blob: ad9e248ac5fd308ae6d294d32a85bef01e4df28a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// license:BSD-3-Clause
// copyright-holders:Sven Gothel
#ifndef MAME_OSD_OPENGL_GL_SHADER_MGR_H
#define MAME_OSD_OPENGL_GL_SHADER_MGR_H
#pragma once
#include "gl_shader_tool.h"
#include "osd_opengl.h"
#include <memory>
// #define GLSL_SOURCE_ON_DISK 1
class glsl_shader_info : public gl_shader_tool
{
public:
enum FEATURE
{
FEAT_PLAIN,
FEAT_BILINEAR,
FEAT_BICUBIC,
FEAT_INT_NUMBER,
FEAT_CUSTOM = FEAT_INT_NUMBER,
FEAT_MAX_NUMBER
};
using gl_shader_tool::gl_shader_tool;
virtual ~glsl_shader_info() = default;
/**
* returns the GLSL program if ok/available, otherwise 0
*/
virtual GLhandleARB get_program_mamebm(int glslShaderFeature, int idx) = 0;
virtual const char *get_filter_name_mamebm(int glslShaderFeature) = 0;
virtual int add_mamebm(const char *custShaderPrefix, int idx) = 0;
virtual GLhandleARB get_program_scrn(int idx) = 0;
virtual int add_scrn(const char *custShaderPrefix, int idx) = 0;
/**
* returns pointer if OK, otherwise nullptr
*/
static std::unique_ptr<glsl_shader_info> init(
osd_gl_context &gl_ctx
#if defined(USE_DISPATCH_GL)
, osd_gl_dispatch *gld
#endif
);
};
#endif // MAME_OSD_OPENGL_GL_SHADER_MGR_H
|