Volodymyr Voytenko
Volodymyr Voytenko

Reputation: 9

opengl: How to do anti-aliasing for triangle

I'm learning OpenGL using Visual Studio C++. Just wondering how I go about doing anti-alias techniques for when I do glBegin(GL_Triangles)... it doesn't seem like a primitive type, or am I wrong?

Upvotes: 0

Views: 1401

Answers (1)

Paritosh Kulkarni
Paritosh Kulkarni

Reputation: 872

Though its not specific what level of antialiasing you are expecting. If you are using glut you can definitely try following code.

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_MULTISAMPLE);
glEnable(GL_MULTISAMPLE);

This will give you multi sampling anti aliasing. From what code you have given you are not doing anything in programmable mode or modern opengl so I think that should be sufficient to you as you dont have to do anything extra.

Upvotes: 1

Related Questions