Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NeOpp

Open gl Window Background Image

This topic is 5938 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 made a window using Win32 and Opengl. I was wondering how to take a 32 bit bitmap file and input it into my window as a background image. The window is fullscreen. I have a resource file with the bitmap in it. Where and how do I put the code into my window''s code...

Share this post


Link to post
Share on other sites
Advertisement
Well this is a very huge question by the way. You need to know how to load bmp files. and that too from memory (well there is no big difference by the way when loading it from disk).

Once you have loaded it as a texture you could set up a ortho projection matrix and put a quad on it textured with you image.

here are the links that could help you

www.gametutorials.com
nehe.gamedev.net

They have it all

do the [winman_thing]

Share this post


Link to post
Share on other sites
Take a look at some texturing tutorials and look up glOrtho in the redbook. Push your projection matrix onto the stack, set up your ortho matrix, select your modelview matrix, draw your textured quad with the bitmap on it, select your projection matrix, pop the projection matrix from the stack, select your modelview matrix, and thats it. See, its a big question to answer fully, and i dont have the time to answer it fully, so ive given you a guide. Get Learnin boy!

Share this post


Link to post
Share on other sites

  • 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!