Jump to content
  • Advertisement
Sign in to follow this  
silverphyre673

binding 2d textures

This topic is 4833 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 want to use glGenTextures and glBindTextures to create some simple textures, but I don't have and don't want to use glaux, which nehe's tutorial (which I am currently working through) uses for this purpose. I normally use LoadImage to load a bitmap for my own little projects (they aren't leaving this computer yet...) so I would like to know how to bind an HBITMAP or something to an object. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
short answer : you cant directly.

longer answer :
You have to give glTexImage*() a pointer to the raw texture data, if you can get that from the HBITMAP then it shouldnt be a problem, however not dealing with HBITMAPs I dont know how todo it off the top of my head.

Share this post


Link to post
Share on other sites
also u might wanna look at another file format instead of bmp as it doesnt handle alpha eg see tga or dds

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!