module Boleite::GUI::Renderer::Contracts

Defined in:

boleite/gui/renderer.cr

Constant Summary

CLASS_DATA = ClassData(Boleite::GUI::Renderer).new
CONTRACTED_METHODS = ["initialize(gfx : GraphicsContext, camera : Camera)", "create_paste_shader(gfx)", "create_vertices()", "clear(color : Colorf)", "clear(rect : IntRect, color : Colorf)", "draw(drawcall : DrawCallContext)", "present()"] of _
CONTRACTS = {:next_def => nil, def draw(drawcall : DrawCallContext) : Void @framebuffer.activate do if shader = drawcall.shader apply_shader_settings(shader, drawcall.transformation, drawcall.uniforms) drawcall.buffers.each do |buffer| drawcall.vertices.attach_buffer(buffer, true) end shader.activate do drawcall.vertices.render(1) end end end end => [{:requires, "drawcall.shader", do drawcall.shader end}]} of _ => _
IGNORED_METHODS = ["finalize", "contract_pre_draw", "contract_post_draw", "contract_requires_draw", "contract_ensures_draw"] of _
INVARIANTS = [] of _

Class Method Summary

Macro Summary

Class Method Detail

def self.on_assert_fail(condition, type) #

[View source]
def self.on_contract_fail(contract, condition, type, method) #

[View source]

Macro Detail

macro add_contract(stage, str, &test) #

[View source]
macro add_invariant(str, &test) #

[View source]
macro ignore_method(method) #

[View source]