class Shale::RenderCtx
- Shale::RenderCtx
- Reference
- Object
Defined in:
shale/render_ctx.crConstructors
-
.new(width : Int32, height : Int32, target : Shale::Surface)
Render Context
Instance Method Summary
-
#draw_scan_line(left : Shale::Edge, right : Shale::Edge, y : UInt32, gradient : Gradient, texture : Shale::Surface)
FIXME , for the texture mapping, gradient is not needed, but still including for the colour part, for now
- #draw_triangle(*vertices : Shale::Vertex, texture : Shale::Surface)
- #scan_edges(a : Shale::Edge, b : Shale::Edge, swap : Bool, gradient : Gradient, texture : Shale::Surface)
- #scan_triangle(min : Shale::Vertex, mid : Shale::Vertex, max : Shale::Vertex, texture : Shale::Surface)
Constructor Detail
def self.new(width : Int32, height : Int32, target : Shale::Surface)
#
Render Context
Description
For now to save time and getting things working, just following the implementation from the video series, in the future (depending on where this class' goes), would be good to change:
- Not relying on the 'window' dimensions for the size of @data
- Conform on which type of Int?
- remove width and height and just use @target's width and height instead
Instance Method Detail
def draw_scan_line(left : Shale::Edge, right : Shale::Edge, y : UInt32, gradient : Gradient, texture : Shale::Surface)
#
FIXME , for the texture mapping, gradient is not needed, but still including for the colour part, for now
def scan_edges(a : Shale::Edge, b : Shale::Edge, swap : Bool, gradient : Gradient, texture : Shale::Surface)
#
def scan_triangle(min : Shale::Vertex, mid : Shale::Vertex, max : Shale::Vertex, texture : Shale::Surface)
#