|
|
|
|
@ -143,11 +143,8 @@ getShaderByHash(GLContext* gl_ctx, u64 hash)
|
|
|
|
|
ShaderProgram* |
|
|
|
|
getShaderByName(const char* name, GLContext* gl_ctx) |
|
|
|
|
{ |
|
|
|
|
// FIXME: no reason to use hashes here. should use std::strncmp instead
|
|
|
|
|
u64 hash = utilFNV64a_str(name); |
|
|
|
|
|
|
|
|
|
for (u32 i = 0; i < gl_ctx->num_shaders; i++) { |
|
|
|
|
if (utilFNV64a_str(gl_ctx->shaders[i].name) == hash) |
|
|
|
|
if (utilCStrMatch(name, gl_ctx->shaders[i].name)) |
|
|
|
|
return &gl_ctx->shaders[i]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|