示例#1
0
DECLEXPORT(HGLRC) WINAPI VBoxCreateContext( HDC hdc, struct VBOXUHGSMI *pHgsmi )
{
    char dpyName[MAX_DPY_NAME];
    ContextInfo *context;

    CR_DDI_PROLOGUE();

    stubInit();

    CRASSERT(stub.contextTable);

    sprintf(dpyName, "%d", hdc);
#ifndef VBOX_CROGL_USE_VBITS_SUPERSET
    if (stub.haveNativeOpenGL)
        desiredVisual |= ComputeVisBits( hdc );
#endif

    context = stubNewContext(dpyName, desiredVisual, UNDECIDED, 0
#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
        , pHgsmi
#else
        , NULL
#endif
            );
    if (!context)
        return 0;

    return (HGLRC) context->id;
}
示例#2
0
HGLRC APIENTRY DrvCreateContext(HDC hdc)
{
    char dpyName[MAX_DPY_NAME];
    ContextInfo *context;

    CR_DDI_PROLOGUE();

    crDebug( "DrvCreateContext(0x%x) called.", hdc);

    stubInit();

    CRASSERT(stub.contextTable);

    sprintf(dpyName, "%d", hdc);
#ifndef VBOX_CROGL_USE_VBITS_SUPERSET
    if (stub.haveNativeOpenGL)
        desiredVisual |= ComputeVisBits( hdc );
#endif

    context = stubNewContext(dpyName, desiredVisual, UNDECIDED, 0
#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
                             , NULL
#endif
                            );
    if (!context)
        return 0;

    return (HGLRC) context->id;
}
示例#3
0
文件: wgl.c 项目: boompig/chromium
HGLRC WINAPI wglCreateContext_prox( HDC hdc )
{
	char dpyName[MAX_DPY_NAME];
	ContextInfo *context;

	stubInit();

	CRASSERT(stub.contextTable);

	sprintf(dpyName, "%d", hdc);
	if (stub.haveNativeOpenGL)
		desiredVisual |= ComputeVisBits( hdc );

	context = stubNewContext(dpyName, desiredVisual, UNDECIDED, 0);
	if (!context)
		return 0;

	return (HGLRC) context->id;
}