DirectFB - Home of the pragmatist Roadmap


[directfb-dev] how to CreateSurface on CRTC2 layer for G400
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-dev] how to CreateSurface on CRTC2 layer for G400



I am trying to coerce SDL compiled with DirectFB to display on the
G400's CRTC2.  The app. that I am trying to display on SDL DirectFB is
freevo.

All of the code examples of using CRTC2 that I have seen show creating
a DirectFB context, then getting layer 2 of this context, and then
getting the surface from the layer:

  DirectFBCreate(&dfb);
  dfb->GetDisplayLayer(dfb, 2, &crtc2);
  crtc2->GetSurface(crtc2, &c2frame);

This makes sense to me.  SDL however, _creates_ a surface (with
CreateSurface()) directly on the DirectFB context:

  DirectFBCreate(&dfb);
  dfb->GetDisplayLayer(dfb, 2, &layer);
  dfb->CreateSurface(dfb, &dsc, &surface);

and then operates on this surface.

I have tried to replace the CreateSurface() with a GetSurface() but I
wind up getting a segfault in the application.  Should a
GetSurface(layer, ...) be substitutable for a
CreateSurface(DFBContext, ...) or is it more complicated than that?

I have already had to hack SDL to use layer 2 rather than DLID_PRIMARY
like I did with GTK+DirectFB, but this CreateSurface() has me puzzled.
If CRTC2 is implemented as an additional layer on the DirectFB
context, then how can CreateSurface() know which layer to create the
surface on?

Any ideas or pointers would be helpful.

b.

-- 
Brian J. Murrell

Attachment: pgp00011.pgp
Description: PGP signature


Home | Main Index | Thread Index


directfb.org / Development / Old Archives