summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/lib
diff options
context:
space:
mode:
author Aaron <aaron.b.stover@gmail.com>2017-12-26 22:27:48 -0800
committer Aaron <aaron.b.stover@gmail.com>2017-12-30 00:29:47 -0800
commit222b41d58254acdfa0f8441c37b7ec43289b7b25 (patch)
treecc76812c25cf744f97341c9766fd997d59f9f012 /src/osd/modules/lib
parent6c456a286507d4d0ba1acb4b9015f9933e2351a4 (diff)
Add Bicubic Shader to OpenGL Backend
This shader uses the equation described by R. Keys in the paper 'Cubic Convolution Interpolation for Digital Image Processing' which is, in this case, the same as a Catmull-Rom spline. This produces a sharper upscaled image than bilinear filtering. The new shader is selected by setting gl_glsl_filter to 2. Consequently, gl_glsl_filter is now treated as an int rather than a boolean. Also fixed a variable name problem in the code guarded by GLSL_SOURCE_ON_DISK.
Diffstat (limited to 'src/osd/modules/lib')
-rw-r--r--src/osd/modules/lib/osdobj_common.cpp2
-rw-r--r--src/osd/modules/lib/osdobj_common.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/modules/lib/osdobj_common.cpp b/src/osd/modules/lib/osdobj_common.cpp
index 704ee399819..5e3846a2b68 100644
--- a/src/osd/modules/lib/osdobj_common.cpp
+++ b/src/osd/modules/lib/osdobj_common.cpp
@@ -100,7 +100,7 @@ const options_entry osd_options::s_option_entries[] =
{ OSDOPTION_GL_VBO, "1", OPTION_BOOLEAN, "enable OpenGL VBO, if available (default on)" },
{ OSDOPTION_GL_PBO, "1", OPTION_BOOLEAN, "enable OpenGL PBO, if available (default on)" },
{ OSDOPTION_GL_GLSL, "0", OPTION_BOOLEAN, "enable OpenGL GLSL, if available (default off)" },
- { OSDOPTION_GLSL_FILTER, "1", OPTION_STRING, "enable OpenGL GLSL filtering instead of FF filtering 0-plain, 1-bilinear (default)" },
+ { OSDOPTION_GLSL_FILTER, "1", OPTION_STRING, "enable OpenGL GLSL filtering instead of FF filtering 0-plain, 1-bilinear (default), 2-bicubic" },
{ OSDOPTION_SHADER_MAME "0", OSDOPTVAL_NONE, OPTION_STRING, "custom OpenGL GLSL shader set mame bitmap 0" },
{ OSDOPTION_SHADER_MAME "1", OSDOPTVAL_NONE, OPTION_STRING, "custom OpenGL GLSL shader set mame bitmap 1" },
{ OSDOPTION_SHADER_MAME "2", OSDOPTVAL_NONE, OPTION_STRING, "custom OpenGL GLSL shader set mame bitmap 2" },
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index f3f1c746337..99acfb045f6 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -144,7 +144,7 @@ public:
bool gl_vbo() const { return bool_value(OSDOPTION_GL_VBO); }
bool gl_pbo() const { return bool_value(OSDOPTION_GL_PBO); }
bool gl_glsl() const { return bool_value(OSDOPTION_GL_GLSL); }
- bool glsl_filter() const { return bool_value(OSDOPTION_GLSL_FILTER); }
+ int glsl_filter() const { return int_value(OSDOPTION_GLSL_FILTER); }
const char *shader_mame(int index) const { return value(string_format("%s%d", OSDOPTION_SHADER_MAME, index).c_str()); }
const char *shader_screen(int index) const { return value(string_format("%s%d", OSDOPTION_SHADER_SCREEN, index).c_str()); }