Matrix4f loadProjectionNormalized - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Matrix4f loadProjectionNormalized method.

This code example shows how to use the following methods:loadProjectionNormalized
	private void initProgramVertex() { 
		ProgramVertexFixedFunction.Builder pvb = new ProgramVertexFixedFunction.Builder(mRS);
		mProgramVertex = pvb.create();
		ProgramVertexFixedFunction.Constants pva = new ProgramVertexFixedFunction.Constants(mRS);
		((ProgramVertexFixedFunction) mProgramVertex).bindConstants(pva);
		Matrix4f proj = new Matrix4f();
		proj.loadProjectionNormalized(1, 1);
		pva.setProjection(proj);
		mScript.set_gProgramVertex(mProgramVertex);
	} 
 
	/** 
	 * Prepares the Sampler (controls how pixels are pulled from a texture) 
	 */ 
	private void initSampler() { 
		mLinearClamp = Sampler.CLAMP_LINEAR(mRS);
		mScript.set_gLinearClamp(mLinearClamp);
	} 
} 
5
CodeRank
This code example shows how to use the following methods:loadProjectionNormalized
        programVertex = pvBuilder.create();
        ProgramVertexFixedFunction.Constants pvConstants =
                new ProgramVertexFixedFunction.Constants(renderScriptGL);
        programVertex.bindConstants(pvConstants);
         
        Matrix4f projection = new Matrix4f();
        projection.loadProjectionNormalized(1, 1);
        pvConstants.setProjection(projection);
        script.set_programVertex(programVertex);
    } 
 
    private void initProgramFragment() { 
        final ProgramFragmentFixedFunction.Builder pfBuilder =
                new ProgramFragmentFixedFunction.Builder(renderScriptGL);
         
        pfBuilder.setTexture(
                ProgramFragmentFixedFunction.Builder.EnvMode.REPLACE,
                ProgramFragmentFixedFunction.Builder.Format.RGBA, 0);
        singleTextureFragmentProcess = pfBuilder.create();
        script.set_singleTextureFragmentProgram(singleTextureFragmentProcess);
5
CodeRank
loadProjectionNormalized Method Overview
Helper function to set the current values to a perspective projection matrix with aspect ratio defined by the parameters and (near, far), (bottom, top) mapping to (-1, 1) at z = 0
See Code Examples for other Android Matrix4f Methods: