class SDL::Texture

Defined in:

texture.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(renderer : Renderer | LibSDL::Renderer, width, height, pixel_format = LibSDL::PixelFormatEnum::RGBA8888, texture_access = LibSDL::TextureAccess::STREAMING) #

[View source]
def self.new(texture : Pointer(LibSDL::Texture)) #

[View source]

Class Method Detail

def self.from(surface : Surface, renderer : Renderer) #

Creates a Texture for renderer from a Surface.


[View source]

Instance Method Detail

def alpha_mod #

[View source]
def alpha_mod=(alpha) #

[View source]
def blend_mode #

[View source]
def blend_mode=(blend_mode : BlendMode) #

[View source]
def color_mod #

[View source]
def color_mod=(rgb) #

[View source]
def finalize #

[View source]
def gl_bind #

Binds an OpenGL/ES/ES2 texture to the current texture, for use with OpenGL instructions when Rendering OpenGL primitives directly.


[View source]
def gl_unbind #

Unbinds an OpenGL/ES/ES2 texture from the current context.


[View source]
def height #

[View source]
def lock : Tuple(Slice(UInt32), Int32) #

[View source]
def lock(& : Slice(UInt32), Int32 -> ) : Nil #

Locks a texture and yields a buffer of pixels for write only changes along with the pitch the data


[View source]
def to_unsafe : Pointer(LibSDL::Texture) #

[View source]
def unlock #

[View source]
def width #

[View source]