Added a large portion of I-MIC-FPS's opengl rendering and model loading systems

This commit is contained in:
2020-07-15 21:19:31 -05:00
parent d7dbcf8511
commit 041cfcccaa
22 changed files with 1724 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
module CyberarmEngine
class Model
class Material
attr_accessor :name, :ambient, :diffuse, :specular
attr_reader :texture_id
def initialize(name)
@name = name
@ambient = Color.new(1, 1, 1, 1)
@diffuse = Color.new(1, 1, 1, 1)
@specular= Color.new(1, 1, 1, 1)
@texture = nil
@texture_id = nil
end
def set_texture(texture_path)
@texture_id = Texture.new(path: texture_path).id
end
end
end
end