Stephen GALLIMORE wrote: > DFBCHECK(DirectFBCreate( &dfb )); > DFBCHECK(dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN )); > > dsc.flags = DSDESC_CAPS | DSDESC_PIXELFORMAT; > dsc.caps = DSCAPS_PRIMARY | DSCAPS_PREMULTIPLIED; > dsc.pixelformat = DSPF_ARGB4444; > DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary)); > > DFBCHECK(dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer)); > DFBCHECK(layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE)); > DFBCHECK(layer->SetOpacity(layer,128)); > > What am I doing wrong, given that I do not want, and believe I should > not need, to put the layer into exclusive mode and use the layer surface > directly?
You are mixing two API "paths". One is the basic with all the automation and control provided by the runtime options "pixelformat", "mode", "force-windowed" etc. That is CreateSurface() with DSCAPS_PRIMARY. It's like "give me something to draw", just a simple client buffer. The other is the explicit usage of windows or layers via GetDisplayLayer(), CreateWindow() or SetCooperativeLevel(), SetConfiguration() and possibly GetSurface(). Behind this API are layer contexts, each with its own configuration, surface etc. In a layer context there is usually only one layer region, unless you have hardware with special support. Each layer has one shared context. It can be seen as the desktop context as all windows are usually created in it. IDirectFBDisplayLayer is attached to the shared context in DLSCL_SHARED and DLSCL_ADMINISTRATIVE. Putting it into DLSCL_EXCLUSIVE, it creates its own private layer context. Usually, applications use SetConfiguration(), GetSurface() etc. for their 'direct' usage, as opposed to a window on that layer. IDirectFB is attached to the shared context of the primary layer in DFSCL_NORMAL and will create a window in it if you create a surface with DSCAPS_PRIMARY. In DFSCL_FULLSCREEN it creates its own private layer context with a region matching your surface description. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | '------------------------------------------' _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
