Pārlūkot izejas kodu

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

pull/4646/head
Ray pirms 2 nedēļām
vecāks
revīzija
c0f2067dba
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. +3
    -2
      src/rcore.c

+ 3
- 2
src/rcore.c Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt