From 60c63acc298fd33ada43f37962d1d6c32a0359c3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 20 Sep 2012 22:45:19 +0200 Subject: OSX CALayer / MacOSXCGLContext: Remove pbuffer swap garbage; Split pbuffer/FBO revalidation/redraw; Don't sync @ needsDisplay Simplified pbuffer replacement: Simply keep holding the pbuffer reference in native code until receiving newPBuffer @ swap. The newPBuffer will be established @draw method. This allows removing interaction at destroy pbuffer, which caused garbage and crash. Remove pbuffer swap garbage See above. Split pbuffer/FBO revalidation/redraw Don't sync @ needsDisplay - No need to sync @ repaint command setNSOpenGLLayerNeedsDisplay* since we use volatiles and all lifecycle action is done @draw -> faster --- make/stub_includes/opengl/macosx-window-system.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'make/stub_includes') diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h index 828e3c01e..64d3d736b 100644 --- a/make/stub_includes/opengl/macosx-window-system.h +++ b/make/stub_includes/opengl/macosx-window-system.h @@ -57,8 +57,8 @@ Bool isNSOpenGLPixelBuffer(uint64_t object); NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSOpenGLPixelBuffer* p, uint32_t texID, Bool opaque, int texWidth, int texHeight); void setNSOpenGLLayerSwapInterval(NSOpenGLLayer* layer, int interval); void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer* layer, long to_micros); -void flushNSOpenGLLayerPBuffer(NSOpenGLLayer* layer); -void setNSOpenGLLayerNeedsDisplay(NSOpenGLLayer* layer, NSOpenGLPixelBuffer* p, uint32_t texID, int texWidth, int texHeight); +void setNSOpenGLLayerNeedsDisplayFBO(NSOpenGLLayer* layer, uint32_t texID, int texWidth, int texHeight); +void setNSOpenGLLayerNeedsDisplayPBuffer(NSOpenGLLayer* layer, NSOpenGLPixelBuffer* p, int texWidth, int texHeight); void releaseNSOpenGLLayer(NSOpenGLLayer *glLayer); void* getProcAddress(const char *procName); -- cgit v1.2.3