blob: 2df18365a4cd9fd445668ea61eb49fbcb6040fa8 (
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
|
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// parameter.h - BGFX shader parameter
//
// A value that represents some form of parametric
// operation, which can be fed to the input of a BGFX
// shader uniform.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_PARAMETER__
#define __DRAWBGFX_PARAMETER__
#include <string>
class bgfx_parameter
{
public:
enum parameter_type
{
PARAM_FRAME,
PARAM_WINDOW,
PARAM_TIME
};
bgfx_parameter(std::string name, parameter_type type) : m_name(name), m_type(type) { }
virtual ~bgfx_parameter() { }
virtual void tick(double delta) = 0;
// Getters
virtual float value() = 0;
std::string name() const { return m_name; }
protected:
std::string m_name;
parameter_type m_type;
};
#endif // __DRAWBGFX_PARAMETER__
|