lib/mittsu/renderers/opengl/opengl_light_renderer.rb in mittsu-0.1.2 vs lib/mittsu/renderers/opengl/opengl_light_renderer.rb in mittsu-0.1.3

- old
+ new

@@ -1,15 +1,15 @@ module Mittsu class OpenGLLightRenderer attr_accessor :lights_need_update, :cache LIGHT_CLASSES = [ - OpenGLAmbientLight, - OpenGLDirectionalLight, - OpenGLPointLight, - OpenGLSpotLight, - OpenGLHemisphereLight + AmbientLight, + DirectionalLight, + PointLight, + SpotLight, + HemisphereLight ] LIGHT_TYPES = LIGHT_CLASSES.map { |klass| klass::TYPE } def initialize(renderer) @renderer = renderer @@ -23,10 +23,10 @@ def setup(lights) @cache.values.each(&:reset) lights.each do |light| next if light.only_shadow - light.implementation(self).setup + light.setup(self) end LIGHT_CLASSES.each do |klass| cache = @cache[klass::TYPE] klass.null_remaining_lights(cache)