16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 13:29: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

@@ -11,10 +11,19 @@ http://mozilla.org/MPL/2.0/.
#include "frustum.h"
void
cFrustum::calculate( glm::mat4 &Projection, glm::mat4 &Modelview ) {
cFrustum::calculate() {
float *proj = &Projection[ 0 ][ 0 ];
float *modl = &Modelview[ 0 ][ 0 ];
auto const &projection = OpenGLMatrices.data( GL_PROJECTION );
auto const &modelview = OpenGLMatrices.data( GL_MODELVIEW );
calculate( projection, modelview );
}
void
cFrustum::calculate( glm::mat4 const &Projection, glm::mat4 const &Modelview ) {
float const *proj = &Projection[ 0 ][ 0 ];
float const *modl = &Modelview[ 0 ][ 0 ];
float clip[ 16 ];
// multiply the matrices to retrieve clipping planes