Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
mnd::RenderTarget Class Reference

Offscreen FBO with MRT colour + sampleable depth for low-resolution rendering. More...

#include <RenderTarget.h>

Public Member Functions

bool Create (int w, int h)
 
void Resize (int w, int h)
 
void Destroy ()
 
void Bind ()
 
GLuint ColorTex () const
 
GLuint NormalTex () const
 
GLuint DepthTex () const
 
int Width () const
 
int Height () const
 
bool IsValid () const
 

Static Public Member Functions

static void BindDefault (int winW, int winH)
 

Detailed Description

Offscreen FBO with MRT colour + sampleable depth for low-resolution rendering.

Attachment layout matches lit_pixel.frag: COLOR_ATTACHMENT0 -> shaded RGBA8 colour COLOR_ATTACHMENT1 -> view-space normals (encoded N*0.5+0.5, RGBA8) DEPTH_ATTACHMENT -> DEPTH_COMPONENT24 texture (sampleable)

Definition at line 33 of file RenderTarget.h.

Member Function Documentation

◆ Bind()

void mnd::RenderTarget::Bind ( )

Definition at line 124 of file RenderTarget.cpp.

References IsValid(), and LOG_ERROR.

Referenced by mnd::Engine::Run().

◆ BindDefault()

void mnd::RenderTarget::BindDefault ( int  winW,
int  winH 
)
static

Definition at line 142 of file RenderTarget.cpp.

Referenced by mnd::Engine::Run().

◆ ColorTex()

GLuint mnd::RenderTarget::ColorTex ( ) const
inline

Definition at line 43 of file RenderTarget.h.

Referenced by mnd::Engine::Run(), and mnd::PostProcess::RunOutline().

◆ Create()

bool mnd::RenderTarget::Create ( int  w,
int  h 
)

Definition at line 39 of file RenderTarget.cpp.

References Destroy(), and LOG_ERROR.

Referenced by mnd::Engine::Init(), and Resize().

◆ DepthTex()

GLuint mnd::RenderTarget::DepthTex ( ) const
inline

Definition at line 45 of file RenderTarget.h.

Referenced by mnd::Engine::Run(), and mnd::PostProcess::RunOutline().

◆ Destroy()

void mnd::RenderTarget::Destroy ( )

Definition at line 114 of file RenderTarget.cpp.

Referenced by Create(), and mnd::Engine::Destroy().

◆ Height()

int mnd::RenderTarget::Height ( ) const
inline

Definition at line 47 of file RenderTarget.h.

Referenced by mnd::PostProcess::RunOutline().

◆ IsValid()

bool mnd::RenderTarget::IsValid ( ) const
inline

Definition at line 48 of file RenderTarget.h.

Referenced by Bind(), mnd::Engine::Run(), and mnd::PostProcess::RunOutline().

◆ NormalTex()

GLuint mnd::RenderTarget::NormalTex ( ) const
inline

Definition at line 44 of file RenderTarget.h.

Referenced by mnd::Engine::Run(), and mnd::PostProcess::RunOutline().

◆ Resize()

void mnd::RenderTarget::Resize ( int  w,
int  h 
)

Definition at line 105 of file RenderTarget.cpp.

References Create().

Referenced by mnd::Engine::Run().

◆ Width()

int mnd::RenderTarget::Width ( ) const
inline

Definition at line 46 of file RenderTarget.h.

Referenced by mnd::PostProcess::RunOutline().


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