PDA

View Full Version : Textures invisible on some graphic cards?



apo_pq
01-24-2007, 03:19 AM
I wrote an 3D-data visualising application using Delphi2006 with GLScene wrapping OpenGL. A function z=f(x,y) is displayed and 1D-textured with a color map (bmp, 1024x1) depending on z (analogue to a phys. map). A second texture (same geometry) may or may not superpose the first (alphablending) to add contour lines (iso-height lines). The user may turn around the datacube and change the distance (zoom), maps or projection styles to better inspect it. The application is using strictly no "specialties" from higher OGL-versions and should run from 1.3 on.

Everything works fine on my development computer that is equiped with a NVidia GeForce4 MX 420, supporting OGL-V 1.5.7. Entering the pre-release tests inhouse, I had to observe that this doesn't go for some other computers, especially with ATI cards or laptops (Intel chips)! With those the map(s) seem to be reduced to one (map-individual) single color. Changing the map, the color changes, but all inherent information is simply invisible. If you switch off hardware acceleration, the maps will show, but then all movements are kind of slooooow, of cause. :(

I got a testing system plugged with a RADEON 7000 supporting OGL-V 1.3.1072 WinXP Release where I can reproduce this behaviour but there are more. I checked his features with GLInfo2 and they even exceed those of my dev.-compy in more than one item! But the textures are spoiled...

Any idea how to avoid this? Is this going for plain OpenGL too?

ZbuffeR
01-24-2007, 08:37 AM
Try with GL_NEAREST sampling mode for the 1d map : is there any change (apart from lacking color interpolation) ?

Check you specify the proper texture clamping (or better, wrapping) with glTexParameteri :
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texparameter.html
GL_REPEAT, GL_CLAMP, GL_CLAMP_TO_EDGE GL_CLAMP_TO_BORDER

Beware that Nvidia (in past drivers, maybe still present) had a switch in the display control panel to enable "conformant OpenGL texture clamp behavior" (which means it wasn't conformant by default !!).