Add matrix buffer

Convert camera to D3D11
Add world, view & projection matrix exposing
This commit is contained in:
2026-11-27 12:17:17 +01:00
parent ead7463b8e
commit c6fdf567b7
8 changed files with 89 additions and 25 deletions
+10 -4
View File
@@ -1,15 +1,21 @@
#pragma once
#include <d3d9.h>
#include <DirectXMath.h>
#include <Windows.h>
using namespace DirectX;
class Camera
{
public:
UINT init(IDirect3DDevice9* pD3DDevice, UINT width, UINT height);
UINT init(UINT width, UINT height);
void update(FLOAT dt);
void deInit();
const XMFLOAT4X4& getViewMatrix() const { return _viewMatrix; }
const XMFLOAT4X4& getProjectionMatrix() const { return _projectionMatrix; }
private:
D3DMATRIX _viewMatrix = {};
D3DMATRIX _projectionMatrix = {};
XMFLOAT4X4 _viewMatrix = {};
XMFLOAT4X4 _projectionMatrix = {};
};