This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API Reference
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

StructuredBuffer Class

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.

StructuredBuffer is a buffer for structures: it represents a uniform array of structures.

StructuredBuffer resource can specified via the following flags.

See Also#

  • StructuredBuffer C++ sample provided in the Samples (Samples -> C++ -> Render) section of UNIGINE SDK Browser.

StructuredBuffer Class

Members

void setDebugName ( string name ) #

Sets a new friendly name of the structured buffer used for GPU debugging (RenderDoc, NVIDIA Nsight). It can be used to help you determine if the corresponding object interface pointer caused the leak. Memory leaks are reported by the debug software layer by outputting a list of object interface pointers along with their friendly names.

Arguments

  • string name - The friendly debug name.

const char * getDebugName() const#

Returns the current friendly name of the structured buffer used for GPU debugging (RenderDoc, NVIDIA Nsight). It can be used to help you determine if the corresponding object interface pointer caused the leak. Memory leaks are reported by the debug software layer by outputting a list of object interface pointers along with their friendly names.

Return value

Current friendly debug name.

int getNumElements() const#

Returns the current number of elements in the structured buffer.

Return value

Current number of elements in the structured buffer.

bool isUsageShared() const#

Returns the current value indicating if the resource has the USAGE_SHARED flag enabled.

Return value

true if the USAGE_SHARED flag is enabled; otherwise false.

bool isUsageStaging() const#

Returns the current value indicating if the resource has the USAGE_STAGING flag enabled.

Return value

true if the USAGE_STAGING flag is enabled; otherwise false.

bool isUsageImmutable() const#

Returns the current value indicating if the resource has the USAGE_IMMUTABLE flag enabled.

Return value

true if the USAGE_IMMUTABLE flag is enabled; otherwise false.

isUsageRender() const#

Returns the current value indicating if the resource has the USAGE_RENDER flag enabled.

Return value

Current the USAGE_RENDER flag

static StructuredBuffer ( ) #

Constructor. Creates a new structured buffer.
Source code (C++)
StructuredBufferPtr input_buffer = StructuredBuffer::create();

void clear ( ) #

Clears smart pointer.

int create ( int flags ) #

Creates a StructuredBuffer instance with specified parameters.

Arguments

Return value

1 if the StructuredBuffer was created successfully; otherwise, 0.

int create ( int flags, unsigned int structure_size, unsigned int num_elements ) #

Creates a StructuredBuffer instance with specified parameters.

Arguments

  • int flags - StructuredBuffer flag.
  • unsigned int structure_size - The size of the structured buffer.
  • unsigned int num_elements - Number of elements in the structured buffer.

Return value

1 if the StructuredBuffer was created successfully; otherwise, 0.

void destroy ( ) #

Destroys smart pointer.

void clearBuffer ( ) #

Clears the structured buffer.

void copy ( StructuredBuffer src ) #

Copies the data from the specified source structured buffer.

Arguments

  • StructuredBuffer src - Source structured buffer to copy data from.

int getVideoMemoryUsage ( ) #

Returns the current amount of video memory used by the structured buffer.

Return value

Video memory amount used by the structured buffer, in bytes.

The information on this page is valid for UNIGINE 2.20 SDK.

Last update: 2025-05-05
Build: ()