File Window.h
Go to the documentation of this file
#pragma once
#include <GLFW/glfw3.h>
#include <stdexcept>
#include <string>
class Window
{
public:
Window(int width, int height, const std::string& title);
~Window();
Window(const Window&) = delete;
Window& operator=(const Window&) = delete;
GLFWwindow* Get() const { return handle; }
bool ShouldClose() const { return glfwWindowShouldClose(handle); }
void SwapBuffers() const { glfwSwapBuffers(handle); }
private:
bool glfw_initialized{ false };
GLFWwindow* handle{ nullptr };
};