" - " + supportGLExecutable.version);
LOGGER.info("DrawingMode.SUBTRACT supported: " + isGlExtBlendSubtractSupported);
}
private void initialize(int width, int height) {
GLDrawableFactory drawableFactory = GLDrawableFactory.getFactory(GLProfile.get(GLProfile.GL2));
AbstractGraphicsDevice graphicsDevice = drawableFactory.getDefaultDevice();
// if(!drawableFactory.canCreateGLPbuffer(graphicsDevice)) {
// throw new RuntimeException("PBuffer not supported but required in this implementation!");
// }
int imageDrawingWidth = properties.getImageDrawingWidth();
int imageDrawingHeight = properties.getImageDrawingHeight();
LOGGER.info("Requested image drawing size: " + imageDrawingWidth + "x" + imageDrawingHeight);
if(!(imageRenderContext.getDrawable() instanceof GLPbuffer)) {
boolean cannotCreatePBuffer = !drawableFactory.canCreateGLPbuffer(graphicsDevice);
// debug fallback
if(!properties.isPBuffer()) cannotCreatePBuffer = true;
if(!usePBuffer) cannotCreatePBuffer = true;
if(!cannotCreatePBuffer) {
try {
GLAutoDrawable imageDrawable = drawableFactory.createGLPbuffer(graphicsDevice,
PBUFFER_CAPABILITIES, null, imageDrawingWidth, imageDrawingHeight, window.getContext());
imageRenderContext.setDrawable(imageDrawable);
SupportGLExecutable supportGLExecutable = new SupportGLExecutable();
glExecutor.execute(supportGLExecutable);