Added command to reload shaders at runtime, added support for shared scripts to Manifest, lights are now loadable from MapParser, misc changes.

This commit is contained in:
2020-03-24 09:51:20 -05:00
parent 2ad1385fb4
commit 578c00673d
18 changed files with 201 additions and 39 deletions

View File

@@ -124,12 +124,14 @@ class IMICFPS
glEnableClientState(GL_VERTEX_ARRAY)
glEnableClientState(GL_COLOR_ARRAY)
glEnableClientState(GL_NORMAL_ARRAY)
if model.has_texture?
glEnable(GL_TEXTURE_2D)
glBindTexture(GL_TEXTURE_2D, model.materials[model.textured_material].texture_id)
glEnableClientState(GL_TEXTURE_COORD_ARRAY)
glTexCoordPointer(3, GL_FLOAT, 0, o.flattened_textures)
end
glVertexPointer(4, GL_FLOAT, 0, o.flattened_vertices)
glColorPointer(3, GL_FLOAT, 0, o.flattened_materials)
glNormalPointer(GL_FLOAT, 0, o.flattened_normals)
@@ -160,10 +162,12 @@ class IMICFPS
glDisableClientState(GL_VERTEX_ARRAY)
glDisableClientState(GL_COLOR_ARRAY)
glDisableClientState(GL_NORMAL_ARRAY)
if model.has_texture?
glDisableClientState(GL_TEXTURE_COORD_ARRAY)
glDisable(GL_TEXTURE_2D)
end
glDisable(GL_CULL_FACE) if model.entity.backface_culling
glDisable(GL_COLOR_MATERIAL)
end