Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/DRW_gpu_wrapper.hh
| Show First 20 Lines • Show All 1,079 Lines • ▼ Show 20 Lines | public: | ||||
| void ensure(int2 target_size) | void ensure(int2 target_size) | ||||
| { | { | ||||
| if (fb_ == NULL) { | if (fb_ == NULL) { | ||||
| fb_ = GPU_framebuffer_create(name_); | fb_ = GPU_framebuffer_create(name_); | ||||
| } | } | ||||
| GPU_framebuffer_default_size(fb_, UNPACK2(target_size)); | GPU_framebuffer_default_size(fb_, UNPACK2(target_size)); | ||||
| } | } | ||||
| void bind() | |||||
| { | |||||
| GPU_framebuffer_bind(fb_); | |||||
| } | |||||
| void clear_depth(float depth) | |||||
| { | |||||
| GPU_framebuffer_clear_depth(fb_, depth); | |||||
| } | |||||
| Framebuffer &operator=(Framebuffer &&a) | Framebuffer &operator=(Framebuffer &&a) | ||||
| { | { | ||||
| if (*this != a) { | if (*this != a) { | ||||
| this->fb_ = a.fb_; | this->fb_ = a.fb_; | ||||
| this->name_ = a.name_; | this->name_ = a.name_; | ||||
| a.fb_ = nullptr; | a.fb_ = nullptr; | ||||
| } | } | ||||
| return *this; | return *this; | ||||
| ▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines | |||||