blending
Hi I''m using blending to to obtain the intersection of some pyramids - it''s working but from the side and top view the sides of the pyramid appear opaque. I''ve tried back-face culling which gets rid of the problem it does only show the intersection area as opaque but then when you rotate you can''t see the pyramids -
the code is below
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glDepthMask(GL_FALSE);
glBlendFunc(GL_ONE, GL_SRC_COLOR);
glLightfv(GL_LIGHT0, GL_DIFFUSE, BlueLight);
glLightfv(GL_LIGHT0, GL_POSITION, BluePos);
glTranslatef(0.0, 0.0, 0.5);
glRotated(45, 0.0, 0.0, 1.0);
glMaterialfv(GL_FRONT, GL_DIFFUSE, DiffuseRef);
glMaterialfv(GL_FRONT, GL_SPECULAR, SpecularRef);
glMaterialfv(GL_FRONT, GL_SHININESS, ShininessHigh);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, PyramidSurface);
gluCylinder(PyramidVolume, 0.025, (8.5-0.5), (1.4*8.5), 4.0, 1.0);
glDepthMask(GL_TRUE);
glDisable(GL_BLEND);
glEnable(GL_DEPTH_TEST);
-any ideas how I can sort this out? - if i just wanted to see the intersected area - how could do this
thanx
blending is not as good as the stencil buffer but this''ll still only show you where they overlap on the screen. to find the intersection u need some maths.
try www.Magic-Software.com
http://members.xoom.com/myBollux
try www.Magic-Software.com
http://members.xoom.com/myBollux
quote: Original post by zedzeek
blending is not as good as the stencil buffer but this'll still only show you where they overlap on the screen. to find the intersection u need some maths.
try www.Magic-Software.com
http://members.xoom.com/myBollux
got any examples of using the stencil buffer and how do i work out the maths??
cheers
Edited by - ogl on January 22, 2001 9:57:41 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement