本文整理汇总了Java中android.opengl.GLES10.glTexCoordPointer方法的典型用法代码示例。如果您正苦于以下问题:Java GLES10.glTexCoordPointer方法的具体用法?Java GLES10.glTexCoordPointer怎么用?Java GLES10.glTexCoordPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.opengl.GLES10
的用法示例。
在下文中一共展示了GLES10.glTexCoordPointer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: draw
import android.opengl.GLES10; //导入方法依赖的package包/类
@Override
public void draw(final int texId, final float[] tex_matrix, final int offset) {
// FIXME Matrixを適用
GLES10.glEnableClientState(GLES10.GL_VERTEX_ARRAY);
pVertex.position(0);
GLES10.glVertexPointer(2, GLES10.GL_FLOAT, VERTEX_SZ, pVertex);
//--------------------------------------------------------------------------------
GLES10.glEnableClientState(GLES10.GL_TEXTURE_COORD_ARRAY);
pTexCoord.position(0);
GLES10.glTexCoordPointer(VERTEX_NUM, GLES10.GL_FLOAT, VERTEX_SZ, pTexCoord);
GLES10.glActiveTexture(GLES10.GL_TEXTURE0);
GLES10.glBindTexture(mTexTarget, texId);
//--------------------------------------------------------------------------------
GLES10.glDrawArrays(GLES10.GL_TRIANGLE_STRIP, 0, VERTEX_NUM);
//--------------------------------------------------------------------------------
GLES10.glBindTexture(mTexTarget, 0);
GLES10.glDisableClientState(GLES10.GL_TEXTURE_COORD_ARRAY);
//--------------------------------------------------------------------------------
GLES10.glDisableClientState(GLES10.GL_VERTEX_ARRAY);
}
示例2: drawQuadWithTexture
import android.opengl.GLES10; //导入方法依赖的package包/类
@Override
public void drawQuadWithTexture(TextureHandle textureid, float[] geometry) {
if (quadEleementBuffer == null) {
generateQuadElementBuffer();
}
quadEleementBuffer.position(0);
glBindTexture(textureid);
FloatBuffer buffer = generateTemporaryFloatBuffer(geometry);
GLES10.glVertexPointer(3, GLES10.GL_FLOAT, 5 * 4, buffer);
FloatBuffer texbuffer = reuseableBufferDuplicate;
texbuffer.position(3);
GLES10.glTexCoordPointer(2, GLES10.GL_FLOAT, 5 * 4, texbuffer);
GLES10.glDrawElements(GLES10.GL_TRIANGLES, 6, GLES10.GL_UNSIGNED_BYTE,
quadEleementBuffer);
}
示例3: drawTrianglesWithTextureColored
import android.opengl.GLES10; //导入方法依赖的package包/类
@Override
public void drawTrianglesWithTextureColored(TextureHandle textureid, float[] geometry) {
glBindTexture(textureid);
GLES10.glEnableClientState(GLES10.GL_COLOR_ARRAY);
FloatBuffer buffer = generateTemporaryFloatBuffer(geometry);
GLES10.glVertexPointer(3, GLES10.GL_FLOAT, 9 * 4, buffer);
FloatBuffer texbuffer = reuseableBufferDuplicate;
texbuffer.position(3);
GLES10.glTexCoordPointer(2, GLES10.GL_FLOAT, 9 * 4, texbuffer);
FloatBuffer colorbuffer = buffer.duplicate(); // we need it selden enogh
// to allocate a new one.
colorbuffer.position(5);
GLES10.glColorPointer(4, GLES10.GL_FLOAT, 9 * 4, colorbuffer);
GLES10.glDrawArrays(GLES10.GL_TRIANGLES, 0, geometry.length / 9);
GLES10.glDisableClientState(GLES10.GL_COLOR_ARRAY);
}
示例4: drawTrianglesWithTexture
import android.opengl.GLES10; //导入方法依赖的package包/类
@Override
public void drawTrianglesWithTexture(TextureHandle textureid, float[] geometry) {
glBindTexture(textureid);
FloatBuffer buffer = generateTemporaryFloatBuffer(geometry);
GLES10.glVertexPointer(3, GLES10.GL_FLOAT, 5 * 4, buffer);
FloatBuffer texbuffer = reuseableBufferDuplicate;
texbuffer.position(3);
GLES10.glTexCoordPointer(2, GLES10.GL_FLOAT, 5 * 4, texbuffer);
GLES10.glDrawArrays(GLES10.GL_TRIANGLES, 0, geometry.length / 5);
}