Compare commits

..

No commits in common. "de45e7a0758deda4d2ed21260e6ff131c420d091" and "47858ef619581e43dafa8b01230ceb9dbf1d3677" have entirely different histories.

5 changed files with 17 additions and 14 deletions

View File

@ -184,9 +184,4 @@ void sendEbo(const BufferSet &bs) noexcept {
glBufferData(GL_ELEMENT_ARRAY_BUFFER, bufferSize, bs.elements.data(), GL_STATIC_DRAW);
}
void clearScreen() noexcept {
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
}
}

View File

@ -15,7 +15,7 @@
namespace glutils {
constexpr ox::StringView GlslVersion = "#version 330";
constexpr auto GlslVersion = "#version 330";
struct Empty {};
@ -176,6 +176,4 @@ void sendVbo(const BufferSet &bs) noexcept;
void sendEbo(const BufferSet &bs) noexcept;
void clearScreen() noexcept;
}

View File

@ -346,8 +346,7 @@ ox::Error initGfx(
const auto spriteFshad = ox::sfmt(renderer::spritefshadTmpl, glutils::GlslVersion);
auto &gctx = static_cast<GlContext&>(*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);
}
@ -436,7 +435,6 @@ void puts(Context *ctx, int column, int row, ox::CRStringView str) noexcept {
setTile(ctx, 0, static_cast<int>(col + i), row, static_cast<uint8_t>(charMap[static_cast<uint8_t>(str[i])]));
}
}
void setBgCbb(Context *ctx, unsigned bgIdx, unsigned cbbIdx) noexcept {
auto &gctx = static_cast<GlContext&>(*ctx);
auto &bg = gctx.backgrounds[bgIdx];
@ -579,7 +577,9 @@ namespace gl {
void drawMainView(core::Context *ctx, ox::Size const&renderSz) noexcept {
glViewport(0, 0, renderSz.width, renderSz.height);
glutils::clearScreen();
// clear screen
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
auto &gctx = static_cast<GlContext&>(*ctx);
renderer::drawBackgrounds(&gctx, renderSz);
if (gctx.spriteBlocks.tex) {

View File

@ -0,0 +1,11 @@
/*
* Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once
#include <studio/module.hpp>
#include <ox/std/memory.hpp>
extern ox::Vector<std::function<ox::UPtr<studio::Module>()>> BuiltinModules;

View File

@ -5,10 +5,10 @@
#include <imgui.h>
#include <keel/media.hpp>
#include <glutils/glutils.hpp>
#include <turbine/turbine.hpp>
#include <studio/configio.hpp>
#include "builtinmodules.hpp"
#include "clawviewer.hpp"
#include "filedialogmanager.hpp"
#include "studioapp.hpp"
@ -119,7 +119,6 @@ void StudioUI::handleKeyEvent(turbine::Key key, bool down) noexcept {
}
void StudioUI::draw() noexcept {
glutils::clearScreen();
drawMenu();
drawTabBar();
if (m_showProjectExplorer) {