module Boleite::Private::OpenGLFrameBuffer::Contracts

Defined in:

boleite/backend/graphics/opengl_frame_buffer.cr

Constant Summary

CLASS_DATA = ClassData(Boleite::Private::OpenGLFrameBuffer).new
CONTRACTED_METHODS = ["initialize()", "activate()", "activate(target)", "blit(src, src_rect, dst_rect)", "attach_buffer(texture : Texture, identifier : Symbol, slot : UInt8)", "attach_depth_buffer(texture)", "detach_buffer(identifier)", "detach_depth_buffer()", "detach_all_buffers()"] of _
CONTRACTS = {:next_def => nil, def attach_depth_buffer(texture) : Void activate do tex = texture.as(OpenGLTexture) GL.safe_call do LibGL.framebufferTexture2D(LibGL::FRAMEBUFFER, LibGL::DEPTH_ATTACHMENT, LibGL::TEXTURE_2D, tex.identifier, 0) end @depth_texture = tex end end => [{:requires, "texture.is_depth?", do texture.is_depth? end}]} of _ => _
IGNORED_METHODS = ["finalize", "contract_pre_attach_depth_buffer", "contract_post_attach_depth_buffer", "contract_requires_attach_depth_buffer", "contract_ensures_attach_depth_buffer"] 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]