summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/chainentry.cpp
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-29 11:28:07 +0200
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-29 11:28:24 +0200
commitd9153eb306f8b3f5e1c9c66cdc3ad6e41d09ccac (patch)
tree2f2ac88e85af83892fbc218012fa30d6de49d121 /src/osd/modules/render/bgfx/chainentry.cpp
parent5cab7dbd8b0a09b55243b115d0c49a4bd3368768 (diff)
Get bgfx post-processing working with laserdisc games, nw
Diffstat (limited to 'src/osd/modules/render/bgfx/chainentry.cpp')
-rw-r--r--src/osd/modules/render/bgfx/chainentry.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/chainentry.cpp b/src/osd/modules/render/bgfx/chainentry.cpp
index f3bbbb42378..be836ba33e5 100644
--- a/src/osd/modules/render/bgfx/chainentry.cpp
+++ b/src/osd/modules/render/bgfx/chainentry.cpp
@@ -146,6 +146,16 @@ void bgfx_chain_entry::setup_quaddims_uniform(render_primitive* prim) const
}
}
+void bgfx_chain_entry::setup_screenindex_uniform(int32_t screen) const
+{
+ bgfx_uniform* screen_index = m_effect->uniform("u_screen_index");
+ if (screen_index != nullptr)
+ {
+ float values[1] = { float(screen) };
+ screen_index->set(values, sizeof(float));
+ }
+}
+
void bgfx_chain_entry::setup_auto_uniforms(render_primitive* prim, texture_manager& textures, uint16_t screen_width, uint16_t screen_height, uint32_t rotation_type, bool swap_xy, int32_t screen)
{
setup_screensize_uniforms(textures, screen_width, screen_height, screen);
@@ -153,6 +163,7 @@ void bgfx_chain_entry::setup_auto_uniforms(render_primitive* prim, texture_manag
setup_rotationtype_uniform(rotation_type);
setup_swapxy_uniform(swap_xy);
setup_quaddims_uniform(prim);
+ setup_screenindex_uniform(screen);
}
bool bgfx_chain_entry::setup_view(int view, uint16_t screen_width, uint16_t screen_height, int32_t screen) const