Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_uniform_buffer_private.hh')
-rw-r--r--source/blender/gpu/intern/gpu_uniform_buffer_private.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
index cf6447ccd37..00d10776864 100644
--- a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
+++ b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh
@@ -63,6 +63,20 @@ class UniformBuf {
}
};
+/* Syntacting suggar. */
+static inline GPUUniformBuf *wrap(UniformBuf *vert)
+{
+ return reinterpret_cast<GPUUniformBuf *>(vert);
+}
+static inline UniformBuf *unwrap(GPUUniformBuf *vert)
+{
+ return reinterpret_cast<UniformBuf *>(vert);
+}
+static inline const UniformBuf *unwrap(const GPUUniformBuf *vert)
+{
+ return reinterpret_cast<const UniformBuf *>(vert);
+}
+
#undef DEBUG_NAME_LEN
} // namespace gpu