boolquit =false;while(!quit) { SDL_Event event;while(SDL_PollEvent(&event)) {///* funcs}//i just added drawing funcs here and it is fine now} nope the problem still goes on without an input it moves to next frame. how can i fix it ...
Clear(0.0f, 0.15f, 0.3f, 1.0f); float sinCounter = sinf(counter); float cosCounter = cosf(counter); SDL_Event ev; while (SDL_PollEvent(&ev) != 0) { keyState = SDL_GetKeyboardState(NULL); if (keyState[SDL_SCANCODE_W]) { camera.MoveForward(1); std::cout << "keypress" <...
很多人都在SDL_PollEvent和SDL_WaitEvent之间纠结。前者会带来更好的帧数表现, 控制帧速 帧速率 事件处理 程序运行 原创 mb64411cc0e9333 2023-04-25 15:27:20 274阅读 SDL路程---之SDL安装 很早就想写点关于SDL的东西了,一直没腾开时间,现在终于有时间把我学习SDL时的路程一点一点记录下来了,SDL(Simple Dire...