Progress towards modern gl made

This commit is contained in:
2019-12-05 17:23:02 -06:00
parent 93a9e2215c
commit 6aeee41a71
10 changed files with 97 additions and 62 deletions

View File

@@ -13,7 +13,7 @@ class IMICFPS
@lights = []
@collision_manager = CollisionManager.new(map: self)
@renderer = Renderer.new(map: self)
@renderer = Renderer.new
Publisher.new
end
@@ -55,12 +55,7 @@ class IMICFPS
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # clear the screen and the depth buffer
glError?
@lights.each(&:draw)
camera.draw
glEnable(GL_DEPTH_TEST)
@renderer.draw
@renderer.draw(camera, @lights, @entities)
end
end