示例#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();
 }