tags:

views:

178

answers:

1

First of all, whats the purpose of this code?

glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);

I could put there GL_DONT_CARE but it doesnt make my lines drawn, unless i use glDisable(GL_LINE_SMOOTH)

So im asking if theres some built in mechanism to make it draw the lines even if the smooth lines arent supported (So it would draw them without antialising...)

Or do i have to make own functions for it and checking if smooth lines are supported etc... and every time i want to draw smooth lines, i need to call this function that checks whether or not its supported? argh.

Edit: The lines are smooth on my other card, on my other card they dont even show up, unless i disable smooth lines. So that is the problem, not glEnable(GL_BLEND)

+4  A: 

glHint as the name implies is a hint to the driver. It does not necessary achieve anything. The actual functioning of glHint depends on the graphics driver.

Also, to enable LINE_SMOOTHing, you need to have blending enabled. Did you enable GL_BLEND ? And while you're at it, choose your glBlend func too!

Example:

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
Kornel Kisielewicz
i edited my first post now, the lines are rendered fine on other card, but with the card that doesnt support smooth lines, it wont render them at all, unless i disable gl_line_smooth
@Newbie: What's the other card?
Kornel Kisielewicz