diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-12-04 12:18:14 +0100 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-12-04 12:18:14 +0100 |
commit | a14896f9ed209dd3f9597722e5a5697bd7dbf531 (patch) | |
tree | 089ca5cbbd206d1921f8f6b53292f5bc1902ca5c /c++/window-opengl/gl_xcb.h | |
parent | 84ecdcbca9e55b1f57fbb832e12ff4fdbb86e7c9 (diff) |
meta: Renamed folder containing source
Diffstat (limited to 'c++/window-opengl/gl_xcb.h')
-rw-r--r-- | c++/window-opengl/gl_xcb.h | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/c++/window-opengl/gl_xcb.h b/c++/window-opengl/gl_xcb.h deleted file mode 100644 index 0d84662..0000000 --- a/c++/window-opengl/gl_xcb.h +++ /dev/null @@ -1,68 +0,0 @@ -#pragma once - -#include <forstio/window/xcb.h> - -#ifndef SAW_OGL -#error "OpenGL is not supported" -#endif - -#include "gl_backends.h" -#include "gl_context.h" -#include "gl_window.h" - -#include <GL/glx.h> - -namespace saw { -namespace gfx { - -struct glx_library_extensions { -public: - std::string_view raw_extension_string; - GLXContext (*glXCreateContextAttribsARB)(Display*, GLXFBConfig, GLXContext, Bool, const int*) = nullptr; -}; - -template<> -class gpu_context<backend::gl_linux_xcb> final { -private: - glx_library_extensions ext_lib_; - own<device<backend::linux_xcb>> device_; - int visual_id_; - GLXContext context_; - GLXFBConfig fb_config_; - - friend class gpu_window<backend::gl_linux_xcb>; -public: - gpu_context(const glx_library_extensions&, own<device<backend::linux_xcb>>, int, GLXContext, GLXFBConfig); - ~gpu_context(); - - own<gpu_window<backend::gl_linux_xcb>> create_window(const video_mode&, std::string_view); - - void flush(); -}; - -template<> -class gpu_window<backend::gl_linux_xcb> final { -private: - own<window<backend::linux_xcb>> window_; - gpu_context<backend::gl_linux_xcb>* context_; - - ::GLXWindow glx_window_handle_; -public: - gpu_window(own<window<backend::linux_xcb>> window, gpu_context<backend::gl_linux_xcb>& ctx, - ::GLXWindow); - ~gpu_window(); - - void bind(); - void swap(); - void show(); - void hide(); - - const video_mode& get_video_mode() const; - const std::string_view get_title() const; - - void resize(size_t height, size_t width); - - conveyor<data<schema::WindowEvents>> on_event(); -}; -} -} |