@Override
public AWTGLPixelBuffer allocate(final GL gl, final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final int minByteSize) {
if( 4 == pixelAttributes.componentCount ) {
if( null == singleRGBA4 || singleRGBA4.requiresNewBuffer(gl, width, height, minByteSize) ) {
singleRGBA4 = allocateImpl(pixelAttributes, width, height, depth, pack, minByteSize);
}
return singleRGBA4;
} else {
if( null == singleRGB3 || singleRGB3.requiresNewBuffer(gl, width, height, minByteSize) ) {
singleRGB3 = allocateImpl(pixelAttributes, width, height, depth, pack, minByteSize);
}
return singleRGB3;
}
}