Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » 5.0.3 More than 1 display and FPS

This thread is locked; no one can reply to it. rss feed Print
5.0.3 More than 1 display and FPS
komons
Member #11,083
June 2009

Hi

Is this normal that FPS fall from 1800 to 54, when I create second display?
First display have 800x600px, second have 400x100.

To check FPS I use Fraps.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Thomas Fjellstrom
Member #476
June 2000
avatar

Having more than one "context" open will likely slow things down, but it shouldn't drop that far.

--
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

komons
Member #11,083
June 2009

Okay I make sample code, and surprise, work well! The bug is in my code. I discovered that loaded font can be used in only first display. In another displays font just make it slow. :< But all displays have the same format. So why?

Here is a sample code with font used:
http://pastie.org/2130563

space - create new display
delete - delete current display
esc - exit

Thomas Fjellstrom
Member #476
June 2000
avatar

komons said:

But all displays have the same format. So why?

Any resource that has a texture attached, is also tied to the display you initially created it for.

The easiest way to fix that is to just load the font again when the second display is set as the current display/backbuffer.

--
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: