Fix first frame being black

TBH this just fixes the symptom be re-rendering...
This commit is contained in:
Michael Bradley 2025-01-01 21:04:05 +13:00
parent 010b41d352
commit c04309baaf
Signed by: MichaelBradley
SSH key fingerprint: SHA256:cj/YZ5VT+QOKncqSkx+ibKTIn0Obg7OIzwzl9BL8EO8
2 changed files with 2 additions and 1 deletions

View file

@ -54,6 +54,7 @@ void Renderable::Render(const Shader *const shader) const {
glVertexAttribPointer(attribLoc, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex),
reinterpret_cast<void *>(offsetof(Vertex, normal)));
} else {
// This will sometimes spam at the beginning of execution
cerr << "Not loading vtxNormal" << endl;
}

View file

@ -263,7 +263,7 @@ void Renderer::HandleMovementKey(const unsigned char key, const bool down) {
}
void Renderer::Tick(const int ticks) {
bool doneSomething = false;
bool doneSomething = ticks == 0;
if (last_mouse_x_ < 0 || last_mouse_x_ > viewport_width_ ||
last_mouse_y_ < 0 || last_mouse_y_ > viewport_height_) {
move_forward_ = false;