Hi,
Am 12.09.2012 22:37, schrieb Ilyes Gouta:
Hi Karim,

On Wed, Sep 12, 2012 at 7:36 PM, Karim 'Kasi Mir' Senoucci
<direc...@tvetc.de> wrote:
Hi,
Am 12.09.2012 19:25, schrieb Ilyes Gouta:

Have you grepped into the code to see what happens when the
layer-rotate=<x> option is passed?

Into the code of DirectFB itself? No, I haven't done that so far. As I have
no knowledge of the DirectFB sources whatsoever, this would probably take
many, many hours, which is why I tried asking those with said knowledge
first who can tell me whether I'm doing anything wrong right away. As it
seems, it's not that simple. :-)
code is usually the ultimate documentation.
Yes, but it's usually also the worst kind of documentation, depending on how well it is documented. Glancing into the DirectFB source, I don't see many comments, which means that without external knowledge of some kind about the general structure of things, it's quite a arduous (and time-consuming) task to get started understanding anything in those cases.

The DirectFB system module is what interfaces with the framebuffer driver, such as what you listed here viafb, vesafb and inteldrmfb. DirectFB would be using fbdev system module to talk to those.
Okay, so the fbdev system module must support layer-rotate, which is parsed in conf.c and then written into an internal structure or class, as far as I understand it. Unfortunatly, I couldn't grep any use of the structure memeber in the whole system subdirectory, not just not in the fbdev system module. As I said, whitout knowing anything about the internal architechture of DirectFB, it's hard to follow the flow of information through the mostly undocumented source files.

By the way: if there is another way to rotate the display (i.e. everything
that is displayed on screen) by 90 or 270 degrees, I'll happily give it a
try. I don't have to use the "layer-rotate" command-line parameter, it's
just the only thing I could find that at least is documented.
Yes. You could use (you UI and rendering code) IDirectFBWindow(s) and
rotate these 90°, 180° and 270°.
Thanks for the suggestion; I have written a small test program in DirectFB (without DFB++) which first creates a window as big as the whole display and then makes all the DrawStrings() onto the window surface instead of the primary one. That really works for the most part; unfortunateley, the DFB++ bindings I use in my program (which I started programming seven years ago when those bindings were fresh) haven't been updated in ages, so the SetRotation method is unknown for windows. Furthermore, a direct translation of my directfb.h-based test program:

surface->DrawRectangle(surface,200,50,300,60);
layer->CreateWindow( layer, &dsc, &window );
window->GetSurface( window, &surface );
surface->Clear( surface, 0,0,0, 0xff );
surface->SetColor(surface, 0x00,0x80,0x80,0xff);
surface->DrawRectangle(surface,200,50,300,60);
surface->SetFont(surface,font);
surface->DrawString(surface,"Test",-1,99,79,DSTF_LEFT);

To doing the same thing in my DFB++ test program which I posted here two days ago:

prim_window = prim_layer->CreateWindow(dsc);
primary=prim_window->GetSurface();
primary->Clear(0,0,0,0xff);
primary->SetColor(0x00,0x80,0x80,0xff);
primary->DrawRectangle(200,50,300,60);
primary->SetFont(font);
primary->DrawString("Test",-1,99,79,DSTF_LEFT);

just produces a black screen with a mouse pointer. I'm still kind of hesitating ditching DFB++ altogether because of my roughly 800 DFB++-based calls in the program which I'd have to rewrite; but as unless I can the above working, I fail to see another way.

The second problem is the mouse pointer. Up until now, I got rid of that one by calling SetCooperativeLevel(DLSCL_EXCLUSIVE) on the primary layer. But I can't use DLSCL_EXCLUSIVE when I create windows, so that option is gone. Is there any way to use an DirectFB window but still hide the mouse cursor?

If you have an acceleration module that's able to handle rotation,
then the composition will be h/w accelerated.
At least without the additional window, the program was fast enough using the software rasterizer; furthermore, there aren't any acceleration modules for Intel GMA3150, GMA36x0, or GMS950, anyway (AFAICS).

Greetings
Kasi Mir

_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to