Hi everyone.
I’ve created a simple SDL2 application following LazyFoo’s tutorial on frame rate capping: http://lazyfoo.net/tutorials/SDL/25_capping_frame_rate/index.php.
The application actually works great on Linux (CentOS 7). The application runs at the frame rate I specify. When I uncap the frame rate I get FPS measurement in the thousands of frames per second (of course it’s not actually rendering anything but an blank window and a textured string).
The problem is that when I forward the application’s X11 display to my Windows 7 PC (Running Xming-Mesa) the framerate of the application drops to like 5 or 6 FPS. I tried running ‘glxgears’ through x11 forwarding and found that it too was getting a very low framerate compared to when it was run as a native X11 app. I tried running export LIBGL_ALWAYS_INDIRECT=1
which did result in a very substantial speedup for glxgears (it was now getting thousands of FPS over x11 forwarding). The SDL2 application is still apparently not being rendered indirectly as it’s FPS remains unaffected and is still 4-5 FPS when forwarded.
I’m using SDL 2.0.3 (that’s what comes with CentOS 7) and am creating my renderer with:
gRenderer = SDL_CreateRenderer( gWindow, -1, SDL_RENDERER_ACCELERATED );
My Windows 7 PC has Xming 6.9.0.31 (I’ve also tried Xming-Mesa but haven’t noticed a difference, I’m pretty sure they are actually the same thing).