Blender V5.3
gl_uniform_buffer.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 "MEM_guardedalloc.h"
12
14
15namespace blender::gpu {
16
20class GLUniformBuf : public UniformBuf {
21 private:
23 int slot_ = -1;
25 GLuint ubo_id_ = 0;
26
27 public:
28 GLUniformBuf(size_t size, const char *name);
30
31 void update(const void *data) override;
32 void clear_to_zero() override;
33 void bind(int slot) override;
34 void bind_as_ssbo(int slot) override;
35 void unbind() override;
36
37 private:
38 void init();
39
40 MEM_CXX_CLASS_ALLOC_FUNCS("GLUniformBuf");
41};
42
43} // namespace blender::gpu
Read Blender memory allocation and freeing.
GLUniformBuf(size_t size, const char *name)
void update(const void *data) override
void bind(int slot) override
void bind_as_ssbo(int slot) override
UniformBuf(size_t size, const char *name)
BMesh const char void * data