Next article: Hacking C++ From C
Previous article: Getting Answers
Tags: advice opengl
OpenGL contexts have maximum viewport sizes. If you attempt to exceed the maximum size by, say, calling glViewport() with a size greater than that, you'll get incomplete drawing and weird corruption. This is particularly bad if you're using OpenGL as an interface element in a resizable window. To fix it, call glGetIntegerv(GL_MAX_VIEWPORT_DIMS, dims) to get the max viewport size, then limit your window's size to make sure you never exceed it.
This is probably obvious to some people, but I only just discovered it today and fixed a bug that's been in the affected (as-yet-unshipped) app for months.
That is all.
No comments have been posted.
Add your thoughts, post a comment:
Spam and off-topic posts will be deleted without notice. Culprits may be publicly humiliated at my sole discretion.