#include <RenderTarget.h>
◆ RenderTarget() [1/3]
Copy constructor. Will always set "texture_created_by_us" to true and use our own texture to avoid memleaks.
◆ RenderTarget() [2/3]
JGL::RenderTarget::RenderTarget |
( |
const Texture * |
texture, |
|
|
const Color4 & |
clear_color = Colors::Black |
|
) |
| |
|
explicit |
Create a render target for a texture that already exists. For adding to an existing texture.
Idk why you'd ever want to clear it out if you're rendering onto a texture you passed in :shrug:.
◆ RenderTarget() [3/3]
Create a Render Target with a brand new texture. Want to render JGL elements onto a texture and display it as a sprite?
◆ ~RenderTarget()
JGL::RenderTarget::~RenderTarget |
( |
| ) |
|
◆ Blit() [1/2]
void JGL::RenderTarget::Blit |
( |
| ) |
const |
If you're using raw OpenGL commands to draw to this outside of J2D or J3D don't forget to do this.
Blits the MSAA FBO onto the regular FBO if MSAA is enabled and or If you're rendering to a texture which uses mipmaps, It regenerates them so what you drew doesn't disappear at a distance. Otherwise it does nothing.
◆ Blit() [2/2]
Blit a render target onto another. Will break if they're not the same size.
◆ GetActiveGLFramebufferHandle()
GLuint JGL::RenderTarget::GetActiveGLFramebufferHandle |
( |
| ) |
|
|
static |
◆ GetClearColor()
Color4 JGL::RenderTarget::GetClearColor |
( |
| ) |
const |
◆ GetData()
std::vector< GLfloat > JGL::RenderTarget::GetData |
( |
| ) |
const |
Get the data back from the FBO. This is not async friendly.
◆ GetDimensions()
Vector2 JGL::RenderTarget::GetDimensions |
( |
| ) |
const |
◆ GetGLDepthBufferHandle()
GLuint JGL::RenderTarget::GetGLDepthBufferHandle |
( |
| ) |
const |
◆ GetGLFramebufferObjectHandle()
GLuint JGL::RenderTarget::GetGLFramebufferObjectHandle |
( |
| ) |
const |
◆ GetGLTextureHandle()
GLuint JGL::RenderTarget::GetGLTextureHandle |
( |
| ) |
const |
◆ GetJGLTexture()
const JGL::Texture * JGL::RenderTarget::GetJGLTexture |
( |
| ) |
const |
◆ GetMSAASampleRate()
◆ MSAAEnabled()
bool JGL::RenderTarget::MSAAEnabled |
( |
| ) |
const |
Returns whether or not MSAA is enabled, If it is and you're not using J2D || J3D Begin / End, You need to run "Blit()" after rendering to your FBO before you show it.
- Note
- Also, If the texture wasn't made by the RenderTarget you don't want this. It would destroy the texture.
◆ Resize()
void JGL::RenderTarget::Resize |
( |
const Vector2 & |
new_size | ) |
|
Change the size of the renderable area of the Render Target.
- Parameters
-
◆ SetActiveGLRenderTarget()
void JGL::RenderTarget::SetActiveGLRenderTarget |
( |
const RenderTarget & |
render_target | ) |
|
|
static |
◆ SetMSAAEnabled()
◆ TextureCreatedByRenderTarget()
bool JGL::RenderTarget::TextureCreatedByRenderTarget |
( |
| ) |
const |
The documentation for this class was generated from the following files: