Various tweaks

This commit is contained in:
2019-02-26 18:43:42 -06:00
parent 8ccd1506f3
commit 2e69647ae3
9 changed files with 85 additions and 46 deletions

View File

@@ -32,7 +32,6 @@ class IMICFPS
return
end
end
@bounding_boxes[mesh_object_id] = {}
@bounding_boxes[mesh_object_id] = {object: object, box: box, color: color, objects: []}
box = object.normalize_bounding_box

View File

@@ -57,7 +57,7 @@ class IMICFPS
glEnableClientState(GL_VERTEX_ARRAY)
glEnableClientState(GL_COLOR_ARRAY)
glEnableClientState(GL_NORMAL_ARRAY)
if model.model_has_texture
if model.has_texture?
glEnable(GL_TEXTURE_2D)
glBindTexture(GL_TEXTURE_2D, model.materials[model.textured_material].texture_id)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
@@ -96,7 +96,7 @@ class IMICFPS
glDisableClientState(GL_VERTEX_ARRAY)
glDisableClientState(GL_COLOR_ARRAY)
glDisableClientState(GL_NORMAL_ARRAY)
if model.model_has_texture
if model.has_texture?
glDisableClientState(GL_TEXTURE_COORD_ARRAY)
# glBindTexture(GL_TEXTURE_2D, 0)
glDisable(GL_TEXTURE_2D)