Blender  V3.3
Macros | Typedefs | Functions
GPU_uniform_buffer.h File Reference

Go to the source code of this file.

Macros

#define GPU_uniformbuf_create(size)   GPU_uniformbuf_create_ex(size, NULL, __func__);
 
#define GPU_UBO_BLOCK_NAME   "node_tree"
 
#define GPU_ATTRIBUTE_UBO_BLOCK_NAME   "unf_attrs"
 

Typedefs

typedef struct GPUUniformBuf GPUUniformBuf
 

Functions

GPUUniformBufGPU_uniformbuf_create_ex (size_t size, const void *data, const char *name)
 
GPUUniformBufGPU_uniformbuf_create_from_list (struct ListBase *inputs, const char *name)
 
void GPU_uniformbuf_free (GPUUniformBuf *ubo)
 
void GPU_uniformbuf_update (GPUUniformBuf *ubo, const void *data)
 
void GPU_uniformbuf_bind (GPUUniformBuf *ubo, int slot)
 
void GPU_uniformbuf_unbind (GPUUniformBuf *ubo)
 
void GPU_uniformbuf_unbind_all (void)
 

Detailed Description

Uniform buffers API. Used to handle many uniforms update at once. Make sure that the data structure is compatible with what the implementation expect. (see "7.6.2.2 Standard Uniform Block Layout" from the OpenGL spec for more info about std140 layout) Rule of thumb: Padding to 16bytes, don't use vec3, don't use arrays of anything that is not vec4 aligned .

Definition in file GPU_uniform_buffer.h.

Macro Definition Documentation

◆ GPU_ATTRIBUTE_UBO_BLOCK_NAME

#define GPU_ATTRIBUTE_UBO_BLOCK_NAME   "unf_attrs"

Definition at line 46 of file GPU_uniform_buffer.h.

◆ GPU_UBO_BLOCK_NAME

#define GPU_UBO_BLOCK_NAME   "node_tree"

Definition at line 45 of file GPU_uniform_buffer.h.

◆ GPU_uniformbuf_create

#define GPU_uniformbuf_create (   size)    GPU_uniformbuf_create_ex(size, NULL, __func__);

Definition at line 35 of file GPU_uniform_buffer.h.

Typedef Documentation

◆ GPUUniformBuf

typedef struct GPUUniformBuf GPUUniformBuf

Opaque type hiding blender::gpu::UniformBuf.

Definition at line 1 of file GPU_uniform_buffer.h.

Function Documentation

◆ GPU_uniformbuf_bind()

void GPU_uniformbuf_bind ( GPUUniformBuf ubo,
int  slot 
)

◆ GPU_uniformbuf_create_ex()

GPUUniformBuf* GPU_uniformbuf_create_ex ( size_t  size,
const void data,
const char *  name 
)

◆ GPU_uniformbuf_create_from_list()

GPUUniformBuf* GPU_uniformbuf_create_from_list ( struct ListBase inputs,
const char *  name 
)

◆ GPU_uniformbuf_free()

void GPU_uniformbuf_free ( GPUUniformBuf ubo)

◆ GPU_uniformbuf_unbind()

void GPU_uniformbuf_unbind ( GPUUniformBuf ubo)

◆ GPU_uniformbuf_unbind_all()

void GPU_uniformbuf_unbind_all ( void  )

Definition at line 226 of file gpu_uniform_buffer.cc.

Referenced by draw_shgroup(), and DRW_state_reset().

◆ GPU_uniformbuf_update()

void GPU_uniformbuf_update ( GPUUniformBuf ubo,
const void data 
)