mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(D3D) Refactor D3D driver
This commit is contained in:
parent
4815f25421
commit
e48b7e7d8a
1056
gfx/d3d9/d3d.cpp
1056
gfx/d3d9/d3d.cpp
File diff suppressed because it is too large
Load Diff
@ -55,58 +55,13 @@ typedef struct
|
||||
|
||||
class D3DVideo
|
||||
{
|
||||
public:
|
||||
D3DVideo();
|
||||
~D3DVideo();
|
||||
|
||||
// Delay constructor due to lack of exceptions.
|
||||
bool construct(const video_info_t *info,
|
||||
const input_driver_t **input, void **input_data);
|
||||
|
||||
bool frame(const void* frame,
|
||||
unsigned width, unsigned height, unsigned pitch,
|
||||
const char *msg);
|
||||
|
||||
bool alive();
|
||||
bool focus() const;
|
||||
void set_nonblock_state(bool state);
|
||||
void set_rotation(unsigned rot);
|
||||
void viewport_info(rarch_viewport &vp);
|
||||
bool read_viewport(uint8_t *buffer);
|
||||
void resize(unsigned new_width, unsigned new_height);
|
||||
bool set_shader(const std::string &path);
|
||||
public:
|
||||
bool process_shader(void);
|
||||
|
||||
void set_filtering(unsigned index, bool smooth);
|
||||
void set_font_rect(font_params_t *params);
|
||||
|
||||
void overlay_render(overlay_t &overlay);
|
||||
|
||||
void show_cursor(bool show);
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
bool overlay_load(const texture_image *images, unsigned num_images);
|
||||
void overlay_tex_geom(unsigned index, float x, float y, float w, float h);
|
||||
void overlay_vertex_geom(unsigned index, float x, float y, float w, float h);
|
||||
void overlay_enable(bool state);
|
||||
void overlay_full_screen(bool enable);
|
||||
void overlay_set_alpha(unsigned index, float mod);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void set_rgui_texture_frame(const void *frame,
|
||||
bool rgb32, unsigned width, unsigned height,
|
||||
float alpha);
|
||||
void set_rgui_texture_enable(bool state, bool fullscreen);
|
||||
#endif
|
||||
|
||||
bool restore();
|
||||
void render_msg(const char *msg, font_params_t *params = nullptr);
|
||||
|
||||
bool should_resize;
|
||||
inline video_info_t& info() { return video_info; }
|
||||
|
||||
private:
|
||||
|
||||
WNDCLASSEX windowClass;
|
||||
HWND hWnd;
|
||||
@ -115,23 +70,15 @@ class D3DVideo
|
||||
LPD3DXFONT font;
|
||||
|
||||
void recompute_pass_sizes();
|
||||
void calculate_rect(unsigned width, unsigned height, bool keep, float aspect);
|
||||
void set_viewport(int x, int y, unsigned width, unsigned height);
|
||||
unsigned screen_width;
|
||||
unsigned screen_height;
|
||||
unsigned rotation;
|
||||
unsigned dev_rotation;
|
||||
D3DVIEWPORT final_viewport;
|
||||
|
||||
std::string cg_shader;
|
||||
|
||||
struct gfx_shader shader;
|
||||
|
||||
void process(void);
|
||||
|
||||
bool init(const video_info_t *info);
|
||||
bool init_base(const video_info_t *info);
|
||||
void make_d3dpp(const video_info_t *info, D3DPRESENT_PARAMETERS *d3dpp);
|
||||
void deinit(void);
|
||||
RECT monitor_rect(void);
|
||||
|
||||
video_info_t video_info;
|
||||
@ -162,11 +109,8 @@ class D3DVideo
|
||||
#ifdef HAVE_OVERLAY
|
||||
bool overlays_enabled;
|
||||
std::vector<overlay_t> overlays;
|
||||
void free_overlays();
|
||||
#endif
|
||||
|
||||
void free_overlay(overlay_t &overlay);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
overlay_t rgui;
|
||||
#endif
|
||||
@ -174,5 +118,9 @@ class D3DVideo
|
||||
RenderChain *chain;
|
||||
};
|
||||
|
||||
#ifndef _XBOX
|
||||
extern "C" bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
1013
gfx/d3d9/d3d9_pc.cpp
1013
gfx/d3d9/d3d9_pc.cpp
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user