refactoring and cleaning while searching for a problem in the demo code

This commit is contained in:
Hartmut Seichter 2021-01-07 23:02:08 +01:00
parent d2c8262c68
commit 0d2138c9f2
14 changed files with 427 additions and 453 deletions

View file

@ -44,6 +44,7 @@ protected:
on_update_t _on_update;
};
}

View file

@ -152,11 +152,15 @@ struct window::impl {
glfwGetVersion(&glfw_major,&glfx_minor,&glfw_rev);
debug::d() << "GLFW " << glfw_major << "." << glfx_minor << "." << glfw_rev;
debug::d() << "GLFW header " << GLFW_VERSION_MAJOR << "." << GLFW_VERSION_MINOR << "." << GLFW_VERSION_REVISION;
// debug::d() << "GLFW " << glfw_major << "." << glfx_minor << "." << glfw_rev;
// debug::d() << "GLFW header " << GLFW_VERSION_MAJOR << "." << GLFW_VERSION_MINOR << "." << GLFW_VERSION_REVISION;
update_display_list();
// we default to window invisible by default
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
// OpenGL
// request specific version 3.3
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
@ -182,7 +186,7 @@ struct window::impl {
rev = glfwGetWindowAttrib(_window, GLFW_CONTEXT_REVISION);
// maybe something to pass to the outside
debug::d() << "OpenGL " << major << "." << minor << "." << rev;
// debug::d() << "OpenGL " << major << "." << minor << "." << rev;
glfwSetWindowUserPointer(_window,this);
@ -213,6 +217,7 @@ struct window::impl {
{
if (_window && !glfwWindowShouldClose(_window))
{
// TODO lock an unlock the current input system to allow for late events coming in
input::get().reset();
// get new events