add framerate limiter
This commit is contained in:
parent
9ce2fa6124
commit
e9264127c5
7 changed files with 73 additions and 0 deletions
|
@ -11,6 +11,7 @@ Window::Window(uint16_t width, uint16_t height, const std::string& title) :
|
|||
handle(nullptr)
|
||||
{
|
||||
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
|
||||
|
||||
handle = glfwCreateWindow(width, height, title.c_str(), nullptr, nullptr);
|
||||
if (handle == nullptr)
|
||||
{
|
||||
|
@ -20,6 +21,7 @@ Window::Window(uint16_t width, uint16_t height, const std::string& title) :
|
|||
}
|
||||
|
||||
glfwMakeContextCurrent(handle);
|
||||
glfwSwapInterval(1);
|
||||
Input::SetWindow(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue