Package fcagnin.jglsdk.glutil

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


                modelMatrix.pop();
            }

            // Render the light
            if ( drawLight ) {
                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


        MatrixStack modelMatrix = new MatrixStack();

        // Render the ground plane.
        {
            modelMatrix.push();
            modelMatrix.scale( 100.0f, 1.0f, 100.0f );

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

        // Draw the trees.
        drawForest( modelMatrix );

        // Draw the building.
        {
            modelMatrix.push();
            modelMatrix.translate( 20.0f, 0.0f, -10.0f );

            drawParthenon( modelMatrix );

            modelMatrix.pop();
View Full Code Here

        glUniform1f( colorProg.lightAttenuationUnif, lightAttenuation );
        glUniform1f( colorProg.shininessFactorUnif, matParams.getSpecularValue() );
        glUseProgram( 0 );

        {
            modelMatrix.push();

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

        }

        if ( drawLookatPoint ) {
            glDisable( GL_DEPTH_TEST );

            modelMatrix.push();
            modelMatrix.translate( camTarget );
            modelMatrix.scale( 1.0f, 1.0f, 1.0f );

            glUseProgram( objectColor.theProgram );
            glUniformMatrix4( objectColor.modelToWorldMatrixUnif, false,
View Full Code Here

        {
            modelMatrix.push();

            // Render the ground plane.
            {
                modelMatrix.push();

                Mat3 normMatrix = new Mat3( modelMatrix.top() );
                normMatrix = Glm.transpose( Glm.inverse( normMatrix ) );

                glUseProgram( whiteProg.theProgram );
View Full Code Here

                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

        glUniform1f( colorProg.lightAttenuationUnif, lightAttenuation );
        glUniform1f( colorProg.shininessFactorUnif, matParams.getSpecularValue() );
        glUseProgram( 0 );

        {
            modelMatrix.push();

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

        {
            modelMatrix.push();

            // Render the ground plane.
            {
                modelMatrix.push();

                Mat3 normMatrix = new Mat3( modelMatrix.top() );
                normMatrix = Glm.transpose( Glm.inverse( normMatrix ) );

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