I have an OpenGL texture.
There is a rectangle on my viewport the same size as the texture.
Is there a way to raster the texture directly to the screen, without pasting it first on some quad?
Thanks!
I have an OpenGL texture.
There is a rectangle on my viewport the same size as the texture.
Is there a way to raster the texture directly to the screen, without pasting it first on some quad?
Thanks!
what you mean by pasting? if you'll do it with glbegin/glvertex/gltexcoord/glend texture will be put directly on 'screen' by gpu.
hope it helps
As Chris Becke said, you can use glDrawPixels to do this, setting the draw position with glWindowPos*()
beforehand.
However, this will be much slower than using a textured quad, as the texture data has to be sent from CPU to GPU with each call. In contrast, Texture Objects are (can be) resident in the GPU memory, and the GPU hardware is heavily optimized for displaying textured tris/quads.