opengl -how to import a created image

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…?
Thank You
bindu k

Hi !

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 ( and 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: