Compare commits
No commits in common. "de45e7a0758deda4d2ed21260e6ff131c420d091" and "47858ef619581e43dafa8b01230ceb9dbf1d3677" have entirely different histories.
de45e7a075
...
47858ef619
@ -184,9 +184,4 @@ void sendEbo(const BufferSet &bs) noexcept {
|
|||||||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, bufferSize, bs.elements.data(), GL_STATIC_DRAW);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
namespace glutils {
|
namespace glutils {
|
||||||
|
|
||||||
constexpr ox::StringView GlslVersion = "#version 330";
|
constexpr auto GlslVersion = "#version 330";
|
||||||
|
|
||||||
struct Empty {};
|
struct Empty {};
|
||||||
|
|
||||||
@ -176,6 +176,4 @@ void sendVbo(const BufferSet &bs) noexcept;
|
|||||||
|
|
||||||
void sendEbo(const BufferSet &bs) noexcept;
|
void sendEbo(const BufferSet &bs) noexcept;
|
||||||
|
|
||||||
void clearScreen() noexcept;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -346,8 +346,7 @@ ox::Error initGfx(
|
|||||||
const auto spriteFshad = ox::sfmt(renderer::spritefshadTmpl, glutils::GlslVersion);
|
const auto spriteFshad = ox::sfmt(renderer::spritefshadTmpl, glutils::GlslVersion);
|
||||||
auto &gctx = static_cast<GlContext&>(*ctx);
|
auto &gctx = static_cast<GlContext&>(*ctx);
|
||||||
oxReturnError(glutils::buildShaderProgram(bgVshad.c_str(), bgFshad.c_str()).moveTo(&gctx.bgShader));
|
oxReturnError(glutils::buildShaderProgram(bgVshad.c_str(), bgFshad.c_str()).moveTo(&gctx.bgShader));
|
||||||
oxReturnError(
|
oxReturnError(glutils::buildShaderProgram(spriteVshad.c_str(), spriteFshad.c_str()).moveTo(&gctx.spriteShader));
|
||||||
glutils::buildShaderProgram(spriteVshad.c_str(), spriteFshad.c_str()).moveTo(&gctx.spriteShader));
|
|
||||||
for (auto &bg : gctx.cbbs) {
|
for (auto &bg : gctx.cbbs) {
|
||||||
initBackgroundBufferset(ctx, gctx.bgShader, &bg);
|
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])]));
|
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 {
|
void setBgCbb(Context *ctx, unsigned bgIdx, unsigned cbbIdx) noexcept {
|
||||||
auto &gctx = static_cast<GlContext&>(*ctx);
|
auto &gctx = static_cast<GlContext&>(*ctx);
|
||||||
auto &bg = gctx.backgrounds[bgIdx];
|
auto &bg = gctx.backgrounds[bgIdx];
|
||||||
@ -579,7 +577,9 @@ namespace gl {
|
|||||||
|
|
||||||
void drawMainView(core::Context *ctx, ox::Size const&renderSz) noexcept {
|
void drawMainView(core::Context *ctx, ox::Size const&renderSz) noexcept {
|
||||||
glViewport(0, 0, renderSz.width, renderSz.height);
|
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);
|
auto &gctx = static_cast<GlContext&>(*ctx);
|
||||||
renderer::drawBackgrounds(&gctx, renderSz);
|
renderer::drawBackgrounds(&gctx, renderSz);
|
||||||
if (gctx.spriteBlocks.tex) {
|
if (gctx.spriteBlocks.tex) {
|
||||||
|
11
src/studio/applib/src/builtinmodules.hpp
Normal file
11
src/studio/applib/src/builtinmodules.hpp
Normal 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;
|
@ -5,10 +5,10 @@
|
|||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
|
|
||||||
#include <keel/media.hpp>
|
#include <keel/media.hpp>
|
||||||
#include <glutils/glutils.hpp>
|
|
||||||
#include <turbine/turbine.hpp>
|
#include <turbine/turbine.hpp>
|
||||||
|
|
||||||
#include <studio/configio.hpp>
|
#include <studio/configio.hpp>
|
||||||
|
#include "builtinmodules.hpp"
|
||||||
#include "clawviewer.hpp"
|
#include "clawviewer.hpp"
|
||||||
#include "filedialogmanager.hpp"
|
#include "filedialogmanager.hpp"
|
||||||
#include "studioapp.hpp"
|
#include "studioapp.hpp"
|
||||||
@ -119,7 +119,6 @@ void StudioUI::handleKeyEvent(turbine::Key key, bool down) noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void StudioUI::draw() noexcept {
|
void StudioUI::draw() noexcept {
|
||||||
glutils::clearScreen();
|
|
||||||
drawMenu();
|
drawMenu();
|
||||||
drawTabBar();
|
drawTabBar();
|
||||||
if (m_showProjectExplorer) {
|
if (m_showProjectExplorer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user