- More Documentation
- Vulkan Configuration Implementations - Fixed build errors on GCC and Clang
This commit is contained in:
@@ -73,7 +73,7 @@ eglcontext::eglcontext(display_server* display)
|
||||
|
||||
// Initialize EGL
|
||||
assertf(eglInitialize(_egldisplay, &_eglvmajor, &_eglvminor), "Failed to initialize egl.");
|
||||
logger::log(format("Initialized EGL v{}.{}", _eglvmajor, _eglvminor));
|
||||
logger::log(logger::info, format("Initialized EGL v{}.{}", _eglvmajor, _eglvminor));
|
||||
|
||||
// Reload EGL bindings
|
||||
assertf(gladLoaderLoadEGL(_egldisplay), "Unable to load EGL Bindings.");
|
||||
@@ -108,7 +108,8 @@ eglcontext::eglcontext(display_server* display)
|
||||
version.minor = _eglvminor;
|
||||
version.patch = 0;
|
||||
version.meta = _eglctype;
|
||||
logger::log(format("Created OpenGL Context: {} v{}.{}", egl_translate_type(version.meta), version.major, version.minor));
|
||||
|
||||
logger::log(logger::alert, format("Created OpenGL Context: {} v{}.{}", egl_translate_type(version.meta), version.major, version.minor));
|
||||
}
|
||||
|
||||
eglcontext::~eglcontext() {
|
||||
|
||||
@@ -37,8 +37,8 @@ eglsurface::eglsurface(fennec::window* win, eglcontext* ctx, void* eglwindow)
|
||||
);
|
||||
|
||||
if (not _eglsurface) {
|
||||
int32_t err = eglGetError();
|
||||
logger::log(format("EGL error: {}", eglErrorString(err)));
|
||||
const int32_t err = eglGetError();
|
||||
logger::log(logger::error, format("EGL error: {}", eglErrorString(err)));
|
||||
}
|
||||
assertf(_eglsurface, "Failed to create EGL surface!");
|
||||
|
||||
@@ -46,17 +46,17 @@ eglsurface::eglsurface(fennec::window* win, eglcontext* ctx, void* eglwindow)
|
||||
}
|
||||
|
||||
eglsurface::~eglsurface() {
|
||||
eglcontext* ctx = static_cast<eglcontext*>(context);
|
||||
eglcontext* ctx = dynamic_cast<eglcontext*>(context);
|
||||
assertf(eglDestroySurface(ctx->_egldisplay, _eglsurface), "Error destroying EGL surface!");
|
||||
}
|
||||
|
||||
void eglsurface::make_current() {
|
||||
eglcontext* ctx = static_cast<eglcontext*>(context);
|
||||
eglcontext* ctx = dynamic_cast<eglcontext*>(context);
|
||||
assertf(eglMakeCurrent(ctx->_egldisplay, _eglsurface, _eglsurface, ctx->_eglcontext), "Error setting the current surface!");
|
||||
}
|
||||
|
||||
void eglsurface::swap() {
|
||||
eglcontext* ctx = static_cast<eglcontext*>(context);
|
||||
eglcontext* ctx = dynamic_cast<eglcontext*>(context);
|
||||
assertf(eglSwapBuffers(ctx->_egldisplay, _eglsurface), "Error swapping surface buffers!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user