|
|
|
|
@ -43,6 +43,7 @@ shaderInitDefault(const char* vertex_code, const char* frag_code)
|
|
|
|
|
|
|
|
|
|
if (!checkShaderErrors(sp->program_id)) { |
|
|
|
|
glDeleteProgram(sp->program_id); |
|
|
|
|
utilSafeFree(sp); |
|
|
|
|
return nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -56,7 +57,6 @@ shaderInitSimple(const char* vertex_code, const char* frag_code)
|
|
|
|
|
GLuint vs_id = 0; |
|
|
|
|
GLuint fs_id = 0; |
|
|
|
|
compileProgram(sp->program_id, vs_id, fs_id, vertex_code, frag_code); |
|
|
|
|
// TODO: add to compile program?
|
|
|
|
|
glGenVertexArrays(1, &sp->vertex_array_id); |
|
|
|
|
glBindVertexArray(sp->vertex_array_id); |
|
|
|
|
|
|
|
|
|
@ -67,6 +67,7 @@ shaderInitSimple(const char* vertex_code, const char* frag_code)
|
|
|
|
|
|
|
|
|
|
if (!checkShaderErrors(sp->program_id)) { |
|
|
|
|
glDeleteProgram(sp->program_id); |
|
|
|
|
utilSafeFree(sp); |
|
|
|
|
return nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|