CSEngine
Loading...
Searching...
No Matches
CSE::SRenderGroup Class Referenceabstract
Inheritance diagram for CSE::SRenderGroup:
CSE::DeferredRenderGroup CSE::DepthOnlyRenderGroup CSE::ForwardRenderGroup

Public Member Functions

 SRenderGroup (const RenderMgr &renderMgr)
 
virtual void RegisterObject (SIRender *object)=0
 
virtual void RemoveObjects (SIRender *object)=0
 
virtual void RenderAll (const CameraBase &camera) const =0
 
virtual void Exterminate ()=0
 

Static Protected Member Functions

static void BindSourceBuffer (const SFrameBuffer &buffer, const GLProgramHandle &handle, int layout)
 

Protected Attributes

const RenderMgrm_renderMgr
 

Detailed Description

Definition at line 7 of file SRenderGroup.h.

Constructor & Destructor Documentation

◆ SRenderGroup()

CSE::SRenderGroup::SRenderGroup ( const RenderMgr renderMgr)
inline

Definition at line 9 of file SRenderGroup.h.

9: m_renderMgr(&renderMgr) {}

Member Function Documentation

◆ BindSourceBuffer()

void SRenderGroup::BindSourceBuffer ( const SFrameBuffer buffer,
const GLProgramHandle handle,
int  layout 
)
staticprotected

렌더링 직전의 소스 버퍼를 바인딩 하는 함수입니다.

Parameters
buffer바인딩 할 SFrameBuffer를 지정합니다.
handleSourceBuffer의 uniform id입니다.

Definition at line 10 of file SRenderGroup.cpp.

10 {
11 const auto& srcBufferTexture = buffer.GetMainColorTexture();
12 const auto& uniforms = handle.Uniforms;
13 const auto& size = buffer.GetSize();
14 const float sizeRaw[2] = { static_cast<float>(size.x), static_cast<float>(size.y) };
15 if(srcBufferTexture == nullptr) return;
16
17 if(uniforms.SourceBuffer >= 0)
18 srcBufferTexture->Bind(uniforms.SourceBuffer, layout);
19 if(uniforms.SourceBufferSize >= 0)
20 glUniform2fv(uniforms.SourceBufferSize, 1, sizeRaw);
21}
STexture * GetMainColorTexture() const

References CSE::SFrameBuffer::GetMainColorTexture().

Referenced by CSE::ForwardRenderGroup::RenderAll(), and CSE::DeferredRenderGroup::RenderGbuffer().

◆ Exterminate()

virtual void CSE::SRenderGroup::Exterminate ( )
pure virtual

◆ RegisterObject()

virtual void CSE::SRenderGroup::RegisterObject ( SIRender object)
pure virtual

◆ RemoveObjects()

virtual void CSE::SRenderGroup::RemoveObjects ( SIRender object)
pure virtual

◆ RenderAll()

virtual void CSE::SRenderGroup::RenderAll ( const CameraBase camera) const
pure virtual

Member Data Documentation

◆ m_renderMgr

const RenderMgr* CSE::SRenderGroup::m_renderMgr
protected

Definition at line 29 of file SRenderGroup.h.


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