Blender  V3.3
gl_uniform_buffer.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "MEM_guardedalloc.h"
11 
13 
14 #include "glew-mx.h"
15 
16 namespace blender {
17 namespace gpu {
18 
22 class GLUniformBuf : public UniformBuf {
23  private:
25  int slot_ = -1;
27  GLuint ubo_id_ = 0;
28 
29  public:
30  GLUniformBuf(size_t size, const char *name);
31  ~GLUniformBuf();
32 
33  void update(const void *data) override;
34  void bind(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 gpu
44 } // namespace blender
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
GLUniformBuf(size_t size, const char *name)
void update(const void *data) override
void bind(int slot) override