PDA

View Full Version : Transparent Objects?!



TheBlob
11-04-2001, 04:04 AM
Hi! Iīm drawing some transparent Quads. But the problem is that they are not drawn from back to front, but in a random order so some displayerrors appear.
I know you can fix it with enabling some buffer....
What should I do??
Thanks,
Blob

jabe
11-04-2001, 04:23 AM
if you mean with displayerrors:
1. wrong clipping -> disable writing to depth buffer -- (glDepthMask(GL_FALSE) --
2. wrong colors -> sort it from back to front -- e.g. quicksort --

regards,
jan

TheBlob
11-04-2001, 04:59 AM
Well i think itīs wrong colors...but actually itīs very hard to sort them from back to front, because if you change your look and the objects are rotated by opengl, itīs hard to sort them...you know what i mean?

jabe
11-04-2001, 05:36 AM
did you try disabling depthbuffer writes?

nevertheless, i know what you mean. i dont know of a good solution solving this problem. maybe you can transform the midpoint of the faces by yourself, sort them and send the untransformed to opengl. it should work, but what about faces partially covered by another and vice versa?