Talk:OpenGL Programming/Modern OpenGL Tutorial 05

Note: the scene tends to be jumpy when resizing - I couldn't figure out where that came from.
The solution to this is to update and pass the mpv matrix while resizing. Let's say we had put all the matrix related stuff into a function called

Then to solve the issue,
 * call the  in   (after  )
 * or call it in  (And delete the mvp calculation and passing from  )

Thank you for the great tutorial, regards from Hungary!


 * I recently faced issues with resizing on Android, and found out that we should compute the matrix in onDisplay, not in onIdle, because GLUTs calls onResize between onIdle and onDisplay.
 * In the more recent tutorials I removed onIdle and do everything on onDisplay. Does this fix your issue?

Thanks for the great tutorial from me also, regards from Montréal, Canada!

Something's missing in this part of the tutorial: how does the graphics card know that cube_vertices [] and cube_colors [] are supposed to be related to the cube_elements IBO?

glu::perspective use

It seems that glu::perspective is used a bit incorrectly, I believe it should accept radians not degress, so it should be glm::mat4 projection = glm::perspective(glm::radians(45.0f), 1.0f * screen_width / screen_height, 0.1f, 10.0f);

Does GL_CULL need to be enabled?
I just finished this tutorial and was trying to resolve an issue where my faces appeared to always render in the order defined in the IBO array. That is, the front face would always render first, the right face second, etc. with the bottom then top faces rendering last.

This made it so that at rotation=0, for example, you could see inside the cube as if there was no front face at all.

I ended up solving this by adding "glEnable(GL_CULL_FACE);" to my main function.

I compared my code to that in the GitLab repository and I'm sure there aren't any differences, but could my issue have been a symptom of some more important underlying problem or should I have had GL_CULL_FACE enabled all along? If it's the latter, then I suggest editing the "Enabling Depth" section so no one else has the same issue in the future :)

Thanks!