Hi, i’m completely new in openGL programming. I’m working in a project with 2D images in BMP format under Linux, i need to open a BMP file and display it. If someone has a sample code of how to do this please send me a mail.
Thanks.
Hi, i’m completely new in openGL programming. I’m working in a project with 2D images in BMP format under Linux, i need to open a BMP file and display it. If someone has a sample code of how to do this please send me a mail.
Thanks.
Don’t use TGA - use PNG
Sample code can be found @ www.google.com
DDS has the benefit of allowing you to store cubemaps and mipmaps in a single file. Plus the compression method used is directly accepted by the hardware so you won’t have to decompress it on the CPU, just send it straight to the GPU.
header: http://cvs1.nvidia.com/OpenGL/include/shared/nv_dds.h
source: http://cvs1.nvidia.com/OpenGL/src/shared/nv_dds.cpp
There should be some code to load a bitmap in the tutorials at http://nehe.gamedev.net/ Try downloading the tutorial on texture mapping. From memory there’s a function to load a bitmap in there somewhere.
Also if you don’t mind getting your hands dirty you could always code such a function yourself
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.