Bladeren bron

REVIEWED: `LoadShaderFromMemory()`, use default locations for default shader #4641

pull/4646/head
Ray 2 weken geleden
bovenliggende
commit
c0f2067dba
1 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. +3
    -2
      src/rcore.c

+ 3
- 2
src/rcore.c Bestand weergeven

@ -1326,9 +1326,10 @@ Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode)
shader.id = rlLoadShaderCode(vsCode, fsCode);
o">// After shader loading, we TRY to set default location names
if (shader.id > 0)
k">if (shader.id == rlGetShaderIdDefault()) shader.locs = rlGetShaderLocsDefault();
else if (shader.id > 0)
{
// After custom shader loading, we TRY to set default location names
// Default shader attribute locations have been binded before linking:
// vertex position location = 0
// vertex texcoord location = 1

Laden…
Annuleren
Opslaan