Commit 22b25dfc authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Introduce wined3d_get_renderer().

parent bb1266b2
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
@ cdecl wined3d_get_adapter(ptr long) @ cdecl wined3d_get_adapter(ptr long)
@ cdecl wined3d_get_adapter_count(ptr) @ cdecl wined3d_get_adapter_count(ptr)
@ cdecl wined3d_get_device_caps(ptr long ptr) @ cdecl wined3d_get_device_caps(ptr long ptr)
@ cdecl wined3d_get_renderer()
@ cdecl wined3d_incref(ptr) @ cdecl wined3d_incref(ptr)
@ cdecl wined3d_register_software_device(ptr ptr) @ cdecl wined3d_register_software_device(ptr ptr)
@ cdecl wined3d_register_window(ptr ptr ptr long) @ cdecl wined3d_register_window(ptr ptr ptr long)
......
...@@ -129,6 +129,11 @@ struct wined3d_settings wined3d_settings = ...@@ -129,6 +129,11 @@ struct wined3d_settings wined3d_settings =
.shader_backend = WINED3D_SHADER_BACKEND_AUTO, .shader_backend = WINED3D_SHADER_BACKEND_AUTO,
}; };
enum wined3d_renderer CDECL wined3d_get_renderer(void)
{
return wined3d_settings.renderer;
}
struct wined3d * CDECL wined3d_create(uint32_t flags) struct wined3d * CDECL wined3d_create(uint32_t flags)
{ {
struct wined3d *object; struct wined3d *object;
...@@ -491,6 +496,9 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) ...@@ -491,6 +496,9 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
vkd3d_set_log_callback(vkd3d_log_callback); vkd3d_set_log_callback(vkd3d_log_callback);
if (wined3d_settings.renderer == WINED3D_RENDERER_AUTO)
wined3d_settings.renderer = WINED3D_RENDERER_OPENGL;
return TRUE; return TRUE;
} }
......
...@@ -514,14 +514,6 @@ static inline int wined3d_uint64_compare(uint64_t x, uint64_t y) ...@@ -514,14 +514,6 @@ static inline int wined3d_uint64_compare(uint64_t x, uint64_t y)
#define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */ #define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */
#define PCI_DEVICE_NONE 0xffff /* e.g. 0x14f for a Geforce6200 */ #define PCI_DEVICE_NONE 0xffff /* e.g. 0x14f for a Geforce6200 */
enum wined3d_renderer
{
WINED3D_RENDERER_AUTO,
WINED3D_RENDERER_VULKAN,
WINED3D_RENDERER_OPENGL,
WINED3D_RENDERER_NO3D,
};
enum wined3d_shader_backend enum wined3d_shader_backend
{ {
WINED3D_SHADER_BACKEND_AUTO, WINED3D_SHADER_BACKEND_AUTO,
......
...@@ -53,6 +53,14 @@ ...@@ -53,6 +53,14 @@
#define WINED3D_RESOURCE_ACCESS_MAP_R 0x4u #define WINED3D_RESOURCE_ACCESS_MAP_R 0x4u
#define WINED3D_RESOURCE_ACCESS_MAP_W 0x8u #define WINED3D_RESOURCE_ACCESS_MAP_W 0x8u
enum wined3d_renderer
{
WINED3D_RENDERER_AUTO,
WINED3D_RENDERER_VULKAN,
WINED3D_RENDERER_OPENGL,
WINED3D_RENDERER_NO3D,
};
enum wined3d_light_type enum wined3d_light_type
{ {
WINED3D_LIGHT_POINT = 1, WINED3D_LIGHT_POINT = 1,
...@@ -2311,6 +2319,7 @@ struct wined3d_adapter * __cdecl wined3d_get_adapter(const struct wined3d *wined ...@@ -2311,6 +2319,7 @@ struct wined3d_adapter * __cdecl wined3d_get_adapter(const struct wined3d *wined
UINT __cdecl wined3d_get_adapter_count(const struct wined3d *wined3d); UINT __cdecl wined3d_get_adapter_count(const struct wined3d *wined3d);
HRESULT __cdecl wined3d_get_device_caps(const struct wined3d_adapter *adapter, HRESULT __cdecl wined3d_get_device_caps(const struct wined3d_adapter *adapter,
enum wined3d_device_type device_type, struct wined3d_caps *caps); enum wined3d_device_type device_type, struct wined3d_caps *caps);
enum wined3d_renderer __cdecl wined3d_get_renderer(void);
ULONG __cdecl wined3d_incref(struct wined3d *wined3d); ULONG __cdecl wined3d_incref(struct wined3d *wined3d);
HRESULT __cdecl wined3d_register_software_device(struct wined3d *wined3d, void *init_function); HRESULT __cdecl wined3d_register_software_device(struct wined3d *wined3d, void *init_function);
BOOL __cdecl wined3d_register_window(struct wined3d *wined3d, HWND window, BOOL __cdecl wined3d_register_window(struct wined3d *wined3d, HWND window,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment