Textures - program works on one machine, but not on another.

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

Ralph Martin
Sounds pretty similar to the problem on my Mac with an ATI card.

Should I file an official bug report, or will you?
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

Wade Walker
Administrator
I'm still not quite sure what the bug is. The fact that three of the textures display properly seems to indicate that it's a bug in your program somehow, rather than a bug in JOGL. Why would JOGL draw some textures properly but not others, with the exact same code? Textures are all the same to JOGL, unless maybe they're radically different sizes or pixel formats

I'd suggest writing a simple test program that just textures a single quad with one texture (there's an example at https://github.com/sgothel/jogl/blob/master/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestGrayTextureFromFileAWTBug417.java). Then set that texture path to each of your textures from ToyShader, one after the other. If the same ones still don't work, check their sizes and formats to make sure they're all the same. In any case, it'll be much simpler to isolate the problem (and possibly submit a bug report) with a one-page test than in a full-size project.

Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

ralphrmartin
Finally cracked it. NVidia cards don't mind textures which are sizes other than powers of two, but ATI cards don't like them. Once I rescaled my textures to sizes which were powers of 2, the ATI version worked.

Should the ATI card handle such textures?

It's a newish card: ATI 4870.
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

Wade Walker
Administrator
Traditionally, only texture dimensions that were powers of two were allowed in OpenGL. Then, with the addition of ARB_texture_non_power_of_two (see http://www.opengl.org/registry/specs/ARB/texture_non_power_of_two.txt) that restriction was relaxed.

If you run etc\test.bat from the JOGL 2 installation, it lists the extensions that your card supports. If ARB_texture_non_power_of_two is not in there, then you've found the problem
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

ralphrmartin
But my ATI 4870 card DOES support ARB_Texture_non_power_of_two (according to the OpenGL Extensions Viewer, for Mac). So there is a problem either in JOGL or in Apple's graphics card driver...
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

Wade Walker
Administrator
Check out http://forum.jogamp.org/Texture-Issue-Again-td2646111.html#a2646679 -- it looks like Haroogan has a similar problem with a similar card.

Can you try running etc/test.sh on your Mac to see if you see the extension? This would at least confirm that it's visible to JOGL.
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

ralphrmartin
This also confirms that non power of two textures are supported (although something to do with newt crashed at the end...):


/usr/bin/java
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-330-10M3321)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-330, mixed mode)
LIBXCB_ALLOW_SLOPPY_LOCK:
LIBGL_DRIVERS_PATH:
LIBGL_DEBUG:
java
LD_LIBRARY PATH: ./lib:
DYLD_LIBRARY PATH: ./lib:/usr/local/cuda/lib:

CLASSPATH: jar/gluegen-rt.jar:jar/nativewindow.all.jar:jar/jogl.all.jar:jar/newt.all.jar

-----------------------------------------------------------------------------------------------------
Platform: Mac OS X 10.6.6 (os), x86_64 (arch) 16 cores
Platform: littleEndian true, 32Bit false, a-ptr bit-size 64
Platform: Java 1.6.0_24, Java HotSpot(TM) 64-Bit Server VM, Apple Inc., http://www.apple.com/, is JavaSE: true
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.common
Extension Name: com.jogamp.common
Specification Title: GlueGen Java Bindings Generator
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: GlueGen Run-Time
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b308-20110301
Implementation Branch: master
Implementation Commit: 2557207469fe581cbc9d51861953cdc88f1e9715
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.nativewindow
Extension Name: javax.media.nativewindow
Specification Title: Native Window Interface API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Native Window Interface Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b338-20110301
Implementation Branch: master
Implementation Commit: 65cd7d4be74539f7c6f5350ff38d02b44b5eb240
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: javax.media.opengl
Extension Name: javax.media.opengl
Specification Title: Java Bindings for OpenGL API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: Java Bindings for OpenGL Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b338-20110301
Implementation Branch: master
Implementation Commit: 65cd7d4be74539f7c6f5350ff38d02b44b5eb240
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Package: com.jogamp.newt
Extension Name: com.jogamp.newt
Specification Title: NEWT API Specification
Specification Vendor: JogAmp Community
Specification Version: 2.0
Implementation Title: NEWT Runtime Environment
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.0-b338-20110301
Implementation Branch: master
Implementation Commit: 65cd7d4be74539f7c6f5350ff38d02b44b5eb240
-----------------------------------------------------------------------------------------------------
Detected screen size 2560x1600
createWindow0 - Parent is neither NSWindow nor NSView : 0x0
*************** viewWillDraw: 0x0x1003013e8-----------------------------------------------------------------------------------------------------
MacOSXGraphicsDevice[type MacOSX, connection decon]: 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/GL2], GLProfile[GL2ES1/GL2], GLProfile[GL2/GL2], GLProfile[GL2/GL2], GLProfile[GL2GL3/GL2], , default GLProfile[GL2/GL2]]]
Swap Interval -1
GL Profile    GLProfile[GL2/GL2]
CTX VERSION   2.1 (compatibility profile, any, old) - 2.1 ATI-1.6.26
GL            jogamp.opengl.gl4.GL4bcImpl@c9be79a
GL_VENDOR     ATI Technologies Inc.
GL_VERSION    2.1 ATI-1.6.26
GL_EXTENSIONS
              GL_ARB_transpose_matrix GL_ARB_vertex_program GL_ARB_vertex_blend GL_ARB_window_pos GL_ARB_shader_objects GL_ARB_vertex_shader GL_ARB_shading_language_100 GL_EXT_multi_draw_arrays GL_EXT_clip_volume_hint GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_gpu_program_parameters GL_EXT_geometry_shader4 GL_EXT_transform_feedback GL_APPLE_client_storage GL_APPLE_specular_vector GL_APPLE_transform_hint GL_APPLE_packed_pixels GL_APPLE_fence GL_APPLE_vertex_array_object GL_APPLE_vertex_program_evaluators GL_APPLE_element_array GL_APPLE_flush_render GL_APPLE_aux_depth_stencil GL_NV_texgen_reflection GL_NV_light_max_exponent GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap GL_ARB_imaging GL_ARB_point_parameters GL_ARB_texture_env_crossbar GL_ARB_texture_border_clamp GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_cube_map GL_ARB_texture_env_dot3 GL_ARB_multisample GL_ARB_texture_env_combine GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat GL_ARB_shadow GL_ARB_depth_texture GL_ARB_shadow_ambient GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_occlusion_query GL_ARB_point_sprite GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ARB_pixel_buffer_object GL_ARB_draw_buffers GL_ARB_shader_texture_lod GL_ARB_color_buffer_float GL_ARB_half_float_vertex GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_ARB_framebuffer_object GL_EXT_compiled_vertex_array GL_EXT_draw_buffers2 GL_EXT_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_texture_rectangle GL_ARB_texture_rectangle GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic GL_EXT_separate_specular_color GL_EXT_secondary_color GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_sRGB GL_EXT_blend_equation_separate GL_EXT_texture_mirror_clamp GL_EXT_packed_depth_stencil GL_EXT_bindable_uniform GL_EXT_texture_integer GL_EXT_gpu_shader4 GL_EXT_framebuffer_sRGB GL_EXT_provoking_vertex GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422 GL_APPLE_rgb_422 GL_APPLE_vertex_array_range GL_APPLE_texture_range GL_APPLE_float_pixels GL_ATI_texture_float GL_ARB_texture_float GL_ARB_half_float_pixel GL_APPLE_pixel_buffer GL_APPLE_object_purgeable GL_NV_blend_square GL_NV_fog_distance GL_NV_conditional_render GL_ATI_texture_mirror_once GL_ATI_blend_equation_separate GL_ATI_blend_weighted_minmax GL_ATI_texture_env_combine3 GL_ATI_separate_stencil GL_ATI_texture_compression_3dc GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGI_color_matrix GL_EXT_texture_array GL_EXT_vertex_array_bgra GL_ARB_instanced_arrays GL_ARB_depth_buffer_float GL_EXT_packed_float GL_EXT_texture_shared_exponent
GLX_EXTENSIONS
             
-----------------------------------------------------------------------------------------------------
Invalid memory access of location 0x23 rip=0x7fff80fdb33c

Invalid memory access of location 0x1b rip=0x7fff80fda11c
Reply | Threaded
Open this post in threaded view
|

Re: Textures - program works on one machine, but not on another.

Wade Walker
Administrator
In reply to this post by ralphrmartin
Apple's web site confirms that they support non-power-of-two on your card: http://developer.apple.com/graphicsimaging/opengl/capabilities/
12