Use persistent hash for config

This commit is contained in:
2020-01-29 18:18:46 -06:00
parent 201ddabbcc
commit 4f1b490600
14 changed files with 40 additions and 31 deletions

View File

@@ -102,7 +102,7 @@ class IMICFPS
glColorPointer(3, GL_FLOAT, 0, o.flattened_materials)
glNormalPointer(GL_FLOAT, 0, o.flattened_normals)
if $debug.get(:wireframe) # This is kinda expensive
if window.config.get(:debug_options, :wireframe) # This is kinda expensive
glDisable(GL_LIGHTING)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
glPolygonOffset(2, 0.5)

View File

@@ -16,14 +16,14 @@ class IMICFPS
entities.each do |object|
if object.visible && object.renderable
# Render bounding boxes before transformation is applied
# @bounding_box_renderer.create_bounding_box(object, object.model.bounding_box, object.debug_color, object.object_id) if $debug.get(:boundingboxes)
# @bounding_box_renderer.create_bounding_box(object, object.model.bounding_box, object.debug_color, object.object_id) if window.config.get(:debug_options, :boundingboxes)
@opengl_renderer.draw_object(camera, lights, object)
end
end
# @bounding_box_renderer.draw_bounding_boxes if $debug.get(:boundingboxes)
# window.number_of_vertices+=@bounding_box_renderer.vertex_count if $debug.get(:boundingboxes)
# @bounding_box_renderer.draw_bounding_boxes if window.config.get(:debug_options, :boundingboxes)
# window.number_of_vertices+=@bounding_box_renderer.vertex_count if window.config.get(:debug_options, :boundingboxes)
# @bounding_box_renderer.bounding_boxes.clear
end