Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/DRW_gpu_wrapper.hh
| Show First 20 Lines • Show All 554 Lines • ▼ Show 20 Lines | public: | ||||
| /* To be able to use it with DRW_shgroup_uniform_texture_ref(). */ | /* To be able to use it with DRW_shgroup_uniform_texture_ref(). */ | ||||
| GPUTexture **operator&() | GPUTexture **operator&() | ||||
| { | { | ||||
| return &tx_; | return &tx_; | ||||
| } | } | ||||
| Texture &operator=(Texture &&a) | Texture &operator=(Texture &&a) | ||||
| { | { | ||||
| if (*this != a) { | if (this != std::addressof(a)) { | ||||
| this->free(); | |||||
| this->tx_ = a.tx_; | this->tx_ = a.tx_; | ||||
| this->name_ = a.name_; | this->name_ = a.name_; | ||||
| this->stencil_view_ = a.stencil_view_; | |||||
| this->mip_views_ = std::move(a.mip_views_); | |||||
| this->layer_views_ = std::move(a.layer_views_); | |||||
| a.tx_ = nullptr; | a.tx_ = nullptr; | ||||
| a.name_ = nullptr; | |||||
| a.stencil_view_ = nullptr; | |||||
| a.mip_views_.clear(); | |||||
| a.layer_views_.clear(); | |||||
| } | } | ||||
| return *this; | return *this; | ||||
| } | } | ||||
| /** | /** | ||||
| * Ensure the texture has the correct properties. Recreating it if needed. | * Ensure the texture has the correct properties. Recreating it if needed. | ||||
| * Return true if a texture has been created. | * Return true if a texture has been created. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 616 Lines • Show Last 20 Lines | |||||