Code example for GL11

Methods: glGenTextures, glGetError

0
        return mGL; 
    } 
 
    public static RawTexture newInstance(GL11 gl) {
        int[] textureId = new int[1];
        gl.glGenTextures(1, textureId, 0);
        int glError = gl.glGetError();
        if (glError != GL11.GL_NO_ERROR) {
            throw new RuntimeException("GL_ERROR: " + glError);
        } 
        return new RawTexture(gl, textureId[0]);
    } 
 
    @Override 
    protected void freeBitmap(Bitmap bitmap) {
        throw new UnsupportedOperationException();
    } 
 
    @Override 
    protected Bitmap getBitmap() {
        throw new UnsupportedOperationException();