boolean normalsDefined = ((vdefined & GeometryArrayRetained.NORMAL_FLOAT) != 0);
boolean vattrDefined = ((vdefined & GeometryArrayRetained.VATTR_FLOAT) != 0);
boolean textureDefined = ((vdefined & GeometryArrayRetained.TEXCOORD_FLOAT) != 0);
FloatBuffer fverts = null;
DoubleBuffer dverts = null;
FloatBuffer fclrs = null;
ByteBuffer bclrs = null;
FloatBuffer[] texCoordBufs = null;
FloatBuffer norms = null;
FloatBuffer[] vertexAttrBufs = null;
// Get vertex attribute arrays
if (vattrDefined) {
vertexAttrBufs = getVertexAttrSetBuffer(vertexAttrData);
}
// get texture arrays
if (textureDefined) {
texCoordBufs = getTexCoordSetBuffer(texCoords);
}
// process alpha for geometryArray without alpha
boolean useAlpha = false;
if (updateAlpha && !ignoreVertexColors) {
useAlpha = true;
}
int[] sarray = null;
int[] start_array = null;
int strip_len = 0;
if (geo_type == GeometryRetained.GEO_TYPE_TRI_STRIP_SET ||
geo_type == GeometryRetained.GEO_TYPE_TRI_FAN_SET ||
geo_type == GeometryRetained.GEO_TYPE_LINE_STRIP_SET) {
sarray = ((GeometryStripArrayRetained) geo).stripVertexCounts;
strip_len = sarray.length;
start_array = ((GeometryStripArrayRetained) geo).stripStartOffsetIndices;
}
if (ignoreVertexColors) {
vformat &= ~GeometryArray.COLOR;
floatColorsDefined = false;
byteColorsDefined = false;
}
// get coordinate array
if (floatCoordDefined) {
gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
fverts = getVertexArrayBuffer(vfcoords, (xform == null));
if (xform != null) {
// Must copy in and transform data
for (int i = initialCoordIndex; i < vcount * 3; i += 3) {
fverts.put(i , (float) (xform[0] * vfcoords[i] +
xform[1] * vfcoords[i+1] +
xform[2] * vfcoords[i+2]));
fverts.put(i+1, (float) (xform[4] * vfcoords[i] +
xform[5] * vfcoords[i+1] +
xform[6] * vfcoords[i+2]));
fverts.put(i+2, (float) (xform[8] * vfcoords[i] +
xform[9] * vfcoords[i+1] +
xform[10] * vfcoords[i+2]));
}
}
} else if (doubleCoordDefined) {
gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
dverts = getVertexArrayBuffer(vdcoords, (xform == null));
if (xform != null) {
// Must copy in and transform data
for (int i = initialCoordIndex; i < vcount * 3; i += 3) {
dverts.put(i , (xform[0] * vdcoords[i] +
xform[1] * vdcoords[i+1] +
xform[2] * vdcoords[i+2]));
dverts.put(i+1, (xform[4] * vdcoords[i] +
xform[5] * vdcoords[i+1] +
xform[6] * vdcoords[i+2]));
dverts.put(i+2, (xform[8] * vdcoords[i] +
xform[9] * vdcoords[i+1] +
xform[10] * vdcoords[i+2]));
}
}
} else {