Re: [AD] Linux displays

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


gfoot@xxxxxxxxxx writes:

> On Tue, Dec 12, 2000 at 12:24:58PM +1000, Mike Fahlbusch wrote:
> > The last atatement appears to limit the screen size to 80 pixels or more.  Can I just change w < 80 and h < 80 to something like w < 1 and h < 1?
> 
> I don't know whether there are any reasons smaller sizes won't work.

Window manager may create larger window than requested, to make a
room for window decorations (title, buttons...).

> 
> > When I run compile and run a program which works fine under MSW it seems to work ok (apart from the window size problem) but the colors of either my program or other programs are messed up.  This also happens if I run allegro/examples/ex3d and select X display.  How do I stop the colors from changing when I move the cursor about?  It's not practical to run this program in full screen mode.
> 
> Your X server is running in 8bpp mode; what you're seeing is the
> palette getting changed to suit the application the cursor is
> pointing at.  Most applications will be nice and cooperate with
> each other over this, using a shared palette, but Allegro asks
> to have its own palette which it can modify as much as it likes,
> so you see the palette changes.  I don't know how Windows works
> in 8bpp modes.

Allegro uses default visual when it creates window, so if default
visual is read-only (one of StaticGray, StaticColor and TrueColor),
then Allegro programs will not change palette.  Users can change
default visual type by using "-cc" switch when running X server
(search for "StaticColor" in /usr/include/X11/X.h to get numbers for
all supported visual types), or by adding "Visual" entry to XF86Config
in "Display" subsection (see "man XF86Config" for visual names).

bash% startx -- -bpp 8 -cc 2

Or switch X server to higher color depth, as suggested by Peter Wang.
Then it might be better to use similar color depth in your Allegro
program.

-- 
Michael Bukin



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/