diff --git a/src/nostalgia/modules/core/src/opengl/gfx.cpp b/src/nostalgia/modules/core/src/opengl/gfx.cpp index f4991f8dd..4cc219fe3 100644 --- a/src/nostalgia/modules/core/src/opengl/gfx.cpp +++ b/src/nostalgia/modules/core/src/opengl/gfx.cpp @@ -346,7 +346,8 @@ ox::Error initGfx( const auto spriteFshad = ox::sfmt(renderer::spritefshadTmpl, glutils::GlslVersion); auto &gctx = static_cast(*ctx); oxReturnError(glutils::buildShaderProgram(bgVshad.c_str(), bgFshad.c_str()).moveTo(&gctx.bgShader)); - oxReturnError(glutils::buildShaderProgram(spriteVshad.c_str(), spriteFshad.c_str()).moveTo(&gctx.spriteShader)); + oxReturnError( + glutils::buildShaderProgram(spriteVshad.c_str(), spriteFshad.c_str()).moveTo(&gctx.spriteShader)); for (auto &bg : gctx.cbbs) { initBackgroundBufferset(ctx, gctx.bgShader, &bg); } @@ -435,6 +436,7 @@ void puts(Context *ctx, int column, int row, ox::CRStringView str) noexcept { setTile(ctx, 0, static_cast(col + i), row, static_cast(charMap[static_cast(str[i])])); } } + void setBgCbb(Context *ctx, unsigned bgIdx, unsigned cbbIdx) noexcept { auto &gctx = static_cast(*ctx); auto &bg = gctx.backgrounds[bgIdx]; @@ -577,9 +579,7 @@ namespace gl { void drawMainView(core::Context *ctx, ox::Size const&renderSz) noexcept { glViewport(0, 0, renderSz.width, renderSz.height); - // clear screen - glClearColor(0, 0, 0, 1); - glClear(GL_COLOR_BUFFER_BIT); + glutils::clearScreen(); auto &gctx = static_cast(*ctx); renderer::drawBackgrounds(&gctx, renderSz); if (gctx.spriteBlocks.tex) {