PDA

View Full Version : help me out!



03-19-2003, 06:38 PM
i'm using linux platform for the windows bitmap file processing using opengl,as i wish to open the BMP file in linux and then wish to have data of it then process it again to show the bmp .kindly help me out as how to do it as i've seen so many sample progs with WINDOWS platform not for LINUX..i anticipate the reply from you.

cbwan
03-20-2003, 12:18 AM
what exactly is your problem?
writing code for linux?
porting code from windows to linux?
loading a .bmp under linux?

take a look at glaux.h, there is a portable
function to load bmp pictures >

AUX_RGBImageRec *image = auxDIBImageLoad("texture.bmp");

you then have access to its data via image->data. format is RGBRGB or BGRBGR,
can't remember http://www.opengl.org/discussion_boards/ubb/wink.gif

if you want to display the picture you
could use the image as a texture and map it on a quad.

hope this helps!
cb

nexusone
03-20-2003, 05:38 AM
On nehe.gamedev.net He has a linux version of his BMP Texture loading code. it is lesson 6.

The other option that is to use the TGA file format instead of the BMP, it has some advantages and later on in the nehe tutors his goes over using TGA files for textures.

I perfer to use TGA file format myself, and I program on both Microsoft and Linux platforms.


Originally posted by saurabh shrivastava:
i'm using linux platform for the windows bitmap file processing using opengl,as i wish to open the BMP file in linux and then wish to have data of it then process it again to show the bmp .kindly help me out as how to do it as i've seen so many sample progs with WINDOWS platform not for LINUX..i anticipate the reply from you.