#endif
}
-void Matrix4x4_FromArrayDoubleD3D (matrix4x4_t *out, const double in[16])
+void Matrix4x4_FromArrayDoubleD3D (matrix4x4_t *out, const double in[4][4])
{
#ifdef MATRIX4x4_OPENGLORIENTATION
- out->m[0][0] = in[0];
- out->m[1][0] = in[1];
- out->m[2][0] = in[2];
- out->m[3][0] = in[3];
- out->m[0][1] = in[4];
- out->m[1][1] = in[5];
- out->m[2][1] = in[6];
- out->m[3][1] = in[7];
- out->m[0][2] = in[8];
- out->m[1][2] = in[9];
- out->m[2][2] = in[10];
- out->m[3][2] = in[11];
- out->m[0][3] = in[12];
- out->m[1][3] = in[13];
- out->m[2][3] = in[14];
- out->m[3][3] = in[15];
+ out->m[0][0] = in[0][0];
+ out->m[1][0] = in[0][1];
+ out->m[2][0] = in[0][2];
+ out->m[3][0] = in[0][3];
+ out->m[0][1] = in[1][0];
+ out->m[1][1] = in[1][1];
+ out->m[2][1] = in[1][2];
+ out->m[3][1] = in[1][3];
+ out->m[0][2] = in[2][0];
+ out->m[1][2] = in[2][1];
+ out->m[2][2] = in[2][2];
+ out->m[3][2] = in[2][3];
+ out->m[0][3] = in[3][0];
+ out->m[1][3] = in[3][1];
+ out->m[2][3] = in[3][2];
+ out->m[3][3] = in[3][3];
#else
- out->m[0][0] = in[0];
- out->m[0][1] = in[1];
- out->m[0][2] = in[2];
- out->m[0][3] = in[3];
- out->m[1][0] = in[4];
- out->m[1][1] = in[5];
- out->m[1][2] = in[6];
- out->m[1][3] = in[7];
- out->m[2][0] = in[8];
- out->m[2][1] = in[9];
- out->m[2][2] = in[10];
- out->m[2][3] = in[11];
- out->m[3][0] = in[12];
- out->m[3][1] = in[13];
- out->m[3][2] = in[14];
- out->m[3][3] = in[15];
+ out->m[0][0] = in[0][0];
+ out->m[0][1] = in[0][1];
+ out->m[0][2] = in[0][2];
+ out->m[0][3] = in[0][3];
+ out->m[1][0] = in[1][0];
+ out->m[1][1] = in[1][1];
+ out->m[1][2] = in[1][2];
+ out->m[1][3] = in[1][3];
+ out->m[2][0] = in[2][0];
+ out->m[2][1] = in[2][1];
+ out->m[2][2] = in[2][2];
+ out->m[2][3] = in[2][3];
+ out->m[3][0] = in[3][0];
+ out->m[3][1] = in[3][1];
+ out->m[3][2] = in[3][2];
+ out->m[3][3] = in[3][3];
#endif
}
// converts a matrix4x4 to a double[16] array in the Direct3D orientation
void Matrix4x4_ToArrayDoubleD3D(const matrix4x4_t *in, double out[16]);
// creates a matrix4x4 from a double[16] array in the Direct3D orientation
-void Matrix4x4_FromArrayDoubleD3D(matrix4x4_t *out, const double in[16]);
+void Matrix4x4_FromArrayDoubleD3D(matrix4x4_t *out, const double in[4][4]);
// converts a matrix4x4 to a float[16] array in the OpenGL orientation
void Matrix4x4_ToArrayFloatGL(const matrix4x4_t *in, float out[16]);
lightgridmatrix[1][3] = -(loadmodel->brushq3.num_lightgrid_imins[1] - 0.5f) / texturesize[1];
lightgridmatrix[2][3] = -(loadmodel->brushq3.num_lightgrid_imins[2] - 1.5f) / texturesize[2];
lightgridmatrix[3][3] = 1;
- Matrix4x4_FromArrayDoubleD3D(&loadmodel->brushq3.lightgridworldtotexturematrix, lightgridmatrix[0]);
+ Matrix4x4_FromArrayDoubleD3D(&loadmodel->brushq3.lightgridworldtotexturematrix, lightgridmatrix);
loadmodel->brushq3.lightgridtexture = R_LoadTexture3D(loadmodel->texturepool, "lightgrid", texturesize[0], texturesize[1], texturesize[2], texturergba, TEXTYPE_RGBA, TEXF_CLAMP, 0, NULL);
Mem_Free(texturergba);
}