DirectFB - Home of the pragmatist Roadmap

[directfb-users] Re: Setting the video mode to a lower bpp
Mailing List archive

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

[directfb-users] Re: Setting the video mode to a lower bpp

Ville Syrjälä wrote:
> On Wed, Jun 30, 2004 at 10:18:46PM +0200, Otto Wyss wrote:
> >
> >     DFBCHECK (DirectFBInit (NULL, NULL));
> >     DFBCHECK (DirectFBCreate (&dfb));
> >     dfb->SetVideoMode (dfb, width, height, m_var_info.bits_per_pixel);
> >     dfb->SetCooperativeLevel (dfb, DFSCL_NORMAL);
> >     dsc.flags = DSDESC_CAPS;
> >     dsc.caps  = (DFBSurfaceCapabilities)(DSCAPS_PRIMARY | DSCAPS_FLIPPING);
> >     DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
> >
> > Can anyone say what's wrong?
> Apparently the bpp parameter of SetVideoMode() doesn't do anything for
> DFSCL_NORMAL primary surfaces.
Could say me how I have to change the above code so it mirrors a normal
startup using the default values as much as possible.

BTW it would be nice if not needed parameters are optional (i.e. in
SetVideoMode parameter bpp should be optional).

> directfbrc option). Quite confusing really. Maybe we should try to clean
> it up a bit?
I suggest the following procedure:
1) Use the frame buffer features as the defaults.
2) Use the cards capabilities replacing any previous defaults.
3) Apply the settings from the code where possible.

It can be assumed that the frame buffer chosen by the user is somehow
running, maybe not in the best way but at least usable. Therefore the
starting point should always be there.

If possible the cards (drivers) capabilities should be used to allow for
the best possible display.

If the user specifies any setting they should overwrite the defaults
where possible. So if the user chooses to lower the bpp he probably has
a reason.

I don't understand the various modes and think the above procedure
should be followed in every mode except for debugging purposes. IMO any
modes should be avoided because they mostly aren't understood by the users.

O. Wyss

See a huge pile of work at "";

Home | Main Index | Thread Index / Development / Old Archives