Quellcode durchsuchen

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

pull/4646/head
Ray vor 2 Wochen
Ursprung
Commit
c0f2067dba
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. +3
    -2
      src/rcore.c

+ 3
- 2
src/rcore.c Datei anzeigen

@ -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…
Abbrechen
Speichern