src/windows/native/sun/java2d/opengl/WGLSurfaceData.c
OGLContext *
OGLSD_SetScratchSurface(JNIEnv *env, jlong pConfigInfo)
{
    WGLGraphicsConfigInfo *wglInfo =
        (WGLGraphicsConfigInfo *)jlong_to_ptr(pConfigInfo);
    OGLContext *oglc;

    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_SetScratchContext");

    if (wglInfo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLSD_SetScratchContext: wgl config info is null");
        return NULL;
    }

    oglc = wglInfo->context;
    if (!WGLSD_MakeCurrentToScratch(env, oglc)) {
        return NULL;
    }

    if (OGLC_IS_CAP_PRESENT(oglc, CAPS_EXT_FBOBJECT)) {
        // the GL_EXT_framebuffer_object extension is present, so this call
        // will ensure that we are bound to the scratch pbuffer (and not
        // some other framebuffer object)
        j2d_glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
    }

    return oglc;
}
/**
 * Makes the given GraphicsConfig's context current to its associated
 * "scratch" surface.  If there is a problem making the context current,
 * this method will return NULL; otherwise, returns a pointer to the
 * OGLContext that is associated with the given GraphicsConfig.
 */
Makes the given GraphicsConfig's context current to its associated
"scratch" surface.  If there is a problem making the context current,
this method will return NULL; otherwise, returns a pointer to the
OGLContext that is associated with the given GraphicsConfig.
Makes the given GraphicsConfig ' s context current to its associated " scratch " surface . If there is a problem making the context current this method will return NULL ; otherwise returns a pointer to the OGLContext that is associated with the given GraphicsConfig .
OGLContext *
OGLSD_SetScratchSurface(JNIEnv *env, jlong pConfigInfo)
{
    WGLGraphicsConfigInfo *wglInfo =
        (WGLGraphicsConfigInfo *)jlong_to_ptr(pConfigInfo);
    OGLContext *oglc;
    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_SetScratchContext");
    if (wglInfo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLSD_SetScratchContext: wgl config info is null");
        return NULL;
    }
    oglc = wglInfo->context;
    if (!WGLSD_MakeCurrentToScratch(env, oglc)) {
        return NULL;
    }
    if (OGLC_IS_CAP_PRESENT(oglc, CAPS_EXT_FBOBJECT)) {
        j2d_glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
    }
    return oglc;
}
OGLContext * OGLSD_SetScratchSurface ( JNIEnv * env , jlong pConfigInfo ) { WGLGraphicsConfigInfo * wglInfo = ( WGLGraphicsConfigInfo * ) jlong_to_ptr ( pConfigInfo ) ; OGLContext * oglc ; J2dTraceLn ( J2D_TRACE_INFO , " " ) ; if ( wglInfo == NULL ) { J2dRlsTraceLn ( J2D_TRACE_ERROR , " " ) ; return NULL ; } oglc = wglInfo -> context ; if ( ! WGLSD_MakeCurrentToScratch ( env , oglc ) ) { return NULL ; } if ( OGLC_IS_CAP_PRESENT ( oglc , CAPS_EXT_FBOBJECT ) ) { j2d_glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , 0 ) ; } return oglc ; }
Makes the given GraphicsConfig's context current to its associated
 "scratch" surface.
Makes the given GraphicsConfig ' s context current to its associated " scratch " surface .
// the GL_EXT_framebuffer_object extension is present, so this call // will ensure that we are bound to the scratch pbuffer (and not // some other framebuffer object)