FatalError
04-06-2001, 07:57 AM
Hi,
I have a model with a ground and a river.
I want the water texture to be transparent and then to see the rocks in the river.
For that I render the scene first with the opaque textures (the ground) and then I make
glEnable(GL_BEND);
glDisable(GL_DEPTH_TEST);
and I render the triangles with the water texture.
The triangles are send to Opengl from the furthest to the nearest.
I init OPengl with
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
I use a glColor4f(1,1,1,0.5f);
But I can't see trough the water.
Does someone have an idee of the problem ?
Thanks
I have a model with a ground and a river.
I want the water texture to be transparent and then to see the rocks in the river.
For that I render the scene first with the opaque textures (the ground) and then I make
glEnable(GL_BEND);
glDisable(GL_DEPTH_TEST);
and I render the triangles with the water texture.
The triangles are send to Opengl from the furthest to the nearest.
I init OPengl with
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
I use a glColor4f(1,1,1,0.5f);
But I can't see trough the water.
Does someone have an idee of the problem ?
Thanks