• Advertisement

Archived

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

So many tutorials on 8-bit gfx but I want 16-bit.

This topic is 6619 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 don't know of any tutorial on 16 bit gfx in particular. The main thing with 16 bit gfx is that you encode the color of each pixel in 16 bits (obviously!). There are two common pixel formats -

RGB565
bit 15.....bit 0
RRRRRGGGGGGBBBBB

RGB555
bit15......bit 0
0RRRRRGGGGGBBBBB

Note that in the former format green gets one extra bit of precision and in the latter one bit is wasted. So when you lock a 16 bit surface, each 16 bit word in memory is arranged like this. You can use the DirectX blitting functions as normal. You don't need to worry at all about DirectX palettes. Color keying in 16 bits is also OK.

Share this post


Link to post
Share on other sites
Advertisement
16 bit graphics are on the whole a lot easier than 8-bit. MSDN has a ton of info. All you really need to worry about is the difference between formats (as stated before, 555 vs. 565 and sometimes the ordering of the components).

- Splat

Share this post


Link to post
Share on other sites
Any good tutorials to cover 16-bit gfx in directX? Anything in MSDN?
Is it possible to set transparent color if you have 16-bit sprites (using directX's own sprite drawing of course).

Share this post


Link to post
Share on other sites

  • Advertisement