Package fcagnin.jglsdk.glutil

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


                        modelMatrix.top().fillAndFlipBuffer( mat4Buffer ) );
                glUniform4f( uniformColor.baseColorUnif, 0.302f, 0.416f, 0.0589f, 1.0f );
                planeMesh.render();
                glUseProgram( 0 );

                modelMatrix.pop();
            }

            // Draw the trees.
            drawForest( modelMatrix );
View Full Code Here


                modelMatrix.push();
                modelMatrix.translate( 20.0f, 0.0f, -10.0f );

                drawParthenon( modelMatrix );

                modelMatrix.pop();
            }

            if ( drawLookatPoint ) {
                glDisable( GL_DEPTH_TEST );
View Full Code Here

                glUniform3( whiteProgram.modelSpaceLightPosUnif, lightPosModelSpace.fillAndFlipBuffer( vec4Buffer ) );

                planeMesh.render();
                glUseProgram( 0 );

                modelMatrix.pop();
            }

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

                glUniformMatrix4( objectColor.worldToCameraMatrixUnif, false,
                        identity.fillAndFlipBuffer( mat4Buffer ) );
                cubeColorMesh.render();
                glUseProgram( 0 );

                modelMatrix.pop();

                glEnable( GL_DEPTH_TEST );
            }
        }
    }
View Full Code Here

                    cylinderMesh.render( "lit" );
                }
                glUseProgram( 0 );

                modelMatrix.pop();
            }

            // Render the light
            if ( drawLight ) {
                modelMatrix.push();
View Full Code Here

                glUniformMatrix4( unlit.modelToCameraMatrixUnif, false,
                        modelMatrix.top().fillAndFlipBuffer( mat4Buffer ) );
                glUniform4f( unlit.objectColorUnif, 0.8078f, 0.8706f, 0.9922f, 1.0f );
                cubeMesh.render( "flat" );

                modelMatrix.pop();
            }

            modelMatrix.pop();
        }
    }
View Full Code Here

                cubeMesh.render( "flat" );

                modelMatrix.pop();
            }

            modelMatrix.pop();
        }
    }

    @Override
    protected void reshape(int w, int h) {
View Full Code Here

            Vec4 lightColor = new Vec4( 1.0f );
            glUniform4( unlit.objectColorUnif, lightColor.fillAndFlipBuffer( vec4Buffer ) );
            cubeMesh.render( "flat" );

            modelMatrix.pop();
        }

        if ( drawCameraPos ) {
            modelMatrix.push();
View Full Code Here

            glDepthMask( true );
            glEnable( GL_DEPTH_TEST );
            glUniform4f( unlit.objectColorUnif, 1.0f, 1.0f, 1.0f, 1.0f );
            cubeMesh.render( "flat" );

            modelMatrix.pop();
        }
    }

    @Override
    protected void reshape(int w, int h) {
View Full Code Here

            glBindTexture( GL_TEXTURE_1D, 0 );

            glUseProgram( 0 );
            glBindBufferBase( GL_UNIFORM_BUFFER, materialBlockIndex, 0 );

            modelMatrix.pop();
        }

        if ( drawLights ) {
            modelMatrix.push();
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.