2020-10-13 09:20:52 +02:00
|
|
|
#ifndef RENDER_D3D9_H
|
|
|
|
#define RENDER_D3D9_H
|
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
|
|
|
#include <d3d9.h>
|
|
|
|
|
|
|
|
#define D3D9_TEXTURE_COUNT 2
|
2018-10-15 00:57:05 +02:00
|
|
|
|
|
|
|
typedef struct CUSTOMVERTEX { float x, y, z, rhw, u, v; } CUSTOMVERTEX;
|
|
|
|
|
2021-06-11 20:30:43 +02:00
|
|
|
typedef struct D3D9RENDERER
|
2020-10-13 09:20:52 +02:00
|
|
|
{
|
|
|
|
HMODULE hmodule;
|
|
|
|
D3DPRESENT_PARAMETERS params;
|
2022-09-23 02:17:33 +02:00
|
|
|
HWND hwnd;
|
2020-10-13 09:20:52 +02:00
|
|
|
LPDIRECT3D9 instance;
|
|
|
|
LPDIRECT3DDEVICE9 device;
|
|
|
|
LPDIRECT3DVERTEXBUFFER9 vertex_buf;
|
|
|
|
IDirect3DTexture9* surface_tex[D3D9_TEXTURE_COUNT];
|
|
|
|
IDirect3DTexture9* palette_tex[D3D9_TEXTURE_COUNT];
|
|
|
|
IDirect3DPixelShader9* pixel_shader;
|
2023-07-03 10:50:03 +02:00
|
|
|
IDirect3DPixelShader9* pixel_shader_upscale;
|
2020-10-13 09:20:52 +02:00
|
|
|
float scale_w;
|
|
|
|
float scale_h;
|
2021-07-21 14:52:44 +02:00
|
|
|
int tex_width;
|
|
|
|
int tex_height;
|
2021-06-11 20:30:43 +02:00
|
|
|
} D3D9RENDERER;
|
2020-10-13 09:20:52 +02:00
|
|
|
|
2022-09-20 11:21:32 +02:00
|
|
|
#define MAX_D3D9ON12_QUEUES 2
|
|
|
|
|
|
|
|
typedef struct _D3D9ON12_ARGS
|
|
|
|
{
|
|
|
|
BOOL Enable9On12;
|
|
|
|
IUnknown* pD3D12Device;
|
|
|
|
IUnknown* ppD3D12Queues[MAX_D3D9ON12_QUEUES];
|
|
|
|
UINT NumQueues;
|
|
|
|
UINT NodeMask;
|
|
|
|
} D3D9ON12_ARGS;
|
|
|
|
|
2020-10-13 09:20:52 +02:00
|
|
|
BOOL d3d9_is_available();
|
|
|
|
DWORD WINAPI d3d9_render_main(void);
|
|
|
|
BOOL d3d9_create();
|
2022-09-23 02:17:33 +02:00
|
|
|
BOOL d3d9_reset(BOOL windowed);
|
|
|
|
BOOL d3d9_release_resources();
|
2020-10-13 09:20:52 +02:00
|
|
|
BOOL d3d9_release();
|
|
|
|
BOOL d3d9_on_device_lost();
|
|
|
|
|
2018-10-15 00:57:05 +02:00
|
|
|
|
2020-10-13 09:20:52 +02:00
|
|
|
#endif
|