OpenGL troubleshooting

Started by
5 comments, last by Acharis 11 years, 6 months ago
This question is half "how I can solve my problem" and half a support question "how should I proceed if a player reported similar problem, which means how to proceed in a more general way in order to track/fix/diagnose such/similar problems".

I have a very, very simple game (SDL + OpenGL, a mere few hundreds trangles (not hundreds of thousands, not tents of thousands, not thousands, just hundreds, it is basicly nothing, even for ancient hardware standards), I'm using very basic features, probably OpenGL 1.1).

Then I have this old computer (but still not that ancient, 2Ghz CPU, 512MB, and GF2MX400). It has fresh WinXP (SP3) installed and DX9.0c (so it is an old comp with all software reinstalled).

* I run my SDL+OpenGL game, it works but is very slow, (the main culprint being glCopyPixels call, but even without it everyting is too slow, it can't be that slow on this kind of machine, I used to make OpenGL games with much higher requirements for worse hardware than that one and everything worked).
* I run my another game, pure SDL, no problem, everything perfectly fast and works.
[s]* I run my SDL+OpenGL texture test, it shows "app need to be reinstalled" and refuses to run, I have not tracked the cause yet, still that's suspicious [solved].[/s]
* I try to run some downloaded GPU caps viewer, it crashes (I expect it might simply need some higher OpenGL version, so we sould disregard this symptom).

At first I thought it was something with drivers, but the OpenGL installed is v1.5.7 (more than enough for my needs), so it should be all all right? Maybe I somehow disabled hardware acceleration in my game's code?

I have trouble determining if the problem is on the computer's side (since on my other, more modern, computer everything works flawlessly) or maybe there is something in my code?

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Advertisement

OpenGL installed is v1.5.7

Try to find the newest driver available. The opengl version is not the best indication for the driver version. Newer driver, which still support the same OGL version, are often more stable and fix some bugs.
I recommend using gDebugger, AMD CodeAnalyst and Intel vTune to profile performance issues. The "app needs to be reinstalled" may be caused by a bad DLL dependency, so use e.g. depends22.exe to see if there are missing DLL dependencies. Also, have a look at the .embed.manifest file generated by Visual Studio to check what kind of dependencies were generated by the build, and see if there are any debug DLLs there.
OK, this is becoming serious, I got another machine (different CPU, more memory, different GPU), reinstalled it fresh, installed newest drivers and... The problem is identical! Both machines report OpenGL 1.5, the game definitely require FAR less (heck, I don't even know GL1.5, my knowledge ended at GL1.2 :D). You can check it here if you like, it's REALLY low specs stuff http://silverlemur.com/work/URRPG/UnnamedRetroRPG-Test.zip

The only similarity between these comps is that I used the same CD with the OS (WinXP Home SP2).



The "app needs to be reinstalled" may be caused by a bad DLL dependency, so use e.g. depends22.exe to see if there are missing DLL dependencies. Also, have a look at the .embed.manifest file generated by Visual Studio to check what kind of dependencies were generated by the build, and see if there are any debug DLLs there.
I solved that one, it was not related at all. BTW, depends22.exe is cute indeed :)

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

This is what i get:

6EtXB.png

This is what i get:
111 FPS, that's double of my best comp :) Me jealous :)
Thanks for testing.

OK, I get a feeling it has nothing to do with these drivers and computers and that I simply have not enabled Hardware acceleration in my code by some twist of fate (which is kind of strange since glReadPixels slows it all down considerably, as if it was copying from VRAM to RAM, which should indicate that HW accel is enabled?)

const SDL_VideoInfo* ptr = SDL_GetVideoInfo();
printf("Hardware acceleration status: %d,%d,%d,%d\n",ptr->hw_available, ptr->blit_hw, ptr->blit_hw_A ,ptr->blit_hw_CC);
This returns 0,0,0,0, I guess it means it's bad? :D


Questions:
- how can I check if the HW acceleration is enabled?
- can you point me to some SDL+OpenGL example (simple if possible) that you are sure have HW accel enabled?

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

I have force changed SDL_driver to "directx" it made most of the HW status flags (SDL_GetVideoInfo()) turn to 1. Still, there is no difference in speed, it's crawling slow. Again, this affects these two older comps, on the modern one it works fast.

Any clues/theories what is the cause of this?

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

This topic is closed to new replies.

Advertisement