class SDL::Texture
- SDL::Texture
- Reference
- Object
Defined in:
texture.crConstructors
- .new(renderer : Renderer | LibSDL::Renderer, width, height, pixel_format = LibSDL::PixelFormatEnum::RGBA8888, texture_access = LibSDL::TextureAccess::STREAMING)
- .new(texture : Pointer(LibSDL::Texture))
Class Method Summary
Instance Method Summary
- #alpha_mod
- #alpha_mod=(alpha)
- #blend_mode
- #blend_mode=(blend_mode : BlendMode)
- #color_mod
- #color_mod=(rgb)
- #finalize
-
#gl_bind
Binds an OpenGL/ES/ES2 texture to the current texture, for use with OpenGL instructions when Rendering OpenGL primitives directly.
-
#gl_unbind
Unbinds an OpenGL/ES/ES2 texture from the current context.
- #height
- #lock : Tuple(Slice(UInt32), Int32)
-
#lock(& : Slice(UInt32), Int32 -> ) : Nil
Locks a texture and yields a buffer of pixels for write only changes along with the pitch the data
- #to_unsafe : Pointer(LibSDL::Texture)
- #unlock
- #width
Constructor Detail
def self.new(renderer : Renderer | LibSDL::Renderer, width, height, pixel_format = LibSDL::PixelFormatEnum::RGBA8888, texture_access = LibSDL::TextureAccess::STREAMING)
#
Class Method Detail
Instance Method Detail
def gl_bind
#
Binds an OpenGL/ES/ES2 texture to the current texture, for use with OpenGL instructions when Rendering OpenGL primitives directly.
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