Set color depth in a bitmap
Thread #616603. Printed from Allegro.cc
I was trying to render some lights using a shader written in GLSL. The result is pretty good (See image 1), But there are still some artifacts that look ugly (See image 2, I have increased the contrast).
From what I have read I think that they are formed because the color depth of the bitmap Im drawing to is not enough.
I have tried setting these options before creating the display:
ALLEGRO_COLOR_SIZE, x, ALLEGRO_REQUIRE);
ALLEGRO_RED_SIZE, y, ALLEGRO_REQUIRE );
ALLEGRO_GREEN_SIZE, y, ALLEGRO_REQUIRE );
ALLEGRO_BLUE_SIZE, y, ALLEGRO_REQUIRE );
ALLEGRO_ALPHA_SIZE, y, ALLEGRO_REQUIRE );
Where x = 32 and y = 8 is the only combination a have tried where display was successful created.
How should I do it ?
(I dont know if this is enough information to address the problem, but I suspect it is something trivial that Im unable to resolve )