예제 #1
0
 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);
 }
예제 #2
0
 public GLContext createContext(GLContext shareWith) {
   return pbufferDrawable.createContext(shareWith);
 }
예제 #3
0
  public GLProfile getGLProfile() {
    if (pbufferDrawable == null) return null;

    return pbufferDrawable.getGLProfile();
  }
예제 #4
0
  public GLCapabilities getChosenGLCapabilities() {
    if (pbufferDrawable == null) return null;

    return pbufferDrawable.getChosenGLCapabilities();
  }
예제 #5
0
  public GLCapabilities getRequestedGLCapabilities() {
    if (pbufferDrawable == null) return null;

    return pbufferDrawable.getRequestedGLCapabilities();
  }
예제 #6
0
 public int getHeight() {
   return pbufferDrawable.getHeight();
 }
예제 #7
0
 public int getWidth() {
   return pbufferDrawable.getWidth();
 }
예제 #8
0
 public GLDrawableFactory getFactory() {
   return pbufferDrawable.getFactory();
 }
예제 #9
0
 public long getHandle() {
   return pbufferDrawable.getHandle();
 }
예제 #10
0
 public NativeWindow getNativeWindow() {
   return pbufferDrawable.getNativeWindow();
 }