mikeash.com: just this guy, you know?

NSBlog
"A failure in the hot air department"
RSS feed (full text feed) - Show Tag Cloud
Showing entries tagged "opengl". Full blog index.

Lesson of the Day at 2006-07-27 00:00
by Mike AshTags: 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.

NSOpenGLContext and one-shot at 2006-02-23 00:00
by Mike AshTags: advice opengl cocoa
If you've done any OpenGL work in Cocoa, you may have noticed that OpenGL surfaces behave badly when it comes to things like miniaturization and deminiaturization to the Dock. This recently caused some big problems for me, and I finally found out how to get rid of these problems altogether. It wasn't excruciatingly hard to find, but I wanted to make a post about it here so that it could be found with words like "deminiaturization".
Hosted at DigitalOcean.