Btk
Btk::Texture Class Reference

Classes

struct  Information
 Texture's information. More...
 

Public Member Functions

 Texture (BtkTexture *t=nullptr)
 
 Texture (const Texture &)=delete
 
 Texture (Texture &&t)
 
Size size () const
 Get the size(w and h) More...
 
int w () const
 
int h () const
 
bool empty () const noexcept
 
Textureoperator= (BtkTexture *)
 
Textureoperator= (Texture &&)
 
BtkTexture * get () const noexcept
 
void update (const Rect *r, void *pixels, int pitch)
 Update a texture's pixels. More...
 
void lock (const Rect *rect, void **pixels, int *pitch)
 Lock a Streaming Texture. More...
 
void lock (const Rect &rect, void **pixels, int *pitch)
 
void lock (void **pixels, int *pitch)
 
void update (const Rect &r, void *pixels, int pitch)
 
void update (void *pixels, int pitch)
 
void unlock ()
 Unlock the texture. More...
 
Information information () const
 Get the texture's information. More...
 

Friends

struct Renderer
 

Member Function Documentation

◆ information()

Texture::Information Btk::Texture::information ( ) const

Get the texture's information.

Returns
Information

◆ lock()

void Btk::Texture::lock ( const Rect rect,
void **  pixels,
int *  pitch 
)

Lock a Streaming Texture.

Parameters
rectThe area you want to lock(nullptr to all texture)
pixelsThe pixels pointer's pointer
pitchThe texture's pixels pitch pointer

◆ size()

Size Btk::Texture::size ( ) const
inline

Get the size(w and h)

Returns
W and H

◆ unlock()

void Btk::Texture::unlock ( )

Unlock the texture.

◆ update()

void Btk::Texture::update ( const Rect r,
void *  pixels,
int  pitch 
)

Update a texture's pixels.

Note
This is a very slow operation
Parameters
rThe area you want to update(nullptr to all texture)
pixelsThe pixels pointer
pitchThe pixels pitch

The documentation for this class was generated from the following files: