summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/frameparameter.h
blob: e559d13c1d80366e126cd0d342ecc8116e150ec0 (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
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
//  frameparameter.h - Frame-based dynamic shader param
//
//============================================================

#pragma once

#ifndef __DRAWBGFX_FRAME_PARAMETER__
#define __DRAWBGFX_FRAME_PARAMETER__

#include <bgfx/bgfx.h>

#include <string>

#include "parameter.h"

class bgfx_frame_parameter : public bgfx_parameter
{
public:
	bgfx_frame_parameter(std::string name, parameter_type type, uint32_t period);
	virtual ~bgfx_frame_parameter() { }

	virtual float value() override;
	virtual void tick(double delta) override;

private:
	uint32_t    m_current_frame;
	uint32_t    m_period;
};

#endif // __DRAWBGFX_FRAME_PARAMETER__