summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/suppressor.h
blob: 343a621b72d2ab64ebd4441a92513f42f3e82a6f (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
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
//  suppressor.h - Conditionally suppress a bgfx chain entry
//  from being processed.
//
//============================================================

#pragma once

#ifndef __DRAWBGFX_SUPPRESSOR__
#define __DRAWBGFX_SUPPRESSOR__

#include <bgfx/bgfx.h>

#include <vector>

class bgfx_slider;

class bgfx_suppressor
{
public:
	enum condition_type
	{
		CONDITION_EQUAL,
		CONDITION_NOTEQUAL,

		CONDITION_COUNT
	};

	enum combine_mode {
		COMBINE_AND,
		COMBINE_OR
	};

	bgfx_suppressor(std::vector<bgfx_slider*> sliders, uint32_t condition, combine_mode combine, void* value);
	~bgfx_suppressor();

	// Getters
	bool suppress();
	combine_mode combine() const { return m_combine; }

private:
	std::vector<bgfx_slider*>   m_sliders;
	uint32_t                    m_condition;
	combine_mode                m_combine;
	uint8_t*                    m_value;
};

#endif // __DRAWBGFX_SUPPRESSOR__