raylib-cpp
C++ object-oriented wrapper library for raylib.
raylib::RenderTexture Class Reference

RenderTexture type, for texture rendering. More...

#include <RenderTexture.hpp>

Public Member Functions

 RenderTexture ()
 Default constructor to build an empty RenderTexture. More...
 
 RenderTexture (const ::RenderTexture &renderTexture)
 
 RenderTexture (const RenderTexture &)=delete
 
 RenderTexture (int width, int height)
 
 RenderTexture (RenderTexture &&other)
 
 RenderTexture (unsigned int id, ::Texture texture, ::Texture depth)
 
 ~RenderTexture ()
 
RenderTexture & BeginMode ()
 Initializes render texture for drawing. More...
 
RenderTexture & EndMode ()
 Ends drawing to render texture. More...
 
::Texture2D GetDepth () const
 Retrieves the depth value for the object. More...
 
unsigned int GetId () const
 Retrieves the id value for the object. More...
 
::Texture2D GetTexture () const
 Retrieves the texture value for the object. More...
 
bool IsReady () const
 Retrieves whether or not the render texture is ready. More...
 
bool Load (int width, int height)
 Loads a render texture at the given width and height. More...
 
RenderTexture & operator= (const ::RenderTexture &texture)
 
RenderTexture & operator= (const RenderTexture &)=delete
 
RenderTexture & operator= (RenderTexture &&other) noexcept
 
void SetDepth (::Texture2D value)
 Sets the depth value for the object. More...
 
void SetId (unsigned int value)
 Sets the id value for the object. More...
 
void SetTexture (::Texture2D value)
 Sets the texture value for the object. More...
 
void Unload ()
 

Detailed Description

RenderTexture type, for texture rendering.

Definition at line 12 of file RenderTexture.hpp.

Constructor & Destructor Documentation

◆ RenderTexture() [1/6]

raylib::RenderTexture::RenderTexture ( )
inline

Default constructor to build an empty RenderTexture.

Definition at line 17 of file RenderTexture.hpp.

◆ RenderTexture() [2/6]

raylib::RenderTexture::RenderTexture ( const ::RenderTexture &  renderTexture)
inline

Definition at line 21 of file RenderTexture.hpp.

◆ RenderTexture() [3/6]

raylib::RenderTexture::RenderTexture ( unsigned int  id,
::Texture  texture,
::Texture  depth 
)
inline

Definition at line 25 of file RenderTexture.hpp.

◆ RenderTexture() [4/6]

raylib::RenderTexture::RenderTexture ( int  width,
int  height 
)
inline

Definition at line 27 of file RenderTexture.hpp.

References Load().

◆ RenderTexture() [5/6]

raylib::RenderTexture::RenderTexture ( const RenderTexture &  )
delete

◆ RenderTexture() [6/6]

raylib::RenderTexture::RenderTexture ( RenderTexture &&  other)
inline

Definition at line 35 of file RenderTexture.hpp.

◆ ~RenderTexture()

raylib::RenderTexture::~RenderTexture ( )
inline

Definition at line 69 of file RenderTexture.hpp.

References Unload().

Member Function Documentation

◆ BeginMode()

RenderTexture & raylib::RenderTexture::BeginMode ( )
inline

Initializes render texture for drawing.

Definition at line 80 of file RenderTexture.hpp.

◆ EndMode()

RenderTexture & raylib::RenderTexture::EndMode ( )
inline

Ends drawing to render texture.

Definition at line 88 of file RenderTexture.hpp.

◆ GetDepth()

::Texture2D raylib::RenderTexture::GetDepth ( ) const
inline

Retrieves the depth value for the object.

Returns
The depth value of the object.

Definition at line 45 of file RenderTexture.hpp.

◆ GetId()

unsigned int raylib::RenderTexture::GetId ( ) const
inline

Retrieves the id value for the object.

Returns
The id value of the object.

Definition at line 43 of file RenderTexture.hpp.

◆ GetTexture()

::Texture2D raylib::RenderTexture::GetTexture ( ) const
inline

Retrieves the texture value for the object.

Returns
The texture value of the object.

Definition at line 44 of file RenderTexture.hpp.

◆ IsReady()

bool raylib::RenderTexture::IsReady ( ) const
inline

Retrieves whether or not the render texture is ready.

Definition at line 104 of file RenderTexture.hpp.

Referenced by Load().

◆ Load()

bool raylib::RenderTexture::Load ( int  width,
int  height 
)
inline

Loads a render texture at the given width and height.

Definition at line 96 of file RenderTexture.hpp.

References IsReady().

Referenced by RenderTexture().

◆ operator=() [1/3]

RenderTexture & raylib::RenderTexture::operator= ( const ::RenderTexture &  texture)
inline

Definition at line 47 of file RenderTexture.hpp.

◆ operator=() [2/3]

RenderTexture & raylib::RenderTexture::operator= ( const RenderTexture &  )
delete

◆ operator=() [3/3]

RenderTexture & raylib::RenderTexture::operator= ( RenderTexture &&  other)
inlinenoexcept

Definition at line 54 of file RenderTexture.hpp.

References Unload().

◆ SetDepth()

void raylib::RenderTexture::SetDepth ( ::Texture2D  value)
inline

Sets the depth value for the object.

Parameters
valueThe value of which to set depth to.

Definition at line 45 of file RenderTexture.hpp.

◆ SetId()

void raylib::RenderTexture::SetId ( unsigned int  value)
inline

Sets the id value for the object.

Parameters
valueThe value of which to set id to.

Definition at line 43 of file RenderTexture.hpp.

◆ SetTexture()

void raylib::RenderTexture::SetTexture ( ::Texture2D  value)
inline

Sets the texture value for the object.

Parameters
valueThe value of which to set texture to.

Definition at line 44 of file RenderTexture.hpp.

◆ Unload()

void raylib::RenderTexture::Unload ( )
inline

Definition at line 73 of file RenderTexture.hpp.

Referenced by ~RenderTexture(), and operator=().