Code example for GL10

Methods: glActiveTextureglBindTextureglTexParameterf

0
    		imageWidth  = (float)bitmap.getWidth();
    		imageHeight = (float)bitmap.getHeight();
    	} 
 
        // Ladataan bitmap OpenGL-tekstuuriksi 
        _gl.glBindTexture(GL10.GL_TEXTURE_2D, sprites[0]);
        _gl.glActiveTexture(sprites[0]);
         
         
        if (isClamped) {
	        // TODO: TÄHÄN TULEE SAMA KUIN ALLA, HIEMAN MUUTETTUNA (KATSO NETTITUTORIAALI!) 
        	//_gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); 
	        _gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT);
	        _gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
	        _gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);
        } 
        else { 
        	_gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
	        _gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);
        } 
 
        GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
 
        // Poistetaan bitmap muistista 
Contextual code suggestions in your IDE  Get Codota for Java