
Added the DDS Texture Loading for future use Added the gamepad class for future use Added first child method to the scenegraph Added RGB to intensity and lerp methods to the shared methods class Added the terrain node class with normals Fixed issue with submeshnode not passing the world transform to the actual meshes
27 lines
789 B
C++
27 lines
789 B
C++
#include "SubMeshNode.h"
|
|
|
|
bool SubMeshNode::Initialise()
|
|
{
|
|
_resourceManager = DirectXFramework::GetDXFramework()->GetResourceManager();
|
|
_renderer = dynamic_pointer_cast<SubMeshRenderer>(_resourceManager->GetRenderer(L"SMR"));
|
|
if (_subMesh == nullptr)
|
|
{
|
|
return false;
|
|
}
|
|
return _renderer->Initialise();
|
|
}
|
|
|
|
void SubMeshNode::Shutdown()
|
|
{
|
|
}
|
|
|
|
void SubMeshNode::Render()
|
|
{
|
|
_renderer->SetSubMesh(_subMesh);
|
|
_renderer->SetWorldTransformation(XMLoadFloat4x4(&_combinedWorldTransformation));
|
|
_renderer->SetCameraPosition(DirectXFramework::GetDXFramework()->GetCamera()->GetRawCameraPosition());
|
|
_renderer->SetAmbientLight(XMFLOAT4(0.5f, 0.5f, 0.5f, 1.0f));
|
|
_renderer->SetDirectionalLight(XMVectorSet(0.0f, -1.0f, 1.0f, 0.0f), XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f));
|
|
_renderer->Render();
|
|
}
|