mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-04-21 05:29:52 +08:00
28 lines
400 B
C++
28 lines
400 B
C++
#include "window.h"
|
|
|
|
|
|
|
|
Window::Window(int x, int y, const char* title)
|
|
{
|
|
GLFWwindow* window = glfwCreateWindow(x, y, title, NULL, NULL);
|
|
this->window = window;
|
|
}
|
|
|
|
|
|
Window::~Window()
|
|
{
|
|
glfwDestroyWindow(this->window);
|
|
}
|
|
|
|
void Window::Resize()
|
|
{
|
|
GLint w, h;
|
|
glfwGetWindowSize(this->window, &w, &h);
|
|
glViewport(0, 0, w, h);
|
|
}
|
|
|
|
int Window::Close()
|
|
{
|
|
return glfwWindowShouldClose(this->window);
|
|
}
|