class

PointClickEngine::Graphics::Core::Renderer

Inherits Reference < Object

Main rendering pipeline coordinator

The Renderer manages the entire rendering process, coordinating between the display, camera, layers, and effects. It provides the main entry point for all rendering operations.

Rendering Pipeline

  1. Clear screen and letterbox
  2. Apply camera transformation
  3. Render each layer in order
  4. Apply post-processing effects
  5. Render UI overlay

Example

renderer = Renderer.new(display)
renderer.render do |context|
  # Render game objects using context
  context.draw_sprite(sprite, position)
end

Constructors

new(display : Display)
Source

Instance methods

blit_logical_texture(texture : RL::Texture2D, width : Int32 = logical_width, height : Int32 = logical_height, tint : RL::Color = RL::WHITE)
Source
build_frame_context(scene_width : Int32 | Nil = nil, scene_height : Int32 | Nil = nil, cinematic_width : Int32 | Nil = nil, cinematic_height : Int32 | Nil = nil) : FrameContext
Source
camera
Source
cleanup

Cleanup render textures

Source
debug_mode=(enabled : Bool)

Enable debug rendering mode

Source
debug_mode?
Source
disable_post_processing
Source
display

Components

Source
enable_post_processing

Enable/disable post-processing

Source
ensure_render_textures
Source
final_render_texture
Source
increment_render_calls

Track render calls for performance monitoring

Source
logical_height
Source
logical_rect
Source
logical_width
Source
post_processing_enabled

Effects and post-processing

Source
post_processing_enabled=(post_processing_enabled : Bool)

Effects and post-processing

Source
render(apply_display_transform : Bool = true, &block : RenderContext -> )

Main render method with context

Source
render_calls

Rendering state

Source
render_multi_viewport(viewports : Array(Tuple(Viewport, Camera)), &block : RenderContext, Int32 -> )

Render with multiple viewports (for split-screen, minimap, etc.)

Source
scene_render_texture_a
Source
scene_render_texture_b
Source
viewport
Source
visible?(world_x : Float32, world_y : Float32, margin : Float32 = 50.0_f32) : Bool

Check if a world position is visible

Source
world_render_texture
Source