Code example for GL11

Methods: glBindBuffer, glColor4f, glDrawElements, glEnable, glEnableClientState, glNormalPointer, glTexCoordPointer, glTexEnvi, glVertexPointer

0
		 
			 
			filetexture.setTexture();
	 
 
gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mTexBufferIndex);
		 
			 
			//gl11.glClientActiveTexture(GL10.GL_TEXTURE6); // lightmap 
			gl11.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
			gl11.glTexCoordPointer(2, GL10.GL_FLOAT, 0, 0);
 
		//gl11.glClientActiveTexture(GL10.GL_TEXTURE1); // color 
			gl11.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
			gl11.glTexCoordPointer(2, GL10.GL_FLOAT, 0, 0);
 
			//gl11.glActiveTexture(GL10.GL_TEXTURE2); 
			gl11.glEnable(GL10.GL_TEXTURE_2D);
			//gl11.glActiveTexture(GL10.GL_TEXTURE1); 
			gl11.glEnable(GL10.GL_TEXTURE_2D);
 
			gl11.glColor4f(shadowcolor, shadowcolor, shadowcolor, shadowcolor);
 
			//gl11.glActiveTexture(GL10.GL_TEXTURE0); 
			 
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
					GL11.GL_COMBINE);
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_COMBINE_RGB,
					GL10.GL_ADD);
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_SRC0_RGB,
					GL10.GL_TEXTURE);
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_SRC1_RGB,
					GL11.GL_PREVIOUS);
 
		//gl11.glActiveTexture(GL10.GL_TEXTURE1); 
		 
			filetexture.setTexture();
			 
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE,
					GL11.GL_COMBINE);
			 
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_COMBINE_RGB,
				GL10.GL_MODULATE);
		 
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_SRC0_RGB,
					GL11.GL_PREVIOUS);
		 
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_SRC1_RGB,
					GL10.GL_TEXTURE);
			 
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_OPERAND0_RGB,
					GL10.GL_SRC_COLOR);
			gl11.glTexEnvi(GL10.GL_TEXTURE_ENV, GL11.GL_OPERAND1_RGB,
					GL10.GL_SRC_COLOR);
		 
		gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mVertBufferIndex);
		gl11.glVertexPointer(3, GL10.GL_FLOAT, 0, 0);
 
		gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mNormBufferIndex);
		gl11.glNormalPointer(GL10.GL_FLOAT, 0, 0);
 
		gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, mIndexBufferIndex);
		gl11.glDrawElements(GL11.GL_TRIANGLES, IdxCnt, GL11.GL_UNSIGNED_SHORT,
				0);