Blender V5.0
gpu_uniform_buffer_private.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2020 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_sys_types.h"
12
13namespace blender::gpu {
14
15#ifndef NDEBUG
16# define DEBUG_NAME_LEN 64
17#else
18# define DEBUG_NAME_LEN 8
19#endif
20
26 protected:
30 void *data_ = nullptr;
33
34 public:
35 UniformBuf(size_t size, const char *name);
36 virtual ~UniformBuf();
37
38 virtual void update(const void *data) = 0;
39 virtual void clear_to_zero() = 0;
40 virtual void bind(int slot) = 0;
41 virtual void bind_as_ssbo(int slot) = 0;
42 virtual void unbind() = 0;
43
47 void attach_data(void *data)
48 {
49 data_ = data;
50 }
51};
52
53#undef DEBUG_NAME_LEN
54
55} // namespace blender::gpu
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
virtual void unbind()=0
virtual void update(const void *data)=0
UniformBuf(size_t size, const char *name)
virtual void bind(int slot)=0
virtual void bind_as_ssbo(int slot)=0
virtual void clear_to_zero()=0
#define DEBUG_NAME_LEN
const char * name