Added follow cam

Added "Controlled" mesh classes
Added Global Lighting Class
Added Gamepad controls
Split terrain nodes into Height and Perlin classes
Fixed Splitmesh node stuff
This commit is contained in:
iDunnoDev
2022-05-09 17:50:22 +01:00
committed by iDunnoDev
parent bc906064e5
commit f6bba67897
58 changed files with 1743 additions and 351 deletions

View File

@ -1,22 +1,24 @@
#pragma once
#include "SharedMethods.h"
#include "DirectXFramework.h"
#include "SubMeshNode.h"
#include "Renderer.h"
#include "Mesh.h"
class SubMeshRenderer : public Renderer
{
public:
void SetSubMesh(shared_ptr<SubMesh> subMesh);
public:
void SetRootChildren(list<SceneNodePointer>& rootChildren);
void SetWorldTransformation(FXMMATRIX worldTransformation);
void SetAmbientLight(XMFLOAT4 ambientLight);
void SetDirectionalLight(FXMVECTOR lightVector, XMFLOAT4 lightColour);
void SetCameraPosition(XMFLOAT4 cameraPosition);
bool Initialise();
bool Initialise();
void Render();
void Shutdown(void);
private:
list<SceneNodePointer>* _rootGraph;
shared_ptr<SubMesh> _subMesh;
XMFLOAT4X4 _worldTransformation;
XMFLOAT4 _ambientLight;
@ -44,10 +46,14 @@ private:
ComPtr<ID3D11RasterizerState> _defaultRasteriserState;
ComPtr<ID3D11RasterizerState> _noCullRasteriserState;
CBUFFER _cBuffer;
void BuildShaders();
void BuildVertexLayout();
void BuildConstantBuffer();
void BuildBlendState();
void BuildRendererState();
void RenderChild(SceneNodePointer node, bool renderTransparent);
};