This commit is contained in:
Ilusha 2024-03-19 17:35:02 +03:00 committed by Ilya Shurupov
parent 25fd52294f
commit 16af8dc809
6 changed files with 140 additions and 42 deletions

View file

@ -135,11 +135,11 @@ void Canvas::deleteImageHandle(ImageHandle image) {
}
}
void Canvas::proc() {
void Canvas::drawBegin() {
const auto size = mContext->window->getSize();
nvgBeginFrame(mContext->vg, size.x, size.y, 1.0);
}
void Canvas::draw() {
void Canvas::drawEnd() {
nvgEndFrame(mContext->vg);
}

View file

@ -47,7 +47,7 @@ DebugGUI::~DebugGUI() {
delete mContext;
}
void DebugGUI::proc() {
void DebugGUI::drawBegin() {
tp::HeapAllocGlobal::startIgnore();
ImGui_ImplOpenGL3_NewFrame();
@ -57,7 +57,7 @@ void DebugGUI::proc() {
tp::HeapAllocGlobal::stopIgnore();
}
void DebugGUI::draw() {
void DebugGUI::drawEnd() {
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
}

View file

@ -2,7 +2,7 @@
#include "Window.hpp"
class GLFWwindow;
struct GLFWwindow;
namespace tp {