|Site sponsored by IGEL|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[directfb-users] Re: Displaying buffer contents
Sven Neumann <email@example.com> writes: > You got me wrong obviously. Your solution is the one that needs > internal headers. What I am suggesting works with the exported > DirectFB API. OK. Thanks for your patience. > The API reference manual could indeed be improved but it covers all > the functions I mentioned. All you need for my first suggestion is > IDirectFBSurface::Lock() and IDirectFB::UnLock() while the second one > uses IDirectFB::CreateSurface() only. [...] > Lock the surface, write the data to it, then unlock it. How do i write data to a surface (with the public API)? Maybe i'm quite blind, but i don't see it. The only way i found to write data to an existing surface is either with private API or via ImageProvider. What am i missing? >> What is the pitch field for, what does it mean, which values are >> valid? > Ugh, do I really need to explain this? This is a basic principle of > computer graphics. Perhaps you know it under the name "rowstride". > Basically it's the number of bytes that you need to advance to get > from one row to the next. And, no, this is not necessarily equal to > the number of columns multiplied by the number of bytes per pixel. Hmmm... it's quite some time ago i'm working with graphics on this low level (ah, C64 times -- that was fun :)). If i have RGB24 or RGB32 surface then is the pitch cols*bpp? Or am i missing something here, too? BTW: DirectFB is a nice project and i really like it (for my project i looked to quite some libraries) -- but mixing one library with sparse documentation with another library with even less documentation sometimes become really frustrating (even more because it's not to easy to debug my application). But i appreciate your help very much. Thanks. -- Until the next mail..., Stefan. -- Info: To unsubscribe send a mail to firstname.lastname@example.org with "unsubscribe directfb-users" as subject.