DirectFB - Home of the pragmatist Roadmap


[directfb-users] Re: Displaying buffer contents
Mailing List archive

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

[directfb-users] Re: Displaying buffer contents



Sven Neumann <neo@convergence.de> writes:

>> Now i want to display this buffer with DirectFB in a window
>> surface. I have not found an ImageProvider for PPM, so i tried a
>> quick and ugly hack like this:

> Is there a particular reason you are using an image provider for this?

No, but there is no public interface to put data in a surface (and
even less documentation).

> It is probably much simpler to create a surface of the right size,
> lock it, copy your data to the surface (line by line since you need to
> respect the pitch) and unlock the surface. Alternatively you can also

Hmmm... first: what is the pitch and how do i respect it?

Then: How is this supposed to work? I have to use internal headers
and first i don't like this idea and second is this impossible
outside the directfb-source-tree (after make install or
installation form a distributions package system), because at
least config.h is missing.

> create a surface around your image data. You don't even need to do the
> copying then. That's what the DSDESC_PREALLOCATED flag is good for.

OK. Is there any chance to get any useable documentation in the
near future? I have read the complete online documentation, quite
some examples and never found any hint how to display a buffer of
data with directfb.

To dive into the source for every little bit of work is quite time
consuming and frustrating.

So: I want to display video pictures -- so i get a many frames to
display. Is there a simple way to say "here is your new buffer" to
a surface or is it a suitable way to construct a new surface for
every frame?

There are two buffers for a surface with preallocated
buffer. Which one it the right to use or is it ok to let both
data-pointers point to the same buffer?

What is the pitch field for, what does it mean, which values are
valid?

-- 
Until the next mail...,
Stefan.


-- 
Info: To unsubscribe send a mail to ecartis@directfb.org with 
"unsubscribe directfb-users" as subject.



Home | Main Index | Thread Index


directfb.org / Development / Old Archives