mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Enabled wireframes for shader renderer
This commit is contained in:
@@ -67,6 +67,17 @@ class IMICFPS
|
||||
glEnableVertexAttribArray(4)
|
||||
end
|
||||
|
||||
if window.config.get(:debug_options, :wireframe)
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
|
||||
Shader.active_shader.uniform_boolean("disableLighting", true)
|
||||
|
||||
glDrawArrays(GL_TRIANGLES, 0, model.faces.count * 3)
|
||||
window.number_of_vertices += model.faces.count * 3
|
||||
|
||||
Shader.active_shader.uniform_boolean("disableLighting", false)
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
|
||||
end
|
||||
|
||||
glDrawArrays(GL_TRIANGLES, 0, model.faces.count * 3)
|
||||
window.number_of_vertices += model.faces.count * 3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user