Textures work! that 3 was only getting 2... Added --native to lunch game at native resolution and fullscreen. Added basic plane.

This commit is contained in:
2018-03-20 11:18:16 -05:00
parent afc039ffe6
commit e26796f42c
6 changed files with 27 additions and 21 deletions

View File

@@ -59,7 +59,6 @@ class IMICFPS
file = File.open(@object_path.sub(File.basename(@object_path), '')+@material_file, 'r')
file.readlines.each do |line|
array = line.strip.split(' ')
# puts array.join
case array.first
when 'newmtl'
material = Material.new(array.last)
@@ -143,7 +142,7 @@ class IMICFPS
if array.size == 4
texture = Vertex.new(Float(array[1]), 1-Float(array[2]), Float(array[3]))
elsif array.size == 3
texture = Vertex.new(Float(array[1]), 1-Float(array[2]), 0.0)
texture = Vertex.new(Float(array[1]), 1-Float(array[2]), 1.0)
else
raise
end