ddraw from 8 to 16 blit faster?

Started by
4 comments, last by Mansion 23 years, 5 months ago
will it go faster if i blit from system memory 8 bit surface to 16 bit primary surface than if i blit from system memory 16 bit to primary surface 16 bit, if i have picture 20x20x16 and i must transfer that this counts like 6400 bits to transfer, but if i use 20x20x8 this is 3200 bits to transfer(but somehow it must transoform to 16 bit) josh!
Advertisement
Not only will it not be faster... it won''t work at all. You can''t create surfaces using varying color depths. Every DirectDraw surface you create in your program must conform to the color depth of the current display mode.

-Ironblayde
 Aeon Software

The following sentence is true.
The preceding sentence is false.
"Your superior intellect is no match for our puny weapons!"
I wanna know how to create & blt a 8bit surface to 16bit primary too. but i got error when i create a 8bit surface in 16bit mode.....

But inside DirectDraw document, it mention i can create a custom surface with different color depth...is it true ?!
you can create custom surface but it must be in system memory, it works..it just doesnt works when i try it to blit to 16 bit surface, can this be done???
Yes, it is possible to create a surface in SYSRAM using different bitdepth than the primarysurface.
Checkout the member of DDSURFACEDESC2, by manipulating that struct, you can set different bitdepths and
RGB masks etc...
Remember to also add DDSD_PIXELFORMAT together with DDSD_CAPS when creating the surface.

Regarding blitting from a 8bpp-surface to a 16bpp-surface...
Dont really know if that is possible at all, havent really tried it out. But, lets say directDraw allows that, it will deffinately not convert your 8bpp indexed colors into 16bit colors.
It will in that case just copy the surfaces bytewise, and you will end up with nothing.

You will actually have to write you own blitter which first convert the colorvalues correctly. But this will certaily not be faster than blitting 16bpp to 16bpp surfaces, due the overhead of all the conversion stuff.

Regards
/Tooon - OTB





Well... I stand corrected.

-Ironblayde
 Aeon Software

The following sentence is true.
The preceding sentence is false.
"Your superior intellect is no match for our puny weapons!"

This topic is closed to new replies.

Advertisement