if(bufferType == BufferTypes.RGBA_4Byte) {
bytes = new byte[width*height*4];
Arrays.fill(bytes, (byte)0);
byteBuffer = ByteBuffer.wrap(bytes);
textureData = new TextureData(GL.GL_RGBA, width, height, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, false, false, true, byteBuffer, null);
textureData.setRowLength(width);
if(textureData.getPixelFormat() != GL.GL_RGBA) throw new RuntimeException("Unexpected pixel format");
this.alpha = true;
} else if(bufferType == BufferTypes.RGB_3Byte) {
bytes = new byte[width*height*3];
Arrays.fill(bytes, (byte)0);
byteBuffer = ByteBuffer.wrap(bytes);
textureData = new TextureData(GL.GL_RGB, width, height, 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, false, false, true, byteBuffer, null);
textureData.setRowLength(width);
if(textureData.getPixelFormat() != GL.GL_RGB) throw new RuntimeException("Unexpected pixel format");
this.alpha = false;
} else {
throw new UnsupportedOperationException("Unsupported buffer type");