Jump to content
  • Advertisement
Sign in to follow this  
cockscockscocks

OpenGL How to load an image using Windows API, OpenGL, etc.

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

I've been going back and fourth at this for months and months and no luck.

I want to know how to load a bitmap or ANY image from a file and put it on a window. I've read every tutorial possible and sorry, none I understand enough to actually write the code and get it working myself. I can't afford anything money related, so some step-by-step help would be appreciated, even if minimal.

It's frustrating because I can't do it no matter what I do, where I turn, etc. And it's been months of no hope and you can imagine that kind of frustration.

So if anyone can help in any way to get me able to actually do it, I'd appreciate it more than can imagine.

I can use Windows API somewhat, but not enough to understand exactly how to load an image from a file and blit it. I've done it, but it doesn't work. And I have no idea about OpenGL much at all.

Share this post


Link to post
Share on other sites
Advertisement
First of all, to keep it simple, ry looking at something like TinyImageLoader -> http://code.google.c...inyimageloader/
Its a project of a buddy of mine, it even includes what you are looking for, samples to display images on the screen using opengl.

Get the latest source from SVN and check out the example framework which will load in an image and display it on screen. Check the loading implementations of different filetypes to see how you can load images, the simplest ones, in my opinion, are TGA and BMP.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!