White Screen for Gears-Demo on new NVidia-Drivers

Hello there

I just get a white Screen for every JOGL-Program I try, even the Demos.

The Error is the same for all Programs I try:

On the first start, my resolution is changed and I see only the left half of my Desktop, streched to the double size.

The mouse behaves like it is in the original resolution, so I can’t click on button I am pointing to, but instead clicking anything, that is at the double x-coord.

The opened window remains white, but it does not seem to hang, since it responses to key-input.

On the second start, the Desktop does not resize, but it gets blury. Despite of that, it’s the same: White screen.

I ran the Gears-Demo with the original jars and the jars from http://www.geocities.com/groundskeeperwiley. Same problem. Heres the debug-output:

Gears-Demo with original jogl.jar:


CANVAS GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
CANVAS GLU IS: net.java.games.jogl.impl.GLUImpl
INIT GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce FX 5900XT/AGP/SSE/3DNOW!
GL_VERSION: 1.5.1

glLoadTransposeMatrixfARB() supported: true

Gears-Demo with modified jogl.jar:


CANVAS GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
CANVAS GLU IS: net.java.games.jogl.impl.GLUImpl
GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_sha
der_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_v
ertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array
GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_E
XT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_shared_texture_palette GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_te
xture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_HP_occlusion_test GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_co
py_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_sten
cil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL
_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL
_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control
WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_render_texture WGL_EXT_extensions_string WGL_EXT_swap_control WGL_NV_float_buffer WGL_NV_render_depth_tex
ture WGL_NV_render_texture_rectangle
null
Current thread: Thread[Thread-2,5,main]
DummyGL is not null
DC: -486472171
RC: 65536
WGLC Current
wglChoosePixelFormatARB: 1768070400
wglGetPixelFormatAttribivARB: 1768070304
haveWGLChoosePixelFormatARB is true
wglChoosePixelFormat
Current DC: -486472171
Current RC: 65536
Current Thread: Thread[Thread-2,5,main]
wglChoosePixelFormatARB == true
INIT GL IS: net.java.games.jogl.impl.windows.WindowsGLImpl
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce FX 5900XT/AGP/SSE/3DNOW!
GL_VERSION: 1.5.1

glLoadTransposeMatrixfARB() supported: true
Exception in thread "Thread-2" net.java.games.jogl.GLException: Error swapping buffers
    at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
    at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:292)
    at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
    at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
    at net.java.games.jogl.Animator$1.run(Animator.java:107)
    at java.lang.Thread.run(Thread.java:595)
Exception in thread "AWT-EventQueue-0" net.java.games.jogl.GLException: Error swapping buffers
    at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
    at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:292)
    at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:208)
    at net.java.games.jogl.GLCanvas.display(GLCanvas.java:75)
    at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:82)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
    at sun.awt.RepaintArea.paint(RepaintArea.java:224)


I am running this on a Desktop-PC:

[]Athlon XP 2600+
[
]GeForce FX 5900 XT
[]ForceWare 61.76 (from July 20)
[
]Microsoft Windows XP
[*]Java 1.5b2 (1.4.X did not work either)

The dumps are with -DATI_WORKAROUND=false, but the error stays the same with this flag set or unset…

Also -Dsun.java2d.noddraw=true doesn’t help…

Any help/ideas are aprechiated

c-ya cylab

I would like to look into the problem myself, but I can’t get the (native) sources to build with my cygwin-based mingw. I get the following error:


c.compile.jogl:
    [apply] In file included from c:/jdk1.5.0/include/jni.h:27,
    [apply]                  from src/native/jogl/BufferUtils.c:40:
    [apply] c:/jdk1.5.0/include/win32/jni_md.h:16: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/win32/jni_md.h:16: warning: data definition has no type or storage class
    [apply] In file included from src/native/jogl/BufferUtils.c:40:
    [apply] c:/jdk1.5.0/include/jni.h:108: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/jni.h:108: warning: no semicolon at end of struct or union
    [apply] c:/jdk1.5.0/include/jni.h:112: error: syntax error before '}' token
    [apply] c:/jdk1.5.0/include/jni.h:112: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:255: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:270: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:277: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:284: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:291: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:298: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:305: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:307: warning: no semicolon at end of struct or union
    [apply] c:/jdk1.5.0/include/jni.h:309: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:310: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:310: error: `jlong' redeclared as different kind of symbol
    [apply] c:/jdk1.5.0/include/win32/jni_md.h:16: error: previous declaration of `jlong'
    [apply] c:/jdk1.5.0/include/jni.h:310: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:311: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:312: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:312: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:312: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:319: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:326: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:333: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:342: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:351: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:360: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:369: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:378: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:387: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:389: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:390: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:390: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:391: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:393: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:393: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:394: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:396: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:396: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:396: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:405: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:414: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:423: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:440: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:441: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:441: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:460: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/jni.h:474: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:481: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:488: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:495: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:502: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:509: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:511: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:512: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:512: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:513: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:514: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:514: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:515: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:516: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:516: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:516: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:523: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:530: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:537: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:553: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:554: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:554: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:573: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/jni.h:635: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:636: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:653: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/jni.h:670: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/jni.h:687: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:731: error: syntax error before "jlong"
    [apply] c:/jdk1.5.0/include/jni.h:734: error: syntax error before '*' token
    [apply] c:/jdk1.5.0/include/jni.h:735: error: `jlong' declared as function returning a function
    [apply] c:/jdk1.5.0/include/jni.h:735: warning: data definition has no type or storage class
    [apply] c:/jdk1.5.0/include/jni.h:736: error: syntax error before '}' token
    [apply] src/native/jogl/BufferUtils.c: In function `Java_net_java_games_jogl_util_BufferUtils_bufferOffset0':
    [apply] src/native/jogl/BufferUtils.c:53: error: dereferencing pointer to incomplete type

BUILD FAILED
file:C:/development/thirdParty/gamedev/jogl-1.1.0-b04-src/jogl/make/build.xml:791: apply returned: 1

I use the following gcc-version:


$ gcc --version
gcc (GCC) 3.3.1 (cygming special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and have a java 1.5 installation:


$ java -version
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)

Has onyone successfully compiled jogl in this constallation? Are there some flags I could make use of? Anything other that might help?

thanks
cylab

I don’t know what the problem could be but I’ve just tested the 61.76 drivers on the dual Pentium III 667 MHz in my office (GeForce FX 5800 Ultra) with a few of the JOGL demos and they work fine. The first time I fired up the Gears demo I did see a brief hang where the window stayed white, but then rendering started as usual. I didn’t see any strange desktop resizing issues.

Regarding building with the mingw compilers, I know they worked at one point but I haven’t tested them in a while. The compiler is complaining about the typedef of jlong to __int64 because it doesn’t know about the __int64 data type, which is a Microsoft construct. I think there may be a command-line switch you can pass to gcc to get it to recognize that data type; check the documentation. You’d need to modify JOGL’s build.xml in this case to add the extra command line argument.

I got the compile-problem fixed by changing line 312 of “/make/build.xml” from

<property name="c.compiler.flags" value="${c.compiler.optflags} -c -DBUILD_DLL -D_WINGDI_ -D_STRICT_ANSI -D_JNI_IMPLEMENTATION_  -o" />

to

<property name="c.compiler.flags" value="${c.compiler.optflags} -c -DBUILD_DLL -D_WINGDI_ -D_STRICT_ANSI -D_JNI_IMPLEMENTATION_ -D__int64='long long' -D_MSC_VER=1400 -o" />

notice the -D_MSC_VER flag. I had to “pretend” using a higher version of VC or I got the following error:

c.compile.jogl:
    [apply] build/gensrc/native/jogl/GLUImpl_JNI.c:16: error: conflicting types for `intptr_t'
    [apply] /usr/include/stdint.h:60: error: previous declaration of `intptr_t'

which is cause by

#if _MSC_VER <= 1200
typedef int intptr_t;
#endif

obviously changing the #if would be the better solution, but since it occoured in “build/gensrc”, it have to be changed somewhere in the generator!?

I did not however succeed in building jogl :slight_smile: Now I’ve got linking-errors:

c.link.jogl:
     [exec] C:\development\thirdParty\gamedev\jogl-1.1.0-b04-src\jogl\build\obj\jogl\WindowsGLImpl_JNI.o(.text+0x264):WindowsGLImpl_JNI.c: undefined reference to `_glAccum'
     [exec] C:\development\thirdParty\gamedev\jogl-1.1.0-b04-src\jogl\build\obj\jogl\WindowsGLImpl_JNI.o(.text+0x614):WindowsGLImpl_JNI.c: undefined reference to `_glAlphaFunc'
     [exec] C:\development\thirdParty\gamedev\jogl-1.1.0-b04-src\jogl\build\obj\jogl\WindowsGLImpl_JNI.o(.text+0x901):WindowsGLImpl_JNI.c: undefined reference to `_glAreTexturesResident'
     [exec] C:\development\thirdParty\gamedev\jogl-1.1.0-b04-src\jogl\build\obj\jogl\WindowsGLImpl_JNI.o(.text+0x9d4):WindowsGLImpl_JNI.c: undefined reference to `_glAreTexturesResident'
     [exec] C:\development\thirdParty\gamedev\jogl-1.1.0-b04-src\jogl\build\obj\jogl\WindowsGLImpl_JNI.o(.text+0xbfd):WindowsGLImpl_JNI.c: undefined reference to `_glArrayElement'
     [exec] C:\development\thirdParty\gamedev\jogl-1.1.0-b04-src\jogl\build\obj\jogl\WindowsGLImpl_JNI.o(.text+0xddd):WindowsGLImpl_JNI.c: undefined reference to `_glBegin'
     ... [i][b]and so on[/b][/i]

something seems to be broken in my library-setup, so I have to investigate further.

If someone raises a hand and suggests what to do, I would be happy :wink:

cya
cylab

Thanks for tracking down the C compiler flags issue. I’ve checked in your changes to the main source tree (with appropriate attribution).

Given that you are using pure mingw you probably don’t have the opengl32.lib import library which is why you’re having link errors. See http://www.mingw.org/mingwfaq.shtml#faq-msvcdll for information on this. There is also an article on Microsoft’s web site: http://support.microsoft.com/default.aspx?scid=kb;en-us;q131313 (found by Googling for “creating import library from dll”). You might be better off having someone email you opengl32.lib and gdi32.lib.