diff options
author | Sven Gothel <[email protected]> | 2011-11-09 00:14:01 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-09 00:14:01 +0100 |
commit | 1055ce051fd7bd3c88724888cf8f46c75535a249 (patch) | |
tree | c93785b2d2eff1363b8eba17398f57534c55c9a5 /make/stub_includes/opengl/macosx-window-system.h | |
parent | 835b88a4ec0a01edf23d2af2cc1d22a7550bdf9b (diff) |
OS X Layered View: Part2 Java/Native MacOSXCGLContext / MacOSXPbufferCGLContext
Undo 368cbf4462d7f3635c1ef4497424c360b5ccc203:
- "use SurfaceUpdateListener() to notify layer", simply use MacOSXCGLContext's swap impl.
MacOSXCGLContext:
- NSOpenGLImpl.create():
- issues createNSOpenGLLayer() using tex-size (maybe POT) as args
- attaches the NSOpenGLLayer to the JAWT layered surface host
- NSOpenGLImpl.setSwapInterval() propagates interval to our NSOpenGLLayer impl.
- NSOpenGLImpl.swapBuffer() (layer case):
- waits for v-sync if enabled (v-sync), or until native 'draw' is finished (tearing)
using our pthread/ NSOpenGLLayer synchronization.
The latter uses CADisplayLink or CVDisplayLinkRef for v-sync synchronization.
- flushes our local ctx
- triggers our NSOpenGLLayer to 'draw'
- MacOSXPbufferCGLContext create() sets the texture size independently of pbuffer size (POT/NPOT)
Diffstat (limited to 'make/stub_includes/opengl/macosx-window-system.h')
-rw-r--r-- | make/stub_includes/opengl/macosx-window-system.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h index 959b44d8d..347de6299 100644 --- a/make/stub_includes/opengl/macosx-window-system.h +++ b/make/stub_includes/opengl/macosx-window-system.h @@ -53,7 +53,9 @@ void setContextPBuffer(NSOpenGLContext* ctx, NSOpenGLPixelBuffer* pBuffer); void setContextTextureImageToPBuffer(NSOpenGLContext* ctx, NSOpenGLPixelBuffer* pBuffer, GLenum colorBuffer); // NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSView* view, Bool opaque); -NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSOpenGLPixelBuffer* pbuffer, Bool opaque, int width, int height); +NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fmt, NSOpenGLPixelBuffer* pbuffer, Bool opaque, int texWidth, int texHeight); +void setNSOpenGLLayerSwapInterval(NSOpenGLLayer* layer, int interval); +void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer* layer, long to_ms); void setNSOpenGLLayerNeedsDisplay(NSOpenGLLayer* glLayer); void releaseNSOpenGLLayer(NSOpenGLLayer *glLayer); |