29 #ifndef __SHADERSTORAGEBUFFER_H__
30 #define __SHADERSTORAGEBUFFER_H__
55 Inst< SFNode > _metadata = 0,
56 Inst< SFInt32 > _width = 0,
57 Inst< SFInt32 > _height = 0,
58 Inst< SFInt32 > _depth = 0,
59 Inst< SFInt32 > _dataSize = 0,
60 Inst< SFString > _storageName = 0
66 virtual void preRender(
unsigned int program );
70 virtual void render ( );
74 virtual void prepareStorageBuffer ( );
77 virtual int getStorageBlockBinding ( ){
78 return storage_block_binding;
81 virtual void initialize ( );
139 static set<size_t> global_block_bindings;
141 static size_t max_block_bindings;
142 static int generateShaderStorageBinding ( );
143 static void deleteShaderStorageBinding (
int binding );
145 H3DUTIL_INT64 max_ssbo_size;
146 H3DUniquePtr<Field> rebuildBuffer;
Contains the SFInt32 field class.
Contains the SFString field class.
Header file for ShaderChildNode.
This is the base node type for the child nodes of the ComposedShader node.
Definition: ShaderChildNode.h:44
This node provide a buffer object for OpenGL shader program to write into and read from.
Definition: ShaderStorageBuffer.h:50
H3DUniquePtr< SFInt32 > dataSize
data size of the structure used for shader storage buffer the metric is bytes Access type: inputOutpu...
Definition: ShaderStorageBuffer.h:109
H3DUniquePtr< SFInt32 > width
horizontal dimension for the data Access type: inputOutput Default value: 512
Definition: ShaderStorageBuffer.h:93
unsigned int storage_block_index
the active block index assigned by the shader, will have valid value only after the shader program ge...
Definition: ShaderStorageBuffer.h:129
int buffer_id
buffer id, generated by openGL
Definition: ShaderStorageBuffer.h:125
int storage_block_binding
the block binding point for shader storage buffer in openGL context its value must be less than the M...
Definition: ShaderStorageBuffer.h:135
H3DUniquePtr< SFInt32 > height
vertical dimension for the data Access type: inputOutput Default value: 512
Definition: ShaderStorageBuffer.h:98
H3DUniquePtr< SFInt32 > depth
layers for the data Access type: inputOutput Default value: 16
Definition: ShaderStorageBuffer.h:103
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: ShaderStorageBuffer.h:117
unsigned int program_handle
shader program that this shader storage buffer will be attached
Definition: ShaderStorageBuffer.h:122
H3DUniquePtr< SFString > storageName
storage buffer name used in shader by default, it will use the node name if not being set Access type...
Definition: ShaderStorageBuffer.h:114
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194