Navigation Menu

Skip to content

Commit

Permalink
Fix OpenGL bad access error on display link thread
Browse files Browse the repository at this point in the history
  • Loading branch information
codeincontext committed Jul 1, 2011
1 parent feda5d7 commit 1e64dcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MacLight/OpenGLScreenReader.m
Expand Up @@ -81,7 +81,9 @@ - (NSColor *)readFullScreenToBuffer
// Use this routine if you want to read only a portion of the screen pixels
- (NSColor *)readPartialScreenToBuffer: (size_t) width bufferHeight:(size_t) height bufferBaseAddress: (void *)baseAddress
{

// Set our context as the current OpenGL context
[mGLContext makeCurrentContext];

// select front buffer as our source for pixel data
glReadBuffer(GL_FRONT);

Expand Down

0 comments on commit 1e64dcd

Please sign in to comment.