Exemple #1
0
static void create_ctx(void *ptr)
{
    struct MPGLContext *ctx = ptr;
    struct w32_context *w32_ctx = ctx->priv;

    if (!create_dc(ctx, w32_ctx->flags))
        return;

    create_context_w32_gl3(ctx);
    if (!w32_ctx->context)
        create_context_w32_old(ctx);

    wglMakeCurrent(w32_ctx->hdc, NULL);
}
Exemple #2
0
static void create_ctx(void *ptr)
{
    struct MPGLContext *ctx = ptr;
    struct w32_context *w32_ctx = ctx->priv;

    if (!create_dc(ctx, w32_ctx->flags))
        return;

    create_context_w32_gl3(ctx);
    if (!w32_ctx->context)
        create_context_w32_old(ctx);

    w32_ctx->dwmapi_dll = LoadLibraryW(u"Dwmapi.dll");
    if (w32_ctx->dwmapi_dll)
        w32_ctx->dwmflush = (DwmFlush_t)GetProcAddress(w32_ctx->dwmapi_dll, "DwmFlush");

    wglMakeCurrent(w32_ctx->hdc, NULL);
}