Hey,
I'm combining two queries here in one - any insight into either would be
hugely appreciated...I'm tearing my hair out here...
System: Ubuntu 7.10 with uvesafb-patched kernel. Geforce8800GTX with no
nvidia drivers present (neither nvidiafb nor the binarys).
#1)
When I run a dfb app (e.g. the first one from the tutorial) in windowed
mode (i.e. just ommitting the fullscreen line), it detects my screen
resolution fine, but has a high chance of COMPLETELY locking up my
computer altogether. If I run it fullscreen, it thinks my vertical res
is about 3x the actual value, but doesn't crash.
#2)
I can't for the life of me get two surfaces to blend together. I just
see the debug surface on the display, and nothing from the original
primary surface. (But by ommitting the blend line, I see the primary
surface' original contents fine). The *relevant* code section's at the
end of this email. Ignore any wild programming habits I have Thanks
in advance!
- Alex
// Initialise the primary
surface
DFBSurfaceDescription surf_dsc;
surf_dsc.flags = DSDESC_CAPS;
surf_dsc.caps = DSCAPS_PRIMARY| DSCAPS_FLIPPING;
DFBCHECK(dfb->CreateSurface( dfb, &surf_dsc, &primary_surface ));
primary_surface->SetPorterDuff(primary_surface,
DSPD_SRC);
// Initialise the debugging
surface
DFBCHECK(dfb->CreateSurface( dfb, &surf_dsc, &debug_surface));
DFBCHECK(debug_surface->SetColor(debug_surface,0,0,0,0));
DFBCHECK(debug_surface->FillRectangle (debug_surface, 0, 0,
screen_width, screen_height));
debug_surface->SetPorterDuff(debug_surface, DSPD_SRC_OVER);
debug_surface->SetBlittingFlags(debug_surface,
DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_SRC_PREMULTIPLY |
DSBLIT_DST_PREMULTIPLY);
primary_surface->SetBlittingFlags(primary_surface,
DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_SRC_PREMULTIPLY |
DSBLIT_DST_PREMULTIPLY);
primary_surface->SetDrawingFlags(primary_surface, DSDRAW_BLEND);
debug_surface->SetDrawingFlags(debug_surface, DSDRAW_BLEND);
//Clear primary
surface
primary_surface->SetColor (primary_surface, 0, 0, 0x30, 0xff);
primary_surface->FillRectangle(primary_surface, 0, 0, screen_width,
screen_height);
// Clear debug surface (alpha 0
everywhere)
debug_surface->SetColor (debug_surface, 0,0,0,0);
debug_surface->FillRectangle (debug_surface, 0, 0, screen_width,
screen_height);
/* SNIP - some basic text drawing goes here, using 0xFF alpha for both
surfaces) */
DFBCHECK(primary_surface->Blit(primary_surface, debug_surface, NULL,
0, 0));
DFBCHECK(primary_surface->Flip(primary_surface, NULL, 0));
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users