Change the matrix interface on RenderState so the backend doesn't have to try detect changes on each Apply

Include the texture matrix in the mesh builder
This commit is contained in:
Magnus Norddahl 2023-05-06 00:34:42 +02:00
commit eba0bee9f6
17 changed files with 126 additions and 136 deletions

View file

@ -50,6 +50,8 @@ public:
// Buffers
int SetViewpoint(const HWViewpointUniforms& vp) override;
void SetViewpoint(int index) override;
void SetModelMatrix(const VSMatrix& matrix, const VSMatrix& normalMatrix) override;
void SetTextureMatrix(const VSMatrix& matrix) override;
int UploadLights(const FDynLightData& lightdata) override;
int UploadBones(const TArray<VSMatrix>& bones) override;
@ -110,8 +112,8 @@ protected:
IBuffer* mLastVertexBuffer = nullptr;
IBuffer* mLastIndexBuffer = nullptr;
bool mLastModelMatrixEnabled = true;
bool mLastTextureMatrixEnabled = true;
MatricesUBO mMatrices = {};
bool mMatricesChanged = true;
int mApplyCount = 0;