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_texture_private.hh')
-rw-r--r--source/blender/gpu/intern/gpu_texture_private.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh
index d237540f654..19022b228b2 100644
--- a/source/blender/gpu/intern/gpu_texture_private.hh
+++ b/source/blender/gpu/intern/gpu_texture_private.hh
@@ -241,6 +241,20 @@ class Texture {
virtual bool init_internal(GPUVertBuf *vbo) = 0;
};
+/* Syntacting suggar. */
+static inline GPUTexture *wrap(Texture *vert)
+{
+ return reinterpret_cast<GPUTexture *>(vert);
+}
+static inline Texture *unwrap(GPUTexture *vert)
+{
+ return reinterpret_cast<Texture *>(vert);
+}
+static inline const Texture *unwrap(const GPUTexture *vert)
+{
+ return reinterpret_cast<const Texture *>(vert);
+}
+
#undef DEBUG_NAME_LEN
inline size_t to_bytesize(eGPUTextureFormat format)