Exemple #1
0
JNIEXPORT jboolean JNICALL
Java_sun_java2d_opengl_GLXGraphicsConfig_initGLX(JNIEnv *env, jclass glxgc)
{
#ifndef HEADLESS
    J2dTraceLn(J2D_TRACE_INFO, "in GLXGraphicsConfig_initGLX");

    return GLXGC_InitGLX();
#else
    return JNI_FALSE;
#endif /* !HEADLESS */
}
Exemple #2
0
/**
 * Returns JNI_TRUE if GLX is available for the current display.  Note that
 * this method will attempt to initialize GLX (and all the necessary function
 * symbols) if it has not been already.  The AWT_LOCK must be acquired before
 * calling this method.
 */
jboolean
GLXGC_IsGLXAvailable()
{
    static jboolean glxAvailable = JNI_FALSE;
    static jboolean firstTime = JNI_TRUE;

    J2dTraceLn(J2D_TRACE_INFO, "GLXGC_IsGLXAvailable");

    if (firstTime) {
        glxAvailable = GLXGC_InitGLX();
        firstTime = JNI_FALSE;
    }

    return glxAvailable;
}