diff options
author | 2016-09-28 15:22:38 +0200 | |
---|---|---|
committer | 2016-09-28 15:30:43 +0200 | |
commit | ecf1e166fc6342ecf0664fe1d3af7aecb621c650 (patch) | |
tree | f75605582b1bc87ea3b6a2989d9867ea4ea93096 /src/emu/render.h | |
parent | 4727ff5e6a1e0aaa1d2b146b819250a6a83e8448 (diff) |
Fixed several small issues in HLSL/BGFX
* fixed target texture dimension when -intoverscan is used (this fixes the appereance of scanline and shadow mask)
* added target_scale and screen_count uniforms
* rounded corners now remain aligned with screen bounds when -intoverscan is used (single screen only)
Diffstat (limited to 'src/emu/render.h')
-rw-r--r-- | src/emu/render.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/emu/render.h b/src/emu/render.h index 069ae534a32..d0f8a29b0c4 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -203,7 +203,7 @@ struct render_color // render_texuv - floating point set of UV texture coordinates struct render_texuv { - float u; // U coodinate (0.0-1.0) + float u; // U coordinate (0.0-1.0) float v; // V coordinate (0.0-1.0) }; @@ -345,8 +345,10 @@ public: // getters render_primitive *next() const { return m_next; } bool packable(const INT32 pack_size) const { return (flags & PRIMFLAG_PACKABLE) && texture.base != nullptr && texture.width <= pack_size && texture.height <= pack_size; } - float get_quad_width() const { return bounds.x1 - bounds.x0; } - float get_quad_height() const { return bounds.y1 - bounds.y0; } + float get_quad_width() const { return abs(bounds.x1 - bounds.x0); } + float get_quad_height() const { return abs(bounds.y1 - bounds.y0); } + float get_full_quad_width() const { return abs(full_bounds.x1 - full_bounds.x0); } + float get_full_quad_height() const { return abs(full_bounds.y1 - full_bounds.y0); } // reset to prepare for re-use void reset(); @@ -354,6 +356,7 @@ public: // public state primitive_type type; // type of primitive render_bounds bounds; // bounds or positions + render_bounds full_bounds; // bounds or positions (unclipped) render_color color; // RGBA values UINT32 flags; // flags float width; // width (for line primitives) @@ -602,8 +605,8 @@ private: user_settings m_user; // user settings bitmap_argb32 * m_overlaybitmap; // overlay bitmap render_texture * m_overlaytexture; // overlay texture - std::unique_ptr<palette_client> m_palclient; // client to the screen palette - std::vector<rgb_t> m_bcglookup; // copy of screen palette with bcg adjustment + std::unique_ptr<palette_client> m_palclient; // client to the screen palette + std::vector<rgb_t> m_bcglookup; // copy of screen palette with bcg adjustment rgb_t m_bcglookup256[0x400]; // lookup table for brightness/contrast/gamma }; |