Jump to content
  • Advertisement


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


How to load images correctly

This topic is 6910 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 everyone, I have built a function that reads in a 256 colour pcx file and stores it in an 8bit directdraw surface, which works and works well I have also got the palette working, so that it displays the correct colours. But what I would like to know, if possible, is how to create a directdraw surface which is 8bit when the directdraw mode is a 16bit one, can you create arbitary bit depth surfaces in dx, or do you have to create them with the same bitdepth of the primary? Also, if I can create such a surface, what would be the best and fastest way of copying out this data from the 8bit surface to the 16bit surface, cause I will load up into a 8bit surface, then to a 16bit one (to convert it to 16bit colour depth I mean) this of course will happen before game runtime, so it''s got to be fast, just not realtime, cause all the images are loaded before anything happens, so I can load them up, convert and store, then the games runs using the stored 16bit versions. Does anyone know what I mean and the best way of approaching this problem? Thanks. kosh

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!