blob: 0ba4224de40c64bd59c917567c080ec7124488c4 (
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
|
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// windowparameter.h - Static window-index shader param
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_WINDOW_PARAMETER__
#define __DRAWBGFX_WINDOW_PARAMETER__
#include <bgfx/bgfx.h>
#include <string>
#include "parameter.h"
class bgfx_window_parameter : public bgfx_parameter
{
public:
bgfx_window_parameter(std::string name, parameter_type type, uint32_t index) : bgfx_parameter(name, type), m_index(index) { }
virtual ~bgfx_window_parameter() { }
virtual float value() override { return float(m_index); }
virtual void tick(double delta) override { }
private:
uint32_t m_index;
};
#endif // __DRAWBGFX_WINDOW_PARAMETER__
|