aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/jogl
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-20 21:25:05 +0000
committerKenneth Russel <[email protected]>2006-02-20 21:25:05 +0000
commitc15bfa2dce50ae132736dd678192f819d5ba2404 (patch)
tree450b1caf9d393d9d85a87865dcc5a1543eb5fe4c /src/native/jogl
parentf97efeac1030357516f74215c60440e8e4db7a11 (diff)
Changed locking protocol for on-screen surfaces to only use the JAWT's
DrawingSurface locking primitives during the makeCurrent operation. While in theory the JAWT should be used for locking for the entire duration of the makeCurrent/release pair, in practice because OpenGL is orthogonal to the window system this is not really necessary, at least if higher-level locking primitives are used to make sure the window is not torn down out from under the library while OpenGL rendering is being performed. The OpenGL-related work done in GLCanvas.addNotify() and removeNotify() handles this. These changes enable simultaneous multi-head rendering on X11 systems with one OpenGL context per thread. Changed GLContext.destroy() to acquire the context's lock during the destroyImpl operation for correctness in the new protocol. Changed several Mac OS X native code entry points to not take an unnecessary NSView* argument. Tested with several demos on all platforms to stress creation and destruction of multiple kinds of OpenGL contexts. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@624 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native/jogl')
-rw-r--r--src/native/jogl/MacOSXWindowSystemInterface.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m
index 066cbe968..e9d90fcdc 100644
--- a/src/native/jogl/MacOSXWindowSystemInterface.m
+++ b/src/native/jogl/MacOSXWindowSystemInterface.m
@@ -490,7 +490,7 @@ void* createContext(void* shareContext, void* view,
return nsContext;
}
-Bool makeCurrentContext(void* context, void* view) {
+Bool makeCurrentContext(void* context) {
NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -499,14 +499,14 @@ Bool makeCurrentContext(void* context, void* view) {
return true;
}
-Bool clearCurrentContext(void* context, void* view) {
+Bool clearCurrentContext(void* context) {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
[NSOpenGLContext clearCurrentContext];
[pool release];
return true;
}
-Bool deleteContext(void* context, void* view) {
+Bool deleteContext(void* context) {
NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -516,7 +516,7 @@ Bool deleteContext(void* context, void* view) {
return true;
}
-Bool flushBuffer(void* context, void* view) {
+Bool flushBuffer(void* context) {
NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -525,7 +525,7 @@ Bool flushBuffer(void* context, void* view) {
return true;
}
-void updateContext(void* context, void* view) {
+void updateContext(void* context) {
NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];