GL_POLYGON_SMOOTH

hi
i did :
glEnable(GL_POLYGON_SMOOTH);
glutSolidCube(1.0);

but i get white lines accross the diagonals of the cube
whats going on here and how do i get rid of it?
thanks

[This message has been edited by jono_123 (edited 10-19-2002).]

[This message has been edited by jono_123 (edited 10-22-2002).]

Try this :

glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);

glEnable(GL_POLYGON_SMOOTH);

// Draw uour cube

nope it still has white lines across the diagonals

For polygon smoothing to work you hae to render polygons in back to front (or front to back, can’t remember) order. glutSolidCube won’t work. You also have to set the appropriate blend mode. There are about 100 threads on this at these forums (at least in the advanced forum), do a search and you will be enlightened.

It’s back to front.

It’s is an effect from double blending at the edges.

V-man

yes this sounds like my problem
how do i get rid of this?

Originally posted by V-man:
[b]It’s is an effect from double blending at the edges.

V-man[/b]

Either write a new method to draw the solid cube, or …

glDisable(GL_POLYGON_SMOOTH);
// draw cube
glEnable(GL_POLYGON_SMOOTH);

Anitox

no see but i want the cube to be smoothed

try the blendmode

glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE);

or on consumer HW you can aim for Fullscreen Antialiasing

I’ve already posted what you need to do to get the cube to render correctly, look at my post above. You can’t use glutSolidCube. What part of this are you confused about?