hi veryone,<br>
<br>
I code in C under DOS using the watcom 11.0 compiler. I have a problem with my current project, a 2d shoot'em'up game. I want to support different modes with different bit depths and I'm using a VBE driver to support these modes. Now, to be able to switch between modes while in-game I handle all graphical data as if it were 32bit and then when it's time to show the data I want to convert it from 32bit to the current bit depth (8, 15, 16 or 32). 32 to 8 is a easy but 32 to 15 is a bit tricky. I want to do these conversions really fast because it is valuable FPS at stake here :)<br>
<br>
If this is a good way of doing it, I'll need a temporary buffer to store the converted data that is going to be displayed, what type should this have? void? Because 32bit data needs the type dword (4 bytes, long or 32bit int) or should I store all data as bytes and store it as r,g,b,r,g,b,r,g,...?<br>
<br>
So, how do I convert 32bit data fast to any other bit depth?<br>
<br>
--- pelle<br>