FCT
载入中...
搜索中...
未找到
UniformWrapper.cpp
浏览该文件的文档.
2#include "UniformWrapper.h"
3#include "Context.h"
4#include "Context.hpp"
5namespace FCT {
7 {
8 }
9
10 Uniform::Uniform(Uniform&& other) noexcept: m_uniformBuffer(other.m_uniformBuffer), m_constBuffer(other.m_constBuffer)
11 {
12 other.m_uniformBuffer = nullptr;
13 other.m_constBuffer = nullptr;
14 }
15
17 {
18 if (this != &other) {
20 {
21 delete m_uniformBuffer;
22 }
23 if (m_constBuffer)
24 {
25 delete m_constBuffer;
26 }
27
28 m_uniformBuffer = other.m_uniformBuffer;
29 m_constBuffer = other.m_constBuffer;
30
31 other.m_uniformBuffer = nullptr;
32 other.m_constBuffer = nullptr;
33 }
34 return *this;
35 }
36
38 {
41 m_constBuffer->layout(layout);
43 m_constBuffer->create();
44 }
45
47 {
49 {
50 delete m_uniformBuffer;
51 }
52 if (m_constBuffer)
53 {
54 delete m_constBuffer;
55 }
56 }
57
59 {
60 m_constBuffer->updataData();
61 }
62
63 Uniform::operator RHI::ConstBuffer*() const
64 {
65 return m_constBuffer;
66 }
67}
FCT::UniformBuffer * m_uniformBuffer
Uniform & operator=(Uniform &&other) noexcept
FCT::RHI::ConstBuffer * m_constBuffer