Sha256: b08d7303079543d1334260d4451e5daaeba8abab895cef38d383b39469b3bcfa

Contents?: true

Size: 569 Bytes

Versions: 6

Compression:

Stored size: 569 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: $window.width, height: $window.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

6 entries across 6 versions & 1 rubygems

Version Path
cyberarm_engine-0.19.0 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.18.0 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.17.1 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.17.0 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.16.0 lib/cyberarm_engine/opengl/renderer/renderer.rb
cyberarm_engine-0.15.0 lib/cyberarm_engine/opengl/renderer/renderer.rb