Get emulator rendering working with Qt

This commit is contained in:
wheremyfoodat 2023-10-01 01:28:08 +03:00
parent 4329976dbc
commit 5155682e0f
12 changed files with 98 additions and 22 deletions

View file

@ -46,7 +46,7 @@ void RendererGL::reset() {
}
}
void RendererGL::initGraphicsContext(SDL_Window* window) {
void RendererGL::initGraphicsContextInternal() {
gl.reset();
auto gl_resources = cmrc::RendererGL::get_filesystem();
@ -168,6 +168,10 @@ void RendererGL::initGraphicsContext(SDL_Window* window) {
reset();
}
// The OpenGL renderer doesn't need to do anything with the GL context (For Qt frontend) or the SDL window (For SDL frontend)
// So we just call initGraphicsContextInternal for both
void RendererGL::initGraphicsContext([[maybe_unused]] SDL_Window* window) { initGraphicsContextInternal(); }
// Set up the OpenGL blending context to match the emulated PICA
void RendererGL::setupBlending() {
// Map of PICA blending equations to OpenGL blending equations. The unused blending equations are equivalent to equation 0 (add)