View Full Version : displaying .bmp files
06-01-2000, 05:55 AM
I am trying to write a simple program that displays .bmp images in a window. Does anyone have any or know where I could find any sample code for an application like this?
06-01-2000, 06:01 AM
By the way, I have been trying to use the glDrawPixels command. Is this the best command to use for what I am trying to do?
06-01-2000, 10:43 AM
only use glDrawPixels if you don't care about speed. Otherwise you should draw a textured quad.
06-01-2000, 02:29 PM
Hi jgrashow - if you're writing the app for OpenGL try using the glaux library. The function auxDIBImageLoad loads a BMP up for you. You can then use the data it returns to create a GL texture. Go see http://nehe.gamedev.net/opengl.asp and take a look at the texture mapping demo - Lots of good GL code examples here.
06-01-2000, 08:47 PM
I wouldn't recommend using the aux libraries, they are obolete and buggy.
06-02-2000, 10:58 AM
The best texture lib I've found is glPNG http://www.wyatt100.freeserve.co.uk/download.htm
It will do the dirty work for you, but it'll also just load a file and give you the raw data if you want. And .png is a VERY flexible format...
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.