Blender
V3.3
|
#include "DRW_render.h"
#include "MEM_guardedalloc.h"
#include "draw_texture_pool.h"
#include "BLI_math_vec_types.hh"
#include "BLI_span.hh"
#include "BLI_utildefines.h"
#include "BLI_utility_mixins.hh"
#include "BLI_vector.hh"
#include "GPU_framebuffer.h"
#include "GPU_storage_buffer.h"
#include "GPU_texture.h"
#include "GPU_uniform_buffer.h"
Go to the source code of this file.
Namespaces | |
blender | |
blender::draw | |
blender::draw::detail | |
Wrapper classes that make it easier to use GPU objects in C++.
All Buffers need to be sent to GPU memory before being used. This is done by using the push_update()
.
A Storage[Array]Buffer can hold much more data than a Uniform[Array]Buffer which can only holds 16KB of data.
All types are not copyable and Buffers are not Movable.
draw::UniformArrayBuffer<T, len>
Uniform buffer object containing an array of T with len elements. Data can be accessed using the [] operator.
draw::UniformBuffer<T>
A uniform buffer object class inheriting from T. Data can be accessed just like a normal T object.
draw::StorageArrayBuffer<T, len>
Storage buffer object containing an array of T with len elements. The item count can be changed after creation using resize()
. However, this requires the invalidation of the whole buffer and discarding all data inside it. Data can be accessed using the [] operator.
draw::StorageBuffer<T>
A storage buffer object class inheriting from T. Data can be accessed just like a normal T object.
draw::Texture
A simple wrapper to GPUTexture. A #draw::Texture can be created without allocation. The ensure_[1d|2d|3d|cube][_array]()
method is here to make sure the underlying texture will meet the requirements and create (or recreate) the GPUTexture if needed.
draw::TextureFromPool
A GPUTexture from the viewport texture pool. This texture can be shared with other engines and its content is undefined when acquiring it. A #draw::TextureFromPool is acquired for rendering using acquire()
and released once the rendering is done using release()
. The same texture can be acquired & released multiple time in one draw loop. The sync()
method MUST be called once during the cache populate (aka: Sync) phase.
draw::Framebuffer
Simple wrapper to #GPUFramebuffer that can be moved.
Definition in file DRW_gpu_wrapper.hh.