Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » GFX_AUTODETECT or what

This thread is locked; no one can reply to it. rss feed Print
GFX_AUTODETECT or what
Yogesh M
Member #3,888
September 2003

I am using AUTODETECT in my program. But it seems that it doesnt work properly in linux. Should I neccesserily use AUTODETECT on all platforms.

In linux AUTODETECT fails but GFX_XWINDOWS works fine.

What are safe GFX options.

though I will allow to pass custom driver through config file.

-------------------------------------
http://www.yzonesoft.tk

A J
Member #3,025
December 2002
avatar

thats the problem with linux. no standard and/or too many config options. therefore such things as AUTODETECT will sometimes fail.

the answer i guess you dont want to hear is.. linux' freedoms are also its downfall. :-/ </flame bait>;D

___________________________
The more you talk, the more AJ is right. - ML

Kitty Cat
Member #2,815
October 2002
avatar

What's the error you get with GFX_AUTODETECT?

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Evert
Member #794
November 2000
avatar

Quote:

thats the problem with linux.

No it's not. AJ, there are a lot of things that you know a lot about, so how about you don't post nonsense about things you don't know a lot about?

Quote:

I am using AUTODETECT in my program. But it seems that it doesnt work properly in linux.

That's strange. It works perfectly here (and currently, Allegro's Linux port is probably the best tested of all).
What version of Allegro and X are you using?

Quote:

Should I neccesserily use AUTODETECT on all platforms.

Yes.

Quote:

In linux AUTODETECT fails but GFX_XWINDOWS works fine.

That makes no sense, as GFX_XWINDOWS should be the driver used by GFX_AUTODETECT anyway. There is a way to check which driver is selected: can you print out gfx_driver->ascii_name after calling set_gfx_mode() (ie, printf("%s\n", gfx_driver->ascii_name); - be sure to run your program from an xterm).

Yogesh M
Member #3,888
September 2003

I ma using allegro 4.1.16, X version [cant remember :-[ ], but In gentoo 2004.2 and debian sarge it didnt work, worked well in fedora core 1.

Quote:

What's the error you get with GFX_AUTODETECT?

A black screen and goes off in a hurry.

Quote:

[Quote]
Should I neccesserily use AUTODETECT on all platforms.

Yes.</quote>

So, I dont need config file to pass custom driver, anyway if I want, where all other graphics driver defined.. in gfx.c I can find only

GFX_AUTODETECT
GFX_AUTODETECT_WINDOWED
GFX_AUTODETECT_FULLSCREEN

Quote:

That makes no sense, as GFX_XWINDOWS should be the driver used by GFX_AUTODETECT anyway. There is a way to check which driver is selected: can you print out gfx_driver->ascii_name after calling set_gfx_mode() (ie, printf("%s\n", gfx_driver->ascii_name); - be sure to run your program from an xterm).

I will do that next time; when I login to linux

-------------------------------------
http://www.yzonesoft.tk

Kitty Cat
Member #2,815
October 2002
avatar

You should try to print out allegro_error and see what it says. Quite a few Allegro functions will set that if they fail (the init functions, anyway).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Evert
Member #794
November 2000
avatar

Quote:

anyway if I want, where all other graphics driver defined..

In platform specific headers. You really have no need to delve into that unless you're going to change anything in Allegro itself. They're documented anyway (see the platform specific section of Allegro's manual).

EDIT:

Quote:

I ma using allegro 4.1.16, X version

Note that there is no such thing as `the X version of Allegro' in the proper sense of the word (although it is sometimes refered to as `the X11 port' what that means is `the UNIX port using the X11 system driver'). The X11 version is the same as the console version is the UNIX version. That means that Allegro will compile fine if you don't have the X11 headers and development libraries installed, but it won't use X, which may not be what you expect.

Yogesh M
Member #3,888
September 2003

Quote:

Note that there is no such thing as `the X version of Allegro' in the proper sense of the word (although it is sometimes refered to as `the X11 port' what that means is `the UNIX port using the X11 system driver'). The X11 version is the same as the console version is the UNIX version. That means that Allegro will compile fine if you don't have the X11 headers and development libraries installed, but it won't use X, which may not be what you expect.

Allegro doesnt need X??? Will allegro programs run in terminal without X. Can I compile allegro with some floppy size linux and run a piece of allegro code in fullscreen with fancy graphics.

-------------------------------------
http://www.yzonesoft.tk

Kitty Cat
Member #2,815
October 2002
avatar

Yes to (potentially) all. I believe Allegro can do VGA 13h on it's own, but beyond that you'll need SVGALib, fbcon, or VBE/AF (which isn't well supported).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Oscar Giner
Member #2,207
April 2002
avatar

Are you running as root? Then Allegro would pick the DGA(2?) driver, and this one may be failing for you.

A J
Member #3,025
December 2002
avatar

Quote:

That's strange. It works perfectly here (and currently, Allegro's Linux port is probably the best tested of all).

when this problem turns out to be a badly configured X setup and/or a setup that was never considered, how are you going to disqualify what i said, after all its not likely going to be an allegro problem as Allegro's Linux port is probably the best tested of all

___________________________
The more you talk, the more AJ is right. - ML

Evert
Member #794
November 2000
avatar

Quote:

when this problem turns out to be a badly configured X setup and/or a setup that was never considered, how are you going to disqualify what i said, after all its not likely going to be an allegro problem

Because the X11 driver should be the default one and it does work.
That said, Oscar has a point: it could be the DGA driver acting up.

Go to: