Friday, 15 August 2014

How to run this DFB image example on Ubuntu 12.04 64-bit with DirectFB 1.6.3? -



How to run this DFB image example on Ubuntu 12.04 64-bit with DirectFB 1.6.3? -

this same illustration runs no problem in older ubuntu 10.10 directfb 1.4.11 , shows yellowish line in center of black screen:

#include <iostream> #include <stdio.h> #include <unistd.h> #include <directfb.h> using namespace std; static idirectfb *dfb = null; static idirectfbsurface *primary = null; static int screen_width = 0; static int screen_height = 0; #define dfbcheck(x...) \ { \ dfbresult err = x; \ \ if (err != dfb_ok) \ { \ fprintf( stderr, "%s <%d>:\n\t", __file__, __line__ ); \ directfberrorfatal( #x, err ); \ } \ } int main(int argc, char **argv) { dfbsurfacedescription dsc; dfbcheck(directfbinit (&argc, &argv)); dfbcheck(directfbcreate (&dfb)); dfbcheck(dfb->setcooperativelevel (dfb, dfscl_fullscreen)); dsc.flags = dsdesc_caps; dsc.caps = dfbsurfacecapabilities(dscaps_primary | dscaps_flipping); dfbcheck(dfb->createsurface( dfb, &dsc, &primary )); dfbcheck(primary->getsize (primary, &screen_width, &screen_height)); dfbcheck(primary->fillrectangle (primary, 0, 0, screen_width, screen_height)); dfbcheck(primary->setcolor (primary, 0xff, 0xff, 0x00, 0xff)); dfbcheck(primary->setsrccolorkey(primary, 0xff, 0xff, 0x00)); dfbcheck(primary->setblittingflags(primary, (dfbsurfaceblittingflags) ( dsblit_blend_alphachannel | dsblit_src_colorkey))); dfbcheck(primary->drawline (primary, 0, screen_height / 2, screen_width - 1, screen_height / 2)); primary->flip(primary, null, dfbsurfaceflipflags(0)); sleep(3); primary->release(primary); dfb->release(dfb); cout << "done!\n"; homecoming 23; }

but same illustration show black screen, no line, in ubuntu 12.04, using directfb 6.3.

the console output is:

# ./a.out ~~~~~~~~~~~~~~~~~~~~~~~~~~| directfb 1.6.3 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2012-2013 directfb integrated media gmbh (c) 2001-2013 world wide directfb open source community (c) 2000-2004 convergence (integrated media) gmbh ---------------------------------------------------------------- (*) directfb/core: single application core. (2013-02-07 11:05) (*) direct/memcpy: using libc memcpy() (*) direct/thread: started 'fusion dispatch' (-1) [messaging other/other 0/0] <8388608>... (*) direct/thread: started 'vt switcher' (-1) [critical other/other 0/0] <8388608>... (*) direct/thread: started 'vt flusher' (-1) [default other/other 0/0] <8388608>... (*) directfb/fbdev: found 'svgadrmfb' (id 0) frame buffer @ 0x00000000, 15360k (mmio 0x00000000, 0k) (*) direct/thread: started 'ps/2 input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: imps/2 mouse (1) 1.0 (directfb.org) (*) direct/thread: started 'ps/2 input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: imps/2 mouse (2) 1.0 (directfb.org) (*) direct/thread: started 'linux input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: powerfulness button (1) 0.1 (directfb.org) (*) direct/thread: started 'linux input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: @ translated set 2 keyboard (2) 0.1 (directfb.org) (*) direct/thread: started 'linux input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: vmware vmware virtual usb mouse (3) 0.1 (directfb.org) (*) direct/thread: started 'linux input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: vmware vmware virtual usb mouse (4) 0.1 (directfb.org) (*) direct/thread: started 'linux input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: imps/2 generic wheel mouse (5) 0.1 (directfb.org) (*) direct/thread: started 'hotplug linux input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: hot-plug detection enabled linux input driver (*) direct/thread: started 'joystick input' (-1) [input other/other 0/0] <8388608>... (*) directfb/input: joystick 0.9 (directfb.org) (*) directfb/input: hot-plug detection enabled input hub driver (*) direct/thread: started 'keyboard input' (-1) [input other/other 0/0] <8388608>... (!!!) *** 1 time [joystick sends js_event_init events, create sure has been calibrated using 'jscal -c' ] *** [joystick.c:99 in joystick_handle_event()] (*) directfb/input: keyboard 0.9 (directfb.org) (*) directfb/genefx: mmx detected , enabled (*) directfb/graphics: mmx software rasterizer 0.7 (directfb.org) (*) directfb/core/wm: default 0.3 (directfb.org) (*) fbdev/mode: setting 800x600 rgb32 (*) fbdev/mode: switched 800x600 (virtual 800x600) @ 32 bit (rgb32), pitch 8192 (*) fbdev/mode: setting 800x600 rgb32 (*) fbdev/mode: switched 800x600 (virtual 800x600) @ 32 bit (rgb32), pitch 8192 (*) fbdev/mode: setting 800x600 rgb32 (*) fbdev/mode: switched 800x600 (virtual 800x1200) @ 32 bit (rgb32), pitch 8192 (*) fbdev/mode: setting 800x600 rgb32 (*) fbdev/mode: switched 800x600 (virtual 800x600) @ 32 bit (rgb32), pitch 8192 done!

any thought why line not drawn? wonder if it's problem 64-bit system?

you meant 1.6.3 version. dont know configure options. illustration mmx support. can reconfigure , reinstall --enable-debug and/or --enable-trace run programs --dfb:debug more info. directfb lot of system call while running can see them strace. old question lately these suggested methods find related problems run directfb apps. goog luck.

directfb

No comments:

Post a Comment