GL10 glDeleteTextures - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:glClientActiveTexture, glBindBuffer, glTexCoordPointer, glVertexPointer
This code example shows how to use the following methods:position
	//    offset - the offset in the vertex/index buffer to start at 
	//    numVertices - the number of vertices (indices) to draw 
	// R: [none] 
	public void drawFull(int primitiveType, int offset, int numVertices) {
		gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); // Enable Position in Vertices
		vertices.position(0);                        // Set Vertex Buffer to Position
		gl.glVertexPointer(positionCnt, GL10.GL_FLOAT, vertexSize, vertices);  // Set Vertex Pointer
 
		if (hasColor) {                            // IF Vertices Have Color
			gl.glEnableClientState(GL10.GL_COLOR_ARRAY);  // Enable Color in Vertices
			vertices.position(positionCnt);            // Set Vertex Buffer to Color
			gl.glColorPointer(COLOR_CNT, GL10.GL_FLOAT, vertexSize, vertices);  // Set Color Pointer
		} 
 
		if (hasTexCoords) {                        // IF Vertices Have Texture Coords
			gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);  // Enable Texture Coords in Vertices
			vertices.position(positionCnt + (hasColor ? COLOR_CNT : 0));  // Set Vertex Buffer to Texture Coords (NOTE: position based on whether color is also specified)
			gl.glTexCoordPointer(TEXCOORD_CNT, GL10.GL_FLOAT, vertexSize, vertices);  // Set Texture Coords Pointer
		} 
 

7
CodeRank
This code example shows how to use the following methods:glDrawElements, glEnable, glFrontFace, glTexCoordPointer, glVertexPointer
This code example shows how to use the following methods:glDrawArrays, glBindBuffer, glColorPointer, glDrawElements, glVertexPointer
		} 
	} 
 
	public void draw(GL11 gl) {
		if (useVBO) {
			gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, vertexVbo);
			gl.glVertexPointer(3, GL10.GL_FLOAT, 0, 0);
 
			gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, colorVbo);
			gl.glColorPointer(4, GL10.GL_UNSIGNED_BYTE, 0, 0);
 
			gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
			// gl.glDrawArrays(GL10.GL_LINE_STRIP, 0, N*N); 
 
			gl.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, vertexElementVbo);
			gl.glDrawElements(GL10.GL_LINE_STRIP, n * n, GL10.GL_UNSIGNED_SHORT, 0);
			gl.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, 0);
		} else { 
			gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuf);
			gl.glColorPointer(4, GL10.GL_UNSIGNED_BYTE, 0, colorBuf);

7
CodeRank
This code example shows how to use the following methods:glBindTexture, glDeleteTextures, glGenTextures, glTexParameterf
	  
	 private void alocTexture(GL10 gl)
	 { 
			//�e�N�X�`���𐶐����� 
		 	int textures[]=new int[1];
		 	gl.glGenTextures(1, textures, 0);
		 	gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
		 	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_LINEAR);
		 	gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT);
		 	gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_REPEAT);
		 	GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, m_texture.image, 0);
			m_texture.id=textures[0];
	 } 
 
	 private void releaseTexture(GL10 gl)
	 { 
		 	if(m_texture.id!=0){
		 		int []id=new int[1];
		 		id[0]=m_texture.id;

6
CodeRank
This code example shows how to use the following methods:glClearColor, glClearDepthf, glDepthFunc, glEnable, glHint
	/** 
	 * The Surface is created/init() 
	 */ 
	public void onSurfaceCreated(GL10 gl, EGLConfig config) {
 
		gl.glShadeModel(GL10.GL_SMOOTH); // Enable Smooth Shading
		gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
		gl.glClearDepthf(1.0f); // Depth Buffer Setup
		gl.glEnable(GL10.GL_DEPTH_TEST); // Enables Depth Testing
		gl.glDepthFunc(GL10.GL_LEQUAL); // The Type Of Depth Testing To Do
 
		// Really Nice Perspective Calculations 
		gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
 
	} 
 
	/** 
	 * Here we do our drawing 
	 */ 
	public void onDrawFrame(GL10 gl) {
8
CodeRank
This code example shows how to use the following methods:glClearColor, glDisable, glEnable, glEnableClientState, glShadeModel
        /* 
         * By default, OpenGL enables features that improve quality 
         * but reduce performance. One might want to tweak that 
         * especially on software renderer. 
         */ 
        gl.glDisable(GL10.GL_DITHER);
 
        /* 
         * Some one-time OpenGL initialization can be made here 
         * probably based on features of this particular context 
         */ 
        gl.glClearColor(1,1,1,1);
        gl.glEnable(GL10.GL_CULL_FACE);
        gl.glShadeModel(GL10.GL_SMOOTH);
        gl.glEnable(GL10.GL_DEPTH_TEST);
 
        /* 
         * create / load the our 3D models here 
         */ 
 

8
CodeRank
This code example shows how to use the following methods:glFrustumf, glLoadIdentity, glMatrixMode, glViewport
    } 
 
    public void onSurfaceChanged(GL10 gl, int w, int h) {
        mWidth = w;
        mHeight = h;
        gl.glViewport(0, 0, w, h);
        mProjector.setCurrentView(0, 0, w, h);
 
        /* 
        * Set our projection matrix. This doesn't have to be done 
        * each time we draw, but usually a new projection needs to 
        * be set when the viewport is resized. 
        */ 
 
        float ratio = (float) w / h;
        gl.glMatrixMode(GL10.GL_PROJECTION);
        gl.glLoadIdentity();
        gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);
        mProjector.getCurrentProjection(gl);
    } 

8
CodeRank
This code example shows how to use the following methods:glBindTexture, glGenTextures, glTexImage2D, glTexParameterf, glTexParameterx
        } 
 
        private int createTargetTexture(GL10 gl, int width, int height) {
            int texture;
            int[] textures = new int[1];
            gl.glGenTextures(1, textures, 0);
            texture = textures[0];
            gl.glBindTexture(GL10.GL_TEXTURE_2D, texture);
            gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, width, height, 0,
                    GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, null);
            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_LINEAR);
            gl.glTexParameterx(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
                    GL10.GL_REPEAT);
            gl.glTexParameterx(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
                    GL10.GL_REPEAT);
;            return texture;

8
CodeRank
This code example shows how to use the following methods:glBindTexture, glGenTextures, glTexParameterf, glTexParameteri, glTexParameteriv
            // change clip rect. 
            if (textureWidth != newTextureWidth || textureHeight != newTextureHeight || mTextureId == 0) {
                // Allocate a texture if needed. 
                if (textureId == 0) {
                    int[] textureIdOut = new int[1];
                    gl.glGenTextures(1, textureIdOut, 0);
                    textureId = textureIdOut[0];
                    mNeedsResize = false;
                    mTextureId = textureId;
 
                    // Set texture parameters. 
                    gl.glBindTexture(GL11.GL_TEXTURE_2D, textureId);
                    gl.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP_TO_EDGE);
                    gl.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP_TO_EDGE);
                    gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
                    gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
                } 
 
                // Set the new texture width and height. 
                textureWidth = newTextureWidth;

7
CodeRank