Parcourir la source

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

pull/4646/head
Ray il y a 2 semaines
Parent
révision
c0f2067dba
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. +3
    -2
      src/rcore.c

+ 3
- 2
src/rcore.c Voir le fichier

@ -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

Chargement…
Annuler
Enregistrer