public GLPbufferImpl(GLDrawableImpl pbufferDrawable, GLContext parentContext) { GLCapabilities caps = (GLCapabilities) pbufferDrawable .getNativeWindow() .getGraphicsConfiguration() .getNativeGraphicsConfiguration() .getChosenCapabilities(); if (caps.isOnscreen()) { if (caps.isPBuffer()) { throw new IllegalArgumentException( "Error: Given drawable is Onscreen and Pbuffer: " + pbufferDrawable); } throw new IllegalArgumentException("Error: Given drawable is Onscreen: " + pbufferDrawable); } else { if (!caps.isPBuffer()) { throw new IllegalArgumentException( "Error: Given drawable is not Pbuffer: " + pbufferDrawable); } } this.pbufferDrawable = pbufferDrawable; context = (GLContextImpl) pbufferDrawable.createContext(parentContext); context.setSynchronized(true); }
public GLContext createContext(GLContext shareWith) { return pbufferDrawable.createContext(shareWith); }
public GLProfile getGLProfile() { if (pbufferDrawable == null) return null; return pbufferDrawable.getGLProfile(); }
public GLCapabilities getChosenGLCapabilities() { if (pbufferDrawable == null) return null; return pbufferDrawable.getChosenGLCapabilities(); }
public GLCapabilities getRequestedGLCapabilities() { if (pbufferDrawable == null) return null; return pbufferDrawable.getRequestedGLCapabilities(); }
public int getHeight() { return pbufferDrawable.getHeight(); }
public int getWidth() { return pbufferDrawable.getWidth(); }
public GLDrawableFactory getFactory() { return pbufferDrawable.getFactory(); }
public long getHandle() { return pbufferDrawable.getHandle(); }
public NativeWindow getNativeWindow() { return pbufferDrawable.getNativeWindow(); }