Package fcagnin.jglsdk.glutil

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


                modelMatrix.pop();
            }

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

                modelMatrix.applyMatrix( objtPole.calcMatrix() );

                if ( scaleCyl ) {
                    modelMatrix.scale( 1.0f, 1.0f, 0.2f );
View Full Code Here


                modelMatrix.pop();
            }

            // Render the light
            if ( drawLightSource ) {
                modelMatrix.push();

                modelMatrix.translate( worldLightPos.x, worldLightPos.y, worldLightPos.z );
                modelMatrix.scale( 0.1f, 0.1f, 0.1f );

                glUseProgram( unlit.theProgram );
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 );
        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

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.