Package fcagnin.jglsdk.glutil

Examples of fcagnin.jglsdk.glutil.MatrixStack.push()


            }

            // Render the lights
            {
                for ( int light = 0; light < lights.getNumberOfPointLights(); light++ ) {
                    modelMatrix.push();

                    modelMatrix.translate( lights.getWorldLightPosition( light ) );

                    glUseProgram( unlit.theProgram );
                    glUniformMatrix4( unlit.modelToCameraMatrixUnif, false,
View Full Code Here


                    modelMatrix.pop();
                }
            }

            if ( drawCameraPos ) {
                modelMatrix.push();

                modelMatrix.setIdentity();
                modelMatrix.translate( 0.0f, 0.0f, -viewPole.getView().radius );

                glDisable( GL_DEPTH_TEST );
View Full Code Here

        glBindBuffer( GL_UNIFORM_BUFFER, lightUniformBuffer );
        glBufferSubData( GL_UNIFORM_BUFFER, 0, lightData.fillAndFlipBuffer( lightBlockBuffer ) );
        glBindBuffer( GL_UNIFORM_BUFFER, 0 );

        {
            modelMatrix.push();

            scene.draw( modelMatrix, materialBlockIndex, lights.getTimerValue( "tetra" ) );

            modelMatrix.pop();
        }
View Full Code Here

            modelMatrix.pop();
        }

        {
            modelMatrix.push();

            // Render the sun
            {
                modelMatrix.push();
View Full Code Here

        {
            modelMatrix.push();

            // Render the sun
            {
                modelMatrix.push();

                Vec3 sunlightDir = new Vec3( lights.getSunlightDirection() );
                modelMatrix.translate( sunlightDir.scale( 500.0f ) );
                modelMatrix.scale( 30.0f, 30.0f, 30.0f );
View Full Code Here

            }

            // Render the lights
            {
                for ( int light = 0; light < lights.getNumberOfPointLights(); light++ ) {
                    modelMatrix.push();

                    modelMatrix.translate( lights.getWorldLightPosition( light ) );

                    glUseProgram( unlit.theProgram );
                    glUniformMatrix4( unlit.modelToCameraMatrixUnif, false,
View Full Code Here

                    modelMatrix.pop();
                }
            }

            if ( drawCameraPos ) {
                modelMatrix.push();

                modelMatrix.setIdentity();
                modelMatrix.translate( 0.0f, 0.0f, -viewPole.getView().radius );

                glDisable( GL_DEPTH_TEST );
View Full Code Here

        glBindBuffer( GL_UNIFORM_BUFFER, lightUniformBuffer );
        glBufferData( GL_UNIFORM_BUFFER, lightData.fillAndFlipBuffer( lightBlockBuffer ), GL_STREAM_DRAW );
        glBindBuffer( GL_UNIFORM_BUFFER, 0 );

        modelMatrix.push();
        modelMatrix.rotateX( -90.0f );

        glUseProgram( progStandard.theProgram );
        glUniformMatrix4( progStandard.modelToCameraMatrixUnif, false,
                modelMatrix.top().fillAndFlipBuffer( mat4Buffer ) );
View Full Code Here

        modelMatrix.pop();

        // Render the sun
        {
            modelMatrix.push();

            Vec3 sunlightDir = new Vec3( lightEnv.getSunlightDirection() );
            modelMatrix.translate( sunlightDir.scale( 500.0f ) );
            modelMatrix.scale( 30.0f, 30.0f, 30.0f );
View Full Code Here

            modelMatrix.pop();
        }

        // Draw lights
        for ( int light = 0; light < lightEnv.getNumPointLights(); light++ ) {
            modelMatrix.push();

            modelMatrix.translate( lightEnv.getPointLightWorldPos( light ) );

            glUseProgram( progUnlit.theProgram );
            glUniformMatrix4( progUnlit.modelToCameraMatrixUnif, false,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.