Skip to content

Commit

Permalink
lib fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SeriousSamV committed Jan 21, 2017
1 parent 4ce580c commit 0b080d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions 02/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ class myApp: public mylib::App
#endif
}

void update() override
void update(double time) override
{
shader.use();
timeValue = glfwGetTime();
greenVal = (std::sin(timeValue) / 2) + 0.5;
glUniform4f(vertexColorLoc, 0.5f, greenVal, 0.25f, 1.0f);
}

void render(double time) override
void render() override
{
glClear(GL_COLOR_BUFFER_BIT);
shader.use();
Expand Down
4 changes: 2 additions & 2 deletions 03/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ class myApp: public mylib::App
glDeleteBuffers(1, &EBO);
}

void update() override
void update(double app_time) override
{

}

void render(double app_time) override
void render() override
{
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
Expand Down
4 changes: 2 additions & 2 deletions 04/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ class myApp: public mylib::App
glDeleteBuffers(1, &EBO);
}

void update() override
void update(double time) override
{

}

void render(double app_time) override
void render() override
{
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
Expand Down
Empty file added 05/main.cpp
Empty file.
8 changes: 4 additions & 4 deletions lib/mylib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class App
app.startup();

while (!glfwWindowShouldClose(window.getWindow())) {
app.update();
app.render(glfwGetTime());
app.update(glfwGetTime());
app.render();

glfwSwapBuffers(window.getWindow());
glfwPollEvents();
Expand All @@ -119,8 +119,8 @@ class App
}

virtual void startup() {}
virtual void update() {}
virtual void render(double) {}
virtual void update(double) {}
virtual void render() {}
virtual void shutdown() {}

protected:
Expand Down

0 comments on commit 0b080d4

Please sign in to comment.