View Full Version : how to display image on opengl window
11-18-2010, 07:43 AM
i am new to opengl.
i wrote a program(image processing) using c language and want to display the output(image output) onto opengl window.
could anybody help me to solve this task?
11-18-2010, 11:27 AM
I don't really know about image processing, but if you can know each pixel of an image, then you can draw it into a texture, or by drawing pixels directly.
Textures could have the advantage that they can fit whatever size the object you'll draw them onto (and can use filter to look good even if the size is very different from the orginal image). Textures are also stored into graphic memory.
I've never used drawing pixel directly with OpenGL. From what I know, they will be good enough for you if you don't need to change the size (show the image with the exact size, in pixels).
... want to display the output(image output) onto opengl window. The most basic way to do this is to use glDrawPixels. I put an example of loading/displaying images & textures at:
OpenGL Images & Textures (http://www.mfwweb.com/OpenGL/Loading_Textures/)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.