Unravel Engine C++ Reference
Loading...
Searching...
No Matches
uniform.h
Go to the documentation of this file.
1#pragma once
2
3#include "handle_impl.h"
4#include <string>
5
6#include "frame_buffer.h"
7#include "texture.h"
8
9#include <limits>
10#include <map>
11#include <memory>
12
13namespace gfx
14{
15
17
18struct uniform : public handle_impl<uniform, uniform_handle>
19{
20 uniform() = default;
21 ~uniform();
22 //-----------------------------------------------------------------------------
23 // Name : populate ()
29 //-----------------------------------------------------------------------------
30 uniform(const std::string& _name, uniform_type _type, std::uint16_t _num = 1);
31
32 //-----------------------------------------------------------------------------
33 // Name : populate ()
39 //-----------------------------------------------------------------------------
40 uniform(handle_type_t _handle);
41
42 //-----------------------------------------------------------------------------
43 // Name : set_texture ()
49 //-----------------------------------------------------------------------------
50 void set_texture(uint8_t _stage,
51 const gfx::frame_buffer* _handle,
52 uint8_t _attachment = 0,
53 uint32_t _flags = std::numeric_limits<uint32_t>::max());
54
55 //-----------------------------------------------------------------------------
56 // Name : set_texture ()
62 //-----------------------------------------------------------------------------
63 void set_texture(uint8_t _stage,
64 const gfx::texture* _texture,
65 uint32_t _flags = std::numeric_limits<uint32_t>::max());
66
67 //-----------------------------------------------------------------------------
68 // Name : set_uniform ()
74 //-----------------------------------------------------------------------------
75 void set_uniform(const void* _value, uint16_t _num = 1);
76
79};
80
81} // namespace gfx
bgfx::UniformInfo uniform_info
Definition graphics.h:26
bgfx::UniformType::Enum uniform_type
Definition graphics.h:25
void deinit_uniform_cache()
Definition uniform.cpp:59
uniform()=default
void set_texture(uint8_t _stage, const gfx::frame_buffer *_handle, uint8_t _attachment=0, uint32_t _flags=std::numeric_limits< uint32_t >::max())
Definition uniform.cpp:91
uniform_info info
Uniform info.
Definition uniform.h:78
void set_uniform(const void *_value, uint16_t _num=1)
Definition uniform.cpp:116