Blender
V5.0
source
blender
gpu
GPU_uniform_buffer.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2005 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
15
16
#pragma once
17
18
#include "
BLI_sys_types.h
"
19
20
struct
ListBase
;
21
22
namespace
blender::gpu
{
23
class
UniformBuf
;
24
}
// namespace blender::gpu
25
26
blender::gpu::UniformBuf
*
GPU_uniformbuf_create_ex
(
size_t
size
,
27
const
void
*
data
,
28
const
char
*
name
);
35
blender::gpu::UniformBuf
*
GPU_uniformbuf_create_from_list
(
ListBase
*
inputs
,
const
char
*
name
);
36
37
#define GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, nullptr, __func__);
38
39
void
GPU_uniformbuf_free
(
blender::gpu::UniformBuf
*ubo);
40
41
void
GPU_uniformbuf_update
(
blender::gpu::UniformBuf
*ubo,
const
void
*
data
);
42
43
void
GPU_uniformbuf_bind
(
blender::gpu::UniformBuf
*ubo,
int
slot);
44
void
GPU_uniformbuf_bind_as_ssbo
(
blender::gpu::UniformBuf
*ubo,
int
slot);
45
void
GPU_uniformbuf_unbind
(
blender::gpu::UniformBuf
*ubo);
50
void
GPU_uniformbuf_debug_unbind_all
();
51
52
void
GPU_uniformbuf_clear_to_zero
(
blender::gpu::UniformBuf
*ubo);
53
54
#define GPU_UBO_BLOCK_NAME "node_tree"
55
#define GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs"
56
#define GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs"
57
constexpr
static
int
GPU_NODE_TREE_UBO_SLOT
= 0;
58
59
#define GPU_UBO_FREE_SAFE(ubo) \
60
do { \
61
if (ubo != nullptr) { \
62
GPU_uniformbuf_free(ubo); \
63
ubo = nullptr; \
64
} \
65
} while (0)
BLI_sys_types.h
GPU_uniformbuf_free
void GPU_uniformbuf_free(blender::gpu::UniformBuf *ubo)
Definition
gpu_uniform_buffer.cc:232
GPU_uniformbuf_bind
void GPU_uniformbuf_bind(blender::gpu::UniformBuf *ubo, int slot)
Definition
gpu_uniform_buffer.cc:242
GPU_uniformbuf_create_from_list
blender::gpu::UniformBuf * GPU_uniformbuf_create_from_list(ListBase *inputs, const char *name)
Definition
gpu_uniform_buffer.cc:211
GPU_uniformbuf_bind_as_ssbo
void GPU_uniformbuf_bind_as_ssbo(blender::gpu::UniformBuf *ubo, int slot)
Definition
gpu_uniform_buffer.cc:247
GPU_NODE_TREE_UBO_SLOT
static constexpr int GPU_NODE_TREE_UBO_SLOT
Definition
GPU_uniform_buffer.hh:57
GPU_uniformbuf_clear_to_zero
void GPU_uniformbuf_clear_to_zero(blender::gpu::UniformBuf *ubo)
Definition
gpu_uniform_buffer.cc:262
GPU_uniformbuf_unbind
void GPU_uniformbuf_unbind(blender::gpu::UniformBuf *ubo)
Definition
gpu_uniform_buffer.cc:252
GPU_uniformbuf_create_ex
blender::gpu::UniformBuf * GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name)
Definition
gpu_uniform_buffer.cc:195
GPU_uniformbuf_debug_unbind_all
void GPU_uniformbuf_debug_unbind_all()
Definition
gpu_uniform_buffer.cc:257
GPU_uniformbuf_update
void GPU_uniformbuf_update(blender::gpu::UniformBuf *ubo, const void *data)
Definition
gpu_uniform_buffer.cc:237
data
BMesh const char void * data
Definition
bmesh_iterators_inline.hh:37
size
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition
btDbvt.cpp:52
blender::gpu::UniformBuf
Definition
gpu_uniform_buffer_private.hh:25
blender::gpu
Definition
blf_internal_types.hh:32
inputs
static blender::bke::bNodeSocketTemplate inputs[]
Definition
node_texture_at.cc:11
name
const char * name
Definition
python_compat.hh:32
ListBase
Definition
DNA_listBase.h:32
Generated on
for Blender by
doxygen
1.16.1