A way to make keyboard event queue both responsive and not take whole CPU power

前端 未结 4 666
迷失自我
迷失自我 2021-01-06 03:56

I am making an Sdl game, it\'s 2d shooter. I am using SDL to import surfaces and OpenGL to draw them on the screen (doing so because it works way faster than just SDL). I\'v

4条回答
  •  暖寄归人
    2021-01-06 04:07

    If you initialized SDL on GameWorld::GenerateCycles()'s thread and MovementThread is calling GameWorld::Movement() then you have a problem:

    • Don't call SDL video/event functions from separate threads

提交回复
热议问题