summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/drawd3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/drawd3d.h')
-rw-r--r--src/osd/modules/render/drawd3d.h125
1 files changed, 34 insertions, 91 deletions
diff --git a/src/osd/modules/render/drawd3d.h b/src/osd/modules/render/drawd3d.h
index 9c2014ead39..31246f5baf8 100644
--- a/src/osd/modules/render/drawd3d.h
+++ b/src/osd/modules/render/drawd3d.h
@@ -9,9 +9,10 @@
#ifndef __WIN_DRAWD3D__
#define __WIN_DRAWD3D__
+#ifdef OSD_WINDOWS
-#include "modules/render/d3d/d3dhlsl.h"
-
+#include "d3d/d3dintf.h"
+#include "d3d/d3dcomm.h"
//============================================================
// CONSTANTS
@@ -24,88 +25,30 @@
// TYPE DEFINITIONS
//============================================================
-namespace d3d
-{
-class cache_target;
-class render_target;
-class renderer;
-
-/* cache_target is a simple linked list containing only a rednerable target and texture, used for phosphor effects */
-class cache_target
-{
-public:
- // construction/destruction
- cache_target() { }
- ~cache_target();
-
- bool init(renderer *d3d, base *d3dintf, int target_width, int target_height);
-
- surface *last_target;
- texture *last_texture;
-
- // real target dimension
- int target_width;
- int target_height;
-
- // only used to identify/find the render target
- int width;
- int height;
-
- int screen_index;
-
- cache_target *next;
- cache_target *prev;
-};
-
-/* render_target is the information about a Direct3D render target chain */
-class render_target
-{
-public:
- // construction/destruction
- render_target() { }
- ~render_target();
-
- bool init(renderer *d3d, base *d3dintf, int width, int height, int target_width, int target_height);
- int next_index(int index) { return ++index > 1 ? 0 : index; }
-
- // real target dimension
- int target_width;
- int target_height;
-
- // only used to identify/find the render target
- int width;
- int height;
-
- int screen_index;
- int page_index;
-
- surface *target_surface[2];
- texture *target_texture[2];
- surface *source_surface[2];
- texture *source_texture[2];
-
- render_target *next;
- render_target *prev;
-
- surface *bloom_target[11];
- texture *bloom_texture[11];
-};
+struct vertex;
+class texture_info;
+class texture_manager;
+struct device;
+struct vertex_buffer;
+class shaders;
+struct hlsl_options;
+class poly_info;
/* renderer is the information about Direct3D for the current screen */
-class renderer : public osd_renderer
+class renderer_d3d9 : public osd_renderer
{
public:
- //renderer() { }
- renderer(osd_window *window);
- virtual ~renderer();
+ renderer_d3d9(osd_window *window);
+ virtual ~renderer_d3d9();
virtual int create() override;
+ virtual slider_state* get_slider_list() override;
+ static bool init(running_machine &machine);
virtual render_primitive_list *get_primitives() override;
virtual int draw(const int update) override;
virtual void save() override;
virtual void record() override;
virtual void toggle_fsfx() override;
- virtual void destroy() override;
int initialize();
@@ -141,8 +84,8 @@ public:
void set_texture(texture_info *texture);
void set_filter(int filter);
- void set_wrap(D3DTEXTUREADDRESS wrap);
- void set_modmode(DWORD modmode);
+ void set_wrap(unsigned int wrap);
+ void set_modmode(int modmode);
void set_blendmode(int blendmode);
void reset_render_states();
@@ -165,15 +108,15 @@ public:
bool is_mod2x_supported() { return (bool)m_mod2x_supported; }
bool is_mod4x_supported() { return (bool)m_mod4x_supported; }
- D3DFORMAT get_screen_format() { return m_screen_format; }
- D3DFORMAT get_pixel_format() { return m_pixformat; }
- D3DDISPLAYMODE get_origmode() { return m_origmode; }
+ D3DFORMAT get_screen_format() { return m_screen_format; }
+ D3DFORMAT get_pixel_format() { return m_pixformat; }
+ D3DDISPLAYMODE get_origmode() { return m_origmode; }
UINT32 get_last_texture_flags() { return m_last_texture_flags; }
- texture_manager * get_texture_manager() { return m_texture_manager; }
- texture_info * get_default_texture() { return m_texture_manager->get_default_texture(); }
- texture_info * get_vector_texture() { return m_texture_manager->get_vector_texture(); }
+ d3d_texture_manager * get_texture_manager() { return m_texture_manager; }
+ texture_info * get_default_texture();
+ texture_info * get_vector_texture();
shaders * get_shaders() { return m_shaders; }
hlsl_options * get_shaders_options() { return m_shaders_options; }
@@ -187,9 +130,9 @@ private:
device * m_device; // pointer to the Direct3DDevice object
int m_gamma_supported; // is full screen gamma supported?
- present_parameters m_presentation; // set of presentation parameters
- D3DDISPLAYMODE m_origmode; // original display mode for the adapter
- D3DFORMAT m_pixformat; // pixel format we are using
+ present_parameters m_presentation; // set of presentation parameters
+ D3DDISPLAYMODE m_origmode; // original display mode for the adapter
+ D3DFORMAT m_pixformat; // pixel format we are using
vertex_buffer * m_vertexbuf; // pointer to the vertex buffer object
vertex * m_lockedbuf; // pointer to the locked vertex buffer
@@ -198,14 +141,14 @@ private:
vertex * m_vectorbatch; // pointer to the vector batch buffer
int m_batchindex; // current index into the vector batch
- poly_info m_poly[VERTEX_BUFFER_SIZE/3];// array to hold polygons as they are created
+ poly_info m_poly[VERTEX_BUFFER_SIZE/3];// array to hold polygons as they are created
int m_numpolys; // number of accumulated polygons
bool m_restarting; // if we're restarting
int m_mod2x_supported; // is D3DTOP_MODULATE2X supported?
int m_mod4x_supported; // is D3DTOP_MODULATE4X supported?
- D3DFORMAT m_screen_format; // format to use for screen textures
+ D3DFORMAT m_screen_format; // format to use for screen textures
texture_info * m_last_texture; // previous texture
UINT32 m_last_texture_flags; // previous texture flags
@@ -214,18 +157,18 @@ private:
int m_last_blendsrc; // previous blendmode
int m_last_blenddst; // previous blendmode
int m_last_filter; // previous texture filter
- D3DTEXTUREADDRESS m_last_wrap; // previous wrap state
- DWORD m_last_modmode; // previous texture modulation
+ UINT32 m_last_wrap; // previous wrap state
+ int m_last_modmode; // previous texture modulation
void * m_hlsl_buf; // HLSL vertex data
shaders * m_shaders; // HLSL interface
hlsl_options * m_shaders_options; // HLSL options
- texture_manager * m_texture_manager; // texture manager
+ d3d_texture_manager * m_texture_manager; // texture manager
int m_line_count;
};
-}
+#endif // OSD_WINDOWS
-#endif
+#endif // __WIN_DRAWD3D__ \ No newline at end of file