Minor format tweaks
This commit is contained in:
parent
6445200a93
commit
e95d8bc655
8 changed files with 60 additions and 36 deletions
|
@ -121,7 +121,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NOTE: MSVC C++ compiler does not support compound literals (C99 feature)
|
// NOTE: MSVC C++ compiler does not support compound literals (C99 feature)
|
||||||
// Plain structures in C++ (without constructors) can be initialized from { } initializers.
|
// Plain structures in C++ (without constructors) can be initialized with { }
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
#define CLITERAL(type) type
|
#define CLITERAL(type) type
|
||||||
#else
|
#else
|
||||||
|
|
40
src/rlgl.h
40
src/rlgl.h
|
@ -3475,10 +3475,22 @@ Matrix rlGetMatrixModelview(void)
|
||||||
#if defined(GRAPHICS_API_OPENGL_11)
|
#if defined(GRAPHICS_API_OPENGL_11)
|
||||||
float mat[16];
|
float mat[16];
|
||||||
glGetFloatv(GL_MODELVIEW_MATRIX, mat);
|
glGetFloatv(GL_MODELVIEW_MATRIX, mat);
|
||||||
matrix.m0 = mat[0]; matrix.m1 = mat[1]; matrix.m2 = mat[2]; matrix.m3 = mat[3];
|
matrix.m0 = mat[0];
|
||||||
matrix.m4 = mat[4]; matrix.m5 = mat[5]; matrix.m6 = mat[6]; matrix.m7 = mat[7];
|
matrix.m1 = mat[1];
|
||||||
matrix.m8 = mat[8]; matrix.m9 = mat[9]; matrix.m10 = mat[10]; matrix.m11 = mat[11];
|
matrix.m2 = mat[2];
|
||||||
matrix.m12 = mat[12]; matrix.m13 = mat[13]; matrix.m14 = mat[14]; matrix.m15 = mat[15];
|
matrix.m3 = mat[3];
|
||||||
|
matrix.m4 = mat[4];
|
||||||
|
matrix.m5 = mat[5];
|
||||||
|
matrix.m6 = mat[6];
|
||||||
|
matrix.m7 = mat[7];
|
||||||
|
matrix.m8 = mat[8];
|
||||||
|
matrix.m9 = mat[9];
|
||||||
|
matrix.m10 = mat[10];
|
||||||
|
matrix.m11 = mat[11];
|
||||||
|
matrix.m12 = mat[12];
|
||||||
|
matrix.m13 = mat[13];
|
||||||
|
matrix.m14 = mat[14];
|
||||||
|
matrix.m15 = mat[15];
|
||||||
#else
|
#else
|
||||||
matrix = RLGL.State.modelview;
|
matrix = RLGL.State.modelview;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3492,10 +3504,22 @@ Matrix rlGetMatrixProjection(void)
|
||||||
float mat[16];
|
float mat[16];
|
||||||
glGetFloatv(GL_PROJECTION_MATRIX,mat);
|
glGetFloatv(GL_PROJECTION_MATRIX,mat);
|
||||||
Matrix m;
|
Matrix m;
|
||||||
m.m0 = mat[0]; m.m1 = mat[1]; m.m2 = mat[2]; m.m3 = mat[3];
|
m.m0 = mat[0];
|
||||||
m.m4 = mat[4]; m.m5 = mat[5]; m.m6 = mat[6]; m.m7 = mat[7];
|
m.m1 = mat[1];
|
||||||
m.m8 = mat[8]; m.m9 = mat[9]; m.m10 = mat[10]; m.m11 = mat[11];
|
m.m2 = mat[2];
|
||||||
m.m12 = mat[12]; m.m13 = mat[13]; m.m14 = mat[14]; m.m15 = mat[15];
|
m.m3 = mat[3];
|
||||||
|
m.m4 = mat[4];
|
||||||
|
m.m5 = mat[5];
|
||||||
|
m.m6 = mat[6];
|
||||||
|
m.m7 = mat[7];
|
||||||
|
m.m8 = mat[8];
|
||||||
|
m.m9 = mat[9];
|
||||||
|
m.m10 = mat[10];
|
||||||
|
m.m11 = mat[11];
|
||||||
|
m.m12 = mat[12];
|
||||||
|
m.m13 = mat[13];
|
||||||
|
m.m14 = mat[14];
|
||||||
|
m.m15 = mat[15];
|
||||||
return m;
|
return m;
|
||||||
#else
|
#else
|
||||||
return RLGL.State.projection;
|
return RLGL.State.projection;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue