From 4de4b32c2d21aa4a97efaec9c73f3838abdabe0b Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 19 Sep 2023 16:29:41 +0200 Subject: window,window-opengl: Fixing up more private problems --- c++/window-opengl/gl_xcb.cpp | 2 +- c++/window-opengl/gl_xcb.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'c++/window-opengl') diff --git a/c++/window-opengl/gl_xcb.cpp b/c++/window-opengl/gl_xcb.cpp index 26eb8cd..3bcd21a 100644 --- a/c++/window-opengl/gl_xcb.cpp +++ b/c++/window-opengl/gl_xcb.cpp @@ -208,7 +208,7 @@ gpu_window::~gpu_window() { } void gpu_window::bind() { - assert(window_ && context_->device && context_->device_->get_xcb_display()); + assert(window_ && context_->device_ && context_->device_->get_xcb_display()); if (window) { if (context_->device_ && context_->device_->get_xcb_display()) { ::glXMakeContextCurrent(context_->device_->get_xcb_display(), glx_window_, diff --git a/c++/window-opengl/gl_xcb.h b/c++/window-opengl/gl_xcb.h index f7f5d6a..0d84662 100644 --- a/c++/window-opengl/gl_xcb.h +++ b/c++/window-opengl/gl_xcb.h @@ -29,6 +29,8 @@ private: int visual_id_; GLXContext context_; GLXFBConfig fb_config_; + + friend class gpu_window; public: gpu_context(const glx_library_extensions&, own>, int, GLXContext, GLXFBConfig); ~gpu_context(); -- cgit v1.2.3