How to determine actual frame buffer attributes?

combolek wrote on Saturday, June 15, 2013:

I know I can use glfwWindowHint() to specify minimum frame buffer attributes e.g.

glfwWindowHint(GLFW_RED_BITS, 4);

But how to determine what I actually got once the window is created? Basically I am looking for an equivalent to glutGet(GLUT_WINDOW_RED_SIZE). I tried glfwGetWindowAttrib(window, GLFW_RED_BITS) but it fails with an error.



elmindreda wrote on Sunday, June 16, 2013:

Use glGet.

combolek wrote on Sunday, June 16, 2013:

Ah, of course, this works.