Create a proper renderer #7

Open
opened 2026-03-10 22:08:57 +00:00 by Fluffy · 1 comment
Owner

Some goals for the renderer:
- Allow for layered Objects
- Allow for shaders to be applied to specific textures
- Proper and efficient culling

Some goals for the renderer: - Allow for layered `Object`s - Allow for shaders to be applied to specific textures - Proper and efficient culling
Author
Owner

Objects on_render method could instead accept or return a render queue item, something like the following maybe

struct RenderQueue {
  .kind = RenderQueueKind::TEXTURE,
  .data = {
    .position     = { 0, 0 },
    .layer        = 1,
    .sprite_sheet = "some_name",
    .sprite_anim  = "some_animation",
    .sprite_index = 0,
    .shader_id    = -1, // Something like this to show no shader should be applied
    .shader_vars  = {},
  }
}

This way, Objects could request to render multiple textures/layers and whatnot

`Object`s `on_render` method could instead accept or return a render queue item, something like the following maybe ```cpp struct RenderQueue { .kind = RenderQueueKind::TEXTURE, .data = { .position = { 0, 0 }, .layer = 1, .sprite_sheet = "some_name", .sprite_anim = "some_animation", .sprite_index = 0, .shader_id = -1, // Something like this to show no shader should be applied .shader_vars = {}, } } ``` This way, `Object`s could request to render multiple textures/layers and whatnot
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Fluffy/UrchinEnginePlusPlus#7
No description provided.