started ppu
This commit is contained in:
parent
e7b78f281f
commit
f9f401c6c0
15 changed files with 313 additions and 54 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue