• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ J2dRlsTraceLn函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中J2dRlsTraceLn函数的典型用法代码示例。如果您正苦于以下问题:C++ J2dRlsTraceLn函数的具体用法?C++ J2dRlsTraceLn怎么用?C++ J2dRlsTraceLn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了J2dRlsTraceLn函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OGLFuncs_OpenLibrary

jboolean
OGLFuncs_OpenLibrary()
{
    J2dRlsTraceLn(J2D_TRACE_INFO, "OGLFuncs_OpenLibrary");

    OGL_OPEN_LIB();
    if (OGL_LIB_IS_UNINITIALIZED()) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLFuncs_OpenLibrary: could not open library");
        return JNI_FALSE;
    }

    return JNI_TRUE;
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:14,代码来源:OGLFuncs.c


示例2: GLXGC_InitGLX

/**
 * Attempts to initialize GLX and the core OpenGL library.  For this method
 * to return JNI_TRUE, the following must be true:
 *     - libGL must be loaded successfully (via dlopen)
 *     - all function symbols from libGL must be available and loaded properly
 *     - the GLX extension must be available through X11
 *     - client GLX version must be >= 1.3
 * If any of these requirements are not met, this method will return
 * JNI_FALSE, indicating there is no hope of using GLX/OpenGL for any
 * GraphicsConfig in the environment.
 */
static jboolean
GLXGC_InitGLX()
{
    int errorbase, eventbase;
    const char *version;

    J2dRlsTraceLn(J2D_TRACE_INFO, "GLXGC_InitGLX");

    if (!OGLFuncs_OpenLibrary()) {
        return JNI_FALSE;
    }

    if (!OGLFuncs_InitPlatformFuncs() ||
        !OGLFuncs_InitBaseFuncs() ||
        !OGLFuncs_InitExtFuncs())
    {
        OGLFuncs_CloseLibrary();
        return JNI_FALSE;
    }

    if (!j2d_glXQueryExtension(awt_display, &errorbase, &eventbase)) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "GLXGC_InitGLX: GLX extension is not present");
        OGLFuncs_CloseLibrary();
        return JNI_FALSE;
    }

    version = j2d_glXGetClientString(awt_display, GLX_VERSION);
    if (version == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "GLXGC_InitGLX: could not query GLX version");
        OGLFuncs_CloseLibrary();
        return JNI_FALSE;
    }

    // we now only verify that the client GLX version is >= 1.3 (if the
    // server does not support GLX 1.3, then we will find that out later
    // when we attempt to create a GLXFBConfig)
    J2dRlsTraceLn1(J2D_TRACE_INFO,
                   "GLXGC_InitGLX: client GLX version=%s", version);
    if (!((version[0] == '1' && version[2] >= '3') || (version[0] > '1'))) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "GLXGC_InitGLX: invalid GLX version; 1.3 is required");
        OGLFuncs_CloseLibrary();
        return JNI_FALSE;
    }

    return JNI_TRUE;
}
开发者ID:wei-tang,项目名称:JVM,代码行数:60,代码来源:GLXGraphicsConfig.c


示例3: OGLFuncs_CloseLibrary

void
OGLFuncs_CloseLibrary()
{
    J2dRlsTraceLn(J2D_TRACE_INFO, "OGLFuncs_CloseLibrary");

    if (OGL_LIB_IS_UNINITIALIZED()) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLFuncs_CloseLibrary: library not yet initialized");
        return;
    }

    if (OGL_CLOSE_LIB()) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLFuncs_CloseLibrary: could not close library");
    }
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:16,代码来源:OGLFuncs.c


示例4: AccelGlyphCache_Init

/**
 * Creates a new GlyphCacheInfo structure, fills in the initial values, and
 * then returns a pointer to the GlyphCacheInfo record.
 *
 * Note that this method only sets up a data structure describing a
 * rectangular region of accelerated memory, containing "virtual" cells of
 * the requested size.  The cell information is added lazily to the linked
 * list describing the cache as new glyphs are added.  Platform specific
 * glyph caching code is responsible for actually creating the accelerated
 * memory surface that will contain the individual glyph images.
 */
GlyphCacheInfo *
AccelGlyphCache_Init(jint width, jint height,
                     jint cellWidth, jint cellHeight,
                     FlushFunc *func)
{
    GlyphCacheInfo *gcinfo;

    J2dTraceLn(J2D_TRACE_INFO, "AccelGlyphCache_Init");

    gcinfo = (GlyphCacheInfo *)malloc(sizeof(GlyphCacheInfo));
    if (gcinfo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "AccelGlyphCache_Init: could not allocate GlyphCacheInfo");
        return NULL;
    }

    gcinfo->head = NULL;
    gcinfo->tail = NULL;
    gcinfo->width = width;
    gcinfo->height = height;
    gcinfo->cellWidth = cellWidth;
    gcinfo->cellHeight = cellHeight;
    gcinfo->isFull = JNI_FALSE;
    gcinfo->Flush = func;

    return gcinfo;
}
开发者ID:susotajuraj,项目名称:openjdk,代码行数:38,代码来源:AccelGlyphCache.c


示例5: GLXGC_DestroyOGLContext

/**
 * Disposes all memory and resources allocated for the given OGLContext.
 */
static void
GLXGC_DestroyOGLContext(OGLContext *oglc)
{
    GLXCtxInfo *ctxinfo;

    J2dTraceLn(J2D_TRACE_INFO, "GLXGC_DestroyOGLContext");

    if (oglc == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "GLXGC_DestroyOGLContext: context is null");
        return;
    }

    // at this point, this context will be current to its scratch surface
    // so the following GL/GLX operations should be safe...

    OGLContext_DestroyContextResources(oglc);

    ctxinfo = (GLXCtxInfo *)oglc->ctxInfo;
    if (ctxinfo != NULL) {
        // release the current context before we continue
        j2d_glXMakeContextCurrent(awt_display, None, None, NULL);

        if (ctxinfo->context != 0) {
            j2d_glXDestroyContext(awt_display, ctxinfo->context);
        }
        if (ctxinfo->scratchSurface != 0) {
            j2d_glXDestroyPbuffer(awt_display, ctxinfo->scratchSurface);
        }

        free(ctxinfo);
    }

    free(oglc);
}
开发者ID:wei-tang,项目名称:JVM,代码行数:38,代码来源:GLXGraphicsConfig.c


示例6: OGLSD_SetScratchSurface

/**
 * 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)
{
    GLXGraphicsConfigInfo *glxInfo =
        (GLXGraphicsConfigInfo *)jlong_to_ptr(pConfigInfo);
    OGLContext *oglc;

    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_SetScratchContext");

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

    oglc = glxInfo->context;
    if (!GLXSD_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;
}
开发者ID:michalwarecki,项目名称:ManagedRuntimeInitiative,代码行数:35,代码来源:GLXSurfaceData.c


示例7: OGLTR_CreateLCDTextProgram

/**
 * Compiles and links the LCD text shader program.  If successful, this
 * function returns a handle to the newly created shader program; otherwise
 * returns 0.
 */
static GLhandleARB
OGLTR_CreateLCDTextProgram()
{
    GLhandleARB lcdTextProgram;
    GLint loc;

    J2dTraceLn(J2D_TRACE_INFO, "OGLTR_CreateLCDTextProgram");

    lcdTextProgram = OGLContext_CreateFragmentProgram(lcdTextShaderSource);
    if (lcdTextProgram == 0) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLTR_CreateLCDTextProgram: error creating program");
        return 0;
    }

    // "use" the program object temporarily so that we can set the uniforms
    j2d_glUseProgramObjectARB(lcdTextProgram);

    // set the "uniform" values
    loc = j2d_glGetUniformLocationARB(lcdTextProgram, "glyph_tex");
    j2d_glUniform1iARB(loc, 0); // texture unit 0
    loc = j2d_glGetUniformLocationARB(lcdTextProgram, "dst_tex");
    j2d_glUniform1iARB(loc, 1); // texture unit 1
    loc = j2d_glGetUniformLocationARB(lcdTextProgram, "invgamma_tex");
    j2d_glUniform1iARB(loc, 2); // texture unit 2
    loc = j2d_glGetUniformLocationARB(lcdTextProgram, "gamma_tex");
    j2d_glUniform1iARB(loc, 3); // texture unit 3

    // "unuse" the program object; it will be re-bound later as needed
    j2d_glUseProgramObjectARB(0);

    return lcdTextProgram;
}
开发者ID:ChenYao,项目名称:jdk7u-jdk,代码行数:38,代码来源:OGLTextRenderer.c


示例8: OGLContext_IsExtensionAvailable

/**
 * Returns JNI_TRUE if the given extension name is available for the current
 * GraphicsConfig; JNI_FALSE otherwise.  An extension is considered available
 * if its identifier string is found amongst the space-delimited GL_EXTENSIONS
 * string.
 *
 * Adapted from the OpenGL Red Book, pg. 506.
 */
jboolean
OGLContext_IsExtensionAvailable(const char *extString, char *extName)
{
    jboolean ret = JNI_FALSE;
    char *p = (char *)extString;
    char *end;

    if (extString == NULL) {
        J2dTraceLn(J2D_TRACE_INFO, "OGLContext_IsExtensionAvailable");
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLContext_IsExtensionAvailable: extension string is null");
        return JNI_FALSE;
    }

    end = p + strlen(p);

    while (p < end) {
        size_t n = strcspn(p, " ");

        if ((strlen(extName) == n) && (strncmp(extName, p, n) == 0)) {
            ret = JNI_TRUE;
            break;
        }

        p += (n + 1);
    }

    J2dRlsTraceLn2(J2D_TRACE_INFO,
                   "OGLContext_IsExtensionAvailable: %s=%s",
                   extName, ret ? "true" : "false");

    return ret;
}
开发者ID:krichter722,项目名称:jdk9-jdk9-jdk,代码行数:41,代码来源:OGLContext.c


示例9: RETURN_STATUS_IF_NULL

HRESULT
D3DGlyphCache::Init(D3DContext *pCtx)
{
    D3DFORMAT format;

    RETURN_STATUS_IF_NULL(pCtx, E_FAIL);

    J2dTraceLn1(J2D_TRACE_INFO, "D3DGlyphCache::Init pCtx=%x", pCtx);

    this->pCtx = pCtx;

    if (pGlyphCache == NULL) {
        // init glyph cache data structure
        pGlyphCache = AccelGlyphCache_Init(D3DTR_CACHE_WIDTH,
                                           D3DTR_CACHE_HEIGHT,
                                           D3DTR_CACHE_CELL_WIDTH,
                                           D3DTR_CACHE_CELL_HEIGHT,
                                           D3DGlyphCache_FlushGlyphVertexCache);
        if (pGlyphCache == NULL) {
            J2dRlsTraceLn(J2D_TRACE_ERROR,
                          "D3DGlyphCache::Init: "\
                          "could not init D3D glyph cache");
            return E_FAIL;
        }
    }

    if (gcType == CACHE_GRAY) {
        format = pCtx->IsTextureFormatSupported(D3DFMT_A8) ?
                 D3DFMT_A8 : D3DFMT_A8R8G8B8;
    } else { // gcType == CACHE_LCD
        format = pCtx->IsTextureFormatSupported(D3DFMT_R8G8B8) ?
                 D3DFMT_R8G8B8 : D3DFMT_A8R8G8B8;
    }

    HRESULT res = pCtx->GetResourceManager()->
                  CreateTexture(D3DTR_CACHE_WIDTH, D3DTR_CACHE_HEIGHT,
                                FALSE/*isRTT*/, FALSE/*isOpaque*/, &format, 0/*usage*/,
                                &pGlyphCacheRes);
    if (FAILED(res)) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "D3DGlyphCache::Init: "\
                      "could not create glyph cache texture");
    }

    return res;
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:46,代码来源:D3DGlyphCache.cpp


示例10: OGLFuncs_InitBaseFuncs

jboolean
OGLFuncs_InitBaseFuncs()
{
    J2dRlsTraceLn(J2D_TRACE_INFO, "OGLFuncs_InitBaseFuncs");

    if (OGL_LIB_IS_UNINITIALIZED()) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLFuncs_InitBaseFuncs: library not yet initialized");
        return JNI_FALSE;
    }

    OGL_EXPRESS_BASE_FUNCS(INIT_AND_CHECK)

    J2dTraceLn(J2D_TRACE_VERBOSE,
        "OGLFuncs_InitBaseFuncs: successfully loaded base symbols");

    return JNI_TRUE;
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:18,代码来源:OGLFuncs.c


示例11: J2dTraceLn2

/**
 * Initializes an OpenGL texture, using the given width and height as
 * a guide.  See OGLSD_InitTextureObject() for more information.
 */
JNIEXPORT jboolean JNICALL
Java_sun_java2d_opengl_OGLSurfaceData_initTexture
    (JNIEnv *env, jobject oglsd,
     jlong pData, jboolean isOpaque,
     jboolean texNonPow2, jboolean texRect,
     jint width, jint height)
{
    OGLSDOps *oglsdo = (OGLSDOps *)jlong_to_ptr(pData);

    J2dTraceLn2(J2D_TRACE_INFO, "OGLSurfaceData_initTexture: w=%d h=%d",
                width, height);

    if (oglsdo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "OGLSurfaceData_initTexture: ops are null");
        return JNI_FALSE;
    }

    /*
     * We only use the GL_ARB_texture_rectangle extension if it is available
     * and the requested bounds are not pow2 (it is probably faster to use
     * GL_TEXTURE_2D for pow2 textures, and besides, our TexturePaint
     * code relies on GL_REPEAT, which is not allowed for
     * GL_TEXTURE_RECTANGLE_ARB targets).
     */
    texRect = texRect && !OGLSD_IsPowerOfTwo(width, height);

    if (!OGLSD_InitTextureObject(oglsdo, isOpaque, texNonPow2, texRect,
                                 width, height))
    {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "OGLSurfaceData_initTexture: could not init texture object");
        return JNI_FALSE;
    }

    OGLSD_SetNativeDimensions(env, oglsdo,
                              oglsdo->textureWidth, oglsdo->textureHeight);

    oglsdo->drawableType = OGLSD_TEXTURE;
    // other fields (e.g. width, height) are set in OGLSD_InitTextureObject()

    return JNI_TRUE;
}
开发者ID:cncomkyle,项目名称:openjdk_7_b147,代码行数:47,代码来源:OGLSurfaceData.c


示例12: OGLSD_GetNativeConfigInfo

/**
 * Returns a pointer (as a jlong) to the native WGLGraphicsConfigInfo
 * associated with the given OGLSDOps.  This method can be called from
 * shared code to retrieve the native GraphicsConfig data in a platform-
 * independent manner.
 */
jlong
OGLSD_GetNativeConfigInfo(OGLSDOps *oglsdo)
{
    WGLSDOps *wglsdo;

    if (oglsdo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLSD_GetNativeConfigInfo: ops are null");
        return 0L;
    }

    wglsdo = (WGLSDOps *)oglsdo->privOps;
    if (wglsdo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLSD_GetNativeConfigInfo: wgl ops are null");
        return 0L;
    }

    return ptr_to_jlong(wglsdo->configInfo);
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:26,代码来源:WGLSurfaceData.c


示例13: OGLContext_IsBIOpShaderSupportAvailable

/**
 * Returns JNI_TRUE only if all of the following conditions are met:
 *   - the GL_ARB_fragment_shader extension is available
 *   - the BufferedImageOp shader codepath has been enabled via the
 *     system property
 */
static jboolean
OGLContext_IsBIOpShaderSupportAvailable(JNIEnv *env,
                                        jboolean fragShaderAvailable)
{
    jboolean isBIOpShaderEnabled = JNI_FALSE;

    J2dTraceLn(J2D_TRACE_INFO, "OGLContext_IsBIOpShaderSupportAvailable");

    // first see if the fragment shader extension is available
    if (!fragShaderAvailable) {
        return JNI_FALSE;
    }

    // next see if the biopshader system property has been enabled
    isBIOpShaderEnabled =
        JNU_GetStaticFieldByName(env, NULL,
                                 "sun/java2d/opengl/OGLSurfaceData",
                                 "isBIOpShaderEnabled", "Z").z;
    if (!isBIOpShaderEnabled) {
        J2dRlsTraceLn(J2D_TRACE_INFO,
                      "OGLContext_IsBIOpShaderSupportAvailable: disabled via flag");
        return JNI_FALSE;
    }

    /*
     * Note: In theory we should probably do some other checks here, like
     * linking a sample shader to see if the hardware truly supports our
     * shader programs.  However, our current BufferedImageOp shaders were
     * designed to support first-generation shader-level hardware, so the
     * assumption is that if our shaders work on those GPUs, then they'll
     * work on newer ones as well.  Also, linking a fragment program can
     * cost valuable CPU cycles, which is another reason to avoid these
     * checks at startup.
     */

    J2dRlsTraceLn(J2D_TRACE_INFO,
                  "OGLContext_IsBIOpShaderSupportAvailable: BufferedImageOp shader supported");

    return JNI_TRUE;
}
开发者ID:krichter722,项目名称:jdk9-jdk9-jdk,代码行数:46,代码来源:OGLContext.c


示例14: J2dTraceLn

/**
 * Initializes a surface in the backbuffer of a given double-buffered
 * onscreen window for use in a BufferStrategy.Flip situation.  The bounds of
 * the backbuffer surface should always be kept in sync with the bounds of
 * the underlying native window.
 */
JNIEXPORT jboolean JNICALL
Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer
    (JNIEnv *env, jobject oglsd,
     jlong pData)
{
    OGLSDOps *oglsdo = (OGLSDOps *)jlong_to_ptr(pData);

    J2dTraceLn(J2D_TRACE_INFO, "OGLSurfaceData_initFlipBackbuffer");

    if (oglsdo == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "OGLSurfaceData_initFlipBackbuffer: ops are null");
        return JNI_FALSE;
    }

    if (oglsdo->drawableType == OGLSD_UNDEFINED) {
        if (!OGLSD_InitOGLWindow(env, oglsdo)) {
            J2dRlsTraceLn(J2D_TRACE_ERROR,
                "OGLSurfaceData_initFlipBackbuffer: could not init window");
            return JNI_FALSE;
        }
    }

    if (oglsdo->drawableType != OGLSD_WINDOW) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "OGLSurfaceData_initFlipBackbuffer: drawable is not a window");
        return JNI_FALSE;
    }

    oglsdo->drawableType = OGLSD_FLIP_BACKBUFFER;
    // x/yOffset have already been set in OGLSD_InitOGLWindow()...
    // REMIND: for some reason, flipping won't work properly on IFB unless we
    //         explicitly use BACK_LEFT rather than BACK...
    oglsdo->activeBuffer = GL_BACK_LEFT;

    OGLSD_SetNativeDimensions(env, oglsdo, oglsdo->width, oglsdo->height);

    return JNI_TRUE;
}
开发者ID:cncomkyle,项目名称:openjdk_7_b147,代码行数:45,代码来源:OGLSurfaceData.c


示例15: OGLContext_IsLCDShaderSupportAvailable

/**
 * Returns JNI_TRUE only if all of the following conditions are met:
 *   - the GL_ARB_fragment_shader extension is available
 *   - the LCD text shader codepath has been enabled via the system property
 *   - the hardware supports the minimum number of texture units
 */
static jboolean
OGLContext_IsLCDShaderSupportAvailable(JNIEnv *env,
                                       jboolean fragShaderAvailable)
{
    jboolean isLCDShaderEnabled = JNI_FALSE;
    GLint maxTexUnits;

    J2dTraceLn(J2D_TRACE_INFO, "OGLContext_IsLCDShaderSupportAvailable");

    // first see if the fragment shader extension is available
    if (!fragShaderAvailable) {
        return JNI_FALSE;
    }

    // next see if the lcdshader system property has been enabled
    isLCDShaderEnabled =
        JNU_GetStaticFieldByName(env, NULL,
                                 "sun/java2d/opengl/OGLSurfaceData",
                                 "isLCDShaderEnabled", "Z").z;
    if (!isLCDShaderEnabled) {
        J2dRlsTraceLn(J2D_TRACE_INFO,
                      "OGLContext_IsLCDShaderSupportAvailable: disabled via flag");
        return JNI_FALSE;
    }

    // finally, check to see if the hardware supports the required number
    // of texture units
    j2d_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &maxTexUnits);
    if (maxTexUnits < 2) {
        J2dRlsTraceLn1(J2D_TRACE_INFO,
                       "OGLContext_IsLCDShaderSupportAvailable: not enough tex units (%d)",
                       maxTexUnits);
    }

    J2dRlsTraceLn(J2D_TRACE_INFO,
                  "OGLContext_IsLCDShaderSupportAvailable: LCD text shader supported");

    return JNI_TRUE;
}
开发者ID:krichter722,项目名称:jdk9-jdk9-jdk,代码行数:45,代码来源:OGLContext.c


示例16: WGLSD_MakeCurrentToScratch

/**
 * Makes the given context current to its associated "scratch" surface.  If
 * the operation is successful, this method will return JNI_TRUE; otherwise,
 * returns JNI_FALSE.
 */
static jboolean
WGLSD_MakeCurrentToScratch(JNIEnv *env, OGLContext *oglc)
{
    WGLCtxInfo *ctxInfo;

    J2dTraceLn(J2D_TRACE_INFO, "WGLSD_MakeCurrentToScratch");

    if (oglc == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "WGLSD_MakeCurrentToScratch: context is null");
        return JNI_FALSE;
    }

    ctxInfo = (WGLCtxInfo *)oglc->ctxInfo;
    if (!j2d_wglMakeCurrent(ctxInfo->scratchSurfaceDC, ctxInfo->context)) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "WGLSD_MakeCurrentToScratch: could not make current");
        return JNI_FALSE;
    }

    return JNI_TRUE;
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:27,代码来源:WGLSurfaceData.c


示例17: OGLSD_SwapBuffers

void
OGLSD_SwapBuffers(JNIEnv *env, jlong window)
{
    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_SwapBuffers");

    if (window == 0L) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLSD_SwapBuffers: window is null");
        return;
    }

    j2d_glXSwapBuffers(awt_display, (Window)window);
}
开发者ID:michalwarecki,项目名称:ManagedRuntimeInitiative,代码行数:13,代码来源:GLXSurfaceData.c


示例18: GLXGC_FindBestVisual

/**
 * Returns the X11 VisualID that corresponds to the best GLXFBConfig for the
 * given screen.  If no valid visual could be found, this method returns zero.
 * 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.
 */
VisualID
GLXGC_FindBestVisual(JNIEnv *env, jint screen)
{
    GLXFBConfig fbc;
    XVisualInfo *xvi;
    VisualID visualid;

    J2dRlsTraceLn1(J2D_TRACE_INFO, "GLXGC_FindBestVisual: scn=%d", screen);

    if (!GLXGC_IsGLXAvailable()) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "GLXGC_FindBestVisual: could not initialize GLX");
        return 0;
    }

    fbc = GLXGC_InitFBConfig(env, screen, 0);
    if (fbc == 0) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "GLXGC_FindBestVisual: could not find best visual");
        return 0;
    }

    xvi = j2d_glXGetVisualFromFBConfig(awt_display, fbc);
    if (xvi == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "GLXGC_FindBestVisual: could not get visual for fbconfig");
        return 0;
    }

    visualid = xvi->visualid;
    XFree(xvi);

    J2dRlsTraceLn2(J2D_TRACE_INFO,
        "GLXGC_FindBestVisual: chose 0x%x as the best visual for screen %d",
                   visualid, screen);

    return visualid;
}
开发者ID:wei-tang,项目名称:JVM,代码行数:45,代码来源:GLXGraphicsConfig.c


示例19: OGLContext_IsVersionSupported

/**
 * Returns JNI_TRUE if the given GL_VERSION string meets the minimum
 * requirements (>= 1.2); JNI_FALSE otherwise.
 */
jboolean
OGLContext_IsVersionSupported(const unsigned char *versionstr)
{
    J2dTraceLn(J2D_TRACE_INFO, "OGLContext_IsVersionSupported");

    if (versionstr == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
                      "OGLContext_IsVersionSupported: version string is null");
        return JNI_FALSE;
    }

    // note that this check allows for OpenGL 2.x
    return ((versionstr[0] == '1' && versionstr[2] >= '2') ||
            (versionstr[0] >= '2'));
}
开发者ID:krichter722,项目名称:jdk9-jdk9-jdk,代码行数:19,代码来源:OGLContext.c


示例20: D3DRenderer_DrawPoly

HRESULT D3DPIPELINE_API
D3DRenderer_DrawPoly(D3DContext *d3dc,
                     jint nPoints, jboolean isClosed,
                     jint transX, jint transY,
                     jint *xPoints, jint *yPoints)
{
    J2dTraceLn(J2D_TRACE_INFO, "D3DRenderer_DrawPoly");

    if (d3dc == NULL || xPoints == NULL || yPoints == NULL) {
        J2dRlsTraceLn(J2D_TRACE_ERROR,
            "D3DRenderer_DrawPoly: d3dc, xPoints or yPoints is NULL");
        return E_FAIL;
    }

    d3dc->BeginScene(STATE_RENDEROP);
    return d3dc->pVCacher->DrawPoly(nPoints, isClosed, transX, transY,
                                    xPoints, yPoints);
}
开发者ID:ChenYao,项目名称:jdk7u-jdk,代码行数:18,代码来源:D3DRenderer.cpp



注:本文中的J2dRlsTraceLn函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ J2dTraceLn函数代码示例发布时间:2022-05-30
下一篇:
C++ J函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap