Enable Dithering...

BlitzMax Forums/BlitzMax Programming/Enable Dithering...

MrCredo(Posted 2006) [#1]
is here a function to enable dithering in blitzmax? how can i do this?


Dreamora(Posted 2006) [#2]
On the DX Side, this should enable it:

primarydevice.GetDevice(_max2ddriver).SetRenderState D3DRS_DITHERENABLE,True


Robert Cummings(Posted 2006) [#3]
shouldn't this be enabled by default in dx? a minor bug perhaps ?


ImaginaryHuman(Posted 2006) [#4]
In OpenGL it is

glEnable(GL_DITHER)

or

glDisable(GL_DITHER)

It only dithers in 16bit or 8bit modes. Ie, if you open a 16-bit screen or if you open a desktop window and your desktop is at 16-bit or 256 colors.

You can still draw everything using 32-bit images, but it will dither down to the output.


MrCredo(Posted 2006) [#5]
support all gfx cards hardware dithering?


Robert Cummings(Posted 2006) [#6]
yes all cards support it - it was in Blitz3D and I moaned back then in beta about having it switched on too :)


Chris C(Posted 2006) [#7]
dithering can actually look worse with "true colour" modes


Robert Cummings(Posted 2006) [#8]
I thought dithering wasn't on in true colour modes? It should not be enabled in 32bit.


ImaginaryHuman(Posted 2006) [#9]
Here I've only seen dithering in 16-bit high/true-color or 8-bit index modes, not 32-bit.

The whole point of dithering is it dithers down from 32-bit to whatever the color depth is, so it wouldn't make sense to apply it to truecolor 32-bit if the screen is 32-bit also.

I've also found that at least on my system a 16-bit screen with dithering is not any faster than a full 32-bit screen.


Dreamora(Posted 2006) [#10]
Todays card work internally on 32bit anyway ... most card that would have a use for dithering are cards that most likely will have performance problems with BMs 3D only rendering as well ...