Quote:Original post by Demus79
Have you tried disabling some lines from your program to see if there is some faulty parts ?
Yes, that pretty much sums up what I did last night ;-)
I uploaded two actual screenshots:
http://totalsoft.de/temp/screen1.png (everything fine in debug-mode)
http://totalsoft.de/temp/screen2.png (erroneous textures when running in retail/release mode)
My graphics include map-graphics and player-graphics, so my first approach was to isolate them.
Drawing both: 11-13 fps
Drawing only map: 7 fps
Drawing only players: 81 fps
Empty Draw thread: ~900 fps
(So it gets faster if the players are compared to only drawing the map...)
The map consists of background and walls:
Drawing players and walls: 6-8 fps
Drawing players and bg: ~70 fps
Drawing players and walls and bg: 11-13 fps however with faulty graphics! (bg texture not drawn, see screen2.png
The walls consist of ~200 tiles, i.e. 400 polygons. I could understand if drawing them would slow me down - however it's all fine in debug-mode...
Quote:Original post by Demus79
What does the function (*state)->gt.processTime(dt); do ?
I use this function to perform calculations for my game, like physics, processing of input and so on. "state" is defined as "SystemState** state;" so I can change the game's behaviour by just pointing state at another variable. In this case it is:
void processTime(const float dt) { simu_soll_zeit+=dt; while (simu_ist_zeit<simu_soll_zeit) { simu_ist_zeit+=0.005f; for (int i=0; i<player_count; i++) player->simulate(0.005f); ... (collision handling) } }
However, it doesn't do any graphic-related things and since I'm using only one thread I hope it shouldn't interfere.
Thanks very much for your help already Demus79! :)