Merge branch 'master' of github.com:sippeangelo/Escape-the-Dawn
Conflicts: Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters Escape-the-Dawn/GameWorld.cpp Escape-the-Dawn/Renderer.cpp Escape-the-Dawn/Systems/RenderSystem.cpp
This commit is contained in:
@@ -72,6 +72,17 @@ void Renderer::Draw(double dt)
|
||||
glPolygonMode(GL_FRONT_AND_BACK, m_DrawWireframe ? GL_LINE : GL_FILL);
|
||||
DrawModels();
|
||||
|
||||
#ifdef DEBUG
|
||||
// Debug draw normals
|
||||
if (m_DrawNormals) {
|
||||
m_ShaderProgramNormals.Bind();
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
DrawModels();
|
||||
}
|
||||
#endif
|
||||
|
||||
ModelsToRender.clear();
|
||||
|
||||
#ifdef DEBUG
|
||||
// Debug draw normals
|
||||
if (m_DrawNormals) {
|
||||
@@ -113,7 +124,7 @@ void Renderer::DrawModels()
|
||||
for (auto texGroup : model->TextureGroups) {
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, texGroup.Texture->texture);
|
||||
glDrawArrays(GL_TRIANGLES, texGroup.StartIndex, texGroup.EndIndex - texGroup.StartIndex + 1);
|
||||
glDrawArrays(GL_TRIANGLES, texGroup.StartIndex, (texGroup.EndIndex - texGroup.StartIndex + 1) * abs(sin(glfwGetTime())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user