1 #ifndef RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
2 #define RAYLIB_CPP_INCLUDE_RENDERTEXTURE_HPP_
4 #include "./raylib.hpp"
5 #include "./raylib-cpp-utils.hpp"
6 #include "./RaylibException.hpp"
7 #include "./TextureUnmanaged.hpp"
26 RenderTexture(
unsigned int id, const ::Texture& texture, const ::Texture& depth) :
33 set(::LoadRenderTexture(width, height));
46 GETTERSETTER(
unsigned int, Id,
id)
55 inline void SetTexture(const ::Texture& newTexture) {
66 inline void SetDepth(const ::Texture& newDepth) {
96 inline void Unload() {
97 UnloadRenderTexture(*
this);
104 ::BeginTextureMode(*
this);
120 return ::LoadRenderTexture(width, height);
131 void set(const ::RenderTexture& renderTexture) {
132 id = renderTexture.id;
133 texture = renderTexture.texture;
134 depth = renderTexture.depth;
137 typedef RenderTexture RenderTexture2D;
RenderTexture type, for texture rendering.
TextureUnmanaged GetTexture()
Get the color buffer attachment texture.
RenderTexture & EndMode()
Ends drawing to render texture.
bool IsReady() const
Retrieves whether or not the render texture is ready.
RenderTexture & BeginMode()
Initializes render texture for drawing.
TextureUnmanaged GetDepth()
Depth buffer attachment texture.
RenderTexture()
Default constructor to build an empty RenderTexture.
static RenderTexture Load(int width, int height)
Load texture for rendering (framebuffer)
RenderTexture(int width, int height)
Load texture for rendering (framebuffer)
A Texture that is not managed by the C++ garbage collector.
All raylib-cpp classes and functions appear in the raylib namespace.