diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-02 02:25:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | a92d77acf715f5a775e99b575cc8cc5238b11557 (patch) | |
tree | 1361ba0795758d8989a5ed87762822a32a47845b /source/blender/gpu/intern/gpu_texture.cc | |
parent | f72c1c4547e5fab769c22652d9872192029ad7fe (diff) |
GPUTexture: Add skeleton of the new GLTexture class
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.cc | 44 |
1 files changed, 44 insertions, 0 deletions
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 * |