Jump to content
  • Advertisement
Sign in to follow this  
kaka28

OpenGL OpenGL texture formats

This topic is 4992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!