GL_LINEAR bug?
Ok, I have this 128x128 texture. When I choose the GL_LINEAR filter, the texture gets this pixel line at the top, which is identical to the pixel line at the bottom, except thinner.
When I choose GL_NEAREST, there isn't any line at all.
http://www.reversecode.com/dl/idevgamez/lava.zip
There are the two builds, one with GL_LINEAR and the other with GL_NEAREST. Why does GL_LINEAR add that 1/2 pixel(image scale) to the top of the image?
When I choose GL_NEAREST, there isn't any line at all.
http://www.reversecode.com/dl/idevgamez/lava.zip
There are the two builds, one with GL_LINEAR and the other with GL_NEAREST. Why does GL_LINEAR add that 1/2 pixel(image scale) to the top of the image?
this happens to me too
Looks like your texture wrap mode is REPEAT. Try CLAMP or CLAMP_TO_EDGE instead.
arekkusu Wrote:Looks like your texture wrap mode is REPEAT. Try CLAMP or CLAMP_TO_EDGE instead.how do I do this?
Read the spec.
you want CLAMP_TO_EDGE(_SGIS). CLAMP doesn't seem to be useful for anything.
I agree with arekkusu -- read the online red book, or search google or something, but...
This is per-texture state, so you must do it once for each texture, with that texture bound.
I agree with arekkusu -- read the online red book, or search google or something, but...
Code:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE_SGIS);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE_SGIS);This is per-texture state, so you must do it once for each texture, with that texture bound.

thanks
