Discussion:
[directfb-users] DirectFB equivalent of XCreatePix
Francois Oligny-Lemieux
2012-11-23 20:32:08 UTC
Permalink
Hi,

I'm porting some X11 code to DirectFB and there are some calls that
construct images to be rendered with the content from a memory buffer. It
uses XCreatePix for X11, CreateDIBSection for win32 and NewGWorld for osx.

Anyone has an idea what is the corresponding operation on DirectFB and/or
where I could find an example, any help is appreciated. I already found the
functions that create an image from file, but in my case it's an image from
buffer.

Thanks!
Francois
Denis Oliver Kropp
2012-11-24 01:48:47 UTC
Permalink
Hi,
I'm porting some X11 code to DirectFB and there are some calls that construct images to be rendered with the content from a memory buffer. It uses XCreatePix
for X11, CreateDIBSection for win32 and NewGWorld for osx.
Anyone has an idea what is the corresponding operation on DirectFB and/or where I could find an example, any help is appreciated. I already found the functions
that create an image from file, but in my case it's an image from buffer.
You need to use IDirectFB::CreateSurface(), then call IDirectFBSurface::Write() to put the data.
--
Denis Oliver Kropp
DirectFB integrated media GmbH
Francois Oligny-Lemieux
2012-12-18 19:35:50 UTC
Permalink
Thanks,

So to see if I understand correctly, I create one surface that is hooked to
the display and several other surfaces that will contain my graphics. When
rendering my app, i will call a bunch of
surfaceWidgetA->Blit(displaySurface, x, y). I'm not sure this is the way
because I dont know how to indicate that one surface is hooked to the
display.

Please let me know how it is.

Thanks,
Francois
Post by Francois Oligny-Lemieux
Post by Francois Oligny-Lemieux
Hi,
I'm porting some X11 code to DirectFB and there are some calls that
construct images to be rendered with the content from a memory buffer. It
uses XCreatePix
Post by Francois Oligny-Lemieux
for X11, CreateDIBSection for win32 and NewGWorld for osx.
Anyone has an idea what is the corresponding operation on DirectFB
and/or where I could find an example, any help is appreciated. I already
found the functions
Post by Francois Oligny-Lemieux
that create an image from file, but in my case it's an image from buffer.
You need to use IDirectFB::CreateSurface(), then call
IDirectFBSurface::Write() to put the data.
--
Denis Oliver Kropp
DirectFB integrated media GmbH
_______________________________________________
directfb-users mailing list
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
Loading...