Replace gluProjectf/gluUnprojectf with own versions. Also changed gGLModelView/gGLProjection and other related matrices to LLMatrix4a.

This commit is contained in:
Shyotl
2014-06-06 01:59:04 -05:00
parent ee60a9801b
commit 24ca32f9f7
26 changed files with 451 additions and 308 deletions

View File

@@ -34,6 +34,7 @@
#include "v3dmath.h"
#include "m3math.h"
#include "m4math.h"
#include "llmatrix4a.h"
#include "llrender.h"
#include "llglslshader.h"
@@ -265,18 +266,19 @@ void LLCubeMap::setMatrix(S32 stage)
gGL.getTexUnit(stage)->activate();
}
LLVector3 x(gGLModelView+0);
LLVector3 y(gGLModelView+4);
LLVector3 z(gGLModelView+8);
LLVector3 x(gGLModelView.mMatrix[0].getF32ptr());
LLVector3 y(gGLModelView.mMatrix[1].getF32ptr());
LLVector3 z(gGLModelView.mMatrix[2].getF32ptr());
LLMatrix3 mat3;
mat3.setRows(x,y,z);
LLMatrix4 trans(mat3);
LLMatrix4a trans;
trans.loadu(mat3);
trans.transpose();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.pushMatrix();
gGL.loadMatrix((F32 *)trans.mMatrix);
gGL.loadMatrix(trans.getF32ptr());
gGL.matrixMode(LLRender::MM_MODELVIEW);
/*if (stage > 0)