summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-02-08 14:26:53 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-02-08 14:26:53 +0100
commit3607505b4de075af46481aee7e286ca641594c07 (patch)
tree4750cd583d6ca356dc7168243894b46624ce4109
parent670596c4b6fe534ad9b4fe6c035444d40e9f00f4 (diff)
fixed texture clamping and added respect of filter parameter (nw)
-rw-r--r--src/osd/modules/render/drawbgfx.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index 4b9da495b4a..6eaaa2d2fb2 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -782,6 +782,9 @@ int renderer_bgfx::draw(int update)
// Draw quad.
// now draw
+ uint32_t texture_flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP;
+ if (video_config.filter==0) texture_flags |= BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT;
+
for (render_primitive *prim = window().m_primlist->first(); prim != NULL; prim = prim->next())
{
uint64_t flags = BGFX_STATE_RGB_WRITE;
@@ -856,7 +859,7 @@ int renderer_bgfx::draw(int update)
, (uint16_t)prim->texture.height
, 1
, bgfx::TextureFormat::BGRA8
- , 0
+ , texture_flags
, mem
);
}
@@ -872,7 +875,7 @@ int renderer_bgfx::draw(int update)
, (uint16_t)prim->texture.height
, 1
, bgfx::TextureFormat::BGRA8
- , 0
+ , texture_flags
, mem
);
}
@@ -903,7 +906,7 @@ int renderer_bgfx::draw(int update)
, (uint16_t)prim->texture.height
, 1
, bgfx::TextureFormat::BGRA8
- , 0
+ , texture_flags
, mem
);
} else {
@@ -911,7 +914,7 @@ int renderer_bgfx::draw(int update)
, (uint16_t)prim->texture.height
, 1
, bgfx::TextureFormat::BGRA8
- , 0
+ , texture_flags
, bgfx::copy(prim->texture.base, prim->texture.width*prim->texture.height*4)
);
}