Jump to content
  • Advertisement
Sign in to follow this  
riyunoa

OpenGL Loading textures...

This topic is 4866 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

Okay, I imported my OBJ models and all I have to do is stick textures on them. So, how do I import a .bmp image into OpenGL? I heard something about storing textures in video card or whatever.......................

Share this post


Link to post
Share on other sites
Advertisement
All you need is to get pixel data of the image. How you load the image is up to you. You may use some of the glu or aux library methods or write your own. It is fairly easy to write bmp loader. Once you have the pixel data you have to create texture from it i.e. using glTexImage2D or other.

Share this post


Link to post
Share on other sites
Yes, I know how to do the texture mapping part with the texture coords and all... but just how am I going to load the thing?

If I decide to go with AUX, do I have to download the AUX library?

Thank you.

Share this post


Link to post
Share on other sites
nah you mean glAux? It's in just about all OpenGLs, even windows.. but it kinda sucks. Better off use Devil or write your own loaders..

and maybe try TGA instead of BMP it's very easy to read, I can give you some code if you get stuck.

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!