OpenGL: exact textures possible?

This is for a 2D game with OpenGL:

Can OpenGL be used to display textures that are completely unfiltered, not stretched, or blurred?

So, when I have BMP and convert it to an OpenGL texture, and then extract that texture and convert it back, do I have any changes or loss of quality / data?

+3
source share
2 answers

Of course, just turn off the filtering that was done by setting GL_MIN_FILTER and GL_MAG_FILTER to GL_NEAREST. Also make sure that you draw the texture in the appropriate size so that the texels are the same size as the pixels.

+7
source

, GL_MIN_FILTER GL_MAG_FITLER GL_NEAREST ( glTexParameter*).

, , : , -. - GL_TEXTURE_RECTANGLE GL_TEXTURE_2D. (0..1.0..1), , (0..w, 0..h). .

+3

Source: https://habr.com/ru/post/1769305/


All Articles