# Simply displaying an image

**URL:** <https://discourse.glfw.org/t/simply-displaying-an-image/684>\
**Category:** support\
**Created:** [June 18, 2016, 4:01am UTC](https://discourse.glfw.org/t/simply-displaying-an-image/684 "2016-06-18T04:01:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![boboi](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@boboi](https://discourse.glfw.org/u/boboi)\
**Post date:** [June 18, 2016, 4:01am UTC](https://discourse.glfw.org/t/simply-displaying-an-image/684/1 "2016-06-18T04:01:18Z")

</div>

Hello

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

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [June 18, 2016, 8:25am UTC](https://discourse.glfw.org/t/simply-displaying-an-image/684/2 "2016-06-18T08:25:30Z")

</div>

The [GLFW test sharing.c](https://github.com/glfw/glfw/blob/master/tests/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](http://www.glfw.org/) related questions, and pure OpenGL ones will likely get better/faster answers elsewhere.

---

<div class="post-metadata">

**Author:** ![boboi](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@boboi](https://discourse.glfw.org/u/boboi)\
**Post date:** [June 20, 2016, 2:57am UTC](https://discourse.glfw.org/t/simply-displaying-an-image/684/3 "2016-06-20T02:57:52Z")

</div>

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