From a92d77acf715f5a775e99b575cc8cc5238b11557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 2 Sep 2020 01:25:32 +0200 Subject: GPUTexture: Add skeleton of the new GLTexture class --- source/blender/gpu/intern/gpu_texture.cc | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'source/blender/gpu/intern/gpu_texture.cc') diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index 0a22df96382..ced9ea5a498 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -46,6 +46,48 @@ #include "gpu_context_private.hh" #include "gpu_framebuffer_private.hh" +#include "gpu_texture_private.hh" + +namespace blender::gpu { + +/* -------------------------------------------------------------------- */ +/** \name Creation & Deletion + * \{ */ + +Texture::Texture(const char *name) +{ + if (name) { + BLI_strncpy(name_, name, sizeof(name_)); + } + else { + name_[0] = '\0'; + } +} + +Texture::~Texture() +{ +} + +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Operation + * \{ */ + +void Texture::attach_to(FrameBuffer *) +{ +} + +/** \} */ + +} // namespace blender::gpu + +/* -------------------------------------------------------------------- */ +/** \name C-API + * \{ */ + +using namespace blender::gpu; + static struct GPUTextureGlobal { /** Texture used in place of invalid textures (not loaded correctly, missing). */ GPUTexture *invalid_tex_1D; @@ -2238,6 +2280,8 @@ void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *size) } } +/** \} */ + /* -------------------------------------------------------------------- */ /** \name GPU Sampler Objects * -- cgit v1.2.3