colossus47
colossus47

Reputation: 99

Rendering Texture 1 to 1 in OpenGL

So what I am looking to do is to render a texture onto a flat plane, using OpenGL and c++, as a way to show an image.

However I need to ensure that there is nothing done to the texture when it is rendered ie. anti-aliasing, interpolation, smoothing, blurring etc.

Is this the default way OpenGL handles rendering textures? Or do some flags need to be set in order to disable any processing?

Upvotes: 2

Views: 1154

Answers (1)

rotoglup
rotoglup

Reputation: 5238

Pretty much everything is said here : http://www.mindcontrol.org/~hplus/graphics/opengl-pixel-perfect.html.

There's no need to offset anything by 0.5, as long as you projection matrix is a glOrtho equivalent matching the viewport pixel resolution.

You may find interessting a related/similar question : Opengl pixel perfect 2D drawing

Upvotes: 1

Related Questions