class
Eagle::Renderer3D
- Eagle::Renderer3D
- Reference
- Object
Overview
The forward renderer: shadow pass, sky, opaque meshes, then transparent meshes.
The scene tree drives it through Scene3D.render. Call #render directly to draw meshes
without nodes, for tools and special effects.
Defined in:
eagle/graphics3d/renderer3d.crConstructors
-
.new(environment : Environment = Environment.new)
Creates a renderer.
Instance Method Summary
-
#dispose : Nil
Frees GPU resources.
-
#draw_calls : Int32
Same as
#stats_draw_calls. -
#environment : Environment
The settings used when rendering.
-
#environment=(environment : Environment)
The settings used when rendering.
-
#light_matrix : Mat4
The light-space matrix used for shadows.
-
#render(camera : CameraView, items : Array(DrawItem), lights : Array(LightData), target_size : Vec2, flip_y : Bool = false, clear : Bool = true) : Nil
Renders items lit by lights from camera into the current target.
-
#shadow_texture : Texture | Nil
The shadow map from the last render, for debugging.
-
#stats_draw_calls : Int32
Draw calls in the last render.
Constructor Detail
Instance Method Detail
def render(camera : CameraView, items : Array(DrawItem), lights : Array(LightData), target_size : Vec2, flip_y : Bool = false, clear : Bool = true) : Nil
#
Renders items lit by lights from camera into the current target. Set flip_y when
rendering into a Canvas, and clear to clear color and depth first.