PDA

View Full Version : visible diagonal lines



Mickey_dup1
09-01-2006, 05:52 AM
Hi, Do anyone know what are these diagonal lines on my GL_QUADS?? Could I take out it? thanks
http://img226.imageshack.us/img226/3313/xxxch1.png (http://imageshack.us)

09-01-2006, 06:02 AM
can u post ur code?

Mickey_dup1
09-01-2006, 07:20 AM
hi, this is my init; maybe problem is here:


.....................
glShadeModel(GL_SMOOTH);
glClearColor( 0.0, 0.0, 0.0, 0.0 );
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
glEnable(GL_POLYGON_SMOOTH);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MO DULATE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR);

09-01-2006, 07:44 AM
hi, i dont understand...

Mickey_dup1
09-01-2006, 07:51 AM
mmm what?

09-01-2006, 07:54 AM
:confused:

Trahern
09-01-2006, 08:00 AM
I would try to remove glEnable(GL_POLYGON_SMOOTH); ( I dont think this is hardware accelerated anyway.. antialiasing is achieved by multisampling nowadays )

if it doesnt help then you can try to remove all glHint calls..

Mickey_dup1
09-01-2006, 08:35 AM
Originally posted by Trahern:
I would try to remove glEnable(GL_POLYGON_SMOOTH); ( I dont think this is hardware accelerated anyway.. antialiasing is achieved by multisampling nowadays )

if it doesnt help then you can try to remove all glHint calls.. removing glEnable(GL_POLYGON_SMOOTH) the lines vanish, but image appear aliased.....(the second suggest dosn't help)

Trahern
09-01-2006, 08:47 AM
you should use GL_ARB_multisample extension if you want to antialias your scene

Mickey_dup1
09-01-2006, 09:31 AM
sorry, but that scene is anti-alised; without these instruction, my scene appear jagged.....the problem is what are they....

plasmonster
09-02-2006, 12:27 AM
Have you looked at the redbook example?

http://fly.srk.fer.hr/~unreal/theredbook/chapter07.html

For polygons in particular, use glBlendFunc (GL_SRC_ALPHA_SATURATE, GL_ONE), not glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); otherwise you'll get a fractional bleed from the background (the dark lines).

Hope this helps.