Fix first frame being black
TBH this just fixes the symptom be re-rendering...
This commit is contained in:
parent
010b41d352
commit
c04309baaf
2 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue