Skip to content

Draft: Merge glwindow into window

Hello, over the past few days I've been working on #36 (closed). Most GlWindow code is now in Window (note that I haven't taken the time to clean the code or add documentation yet). I'd appreciate some feedback on the changes I did and perhaps some advice on how to finish this up?

I'm currently stuck on pulling the last bit of code for setAsCurrentContext and releaseContext from GlWindow. Here's how I go about doing that:

  1. Pull the two methods into Window
  2. Go through the errors.
  3. change any GlWindow to Window on the way.

As I imagined it, GlWindow should mostly disappear from the code with the exception of using it as a wrapper for GLFWwindow* to use std::shared_ptr.

By following the aforementioned steps, I usually end up with one thread trying to lock its own window lock twice. Once in Scene::run, and once in Scene::setAsMaster. This is obviously a logic error on my part because as I understand, these should be two different windows with two different locks? I've tried going through the code a couple of times to figure out what's wrong but nothing obvious pops up.

Merge request reports