A few things I noticed:Any reason why you need an opengl 3.0 context explicitly? usually just ALLEGRO_OPENGL is fine. Try that.
I've been trying various unnecessary changes to my code attempting to track down the bottle neck. No other reason for for setting the display atm.
Usually you should init your addons before creating the display. That might be causing a problem.You use 1000/60 to create your timer, you might want to double check that it is indeed 16.666 because neither your numerator or denominator are floats so C++ might do integer division which would give you a weird framerate maybe.I would also highly recommend that you throw exceptions instead of returning numbers like that. I would must rather see "Allegro Display Failed To Create" in my console than 2 or something.
Ok, I can try changing the order of init'ing the addons, again. I can typecast the timer rate, np. I'm working on a overloaded new operator to use as a mixin class(once I verify Allegro can meet my needs), so had planned to deal with that later.
Also, there's no sense in checking for NULL every time you call new. The only way that will return NULL is if you run out of memory and if that happens the runtime will throw an out of memory exception or something.You are often changing targets which requires render to texture support. Maybe you do not have that?
Checking for NULL is good practice no matter how long you've been coding.???
Just how many cycles will it save to not do it?
The target bitmap is changed once per loop, no more than that other than in Init().
Loading and running the first stage(host frame with controls) runs like a charm. I haven't measured FPS, I've merely used fprintf every 100 frames. I see it printed more than twice a second.
Once I've loaded and closed the playlist popup and started the game, every single bitmap is a memeory bitmap, not a video bitmap and everything becomes moot with 5 FPS. If I want a card game where the cards don't move, I could use windoze and be done in a week or probably less.
When I close the game and only the frame is running again, the frame rate returns(all of the first stage of bitmap loading are video bitmaps and accelerated).
Also note that ALLEGRO_OPENGL_3_0 is only a modifier for ALLEGRO_OPENGL, if you don't specify ALLEGRO_OPENGL, Allegro will fall back to its default on a given platform. For windows the default is ALLEGRO_DIRECT3D.Also ALLEGRO_VIDEO_BITMAP is the default.Would you be able to post the entire code? Or even better, make a small, simple example that displays the same problems? (I would prefer that over your original code, that way if it is an allegro bug, it would be extremely obvious that it is an allegro bug, and be easier to debug).
Changing ALLEGRRO_OPENGL_3_0 TO ALLGRO_OPENGL solved the issue.
Thanks all for your input.