v2.0.0
Loading...
Searching...
No Matches
rendertypes.h
Go to the documentation of this file.
1//=============================================================================================================
25
26#ifndef RENDERTYPES_H
27#define RENDERTYPES_H
28
29//=============================================================================================================
30// INCLUDES
31//=============================================================================================================
32
33#include "../disp3D_global.h"
34
35#include <QtGlobal>
36
37#include <cstdint>
38#include <memory>
39
40namespace DISP3DLIB
41{
42
43//=============================================================================================================
54inline uint32_t packABGR(uint32_t r, uint32_t g, uint32_t b, uint32_t a = 0xFF)
55{
56 return (a << 24) | (b << 16) | (g << 8) | r;
57}
58
59//=============================================================================================================
75
76//=============================================================================================================
90
91//=============================================================================================================
99{
100 const void* data = nullptr;
101 quint32 bytes = 0;
102 quint64 generation = 0;
103};
104
105//=============================================================================================================
117
118//=============================================================================================================
126{
127public:
129 : m_token(std::make_shared<char>())
130 {
131 }
133 : RenderKey()
134 {
135 }
137 {
138 return *this;
139 }
140
142 const void* id() const
143 {
144 return m_token.get();
145 }
146
148 std::weak_ptr<const void> token() const
149 {
150 return m_token;
151 }
152
153private:
154 std::shared_ptr<char> m_token;
155};
156
157} // namespace DISP3DLIB
158
159#endif // RENDERTYPES_H
Library export/import macros and namespace marker for the disp3D library.
3-D brain visualisation using the Qt RHI rendering backend.
uint32_t packABGR(uint32_t r, uint32_t g, uint32_t b, uint32_t a=0xFF)
Definition rendertypes.h:54
@ ModeSourceEstimate
Definition rendertypes.h:88
CPU-side contents of one GPU buffer of a renderable.
Definition rendertypes.h:99
CPU streams of an instanced mesh: one shape (vertices, indices) drawn once per instance.
RenderKey(const RenderKey &)
RenderKey & operator=(const RenderKey &)
std::weak_ptr< const void > token() const
const void * id() const