mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-05 17:36:26 +00:00
REVIEWED: LoadShaderFromMemory()
, use default locations for default shader #4641
This commit is contained in:
@@ -1326,9 +1326,10 @@ Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode)
|
|||||||
|
|
||||||
shader.id = rlLoadShaderCode(vsCode, fsCode);
|
shader.id = rlLoadShaderCode(vsCode, fsCode);
|
||||||
|
|
||||||
// After shader loading, we TRY to set default location names
|
if (shader.id == rlGetShaderIdDefault()) shader.locs = rlGetShaderLocsDefault();
|
||||||
if (shader.id > 0)
|
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:
|
// Default shader attribute locations have been binded before linking:
|
||||||
// vertex position location = 0
|
// vertex position location = 0
|
||||||
// vertex texcoord location = 1
|
// vertex texcoord location = 1
|
||||||
|
Reference in New Issue
Block a user