예제 #1
0
파일: GLXUtil.java 프로젝트: rsantina/jogl
  public static void getGLXVersion(long display, int major[], int minor[]) {
    if (0 == display) {
      throw new GLException("null display handle");
    }
    if (major.length < 1 || minor.length < 1) {
      throw new GLException("passed int arrays size is not >= 1");
    }

    if (!GLX.glXQueryVersion(display, major, 0, minor, 0)) {
      throw new GLException("glXQueryVersion failed");
    }

    // Work around bugs in ATI's Linux drivers where they report they
    // only implement GLX version 1.2 on the server side
    if (major[0] == 1 && minor[0] == 2) {
      String str = GLX.glXGetClientString(display, GLX.GLX_VERSION);
      try {
        // e.g. "1.3"
        major[0] = Integer.valueOf(str.substring(0, 1)).intValue();
        minor[0] = Integer.valueOf(str.substring(2, 3)).intValue();
      } catch (Exception e) {
        major[0] = 1;
        minor[0] = 2;
      }
    }
  }
예제 #2
0
파일: GLXUtil.java 프로젝트: rsantina/jogl
 /**
  * Workaround for apparent issue with ATI's proprietary drivers where direct contexts still send
  * GLX tokens for GL calls
  */
 public static String getVendorName(long display) {
   return GLX.glXGetClientString(display, GLX.GLX_VENDOR);
 }
예제 #3
0
파일: GLXUtil.java 프로젝트: rsantina/jogl
 public static String getExtension(long display) {
   return GLX.glXGetClientString(display, GLX.GLX_EXTENSIONS);
 }