Hello, here are 3 problems I just can’t solve :
When using glut, how do you specify that you want a 32-bit depth-buffer ? (I automatically get a 24-bit buffer)
If the alpha channel is ignored, if GLUT_RGBA = GLUT_RGB, what use is it to specify the 4th component of colors ? Is it always ignored ?
I just can’t get polygon antialiasing. I’ve tried glEnable (GL_POLYGON&LINE&POINT_SMOOTH);
I’ve tried enabling blending. But it does not work !
If you have some idea about any of these 3 problems… please help !
As DFrey has already answered 1), I just have the last two to play with :
If you are in RGB mode, there is no use in specifying a 4th component (alpha) with glColor… However, you can use the alpha channel of a texture to do some blending or multitexture effects (even if you color buffer does not have an alpha channel !).
If you want to enable polygon antialiasing:
Note that the hint you give in glHint can be ignored: some vendors will simply ignore this and won’t antialias your polygons…
What hardware are you using ?
Wow I’ve just become a “frequent contributor” !
OK thank you VERY MUCH, DFrey and Eric ! You solved my 3 problems. And for question 3, it was indeed the glHint who missed. Now it works, but it has created another problem : I have a white sky, and polygon antialiasing now produces a white grid on my teapots (exactly as if I had redrawn them in GL_WIRE mode). I guess that the antialiasing algorithm blends the polygon’s color with the background color… However such a grid is not convenient. How could I suppress it ?
[This message has been edited by Morglum (edited 07-30-2001).]
Your need to play with the blending function, GL_SRC_ALPHA_MINUS_DST_COLOR i think.
but personally on my card ive found polygon/line smooth to not give very good results. the only decent looking one is point_smooth
thanks, I’m just trying every possible combination of parameters for glBlendFunc. On my card, polygon antialiasing looks very good, but it is very slow.