Ok i got it .. i copied it to $HOME/.directfbrc and working fine .. but

why graphics and video layer commented ???

# Graphics Layer
#init-layer        = 0
#layer-size        = 720x576
#layer-format      = RGB16
#layer-stacking    = middle,upper
#layer-bg-color    = 000000
#layer-src-key     = 000000
#layer-buffer-mode = backvideo

#
# Video Layer
#init-layer        = 1
#layer-size        = 720x576
#layer-format      = UYVY
#layer-stacking    = lower
#layer-bg-color    = 0000ff
#layer-buffer-mode = frontonly
#layer-bg-image    = /usr/local/share/images/bg_flower.jpg

Even with these lines commented, my code works fine and "fast" .. but if i
un comment Graphics layer lines my code works bit slow ,,,, :-o ???


My code does following things
1] creating primary surface DFBCHECK (dfb->CreateSurface( dfb, &dsc,
&primary ));

2]crate a layer  DFBCHECK(dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer
));

3]create a window with this layer and a window surface and render a
transparent logo
    DFBCHECK(layer->CreateWindow( layer, &desc, &window1 ) );
   window1->GetSurface( window1, &window_surface1 );
   provider->RenderTo( provider, window_surface1, NULL );

4]create another two surface "tux" and "tux2" and render different images to
each layer

   DFBCHECK (dfb->CreateImageProvider (dfb, DATADIR"/tux.png", &provider));
   DFBCHECK (provider->GetSurfaceDescription (provider, &dsc));
   DFBCHECK (dfb->CreateSurface (dfb, &dsc, &tux));
   DFBCHECK (provider->RenderTo (provider, tux, NULL));
   provider->Release (provider);

5] display logo on windows_surface1 and in while loop blit tux and tux2
layer and flip primary layer as follows... (this will give cube left to
right rotation effect)

STEP=10;
while(stop condition )
{
        DFBCHECK (primary->StretchBlit (primary, tux2, NULL,&imgrect));
        DFBCHECK (primary->StretchBlit (primary, tux,NULL, &imgrect2));

         DFBCHECK (primary->Flip (primary, NULL, DSFLIP_WAITFORSYNC));

             sprite_x-=STEP;
             imgrect.w-=STEP;
             imgrect2.w+=STEP;
             imgrect2.x-=STEP;
}

So above code will wprk fast in if in directfbrc file we coment all lines
related to graphics layer .. but if i uncomment them bit slow ... please
answer

Thanks

On Thu, Sep 4, 2008 at 12:53 PM, Deepak Mundra <[EMAIL PROTECTED]>wrote:

> Hi i came to know about directfbrc file which is located in
> gfxdriver/davinci/ .. I
>  heard that using this file we can tel directfb to use davinci driver ..
>
> Each time when i run a program i have to mention sytem,dev-phys,video
> lenght i mean to say
>
> ./my_prog --dfb:system=devmem --dfb:video-phys=0x87400000
> --dfb:video-length=195000 --dfb:accelerator=6400
>
> so can we avoide this by using directfbrc file ??? if yes how ??
>
> Thanks
> Deepak
>
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to