} else {
srcPixelFormat = GL11.GL_RGB;
}
// convert that image into a byte buffer of texture data
ByteBuffer textureBuffer = data.imageToByteBuffer(bufferedImage, false, false, null);
texture.setTextureHeight(data.getTexHeight());
texture.setTextureWidth(data.getTexWidth());
texture.setAlpha(data.getDepth() == 32);
if (target == GL11.GL_TEXTURE_2D) {