Beispiel #1
0
static bool config_window_w32(struct MPGLContext *ctx, int flags)
{
    if (!vo_w32_config(ctx->vo, flags))
        return false;

    bool success = false;
    if (ctx->requested_gl_version >= MPGL_VER(3, 0))
        success = create_context_w32_gl3(ctx);
    if (!success)
        success = create_context_w32_old(ctx);
    return success;
}
Beispiel #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);

    wglMakeCurrent(w32_ctx->hdc, NULL);
}
Beispiel #3
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);
}