OpenBarnyard
 
Loading...
Searching...
No Matches
TShader Class Referenceabstract

#include <TShader.h>

Inheritance diagram for TShader:
TObject

Classes

class  TShaderList
 

Public Types

enum  State_ : State { State_None = 0 , State_Created = BITFLAG( 0 ) , State_Validated = BITFLAG( 1 ) }
 
using State = TUINT32
 
- Public Types inherited from TObject
enum  { IsTObject = TTRUE }
 

Public Member Functions

 TDECLARE_CLASS (TShader, TObject)
 
 TShader ()
 
 ~TShader ()
 
virtual void OnDestroy ()
 
virtual void Flush ()
 
virtual void StartFlush ()=0
 
virtual void EndFlush ()=0
 
virtual TBOOL Create ()
 
virtual TBOOL Validate ()
 
virtual void Invalidate ()
 
virtual TBOOL TryInvalidate ()
 
virtual TBOOL TryValidate ()
 
virtual void Render (TRenderPacket *a_pRenderPacket)=0
 
TBOOL IsCreated () const
 
TBOOL IsValidated () const
 
TShaderGetNextShader ()
 
- Public Member Functions inherited from TObject
virtual Toshi::TClass * GetClass ()
 
virtual void Delete ()
 
virtual ~TObject ()
 
TBOOL IsExactly (TClass *a_pClass)
 
TBOOL IsA (TClass *a_pClass)
 

Static Public Attributes

static TShaderList sm_oShaderList
 
- Static Public Attributes inherited from TObject
static constexpr Toshi::TClass * PARENTCLASS = TNULL
 
static constinit Toshi::TClass ms_oClass = Toshi::TClass( "TObject", TObject::CreateTObject, TObject::CreateTObjectInPlace, TObject::InitialiseClass, TObject::DeinitialiseClass, 0, 2, sizeof( TObject ), alignof( TObject ) )
 

Additional Inherited Members

- Static Public Member Functions inherited from TObject
static Toshi::TObject * CreateTObject ()
 
static Toshi::TObject * CreateTObjectInPlace (void *a_pPtr)
 
static void InitialiseClass ()
 
static void DeinitialiseClass ()
 
static TFORCEINLINE TClassGetClassStatic ()
 

Detailed Description

Definition at line 17 of file TShader.h.

Member Typedef Documentation

◆ State

Definition at line 23 of file TShader.h.

Member Enumeration Documentation

◆ State_

Enumerator
State_None 
State_Created 
State_Validated 

Definition at line 24 of file TShader.h.

25 {
26 State_None = 0,
29 };
#define BITFLAG(x)
Definition Defines.h:10
@ State_Created
Definition TShader.h:27
@ State_Validated
Definition TShader.h:28
@ State_None
Definition TShader.h:26

Constructor & Destructor Documentation

◆ TShader()

TShader::TShader ( )

Definition at line 14 of file TShader.cpp.

15{
16 m_State = State_None;
17 sm_oShaderList.AddShader( this );
18}
static TShaderList sm_oShaderList
Definition TShader.h:90

◆ ~TShader()

TShader::~TShader ( )

Definition at line 20 of file TShader.cpp.

21{
22 sm_oShaderList.RemoveShader( this );
23}

Member Function Documentation

◆ Create()

TBOOL TShader::Create ( )
virtual

Definition at line 34 of file TShader.cpp.

35{
36 m_State |= State_Created;
37 return TTRUE;
38}
#define TTRUE
Definition Typedefs.h:25

◆ EndFlush()

virtual void TShader::EndFlush ( )
pure virtual

◆ Flush()

void TShader::Flush ( )
virtual

Definition at line 30 of file TShader.cpp.

31{
32}

◆ GetNextShader()

TShader * TShader::GetNextShader ( )
inline

Definition at line 87 of file TShader.h.

87{ return m_pNextShader; }

◆ Invalidate()

void TShader::Invalidate ( )
virtual

Definition at line 46 of file TShader.cpp.

47{
48 m_State &= ~State_Validated;
49}

◆ IsCreated()

TBOOL TShader::IsCreated ( ) const
inline

Definition at line 84 of file TShader.h.

84{ return m_State & State_Created; }

◆ IsValidated()

TBOOL TShader::IsValidated ( ) const
inline

Definition at line 85 of file TShader.h.

85{ return m_State & State_Validated; }

◆ OnDestroy()

void TShader::OnDestroy ( )
virtual

Definition at line 25 of file TShader.cpp.

26{
27 m_State &= ~State_Created;
28}

◆ Render()

virtual void TShader::Render ( TRenderPacket * a_pRenderPacket)
pure virtual

◆ StartFlush()

virtual void TShader::StartFlush ( )
pure virtual

◆ TDECLARE_CLASS()

TShader::TDECLARE_CLASS ( TShader ,
TObject  )

◆ TryInvalidate()

virtual TBOOL TShader::TryInvalidate ( )
inlinevirtual

Definition at line 76 of file TShader.h.

76{ return TTRUE; }

◆ TryValidate()

virtual TBOOL TShader::TryValidate ( )
inlinevirtual

Definition at line 79 of file TShader.h.

79{ return TTRUE; }

◆ Validate()

TBOOL TShader::Validate ( )
virtual

Definition at line 40 of file TShader.cpp.

41{
42 m_State |= State_Validated;
43 return TTRUE;
44}

Member Data Documentation

◆ sm_oShaderList

TShaderList TShader::sm_oShaderList
inlinestatic

Definition at line 90 of file TShader.h.


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