mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Terrrain fill dome, added terrain to face count
This commit is contained in:
@@ -9,5 +9,11 @@ class IMICFPS
|
||||
super
|
||||
glEnable(GL_LIGHTING)
|
||||
end
|
||||
|
||||
def update
|
||||
super
|
||||
@y_rotation+=0.01
|
||||
@y_rotation%=360
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -100,6 +100,7 @@ class IMICFPS
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
|
||||
# glDrawArrays(GL_TRIANGLE_STRIP, 0, @vertices.size/3)
|
||||
glDrawArrays(GL_TRIANGLES, 0, @vertices.size/3)
|
||||
$window.number_of_faces+=@vertices.size/3
|
||||
|
||||
glDisableClientState(GL_VERTEX_ARRAY)
|
||||
glDisableClientState(GL_NORMAL_ARRAY)
|
||||
|
||||
@@ -27,7 +27,7 @@ class IMICFPS
|
||||
# Model.new(type: :obj, file_path: "objects/tree.obj", z: -5)
|
||||
# Model.new(type: :obj, file_path: "objects/tree.obj", x: -2, z: -6)
|
||||
# Model.new(type: :obj, file_path: "objects/sponza.obj", scale: 1, y: -0.2)
|
||||
@terrain = Terrain.new(size: 40, height: 0)
|
||||
@terrain = Terrain.new(size: 170, height: 0)
|
||||
|
||||
@player = Player.new(x: 1, y: 0, z: -1)
|
||||
@camera = Camera.new(x: 0, y: -2, z: 1)
|
||||
@@ -100,6 +100,8 @@ class IMICFPS
|
||||
object.update
|
||||
end
|
||||
|
||||
@skydome.update if @skydome.renderable
|
||||
|
||||
@camera.update
|
||||
|
||||
$window.close if $window.button_down?(Gosu::KbEscape)
|
||||
|
||||
Reference in New Issue
Block a user