blob: 40bedf8b732ca123f51c0386f7739955cde177c3 (
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
|
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// uniformreader.h - BGFX shader uniform JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_UNIFORM_READER__
#define __DRAWBGFX_UNIFORM_READER__
#include <bgfx/bgfx.h>
#include "statereader.h"
class bgfx_uniform;
enum uniform_type
{
TYPE_INT1 = bgfx::UniformType::Int1,
TYPE_VEC4 = bgfx::UniformType::Vec4,
TYPE_MAT3 = bgfx::UniformType::Mat3,
TYPE_MAT4 = bgfx::UniformType::Mat4,
TYPE_CAMERA, // Alias for the current ortho camera, used to auto-bind on material load
TYPE_COUNT = 5
};
class uniform_reader : public state_reader
{
public:
static bgfx_uniform* read_from_value(const Value& value);
private:
static const int TYPE_COUNT = uniform_type::TYPE_COUNT;
static const string_to_enum TYPE_NAMES[TYPE_COUNT];
};
#endif // __DRAWBGFX_UNIFORM_READER__
|