Toinou
06-13-2001, 10:27 PM
Hi there, I need to show an image in an OpenGL space (I would like to show it like a 2D viewer would do), but the image is not exactly the same as what it is in reality (I mean in a 2D viewing program), although I use glOrtho, and a viewport which has the same dimensions as my image, there is color distorsion...
This is the code I use :
glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 );
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexEnvf ( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
Is it a problem of filter, lighting (I chose the default one), projection, environment???
Anybody to help me?
Thanks a lot,
Antoine Rennuit.
This is the code I use :
glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 );
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexEnvf ( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
Is it a problem of filter, lighting (I chose the default one), projection, environment???
Anybody to help me?
Thanks a lot,
Antoine Rennuit.