delay
This commit is contained in:
parent
14c1335881
commit
8fab19dd26
|
@ -5,6 +5,8 @@
|
|||
#include "DrawRender.hpp"
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
DrawRender::DrawRender(int windowWidth, int windowHeight, vkvm::Color defaultBackgroundColor, vkvm::Color penColor, int penWidth)
|
||||
: backgroundColor(defaultBackgroundColor), penColor(penColor) {
|
||||
|
@ -125,11 +127,7 @@ void DrawRender::translateToSharedMemory(std::vector<std::vector<bool>> shape, i
|
|||
currentY++;
|
||||
}
|
||||
|
||||
// a violent way to delay redraw
|
||||
for(y = 900; y < 1000; y++) {
|
||||
for(x = 900; x < 1000; x++)
|
||||
vkvm::setPixel(y, x, vkvm::Color(217,217,217));
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
|
||||
void DrawRender::clearToSharedMemory(std::vector<std::vector<bool>> shape, int startX, int startY) {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <Color.hpp>
|
||||
#include <vkvm.hpp>
|
||||
#include <iostream>
|
||||
#include "Font.h"
|
||||
#include "vector"
|
||||
#include "utils.hpp"
|
||||
#include <cmath>
|
||||
|
|
Loading…
Reference in New Issue