mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
add option to create opengl core context
This commit is contained in:
parent
3b69255158
commit
1186c9cc00
1
inc/dd.h
1
inc/dd.h
@ -139,6 +139,7 @@ typedef struct CNCDDRAW
|
|||||||
BOOL fpupreserve;
|
BOOL fpupreserve;
|
||||||
BOOL allow_wmactivate;
|
BOOL allow_wmactivate;
|
||||||
int d3d9_adapter;
|
int d3d9_adapter;
|
||||||
|
BOOL opengl_core;
|
||||||
BOOL accurate_timers;
|
BOOL accurate_timers;
|
||||||
BOOL resizable;
|
BOOL resizable;
|
||||||
BOOL nonexclusive;
|
BOOL nonexclusive;
|
||||||
|
@ -51,6 +51,7 @@ void cfg_load()
|
|||||||
g_ddraw->fpupreserve = cfg_get_bool("fpupreserve", FALSE);
|
g_ddraw->fpupreserve = cfg_get_bool("fpupreserve", FALSE);
|
||||||
g_ddraw->allow_wmactivate = cfg_get_bool("allow_wmactivate", FALSE);
|
g_ddraw->allow_wmactivate = cfg_get_bool("allow_wmactivate", FALSE);
|
||||||
g_ddraw->d3d9_adapter = cfg_get_int("d3d9_adapter", 0);
|
g_ddraw->d3d9_adapter = cfg_get_int("d3d9_adapter", 0);
|
||||||
|
g_ddraw->opengl_core = cfg_get_bool("opengl_core", FALSE);
|
||||||
cfg_get_string("screenshotdir", ".\\Screenshots\\", g_ddraw->screenshot_dir, sizeof(g_ddraw->screenshot_dir));
|
cfg_get_string("screenshotdir", ".\\Screenshots\\", g_ddraw->screenshot_dir, sizeof(g_ddraw->screenshot_dir));
|
||||||
|
|
||||||
if (g_ddraw->locktopleft)
|
if (g_ddraw->locktopleft)
|
||||||
@ -352,6 +353,7 @@ static void cfg_create_ini()
|
|||||||
"\n"
|
"\n"
|
||||||
"; Undocumented settings\n"
|
"; Undocumented settings\n"
|
||||||
"d3d9_adapter=0\n"
|
"d3d9_adapter=0\n"
|
||||||
|
"opengl_core=false\n"
|
||||||
"d3d9on12=false\n"
|
"d3d9on12=false\n"
|
||||||
"game_handles_close=false\n"
|
"game_handles_close=false\n"
|
||||||
"accuratetimers=false\n"
|
"accuratetimers=false\n"
|
||||||
|
@ -214,6 +214,11 @@ void oglu_init()
|
|||||||
g_oglu_got_version3 = FALSE;
|
g_oglu_got_version3 = FALSE;
|
||||||
wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)xwglGetProcAddress("wglCreateContextAttribsARB");
|
wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)xwglGetProcAddress("wglCreateContextAttribsARB");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_ddraw->opengl_core)
|
||||||
|
{
|
||||||
|
wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)xwglGetProcAddress("wglCreateContextAttribsARB");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL oglu_ext_exists(char* ext, HDC hdc)
|
BOOL oglu_ext_exists(char* ext, HDC hdc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user