Sign in to follow this  
kaka28

OpenGL OpenGL texture formats

Recommended Posts

hi all, I want some information regarding texturing 3D model in OpenGL. Till now I have tried only with BMP textures. Do any other formats also support texturing in OPENGL. pls mention. thank you

Share this post


Link to post
Share on other sites
Opengl supports arrays of raw pixel data in a wide variety of formats, including some compressed ones. You will however need a way to read in a file and extract the pixel data. You can either hunt around for a 3rd party library to load the format of your choice or read the format spec for it and write your own.

I would recommed avoiding lossy compression formats like jpeg for 3d textures, you can end up with poor quality due to the compression artifacts. TGA is a popular texture format, and DDS is also an option if you are looking to use compressed textures. Nvidia has some good tools for working with DDS on their developer site.

Pretty much any format with support for 32 bit color will be an option for textures.

Share this post


Link to post
Share on other sites
hi Solias,

thank you very much for your reply. Can you provide me with some sort of code for loading TGA or DDS format images.

pls reply
kaka

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this