Hi, i'm having problems with displaying text with Allegro 5. Whenever i display a text in screen, the framerate drops from ~60 to ~12.
Here is an example i made where this is happening:
When nothing is being shown the fps is 60, and it doesn't change when i show the bitmap, but when i show the text it is 12-13.
I'm linking with liballegro-5.0.4-monolith-md-debug.a, but i've also tried with the other options, but no change.
I'm using a slow netbook (1.4Ghz), but i've never experienced anything like this with Allegro4
What video card does it have? Attaching the allegro.log file may help.
If you draw this text beforehand (to cache things), does it speed it up: "FPS: 0123456789"?
it has a integrated Intel GMA500 (it's not a good card, and it sucks in openGL (could that be the cause?))
drawing the text before doesn't change anything
I've attached allegro.log
It's using Direct3D at the moment. You can try OpenGL:
#include <allegro5/allegro_opengl.h> //... al_set_new_display_flags(ALLEGRO_OPENGL); al_create_display( ... );
Ok. But with OpenGL the program won't start (but that is becouse the computer, i've had problems with other openGL games (advice: never buy an netbook with gma500)
The compiler says that line is undefined - one too many 'display's there.
I compiled your program against Allegro 5.1 SVN and had no problems at all using consola.ttf. It all ran at 60 fps. This was on a 2.1Ghz dual core Turion 64 laptop with integrated ATI Radeon X1270 though.
Oh, and please fix your code formatting next time - it's really hard to read.