OpenBarnyard
 
Loading...
Searching...
No Matches
AGrassMeshHAL_DX8.cpp
Go to the documentation of this file.
1#include "pch.h"
2#include "AGrassMeshHAL_DX8.h"
3
6
7//-----------------------------------------------------------------------------
8// Enables memory debugging.
9// Note: Should be the last include!
10//-----------------------------------------------------------------------------
11#include <Core/TMemoryDebugOn.h>
12
14
16
18 : m_pUnk1( TNULL )
19{
20
21}
22
26
27// $Barnyard: FUNCTION 005f8870
29{
31 TRenderContextD3D* pCurrentContext = TRenderContextD3D::Upcast( pRenderInterface->GetCurrentContext() );
32
33 TRenderPacket* pRenderPacket = GetMaterial()->GetRegMaterial()->AddRenderPacket( this );
34 pRenderPacket->SetModelViewMatrix( pCurrentContext->GetModelViewMatrix() );
35
36 return TTRUE;
37}
38
39// $Barnyard: FUNCTION 005f8830
40void AGrassMeshHAL::SetUnknown( void* a_pUnk )
41{
42 m_pUnk1 = a_pUnk;
43}
44
45void AGrassMeshHAL::CreateHAL( TUINT32 a_eFlags, TUINT16 a_uiMaxVertices, CellMeshSphere* a_pCellMeshSphere )
46{
47 m_pCellMeshSphere = a_pCellMeshSphere;
48 AGrassMesh::Create( a_eFlags, a_uiMaxVertices );
49}
#define TOSHI_NAMESPACE_USING
Definition Defines.h:46
#define TDEFINE_CLASS(...)
Definition TObject.h:120
uint16_t TUINT16
Definition Typedefs.h:15
#define TNULL
Definition Typedefs.h:23
uint32_t TUINT32
Definition Typedefs.h:13
#define TTRUE
Definition Typedefs.h:25
bool TBOOL
Definition Typedefs.h:6
static TRenderContextD3D * Upcast(TRenderContext *a_pRenderContext)
DirectX 8 implementation of the render interface Handles DirectX 8 specific rendering functionality a...
static TFORCEINLINE TRenderD3DInterface * Interface()
Gets the render interface singleton.
TMatrix44 & GetModelViewMatrix()
TRenderContext * GetCurrentContext() const
void SetModelViewMatrix(TMatrix44 &a_rMatrix44)
void CreateHAL(TUINT32 a_eFlags, TUINT16 a_uiMaxVertices, CellMeshSphere *a_pCellMeshSphere)
virtual TBOOL Render() override
void SetUnknown(void *a_pUnk)
virtual TBOOL Create(TUINT32 a_uiFlags, TUINT16 a_uiMaxVertices)