PDA

View Full Version : Showing Transparencies on TNT and GeFORCE..



PeterParker
09-05-2000, 12:37 AM
Hi there I have a little problem..
At the moment I am working on an Engine, to display solid and trasparent Polys. I know, that transparent Polys have to be rendered after all solid and they have to be sortet. At the moment I am rendering them as they are in my database. So I have to switch on/off the Z-Buffer often with Command
glDepthMask([1|0]);

I can render everything in my Engine on my Riva TNT. On another machine working with GeFORCE or even Softwore Rendering, I have very strange artefacts, that looks like OpenGL is not refreshing the Window in the right way..If I remove this Command, everything is rendered correctly(not transparent, but without artefacts..)
Is it not allowed to use
glDepthMask([1|0]);
more than once ? Why shows my Riva everything Correct?
Please help me..
thanx
Peter

Trouvist
09-05-2000, 03:33 AM
Have you loaded the most recent reference drivers from nvidia? www.nvidia.com (http://www.nvidia.com)

version 6.18 should be installed on both machines in order to have the most consistency between the cards.

PeterParker
09-05-2000, 04:22 AM
thx Trouvist,
I just Downloaded the latest drivers, and now it has the same artefacts, like the GeFORCE.. But why is this? I am just using the glDepthMask(bool) - Command more than twice.. is this not allowed?

09-05-2000, 09:09 AM
Originally posted by PeterParker:
thx Trouvist,
I just Downloaded the latest drivers, and now it has the same artefacts, like the GeFORCE.. But why is this? I am just using the glDepthMask(bool) - Command more than twice.. is this not allowed?

I'm just a beginner, but I think you can try to clear Depth Buffer after changing DepthMask. May be you don't clear it and previous information stays in it and when you use it again it gets on to screen with new stuff that you are outputting?
I'm not sure that's the reason, but trashed buffers can give such problems. That's not from my practice - just theory.

PeterParker
09-07-2000, 06:08 AM
Bingo Mr. Beginer That is it!
If you disable Z-Buffer-Writes with
glDephtMask(GL_FALSE);
the Clear will not influence the Z-Buffer, even if you set the Z-Buffer Bit. This was changed in the actual Riva TNT Driver. In the old one the Z-Buffer was cleared, even if writing to Z-Buffer was disabled..
So before Clearing the Z-Buffer, be sure to enable it with
glDephtMask(GL_TRUE);
So you won't have problems..
Greetings
Peter