PDA

View Full Version : visualization problem



arthas
03-17-2008, 07:11 AM
Hi! I wrote a program for radiography simulation,It uses 3d textures and glBlendEquation(GL_FUNC_ADD);. The program works and display the correct result except the fact that the displayed image seems "cutted" in 4 squares and in the right one, i don't see nothing.. I've posted the picture, the correct image is a cross (so I should see the right part..) anyone has an idea why I don't see the complete picture?

http://img512.imageshack.us/img512/2310/immaginetl4.th.jpg (http://img512.imageshack.us/my.php?image=immaginetl4.jpg)

Relic
03-17-2008, 07:51 AM
Are the white areas rendered from the 3D texture as well?
If not, to determine if you rendered white on white on the right side, set the glClearColor to something fancy. I normally use magenta for debugging.
Other then that, it could be anything, like uninitialized depth buffer, depth test on and not rendered back to front, blending saturated to white, etc.
Post the code which renders that image and you might get a more precise answer.

arthas
03-17-2008, 08:14 AM
the cross right side should be = to the left; if I try to change volume, it's always the same, the right is white or partially visible:

here the wrong picture(gpu)
http://img525.imageshack.us/img525/4879/wrongmg6.th.jpg (http://img525.imageshack.us/my.php?image=wrongmg6.jpg)

here the right picture( the "equivalent" of my opengl program but on cpu..no 3d texture)
http://img249.imageshack.us/img249/6019/rightzr3.th.jpg (http://img249.imageshack.us/my.php?image=rightzr3.jpg)

the code is long and mixed with other classes, if you tell me what do u want to see I can post the part

Relic
03-17-2008, 08:59 AM
Explain what you're actually doing, e.g. how that image above is rendered and then provide the OpenGL calls that really render that image.
It would be best to trace that to get the parameters.
Search for GLintercept for a nice tool to do that.

arthas
03-18-2008, 01:32 AM
SOLVED! the problem was the order of the vertex mapping.. to assure the right rendering, they must be declared in anticlockwise order.. so: 0,0; 1,0; 1,1; 0,1.