Simply displaying an image


I am new to OpenGL. I am given a task to show an image in full screen using OpenGL (OS X, C++). The only thing this program will ever do is to show static images in full screen; no graphics, motion, 3D, mapping, computation, or any other stuff OpenGL is actually made for. The reason to do this in OpenGL is performance.

Now, I am spending third day in a row going through any web resources I can find, and finding myself learning things about OpenGL programming that are a total overkill for the task at hand, and which I will probably never use. What I can’t find is a straightforward sample code that does this simple thing.

So I am asking for your help - if you could direct me to a piece of code that does just this: take image data from memory and show it on full screen using OpenGL - I will be enormously grateful…

Thanks a lot in advance

The GLFW test sharing.c does what you want, except it also opens two windows. If you remove all the calls related to windows[1] and only keep the first draw_quad(texture) call then you should be able to achieve what you want with this code.

Please note though that this forum is for GLFW related questions, and pure OpenGL ones will likely get better/faster answers elsewhere.

Thanks a lot, I’ll check the “sharing” code