Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.GL10.glEnableClientState()


      VertexAttribute attribute = attributes.get(i);

      switch (attribute.usage) {
      case Usage.Position:
        byteBuffer.position(attribute.offset);
        gl.glEnableClientState(GL11.GL_VERTEX_ARRAY);
        gl.glVertexPointer(attribute.numComponents, GL10.GL_FLOAT, attributes.vertexSize, byteBuffer);
        break;

      case Usage.Color:
      case Usage.ColorPacked:
View Full Code Here


      case Usage.Color:
      case Usage.ColorPacked:
        int colorType = GL10.GL_FLOAT;
        if (attribute.usage == Usage.ColorPacked) colorType = GL11.GL_UNSIGNED_BYTE;
        byteBuffer.position(attribute.offset);
        gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
        gl.glColorPointer(attribute.numComponents, colorType, attributes.vertexSize, byteBuffer);
        break;

      case Usage.Normal:
        byteBuffer.position(attribute.offset);
View Full Code Here

        gl.glColorPointer(attribute.numComponents, colorType, attributes.vertexSize, byteBuffer);
        break;

      case Usage.Normal:
        byteBuffer.position(attribute.offset);
        gl.glEnableClientState(GL10.GL_NORMAL_ARRAY);
        gl.glNormalPointer(GL10.GL_FLOAT, attributes.vertexSize, byteBuffer);
        break;

      case Usage.TextureCoordinates:
        gl.glClientActiveTexture(GL10.GL_TEXTURE0 + textureUnit);
View Full Code Here

        gl.glNormalPointer(GL10.GL_FLOAT, attributes.vertexSize, byteBuffer);
        break;

      case Usage.TextureCoordinates:
        gl.glClientActiveTexture(GL10.GL_TEXTURE0 + textureUnit);
        gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
        byteBuffer.position(attribute.offset);
        gl.glTexCoordPointer(attribute.numComponents, GL10.GL_FLOAT, attributes.vertexSize, byteBuffer);
        textureUnit++;
        break;
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.