26#ifndef TGUI_CANVAS_OPENGL3_HPP
27#define TGUI_CANVAS_OPENGL3_HPP
29#include <TGUI/Backend/Renderer/OpenGL3/BackendTextureOpenGL3.hpp>
31#if !TGUI_BUILD_AS_CXX_MODULE
32 #include <TGUI/Backend/Renderer/BackendRenderTarget.hpp>
33 #include <TGUI/Widgets/CanvasBase.hpp>
38TGUI_MODULE_EXPORT
namespace tgui
68 using Ptr = std::shared_ptr<CanvasOpenGL3>;
69 using ConstPtr = std::shared_ptr<const CanvasOpenGL3>;
71 static constexpr const char StaticWidgetType[] =
"CanvasOpenGL3";
81 CanvasOpenGL3(
const char* typeName = StaticWidgetType,
bool initRenderer =
true);
143 using Widget::setSize;
178 unsigned int m_textureId = 0;
179 unsigned int m_frameBuffer = 0;
182 std::shared_ptr<BackendTextureOpenGL3> m_backendTexture = std::make_shared<BackendTextureOpenGL3>();
Base class for render targets.
Definition BackendRenderTarget.hpp:48
This class is used as base class for the backend-specific canvas widgets.
Definition CanvasBase.hpp:39
Definition CanvasOpenGL3.hpp:65
std::shared_ptr< const CanvasOpenGL3 > ConstPtr
Shared constant widget pointer.
Definition CanvasOpenGL3.hpp:69
CanvasOpenGL3(const CanvasOpenGL3 ©)
Copy constructor.
static TGUI_NODISCARD CanvasOpenGL3::Ptr copy(const CanvasOpenGL3::ConstPtr &canvas)
Makes a copy of another canvas.
void draw(BackendRenderTarget &target, RenderStates states) const override
Draw the widget to a render target.
std::shared_ptr< CanvasOpenGL3 > Ptr
Shared widget pointer.
Definition CanvasOpenGL3.hpp:68
~CanvasOpenGL3() override
Destructor.
unsigned int bindFramebuffer() const
Binds the framebuffer of the canvas.
TGUI_NODISCARD Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
void setSize(const Layout2d &size) override
Changes the size of the widget.
CanvasOpenGL3(CanvasOpenGL3 &©)=default
Default move constructor.
static TGUI_NODISCARD CanvasOpenGL3::Ptr create(const Layout2d &size={"100%", "100%"})
Creates a new canvas widget.
Class to store the position or size of a widget.
Definition Layout.hpp:305
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39
States used for drawing.
Definition RenderStates.hpp:39