- Setup Contexts to pull more info from the GPU
- Started outlining OpenGL implementation
This commit is contained in:
@@ -32,6 +32,12 @@ public:
|
||||
const uint64_t uuid;
|
||||
|
||||
virtual bool connected() = 0;
|
||||
virtual int32_t get_version_major() = 0;
|
||||
virtual int32_t get_version_minor() = 0;
|
||||
virtual int32_t get_context_version() = 0;
|
||||
virtual const cstring& get_context_name() = 0;
|
||||
|
||||
virtual bool check_extension(const cstring& ext) = 0;
|
||||
virtual void make_current(gfxsurface* surface) = 0;
|
||||
|
||||
virtual ~gfxcontext() = default;
|
||||
|
||||
@@ -32,6 +32,11 @@ public:
|
||||
~eglcontext() override;
|
||||
|
||||
bool connected() override;
|
||||
int32_t get_version_major() override { return _eglvmajor; }
|
||||
int32_t get_version_minor() override { return _eglvminor; }
|
||||
int32_t get_context_version() override { return _eglctype; }
|
||||
const cstring& get_context_name() override;
|
||||
bool check_extension(const cstring& ext) override;
|
||||
|
||||
void make_current(gfxsurface* surface) override;
|
||||
|
||||
@@ -39,7 +44,8 @@ private:
|
||||
EGLDisplay _egldisplay;
|
||||
EGLContext _eglcontext;
|
||||
EGLConfig _eglconfig;
|
||||
EGLint _eglvmajor, _eglvminor;
|
||||
EGLint _eglvmajor, _eglvminor, _eglctype;
|
||||
cstring _extensions;
|
||||
|
||||
void cleanup();
|
||||
};
|
||||
|
||||
22
include/fennec/renderers/interface/renderer.h
Normal file
22
include/fennec/renderers/interface/renderer.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// =====================================================================================================================
|
||||
// fennec, a free and open source game engine
|
||||
// Copyright © 2025 Medusa Slockbower
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// =====================================================================================================================
|
||||
|
||||
#ifndef FENNEC_RENDERERS_INTERFACE_RENDERER_H
|
||||
#define FENNEC_RENDERERS_INTERFACE_RENDERER_H
|
||||
|
||||
#endif // FENNEC_RENDERERS_INTERFACE_RENDERER_H
|
||||
34
include/fennec/renderers/opengl/fallback.h
Normal file
34
include/fennec/renderers/opengl/fallback.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// =====================================================================================================================
|
||||
// fennec, a free and open source game engine
|
||||
// Copyright © 2025 Medusa Slockbower
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// =====================================================================================================================
|
||||
|
||||
#ifndef FENNEC_RENDERERS_OPENGL_FALLBACK_H
|
||||
#define FENNEC_RENDERERS_OPENGL_FALLBACK_H
|
||||
|
||||
/*
|
||||
* This should be implemented using the OpenGL ES 3.2 profile
|
||||
* https://registry.khronos.org/OpenGL/specs/es/3.2/es_spec_3.2.pdf
|
||||
*
|
||||
* Requires the following:
|
||||
* OpenGL ES 3.2 / OpenGL 4.3 OR
|
||||
* - EXT_texture_array
|
||||
* - ARB_compute_shader
|
||||
* - ARB_shader_image_load_store
|
||||
* - ARB_texture_cube_map_array
|
||||
*/
|
||||
|
||||
#endif // FENNEC_RENDERERS_OPENGL_FALLBACK_H
|
||||
27
include/fennec/renderers/opengl/legacy.h
Normal file
27
include/fennec/renderers/opengl/legacy.h
Normal file
@@ -0,0 +1,27 @@
|
||||
// =====================================================================================================================
|
||||
// fennec, a free and open source game engine
|
||||
// Copyright © 2025 Medusa Slockbower
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// =====================================================================================================================
|
||||
|
||||
#ifndef FENNEC_RENDERERS_OPENGL_LEGACY_H
|
||||
#define FENNEC_RENDERERS_OPENGL_LEGACY_H
|
||||
|
||||
/*
|
||||
* This should be implemented using the OpenGL ES 2.0 profile
|
||||
* https://registry.khronos.org/OpenGL/specs/es/2.0/es_full_spec_2.0.pdf
|
||||
*/
|
||||
|
||||
#endif // FENNEC_RENDERERS_OPENGL_LEGACY_H
|
||||
34
include/fennec/renderers/opengl/modern.h
Normal file
34
include/fennec/renderers/opengl/modern.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// =====================================================================================================================
|
||||
// fennec, a free and open source game engine
|
||||
// Copyright © 2025 Medusa Slockbower
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// =====================================================================================================================
|
||||
|
||||
#ifndef FENNEC_RENDERERS_OPENGL_MODERN_H
|
||||
#define FENNEC_RENDERERS_OPENGL_MODERN_H
|
||||
|
||||
/*
|
||||
*
|
||||
* Requires the following:
|
||||
* OpenGL 4.6 OR
|
||||
* - ARB_shader_draw_parameters
|
||||
* - ARB_multi_draw_indirect
|
||||
* - EXT_texture_array
|
||||
* - ARB_compute_shader
|
||||
* - ARB_shader_image_load_store
|
||||
* - ARB_texture_cube_map_array
|
||||
*/
|
||||
|
||||
#endif // FENNEC_RENDERERS_OPENGL_MODERN_H
|
||||
Reference in New Issue
Block a user