Showing a picture??

Started by
3 comments, last by Rob Loach 19 years, 4 months ago
Please let me know if my understanding is correct with this so far? From previous threads I am inferring that all you have to do is to create an image with any image editor, and OGL or DirectX will allow you to display the image. The other question is what code do I use to do this?
Advertisement
If you want to display a picture only, you don't need D3D or OGL.
You can use a (rather) simple library like SDL to load and display images in just a few lines code.
Look at the tutorials on that site to read how this can be done.
You can indeed load an image and display it on screen using either DirectX or OGL (or a number of other options for that matter, including GDI, Allegro, SDL, etc.).

The exact code used would depend on what language you were using, as well as what API/library you were using. If you look for tutorials in whatever language/API combination you'd like to use, you should have no trouble finding some sample code for displaying an image.

- Jason Astle-Adams

DX, OpenGL, and SDL all load different types of images. They all load .bmp images, but if you want to use a different type, be sure to check with the documentation.
I have some tutorials set up in SDL to do just that: Have fun!.
Rob Loach [Website] [Projects] [Contact]

This topic is closed to new replies.

Advertisement