tags:

views:

197

answers:

3

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!

A: 

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

fazo
+2  A: 

If you have the bits of the texture you can call glDrawPixels

Chris Becke
+3  A: 

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.

Drew Hall