Browse Source

Reorder glClear and nanovg drawing. Rename CPU meter to CPU timer.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
0a39d57f09
2 changed files with 4 additions and 5 deletions
  1. +1
    -1
      src/app/Toolbar.cpp
  2. +3
    -4
      src/window.cpp

+ 1
- 1
src/app/Toolbar.cpp View File

@@ -364,7 +364,7 @@ struct SettingsButton : MenuButton {
menu->addChild(paramTooltipItem); menu->addChild(paramTooltipItem);


CpuMeterItem *cpuMeterItem = new CpuMeterItem; CpuMeterItem *cpuMeterItem = new CpuMeterItem;
cpuMeterItem->text = "CPU meter";
cpuMeterItem->text = "CPU timer";
cpuMeterItem->rightText = CHECKMARK(settings::cpuMeter); cpuMeterItem->rightText = CHECKMARK(settings::cpuMeter);
menu->addChild(cpuMeterItem); menu->addChild(cpuMeterItem);




+ 3
- 4
src/window.cpp View File

@@ -362,10 +362,6 @@ void Window::run() {
// Render scene // Render scene
bool visible = glfwGetWindowAttrib(win, GLFW_VISIBLE) && !glfwGetWindowAttrib(win, GLFW_ICONIFIED); bool visible = glfwGetWindowAttrib(win, GLFW_VISIBLE) && !glfwGetWindowAttrib(win, GLFW_ICONIFIED);
if (visible) { if (visible) {
glViewport(0, 0, fbWidth, fbHeight);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);

// Update and render // Update and render
nvgBeginFrame(vg, fbWidth, fbHeight, pixelRatio); nvgBeginFrame(vg, fbWidth, fbHeight, pixelRatio);
nvgReset(vg); nvgReset(vg);
@@ -377,6 +373,9 @@ void Window::run() {
args.clipBox = APP->scene->box.zeroPos(); args.clipBox = APP->scene->box.zeroPos();
APP->scene->draw(args); APP->scene->draw(args);


glViewport(0, 0, fbWidth, fbHeight);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
nvgEndFrame(vg); nvgEndFrame(vg);


glfwSwapBuffers(win); glfwSwapBuffers(win);


Loading…
Cancel
Save