Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro uses wrong video card sometimes

This thread is locked; no one can reply to it. rss feed Print
Allegro uses wrong video card sometimes
kovarex
Member #14,203
April 2012

Hello,
we are using allegro for our indie game, and some of the players have this problem. They have the internal weak GPU and dedicated GPU both active, this is common with multi monitor setups. I have no idea how is decided which GPU is used, but for some of them, the internal weak one is, and as the game has quite high video-memory requirements, the weak one might not even hold the needed graphics, or it is just slow when playing.

Is there any way to get the list of available GPUs in the system and choose which one should allegro use?

Thank you for any advice.

Michal

www.factorio.com - a factory building game.

beoran
Member #12,636
March 2011

Use the functions in the "monitor" section of the API doc to get the display adapters (video cards) and monitors connected. There's no way to fins out which is the "performant" video card directly, however, a short FPS measurement could help to find out which display adapter and monitor to give preference to. Or just let the end users choose manually though some setting or menu option.

See
http://alleg.sourceforge.net/a5docs/refman/monitor.html#al_get_num_video_adapters
for the API documentation.

kovarex
Member #14,203
April 2012

Thank you for the response, this was exactly the thing I was looking for. I will let the user choose.

www.factorio.com - a factory building game.

Thomas Fjellstrom
Member #476
June 2000
avatar

I really wish there was a better way to detect the primary monitor. The user can tell windows/X which is the primary, but how many people bother? Generally it's the monitor with the windows task bar (or in X, it could be anything, ;D)...

I'm surprised though that the machines split the cards across displays? Most laptops these days use a hybrid approach so you're either using one gpu or the other, and not both. (not 100% technically true, the low end intel is typically in use but not doing the 3d rendering).

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

beoran
Member #12,636
March 2011

Well, that might be so on laptops, but if it's a high end game desktop with an additional graphic card plugged into it, the low end built-in card will still be available, and useful for dual screen. I think kovarex's customers with problems are probably in such a situation.

Thomas Fjellstrom
Member #476
June 2000
avatar

beoran said:

if it's a high end game desktop with an additional graphic card plugged into it, the low end built-in card will still be available, and useful for dual screen.

It used to be that the integrated gpu was always disabled in that case. But I think that has changed with intel's newest built in gpu's were it's still usable even when it's not actually hooked up to any outputs...

Still though, if there is a way to get at the primary monitor info, we should export it somewhere. And if that isn't enough, there is nothing we can reliably do.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Go to: