added manual calcs of model-view-proj matrix

This commit is contained in:
h4570
2020-12-24 12:45:09 +01:00
parent 91934df5e8
commit b4fe16dccc
13 changed files with 156 additions and 135 deletions
+3 -3
View File
@@ -31,10 +31,10 @@ public:
Plane planes[6];
/**
* Projection matrix
* View matrix
* Set by lookAt() method.
*/
Matrix worldView;
Matrix view;
protected:
/** Pointer to screen settings */
@@ -42,7 +42,7 @@ protected:
/**
* Adaption of OpenGL lookAt camera.
* Calculates worldView matrix and update frustum planes
* Calculates view matrix and update frustum planes
* Should be called every frame.
*/
void lookAt(Vector3 &t_target);
+10
View File
@@ -39,6 +39,16 @@ private:
void drawVertices(Mesh &t_mesh, u32 t_start, u32 t_end, VECTOR *t_vertices, VECTOR *t_coordinates, prim_t *t_prim, texbuffer_t *textureBuffer);
packet2_t *packets[2] __attribute__((aligned(64)));
packet2_t *currPacket;
/**
* OpenGL name: Model
* Sony name: local world
*/
Matrix model;
/**
* OpenGL name: ModelViewProjection
* Sony name: local screen
*/
Matrix modelViewProj;
u8 context;
packet2_t *matricesPacket __attribute__((aligned(64)));
VECTOR position, rotation;