summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx')
-rw-r--r--src/osd/modules/render/bgfx/chain.cpp50
-rw-r--r--src/osd/modules/render/bgfx/chain.h6
-rw-r--r--src/osd/modules/render/bgfx/chainmanager.cpp46
-rw-r--r--src/osd/modules/render/bgfx/targetmanager.cpp4
4 files changed, 53 insertions, 53 deletions
diff --git a/src/osd/modules/render/bgfx/chain.cpp b/src/osd/modules/render/bgfx/chain.cpp
index 4ba069d18a4..5806c3ce042 100644
--- a/src/osd/modules/render/bgfx/chain.cpp
+++ b/src/osd/modules/render/bgfx/chain.cpp
@@ -34,11 +34,11 @@ bgfx_chain::bgfx_chain(std::string name, std::string author, bool transform, tar
, m_current_time(0)
, m_screen_index(screen_index)
{
- for (bgfx_target* target : m_target_list)
- {
- m_target_map[target->name()] = target;
- m_target_names.push_back(target->name());
- }
+ for (bgfx_target* target : m_target_list)
+ {
+ m_target_map[target->name()] = target;
+ m_target_names.push_back(target->name());
+ }
}
bgfx_chain::~bgfx_chain()
@@ -63,13 +63,13 @@ bgfx_chain::~bgfx_chain()
void bgfx_chain::repopulate_targets()
{
- for (size_t i = 0; i < m_target_names.size(); i++)
- {
- bgfx_target* target = m_targets.target(m_screen_index, m_target_names[i]);
- if (target != nullptr) {
- m_target_list[i] = target;
- }
- }
+ for (size_t i = 0; i < m_target_names.size(); i++)
+ {
+ bgfx_target* target = m_targets.target(m_screen_index, m_target_names[i]);
+ if (target != nullptr) {
+ m_target_list[i] = target;
+ }
+ }
}
void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_manager& textures, osd_window& window, uint64_t blend)
@@ -87,19 +87,19 @@ void bgfx_chain::process(render_primitive* prim, int view, int screen, texture_m
bool orientation_swap_xy = (window.machine().system().flags & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
bool rotation_swap_xy = (window.target()->orientation() & ORIENTATION_SWAP_XY) == ORIENTATION_SWAP_XY;
bool swap_xy = orientation_swap_xy ^ rotation_swap_xy;
-
- float screen_scale_x = 1.0f;
- float screen_scale_y = 1.0f;
- float screen_offset_x = 0.0f;
- float screen_offset_y = 0.0f;
- if (screen_device != nullptr)
- {
- render_container &screen_container = screen_device->container();
- screen_scale_x = 1.0f / screen_container.xscale();
- screen_scale_y = 1.0f / screen_container.yscale();
- screen_offset_x = -screen_container.xoffset();
- screen_offset_y = -screen_container.yoffset();
- }
+
+ float screen_scale_x = 1.0f;
+ float screen_scale_y = 1.0f;
+ float screen_offset_x = 0.0f;
+ float screen_offset_y = 0.0f;
+ if (screen_device != nullptr)
+ {
+ render_container &screen_container = screen_device->container();
+ screen_scale_x = 1.0f / screen_container.xscale();
+ screen_scale_y = 1.0f / screen_container.yscale();
+ screen_offset_x = -screen_container.xoffset();
+ screen_offset_y = -screen_container.yoffset();
+ }
for (bgfx_chain_entry* entry : m_entries)
{
diff --git a/src/osd/modules/render/bgfx/chain.h b/src/osd/modules/render/bgfx/chain.h
index bddec2c9bc3..157f92173cf 100644
--- a/src/osd/modules/render/bgfx/chain.h
+++ b/src/osd/modules/render/bgfx/chain.h
@@ -32,7 +32,7 @@ public:
~bgfx_chain();
void process(render_primitive* prim, int view, int screen, texture_manager& textures, osd_window &window, uint64_t blend = 0L);
- void repopulate_targets();
+ void repopulate_targets();
// Getters
std::vector<bgfx_slider*>& sliders() { return m_sliders; }
@@ -49,8 +49,8 @@ private:
std::vector<bgfx_parameter*> m_params;
std::vector<bgfx_chain_entry*> m_entries;
std::vector<bgfx_target*> m_target_list;
- std::vector<std::string> m_target_names;
- std::map<std::string, bgfx_target*> m_target_map;
+ std::vector<std::string> m_target_names;
+ std::map<std::string, bgfx_target*> m_target_map;
int64_t m_current_time;
uint32_t m_screen_index;
};
diff --git a/src/osd/modules/render/bgfx/chainmanager.cpp b/src/osd/modules/render/bgfx/chainmanager.cpp
index d4c59f9bb6a..2116322f19a 100644
--- a/src/osd/modules/render/bgfx/chainmanager.cpp
+++ b/src/osd/modules/render/bgfx/chainmanager.cpp
@@ -293,17 +293,17 @@ void chain_manager::process_screen_quad(uint32_t view, uint32_t screen, render_p
bgfx_texture *texture = new bgfx_texture(full_name, bgfx::TextureFormat::RGBA8, tex_width, tex_height, mem, BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT);
m_textures.add_provider(full_name, texture);
- const bool any_targets_rebuilt = m_targets.update_target_sizes(screen, tex_width, tex_height, TARGET_STYLE_GUEST);
+ const bool any_targets_rebuilt = m_targets.update_target_sizes(screen, tex_width, tex_height, TARGET_STYLE_GUEST);
if (any_targets_rebuilt)
- {
- for (bgfx_chain* chain : m_screen_chains)
- {
- if (chain != nullptr)
- {
- chain->repopulate_targets();
- }
- }
- }
+ {
+ for (bgfx_chain* chain : m_screen_chains)
+ {
+ if (chain != nullptr)
+ {
+ chain->repopulate_targets();
+ }
+ }
+ }
bgfx_chain* chain = screen_chain(screen);
chain->process(prim, view, screen, m_textures, window, bgfx_util::get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags)));
@@ -441,19 +441,19 @@ uint32_t chain_manager::handle_screen_chains(uint32_t view, render_primitive *st
std::swap(screen_width, screen_height);
}
- const bool any_targets_rebuilt = m_targets.update_target_sizes(screen_index, screen_width, screen_height, TARGET_STYLE_NATIVE);
- if (any_targets_rebuilt)
- {
- for (bgfx_chain* chain : m_screen_chains)
- {
- if (chain != nullptr)
- {
- chain->repopulate_targets();
- }
- }
- }
-
- process_screen_quad(view + used_views, screen_index, prim, window);
+ const bool any_targets_rebuilt = m_targets.update_target_sizes(screen_index, screen_width, screen_height, TARGET_STYLE_NATIVE);
+ if (any_targets_rebuilt)
+ {
+ for (bgfx_chain* chain : m_screen_chains)
+ {
+ if (chain != nullptr)
+ {
+ chain->repopulate_targets();
+ }
+ }
+ }
+
+ process_screen_quad(view + used_views, screen_index, prim, window);
used_views += screen_chain(screen_index)->applicable_passes();
screen_index++;
diff --git a/src/osd/modules/render/bgfx/targetmanager.cpp b/src/osd/modules/render/bgfx/targetmanager.cpp
index 7e8577b95b3..dfc1678ee34 100644
--- a/src/osd/modules/render/bgfx/targetmanager.cpp
+++ b/src/osd/modules/render/bgfx/targetmanager.cpp
@@ -102,10 +102,10 @@ bool target_manager::update_target_sizes(uint32_t screen, uint16_t width, uint16
{
sizes[screen] = osd_dim(width, height);
rebuild_targets(screen, style);
- return true;
+ return true;
}
- return false;
+ return false;
}
void target_manager::rebuild_targets(uint32_t screen, uint32_t style)