Castor3D  ..
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Castor3D::ProgramInputLayout Class Referenceabstract

ProgramInputLayout class. More...

+ Inheritance diagram for Castor3D::ProgramInputLayout:
+ Collaboration diagram for Castor3D::ProgramInputLayout:

Public Member Functions

C3D_API ProgramInputLayout (RenderSystem &p_renderSystem)
 Constructor. More...
 
C3D_API ~ProgramInputLayout ()
 Destructor. More...
 
virtual C3D_API bool Initialise (ShaderProgram const &p_program)=0
 Initialisation function, on GPU side. More...
 
virtual C3D_API void Cleanup ()=0
 Cleanup function, on GPU side. More...
 
std::vector< BufferElementDeclaration >::const_iterator begin () const
 
std::vector< BufferElementDeclaration >::const_iterator end () const
 

Protected Member Functions

C3D_API void DoAddAttribute (Castor::String const &p_name, eELEMENT_TYPE p_type, uint32_t p_offset=0)
 Adds an attribute to the layout. More...
 
uint32_t DoGuessUsages (Castor::String const &p_name, eELEMENT_TYPE p_type)
 Tries to guess possible usage for attribute, given its name and type. More...
 

Protected Attributes

std::vector< BufferElementDeclarationm_layout
 Buffer elements description. More...
 

Friends

C3D_API bool operator== (ProgramInputLayout const &p_lhs, ProgramInputLayout const &p_rhs)
 Equality operator. More...
 

Detailed Description

ProgramInputLayout class.

Author
Sylvain DOREMUS
Version
0.8.0
Date
03/02/2016
Remarks
Holds the vertex buffer declaration, initialised by the shader program when compiled.

Constructor & Destructor Documentation

◆ ProgramInputLayout()

C3D_API Castor3D::ProgramInputLayout::ProgramInputLayout ( RenderSystem p_renderSystem)

Constructor.

◆ ~ProgramInputLayout()

C3D_API Castor3D::ProgramInputLayout::~ProgramInputLayout ( )

Destructor.

Member Function Documentation

◆ begin()

std::vector< BufferElementDeclaration >::const_iterator Castor3D::ProgramInputLayout::begin ( ) const
inline
Returns
An iterator to the beginning of the layout elements.

References m_layout.

◆ Cleanup()

virtual C3D_API void Castor3D::ProgramInputLayout::Cleanup ( )
pure virtual

Cleanup function, on GPU side.

◆ DoAddAttribute()

C3D_API void Castor3D::ProgramInputLayout::DoAddAttribute ( Castor::String const &  p_name,
eELEMENT_TYPE  p_type,
uint32_t  p_offset = 0 
)
protected

Adds an attribute to the layout.

Parameters
[in]p_nameAssociated variable name.
[in]p_typeElement type.
[in]p_offsetOffset in the stream.

◆ DoGuessUsages()

uint32_t Castor3D::ProgramInputLayout::DoGuessUsages ( Castor::String const &  p_name,
eELEMENT_TYPE  p_type 
)
protected

Tries to guess possible usage for attribute, given its name and type.

Parameters
[in]p_nameAssociated variable name.
[in]p_typeElement type.
Returns
The possible usages.

◆ end()

std::vector< BufferElementDeclaration >::const_iterator Castor3D::ProgramInputLayout::end ( ) const
inline
Returns
An iterator to the end of the layout elements.

References m_layout.

◆ Initialise()

virtual C3D_API bool Castor3D::ProgramInputLayout::Initialise ( ShaderProgram const &  p_program)
pure virtual

Initialisation function, on GPU side.

Parameters
[in]p_programThe shader program used to fill this layout.
Returns
true if OK.

Friends And Related Function Documentation

◆ operator==

C3D_API bool operator== ( ProgramInputLayout const &  p_lhs,
ProgramInputLayout const &  p_rhs 
)
friend

Equality operator.

Parameters
[in]p_lhs,p_rhsThe 2 objects to compare.

Member Data Documentation

◆ m_layout

std::vector< BufferElementDeclaration > Castor3D::ProgramInputLayout::m_layout
protected

Buffer elements description.

Referenced by begin(), and end().


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