Jump to content
  • Advertisement
Sign in to follow this  
jojygv

How to display a BMP image?

This topic is 4846 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 , Thanks for taking time! The last time I posted a question in this forum, the response I got was awesome. I am hoping the same this time too. Anywaz, what I am trying to do is this: I am trying to create a scene using some BMPs. How do i load BMPs and then display them in particular positions in a scene?? Any help is appreciated! George

Share this post


Link to post
Share on other sites
Advertisement
Which programming language are you using / would you like to use? Have you dowloaded any libraries to help you out? We need a bit more information to be able to help you fully.

Share this post


Link to post
Share on other sites
What programming language are you using? Are you using a graphics library? What operating system are you targeting?

Share this post


Link to post
Share on other sites
A good way to start is some tutorial of cone3d.gamedev.net
I'm sure they'll teach you how to load some BMP's.
However, maybe for a task like this you could use SDL instead of OpenGL. Just a suggestion because I think it'll be much easier with SDL. SDL has a function for it called SDL_LoadBMP() and if you want other image formats you can use the SDL_image sub library so you can also load PNG's and JPG's and much others.
Check out libsdl.org

Hope this helps and good luck!

Greetings,
Rob

Share this post


Link to post
Share on other sites
thanks for the responses. I did try the NeHe example. I had trouble trying to load an image with a different size than that given with the example code. How does image size matter? And what to do about it?

thanks once again
George

Share this post


Link to post
Share on other sites
Also, isnt texture loading for wrapping texture around polygons? What do we do when we just want to display an image as it is?

thx

Share this post


Link to post
Share on other sites
When using an API such as OpenGL that is designed primarily for 3d rendering, displaying graphics 2-dimensionally often means loading them as a texture and then rendering them to a quad that faces directly towards the viewport (such as a billboard). Not being directly familiar with OpenGL myself, I can't say for sure that this is what you'd have to do, but it seems logical. Myself, I'd choose something like SDL (which Toadhead recommended) or Allegro. But that's just a lazy bum of a programmer speaking. :)

Share this post


Link to post
Share on other sites
thanks Dragon. I am a total new comer to the field. I am sure anyone here is better than me. thanks or the advice. I need to look into SDL to see what it can do.

thanks once again.

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!