mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Add OpenGL error check to glfwinfo
This commit is contained in:
parent
cbcadded18
commit
f3f0eaa59e
@ -354,6 +354,7 @@ int main(int argc, char** argv)
|
|||||||
int ch, api, major, minor, revision, profile;
|
int ch, api, major, minor, revision, profile;
|
||||||
GLint redbits, greenbits, bluebits, alphabits, depthbits, stencilbits;
|
GLint redbits, greenbits, bluebits, alphabits, depthbits, stencilbits;
|
||||||
int list_extensions = GLFW_FALSE, list_layers = GLFW_FALSE;
|
int list_extensions = GLFW_FALSE, list_layers = GLFW_FALSE;
|
||||||
|
GLenum error;
|
||||||
GLFWwindow* window;
|
GLFWwindow* window;
|
||||||
|
|
||||||
enum { API, BEHAVIOR, DEBUG, FORWARD, HELP, EXTENSIONS, LAYERS,
|
enum { API, BEHAVIOR, DEBUG, FORWARD, HELP, EXTENSIONS, LAYERS,
|
||||||
@ -609,6 +610,10 @@ int main(int argc, char** argv)
|
|||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
|
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
|
||||||
|
|
||||||
|
error = glGetError();
|
||||||
|
if (error != GL_NO_ERROR)
|
||||||
|
printf("*** OpenGL error after make current: 0x%08x ***\n", error);
|
||||||
|
|
||||||
// Report client API version
|
// Report client API version
|
||||||
|
|
||||||
api = glfwGetWindowAttrib(window, GLFW_CLIENT_API);
|
api = glfwGetWindowAttrib(window, GLFW_CLIENT_API);
|
||||||
|
Loading…
Reference in New Issue
Block a user