View Full Version : Image not as texture
04-16-2012, 12:33 AM
Guys, does anyone know if I can place several images on top of each other and display them without creating a texture applied to a quad? I just wanna show them without having to create objects and use depth, etc.
I'm trying to use glDrawBuffer (back, front..) and then glReadBuffer (back, front..), but it just shows the first image (last one generated). I'm also using glutSwapBuffers() between the buffers.
04-16-2012, 01:04 AM
You cannot "draw a texture." You can draw triangles that have images applied to the via texture mapping, but you can't just draw an image.
glDrawBuffer (http://www.opengl.org/wiki/GLAPI/glDrawBuffer) does not draw things. glReadBuffer (http://www.opengl.org/wiki/GLAPI/glReadBuffer) does not read things. They simply set what the current buffer your rendering commands draw to/read from.
Guys, does anyone know if I can place several images on top of each other and display them without creating a texture applied to a quad? I just wanna show them without having to create objects and use depth, etc. You can use glDrawPixels to simply display an image on the screen without texture mapping it to a quad. As long as you're not worried about optimizing the speed of your app. this works fine. It's fast enough for all of my applications including one where I play sequences of images as movies. For a self-contained a demo that reads in images and displays them using DrawPixels AND as textured mapped surfaces, go to: http://www.mfwweb.com/OpenGL/Loading_Textures/
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.