initial checkin
This commit is contained in:
commit
8c67b1f632
474 changed files with 145799 additions and 0 deletions
33
src/core/window.cpp
Normal file
33
src/core/window.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include "window.hpp"
|
||||
|
||||
pw::window::window() {
|
||||
|
||||
_window = glfwCreateWindow(640, 480, "My Title", NULL, NULL);
|
||||
}
|
||||
|
||||
pw::window::~window() {
|
||||
|
||||
glfwDestroyWindow(_window);
|
||||
}
|
||||
|
||||
bool pw::window::update()
|
||||
{
|
||||
if (!glfwWindowShouldClose(_window)) {
|
||||
glfwSwapBuffers(_window);
|
||||
glfwPollEvents();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void pw::window::load(sol::table &ns) {
|
||||
{
|
||||
glfwInit();
|
||||
|
||||
ns.new_usertype<window>("window",
|
||||
"update",&window::update
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue