Package net.rim.device.api.opengles

Examples of net.rim.device.api.opengles.GL20.glUseProgram()


        // Load the shaders
        _program =
                createShaderProgram(gl, getSource(VERTEX_SHADER),
                        getSource(FRAGMENT_SHADER));
        gl.glUseProgram(_program);

        // Get attribute locations
        _positionLoc = gl.glGetAttribLocation(_program, "position");
        _texCoordLoc = gl.glGetAttribLocation(_program, "texCoord");
        _normalLoc = gl.glGetAttribLocation(_program, "normal");
View Full Code Here


            _sizeChanged = false;
        }

        gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);

        gl.glUseProgram(_program);

        // Transform the cube
        _matrix.setIdentity();
        _matrix.translate(0.0f, 0.0f, -3.5f);
        _matrix.rotate(_rotationAxis, _rotation.getFloat());
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.