MCPcopy Create free account
hub / github.com/RenderKit/embree / CheckProgram

Function CheckProgram

tutorials/common/imgui/backends/imgui_impl_opengl3.cpp:673–689  ·  view source on GitHub ↗

If you get an error please report on GitHub. You may try different GL context version or GLSL version.

Source from the content-addressed store, hash-verified

671
672// If you get an error please report on GitHub. You may try different GL context version or GLSL version.
673static bool CheckProgram(GLuint handle, const char* desc)
674{
675 ImGui_ImplOpenGL3_Data* bd = ImGui_ImplOpenGL3_GetBackendData();
676 GLint status = 0, log_length = 0;
677 glGetProgramiv(handle, GL_LINK_STATUS, &status);
678 glGetProgramiv(handle, GL_INFO_LOG_LENGTH, &log_length);
679 if ((GLboolean)status == GL_FALSE)
680 fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link %s! With GLSL %s\n", desc, bd->GlslVersionString);
681 if (log_length > 1)
682 {
683 ImVector<char> buf;
684 buf.resize((int)(log_length + 1));
685 glGetProgramInfoLog(handle, log_length, nullptr, (GLchar*)buf.begin());
686 fprintf(stderr, "%s\n", buf.begin());
687 }
688 return (GLboolean)status == GL_TRUE;
689}
690
691bool ImGui_ImplOpenGL3_CreateDeviceObjects()
692{

Callers 1

Calls 3

resizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected