From 8dad985328e2183b224300aa992951131956fdb3 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 23 Jan 2024 13:12:11 +0100 Subject: core,codec-json,codec-minecraft,codec-netcdf,codec,io-tls,io,io_codec,window,window-opengl: Renamed file endings and changed includes --- modules/window-opengl/gl_xcb.h | 68 ------------------------------------------ 1 file changed, 68 deletions(-) delete mode 100644 modules/window-opengl/gl_xcb.h (limited to 'modules/window-opengl/gl_xcb.h') diff --git a/modules/window-opengl/gl_xcb.h b/modules/window-opengl/gl_xcb.h deleted file mode 100644 index 0d84662..0000000 --- a/modules/window-opengl/gl_xcb.h +++ /dev/null @@ -1,68 +0,0 @@ -#pragma once - -#include - -#ifndef SAW_OGL -#error "OpenGL is not supported" -#endif - -#include "gl_backends.h" -#include "gl_context.h" -#include "gl_window.h" - -#include - -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 final { -private: - glx_library_extensions ext_lib_; - own> device_; - 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(); - - own> create_window(const video_mode&, std::string_view); - - void flush(); -}; - -template<> -class gpu_window final { -private: - own> window_; - gpu_context* context_; - - ::GLXWindow glx_window_handle_; -public: - gpu_window(own> window, gpu_context& 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> on_event(); -}; -} -} -- cgit v1.2.3