Advertisement

bit-depth independant and alpha

Started by February 28, 2000 05:56 AM
2 comments, last by mcfc98 25 years ago
Im writing the front end code for a game that will eventually mix 2d/3d together. At the moment just working on the 2d bit i have to draw 4,8,16(565,555,5551,444),24,32 bit images. To do this i am creating a surface that matches the bit depth of the backbuffer, drawing the image data using gdi into the surface. When it needs to be drawn on the screen i then just use DDraw''s bitlbt for speed. The problem occurs however when i need to use the alpha channel data contained in the 32bit images - is it possible to attatch a seperate alpha surface to another surface and then merge the 2 on drawing? or as an alternative is it possible to draw image data from a different bit depth (ie 32) onto another (i.e 16) in ddraw?
if i am right, bitblt isn''t optimized for speed but for bit depths conversion...
if you want speed use bltfast which is 10% faster than blt in HEL
however bitblt does color conversion, so you can use it to draw 16bit on a 32bit surface. but this is slow and should be avoided from what i heard

hope i am right
ridcully
Advertisement
quote:
Original post by Ridcully

if i am right, bitblt isn''t optimized for speed but for bit depths conversion...
if you want speed use bltfast which is 10% faster than blt in HEL
however bitblt does color conversion, so you can use it to draw 16bit on a 32bit surface. but this is slow and should be avoided from what i heard

hope i am right
ridcully


sorry i said btblt didn''t I?! i use gdi stuf to write to the surface on inititialisation and then use bltfast when drawing the frame.
i take it there is only bltfast and blt then i can use? if so i guess it''ll have to be a textured poly in d3d.

This topic is closed to new replies.

Advertisement