animesh wrote:
> Hi,
>   My code is not working, it always crashes at the SetColorIndex giving 
> the following message
> 
> (#) DirectFBError [primary->SetColorIndex(primary, 0)]: Not supported!
> 
> Can anyone provide me with an working code or suggest any modification 
> in present code, so that SetColorIndex, can work.
> 
> Basicaly i am trying to do this.
> 1) Create on surface with Palette support.
> 2) Set the palette to the surface.
> 3) Then access a particular color in the Palette uing setcolorindex.
> 4) Draw a rectangle using that color.
> 
> Can anyone suggest where i am getting wrong.

Your code looks fine. Can you add a primary->GetPixelFormat() and report back?

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to