Backends: OpenGL3: added additional debug GL_CALL enclosure for glCreateShader() calls. (#8104)

This commit is contained in:
ocornut 2024-10-28 15:52:37 +01:00
parent 81cfe09657
commit 81b689b969

View File

@ -895,13 +895,15 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
// Create shaders // Create shaders
const GLchar* vertex_shader_with_version[2] = { bd->GlslVersionString, vertex_shader }; const GLchar* vertex_shader_with_version[2] = { bd->GlslVersionString, vertex_shader };
GLuint vert_handle = glCreateShader(GL_VERTEX_SHADER); GLuint vert_handle;
GL_CALL(vert_handle = glCreateShader(GL_VERTEX_SHADER));
glShaderSource(vert_handle, 2, vertex_shader_with_version, nullptr); glShaderSource(vert_handle, 2, vertex_shader_with_version, nullptr);
glCompileShader(vert_handle); glCompileShader(vert_handle);
CheckShader(vert_handle, "vertex shader"); CheckShader(vert_handle, "vertex shader");
const GLchar* fragment_shader_with_version[2] = { bd->GlslVersionString, fragment_shader }; const GLchar* fragment_shader_with_version[2] = { bd->GlslVersionString, fragment_shader };
GLuint frag_handle = glCreateShader(GL_FRAGMENT_SHADER); GLuint frag_handle;
GL_CALL(frag_handle = glCreateShader(GL_FRAGMENT_SHADER));
glShaderSource(frag_handle, 2, fragment_shader_with_version, nullptr); glShaderSource(frag_handle, 2, fragment_shader_with_version, nullptr);
glCompileShader(frag_handle); glCompileShader(frag_handle);
CheckShader(frag_handle, "fragment shader"); CheckShader(frag_handle, "fragment shader");