Skip to content

Instantly share code, notes, and snippets.

@cyco
Created June 24, 2014 04:49
Show Gist options
  • Save cyco/5238e18be048d421c907 to your computer and use it in GitHub Desktop.
Save cyco/5238e18be048d421c907 to your computer and use it in GitHub Desktop.
NSTimeInterval tempQuickSaveTime = _lastQuickSave;
_lastQuickSave = [NSDate timeIntervalSinceReferenceDate];
[self render];
CGLLockContext(cgl_ctx);
{
glReadPixels((frameSize.width - textureNSSize.width) / 2,
(frameSize.height - textureNSSize.height) / 2,
textureIntSize.width, textureIntSize.height,
GL_RGB, GL_UNSIGNED_BYTE, [imageRep bitmapData]);
}
CGLUnlockContext(cgl_ctx);
_lastQuickSave = tempQuickSaveTime;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment