View Full Version : opengl -how to import a created image
11-22-2005, 08:22 PM
I'm new to opengl.
I want to render the surface of the image created by another opengl program..
I don' know how to store and call a 3D image to another program..
Could you please help me in finding a link to sample code that uses an imported image..?
11-22-2005, 09:58 PM
I am not sure what you want to do here, if you want to load an image file from disk and display it in OpenGL, then you need code that can read that specific file format (www.sourceforge.net and www.freshmeat.net (http://www.freshmeat.net) is your friend here), then you can use glDrawPixels to put an image stored in ram (in one of the formats supported by OpenGL)on the framebuffer.
Another alternative if you need more performance is to put the image as texture on a quad or other polygon.
But as I said, I am not sure what you want to do with your image.
Here's a simple tutorial that shows how to load a bitmap image, and bind it as a texture to a 3D object:
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.