So openGL uses 0,0 to 1,1 for texture data
How do I avoid rounding errors if I want pixel perfect mapping? ( from pixel_location / texture_size divisions )
Assigning texture coordinates
not yet Im just thinking bout this ahead of time
Im just guessing that there will be some situations where I will get a pixel off at the borders of each quad
Maybe Im just wrong?
Im just guessing that there will be some situations where I will get a pixel off at the borders of each quad
Maybe Im just wrong?
If that's the case, then the problem is not precision but how you align your texels to the screen. You can always fix the little precision issue there is by rounding; or in filtering terms, use GL_NEAREST. You should look into how you align your texels instead if it becomes a problem.
I've never noticed a problem. You can use GL_CLAMP, or GL_CLAMP_TO_EDGE something like that for glTexParameter. GL_NEAREST will not give you any linear/mipmapped filtering. Unless you have a specific use that you don't need mip mapping.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement