aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode/OpenGL_X11_common.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2001-02-14 12:54:54 +0000
committerSven Gothel <[email protected]>2001-02-14 12:54:54 +0000
commit70be669b0db3713117982dbeeadbb91ed670e901 (patch)
treebd39a986a7b840d9ebf3dc0d796032c16cbf8634 /CNativeCode/OpenGL_X11_common.c
parentaaad1aab82e57bc369e26f55a25b24fb77d9fd45 (diff)
rel-2-5-2-0-test3rel-2-5-2-0-test3
Diffstat (limited to 'CNativeCode/OpenGL_X11_common.c')
-rw-r--r--CNativeCode/OpenGL_X11_common.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/CNativeCode/OpenGL_X11_common.c b/CNativeCode/OpenGL_X11_common.c
index cef4290..0c92a65 100644
--- a/CNativeCode/OpenGL_X11_common.c
+++ b/CNativeCode/OpenGL_X11_common.c
@@ -53,7 +53,8 @@
* be associated with the window
*/
int LIBAPIENTRY get_GC( Display *display, Window win, XVisualInfo *visual,
- GLXContext *gc, GLXContext gc_share)
+ GLXContext *gc, GLXContext gc_share,
+ jboolean verbose )
{
int trial = 2;
@@ -78,8 +79,17 @@ int LIBAPIENTRY get_GC( Display *display, Window win, XVisualInfo *visual,
/* associated the context with the X window */
if( glXMakeCurrent( display, win, *gc ) == False) {
glXDestroyContext( display, *gc );
+ if(JNI_TRUE==verbose)
+ {
+ fprintf(stderr, "GL4Java: glXCreateContext trial %p\n", *gc);
+ fprintf(stderr, "GL4Java: glXDestroyContext trial %p\n", *gc);
+ }
continue;
- } else return 0;
+ } else {
+ if(JNI_TRUE==verbose)
+ fprintf(stderr, "GL4Java: glXCreateContext sure %p\n", *gc);
+ return 0;
+ }
}
return -2;
@@ -254,7 +264,7 @@ VisualGC LIBAPIENTRY findVisualGlX( Display *display,
if( *pOwnWin == JNI_TRUE && newWin!=0 &&
(gc_ret=get_GC( display, newWin,
- vgc.visual, &(vgc.gc), shareWith)) == 0
+ vgc.visual, &(vgc.gc), shareWith, verbose)) == 0
)
{
vgc.success=1;
@@ -262,7 +272,7 @@ VisualGC LIBAPIENTRY findVisualGlX( Display *display,
}
else if( vgc.visual!=NULL && *pOwnWin == JNI_FALSE && *pWin!=0 &&
(gc_ret=get_GC( display, *pWin,
- vgc.visual, &(vgc.gc), shareWith)) == 0
+ vgc.visual, &(vgc.gc), shareWith, verbose)) == 0
)
{
vgc.success=1;