BennyQBD / 3DEngineCpp

It's like the 3D Game Engine, except in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too high window sync time

zeyorama opened this issue · comments

Hey Benny,
I got a issue with my window sync time. I profile SDLSwapBuffers which calls SDL_GL_SwapWindow(window) and it needs a lot of time. On our Forward-Renderer needs it nearly the same amount of time to sync as to render, at the moment about 32ms. On my Deferred-Renderer is the render time nearly 3ms but the sync time about 60 ms. Do you have any idea whats going on?

Thanks in advance and sorry for my bad english.

I have the same problem, is there any way to fix it? It happens on nvidia(?) mobile gpus (laptops) as far I know. I've tested it on several computers. It happens only on my laptops.

try to set this in the code

_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;

maybe you run on intel graphics, don't know if that would be a reason, but OpenGL in my own framework missed this one line and was painfully slow, but got speed eventually when I set enablement on

Thanks, it helped me a lot.

neni zac :)

This helps, thanks a lot.
Just for completion, there is an AMD equivalent:
_declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;

@zeyorama oh cool, thanks, I didn't knew there is AMD counterpart of it :)

@zeyorama thanks for the AMD equivalent!