瀏覽代碼

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

pull/4646/head
Ray 2 週之前
父節點
當前提交
c0f2067dba
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      src/rcore.c

+ 3
- 2
src/rcore.c 查看文件

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

Loading…
取消
儲存