16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00

virtual opengl matrix stack, light glare billboards

This commit is contained in:
tmj-fstate
2017-03-23 00:09:28 +01:00
parent f4a5f60465
commit 2c76a4418e
15 changed files with 498 additions and 40 deletions

View File

@@ -139,14 +139,15 @@ class matrix4x4
// the column increasing fastest. However, some APIs (OpenGL in particular) do this
// backwards, hence the "constructor" from C matrices, or from OpenGL matrices.
// Note that matrices are stored internally in OpenGL format.
void C_Matrix(scalar_t *initArray)
void C_Matrix(scalar_t const *initArray)
{
int i = 0;
for (int y = 0; y < 4; ++y)
for (int x = 0; x < 4; ++x)
(*this)(x)[y] = initArray[i++];
}
void OpenGL_Matrix(scalar_t *initArray)
template <typename _Type>
void OpenGL_Matrix(_Type const *initArray)
{
int i = 0;
for (int x = 0; x < 4; ++x)