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

#ifndef MAME_RENDER_BGFX_FRAMEPARAMETER_H
#define MAME_RENDER_BGFX_FRAMEPARAMETER_H

#pragma once

#include "parameter.h"

#include <cstdint>
#include <string>

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

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

private:
	uint32_t    m_current_frame;
	uint32_t    m_period;
};

#endif // MAME_RENDER_BGFX_FRAMEPARAMETER_H