Sha256: cf45bd74f49913558139af9ce0207482691de0419df182fd39552ba324d460d6

Contents?: true

Size: 639 Bytes

Versions: 3

Compression:

Stored size: 639 Bytes

Contents

module CyberarmEngine
  class Renderer
    attr_reader :opengl_renderer, :bounding_box_renderer

    def initialize
      @bounding_box_renderer = BoundingBoxRenderer.new
      @opengl_renderer = OpenGLRenderer.new(width: CyberarmEngine::Window.instance.width, height: CyberarmEngine::Window.instance.height)
    end

    def draw(camera, lights, entities)
      @opengl_renderer.render(camera, lights, entities)
      @bounding_box_renderer.render(entities) if @show_bounding_boxes
    end

    def canvas_size_changed
      @opengl_renderer.canvas_size_changed
    end

    def finalize # cleanup
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cyberarm_engine-0.23.0 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.22.0 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.21.0 lib/cyberarm_engine/opengl/renderer/renderer.rb