- Decided to remove boost due to extensive dependencies
- Huge refactor on Wayland loading to support retrieval of Protocol headers - Setup EGL to create surfaces for Wayland windows
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <fennec/platform/interface/display.h>
|
||||
#include <fennec/platform/interface/platform.h>
|
||||
#include <fennec/platform/opengl/egl/context.h>
|
||||
#include <fennec/platform/opengl/egl/surface.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
@@ -40,7 +41,10 @@ STATIC_CONSTRUCTOR(_egl_init) {
|
||||
}
|
||||
|
||||
eglcontext::eglcontext(display* display)
|
||||
: gfxcontext(display, "EGL", this) {
|
||||
: gfxcontext(display, "EGL", this)
|
||||
, _egldisplay(nullptr), _eglcontext(nullptr)
|
||||
, _eglconfig(), _eglvmajor(0), _eglvminor(0)
|
||||
, _eglctype(0), _extensions(nullptr) {
|
||||
|
||||
// Get the display format
|
||||
const display::pixel_format& fmt = _display->get_color_format();
|
||||
@@ -121,7 +125,7 @@ bool eglcontext::connected() {
|
||||
return _eglcontext != nullptr;
|
||||
}
|
||||
|
||||
const cstring& eglcontext::get_context_name() {
|
||||
const cstring& eglcontext::get_name() {
|
||||
static constexpr cstring opengl = "OpenGL";
|
||||
static constexpr cstring gles = "GLES";
|
||||
static constexpr cstring openvg = "OpenVG"; // this should never be used
|
||||
@@ -137,8 +141,13 @@ bool eglcontext::check_extension(const cstring& ext) {
|
||||
return _extensions.find(ext) != _extensions.size();
|
||||
}
|
||||
|
||||
void eglcontext::make_current(gfxsurface*) {
|
||||
gfxsurface* eglcontext::create_surface(window* window) {
|
||||
return new eglsurface(this, window);
|
||||
}
|
||||
|
||||
void eglcontext::make_current(gfxsurface* surface) {
|
||||
eglsurface* eglsurface = static_cast<fennec::eglsurface*>(surface);
|
||||
eglMakeCurrent(_egldisplay, eglsurface->get_egl_surface(), eglsurface->get_egl_surface(), _eglcontext);
|
||||
}
|
||||
|
||||
void eglcontext::cleanup() {
|
||||
|
||||
Reference in New Issue
Block a user