started ppu

This commit is contained in:
Lauchmelder 2022-03-03 02:33:08 +01:00
parent e7b78f281f
commit f9f401c6c0
No known key found for this signature in database
GPG key ID: C2403C69D78F011D
15 changed files with 313 additions and 54 deletions

View file

@ -10,6 +10,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)
{
@ -28,6 +29,12 @@ Window::~Window()
glfwDestroyWindow(handle);
}
void Window::SetScale(int scale)
{
glfwSetWindowSize(handle, 256 * scale, 240 * scale + 20);
glViewport(0, 0, 256 * scale, 240 * scale);
}
void Window::Begin()
{
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);