I'm trying to write a game using C and OpenGL, I wrote some rendering code and camera, but the game is very laggy, framerate is so low (probably around 10-15fps), however, if I launch the game through Steam as a non Steam game my framerate jumps up to 800 immediately after Steam Overlay loads. The game works fine on my computer and my friend's laptop even without launching with Steam.

And I'm running Windows 10 Pro, 8GB ram, Nvidia GTX 1050 4GB, Intel Core i5-7300HQ

  • 1
    \$\begingroup\$ Make sure you tell your nvidia driver to run the game with your GPU and not with your on-board chip. \$\endgroup\$ – Vaillancourt Jun 23 '19 at 19:39
  • \$\begingroup\$ I did! But even on Intel GPU the performance is 300+ FPS when I run it with Steam. \$\endgroup\$ – Jiří Velek Jun 23 '19 at 19:41
  • \$\begingroup\$ Are you maybe running it through a debugger? \$\endgroup\$ – Turms Jun 23 '19 at 21:03
  • \$\begingroup\$ No, I compile with clang and make, so I would have to run lldb manually which I don't \$\endgroup\$ – Jiří Velek Jun 23 '19 at 21:13
  • \$\begingroup\$ Are you running exactly the same executable with steam? If not, maybe the compiler optimization flags are different. \$\endgroup\$ – Turms Jun 23 '19 at 21:17

Reinstalling Windows fixed my problem.

  • 2
    \$\begingroup\$ So it was a driver problem. \$\endgroup\$ – Philipp Jun 24 '19 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.