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

    return pbufferDrawable.getGLProfile();
  }
Esempio n. 4
0
  public GLCapabilities getChosenGLCapabilities() {
    if (pbufferDrawable == null) return null;

    return pbufferDrawable.getChosenGLCapabilities();
  }
Esempio n. 5
0
  public GLCapabilities getRequestedGLCapabilities() {
    if (pbufferDrawable == null) return null;

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