Login  Register

Depth buffer not working on Win7-64b?

Posted by Martin on Oct 20, 2010; 8:57am
URL: https://forum.jogamp.org/Depth-buffer-not-working-on-Win7-64b-tp1737435.html

Hi folks,

I started using JOGL2 on a Win7, 64b computer. I retrieved a window-i586 release since Win7 is supposed to be able to run 32 bit binaries.
It seems that the depth buffer does not work properly: as shown by this image [1], the center of the gear is rendered before its edge:


 
When I turn around the gears, the gears are always displayed "sorted", meaning the blue is always on top of green, which is on top of red gear, which is consistent with a GL method calls in the sample program (red, green and then blue).I confirm that gl.glEnable(GL2.GL_DEPTH_TEST); is in the code.

I made the same test on a WinXP, 32b computer: it works properly, so Win7 or 64b suspected :) All these problems reminds me a related discussion concerning Jzy3d, using JOGL-1.1.1 [2], where a user does not have the feedback buffer working properly on a Win7, 32b computer.

If you see anything weird in my setting below, please let me know! Thanks in advance!
Martin
-------
[1] http://martin.pernollet.free.fr/jogl/gear-problem.png
[2] http://code.google.com/p/jzy3d/issues/detail?id=10

-------
Gear.java output:

Gears: Init: AWT-GLCanvas[ class javax.media.nativewindow.awt.AWTGraphicsConfiguration[class javax.media.nativewindow.awt.AWTGraphicsScreen[class javax.media.nativewindow.awt.AWTGraphicsDevice[type AWT, awtDevice Win32GraphicsDevice[screen=0], handle 0x0], idx 0],
        chosen    GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
        requested GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
        sun.awt.Win32GraphicsConfig@169e11[dev=Win32GraphicsDevice[screen=0],pixfmt=0],
        encapsulated WindowsWGLGraphicsConfiguration[class javax.media.nativewindow.DefaultGraphicsScreen[class javax.media.nativewindow.windows.WindowsGraphicsDevice[type Windows, handle 0x0], idx 0], pfdID 1, wglChoosen true,
        requested GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
        chosen    GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 8, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: false, Stereo: false, HardwareAccelerated: true, DepthBits: 0, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: true, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]]], com.jogamp.opengl.impl.windows.wgl.WindowsOnscreenWGLDrawable, GLAnimatorControl: com.jogamp.opengl.util.Animator@743399, GLEventListeners num 1 [demos.gears.Gears@eee36c[init true], ]]
Chosen GLCapabilities: GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]
INIT GL IS: com.jogamp.opengl.impl.gl4.GL4bcImpl
GL_VENDOR: Intel
GL_RENDERER: Intel(R) Graphics Media Accelerator HD
GL_VERSION: 2.1.0 - Build 8.15.10.2021
Gears: Reshape: 0/0 284x262
Gears: Dispose

-------
GLInfo.java output:

GLProfile[GL2/GL2] GLInfo.start()
GLProfile[GL2/GL2] GLCapabilities PRE : GLCapabilities[Capabilities[Onscreen: true, Red: 5, Green: 6, Blue: 5, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 16, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]
GLProfile[GL2/GL2] GLWindow : NEWT-GLWindow[
        Helper: GLAnimatorControl: null, GLEventListeners num 0 [],
        Drawable: null,
        Context: null]
Detected screen size 1366x768
GLProfile[GL2/GL2] GL Profile Static: GLAvailability[Native[GL4bc false, GL4 false, GL3bc false, GL3 false, GL2 true[1.5 (compatibility profile, any, old)], GL2ES1 true, GLES1 false, GL2ES2 true, GLES2 false], Profiles[GLProfile[GL2ES2/GL2ES12], GLProfile[GL2ES1/GL2ES12], GLProfile[GL2/GL2], GLProfile[GL2GL3/GL2], , default GLProfile[GL2/GL2]]]
GLProfile[GL2/GL2] GL Profile Static - MaxFixedFunc: GLProfile[GL2/GL2]
GLProfile[GL2/GL2] GL Profile Static - MaxProgrammable: GLProfile[GL2/GL2]
GLProfile[GL2/GL2] GLCapabilities POST: GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 8, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 16, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: true, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]
GLProfile[GL2/GL2] GL Profile: GLProfile[GL2/GL2]
GLProfile[GL2/GL2] GL:com.jogamp.opengl.impl.gl4.GL4bcImpl@15ff48b
GLProfile[GL2/GL2]
GLProfile[GL2/GL2] Context GL Version: 2.1 (compatibility profile, any, old) - 2.1.0 - Build 8.15.10.2021
GLProfile[GL2/GL2]
GLProfile[GL2/GL2] GL_VERSION: 2.1.0 - Build 8.15.10.2021
GLProfile[GL2/GL2] GL_EXTENSIONS:
GLProfile[GL2/GL2]   GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_separate_specular_color GL_ARB_multitexture GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_pixel_buffer_object GL_WIN_swap_hint GL_EXT_framebuffer_object GL_EXT_texture_sRGB GL_ARB_color_buffer_float GL_ARB_half_float_pixel GL_ARB_texture_float GL_NV_conditional_render GL_EXT_texture_swizzle GL_ARB_draw_instanced
GLProfile[GL2/GL2]
GLProfile[GL2/GL2] Platform EXTENSIONS:
GLProfile[GL2/GL2]   WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_extensions_string WGL_EXT_swap_control WGL_ARB_pixel_format_float
GLProfile[GL2/GL2]
GLProfile[GL2/GL2] Availability Tests:
GLProfile[GL2/GL2]   glConvolutionFilter2D: false
GLProfile[GL2/GL2]   Fixed: glBegin: true
GLProfile[GL2/GL2]   ES1  : glClearColorx: false
GLProfile[GL2/GL2]   GLSL : glUseProgram: true
GLProfile[GL2/GL2]   GL_ARB_vertex_array_object: false
GLProfile[GL2/GL2]   GL_ARB_vertex_array_object: glBindVertexArray: false
GLProfile[GL2/GL2]   GL_EXT_gpu_shader4: false
GLProfile[GL2/GL2]   GL_EXT_gpu_shader4: glBindFragDataLocationfalse
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_VERSION_3_0: false, complete: false
GLProfile[GL2/GL2]       glBeginConditionalRender: true
GLProfile[GL2/GL2]       GL_ARB_framebuffer_object: false
GLProfile[GL2/GL2]           glIsRenderbuffer: true
GLProfile[GL2/GL2]       GL_ARB_map_buffer_range: false
GLProfile[GL2/GL2]           glMapBufferRange: false
GLProfile[GL2/GL2]       GL_ARB_vertex_array_object: false
GLProfile[GL2/GL2]           glBindVertexArray: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_VERSION_3_1: false, complete: false
GLProfile[GL2/GL2]       glDrawArraysInstanced: true
GLProfile[GL2/GL2]       GL_ARB_uniform_buffer_object: false
GLProfile[GL2/GL2]           glGetUniformIndices: false
GLProfile[GL2/GL2]       GL_ARB_copy_buffer: false
GLProfile[GL2/GL2]           glCopyBufferSubData: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_VERSION_3_2: false, complete: false
GLProfile[GL2/GL2]       GL_ARB_vertex_array_bgra: false
GLProfile[GL2/GL2]       GL_ARB_draw_elements_base_vertex: false
GLProfile[GL2/GL2]           glDrawElementsBaseVertex: false
GLProfile[GL2/GL2]       GL_ARB_fragment_coord_conventions: false
GLProfile[GL2/GL2]       GL_ARB_provoking_vertex: false
GLProfile[GL2/GL2]           glProvokingVertex: false
GLProfile[GL2/GL2]       GL_ARB_seamless_cube_map: false
GLProfile[GL2/GL2]       GL_ARB_texture_multisample: false
GLProfile[GL2/GL2]           glTexImage2DMultisample: false
GLProfile[GL2/GL2]       GL_ARB_depth_clamp: false
GLProfile[GL2/GL2]       GL_ARB_geometry_shader4: false
GLProfile[GL2/GL2]           glProgramParameteri: false
GLProfile[GL2/GL2]       GL_ARB_sync: false
GLProfile[GL2/GL2]           glFenceSync: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_VERSION_3_3: false, complete: false
GLProfile[GL2/GL2]       GL_ARB_shader_bit_encoding: false
GLProfile[GL2/GL2]       GL_ARB_blend_func_extended: false
GLProfile[GL2/GL2]       GL_ARB_explicit_attrib_location: false
GLProfile[GL2/GL2]       GL_ARB_occlusion_query2: false
GLProfile[GL2/GL2]       GL_ARB_sampler_objects: false
GLProfile[GL2/GL2]       GL_ARB_texture_rgb10_a2ui: false
GLProfile[GL2/GL2]       GL_ARB_texture_swizzle: false
GLProfile[GL2/GL2]       GL_ARB_timer_query: false
GLProfile[GL2/GL2]       GL_ARB_instanced_arrays: false
GLProfile[GL2/GL2]       GL_ARB_vertex_type_2_10_10_10_rev: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_VERSION_4_0: false, complete: false
GLProfile[GL2/GL2]       GL_ARB_texture_query_lod: false
GLProfile[GL2/GL2]       GL_ARB_draw_buffers_blend: false
GLProfile[GL2/GL2]       GL_ARB_draw_indirect: false
GLProfile[GL2/GL2]       GL_ARB_gpu_shader5: false
GLProfile[GL2/GL2]       GL_ARB_gpu_shader_fp64: false
GLProfile[GL2/GL2]       GL_ARB_sample_shading: false
GLProfile[GL2/GL2]       GL_ARB_shader_subroutine: false
GLProfile[GL2/GL2]       GL_ARB_tessellation_shader: false
GLProfile[GL2/GL2]       GL_ARB_texture_buffer_object_rgb32: false
GLProfile[GL2/GL2]       GL_ARB_texture_cube_map_array: false
GLProfile[GL2/GL2]       GL_ARB_texture_gather: false
GLProfile[GL2/GL2]       GL_ARB_transform_feedback2: false
GLProfile[GL2/GL2]       GL_ARB_transform_feedback3: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_AMD_vertex_shader_tessellator: false
GLProfile[GL2/GL2]       glTessellationFactorAMD: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_VERSION_4_1: false, complete: false
GLProfile[GL2/GL2]       GL_ARB_ES2_compatibility: false
GLProfile[GL2/GL2]       GL_ARB_get_program_binary: false
GLProfile[GL2/GL2]       GL_ARB_separate_shader_objects: false
GLProfile[GL2/GL2]       GL_ARB_shader_precision: false
GLProfile[GL2/GL2]       GL_ARB_vertex_attrib_64bit: false
GLProfile[GL2/GL2]       GL_ARB_viewport_array: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GL_AMD_vertex_shader_tessellator: false
GLProfile[GL2/GL2]       glTessellationFactorAMD: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   EGL  : eglCreateContext: false
GLProfile[GL2/GL2]   EGLEx: eglCreateImage: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   GLX  : glXCreateWindow: false
GLProfile[GL2/GL2]   GLX_ARB_create_context: false
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   WGL  : wglCreateContext: true
GLProfile[GL2/GL2]
GLProfile[GL2/GL2]   CGL  : CGLCreateContext: false
GLProfile[GL2/GL2] display: 0
GLProfile[GL2/GL2] display: 1
GLProfile[GL2/GL2] GLInfo.run() 1
GLProfile[GL2/GL2] GLInfo.run() 2
GLProfile[GL2/GL2] display: 2
GLProfile[GL2/GL2] GLInfo.run() 3
GLProfile[GL2/GL2] display: 3
GLProfile[GL2/GL2] dispose
GLProfile[GL2/GL2] GLInfo shut down cleanly.