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

Unigine.StructuredBuffer Class

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

Properties

string DebugName#

The 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.

int NumElements#

The number of elements in the structured buffer.

bool IsUsageShared#

The value indicating if the resource has the USAGE_SHARED flag enabled.

bool IsUsageStaging#

The value indicating if the resource has the USAGE_STAGING flag enabled.

bool IsUsageImmutable#

The value indicating if the resource has the USAGE_IMMUTABLE flag enabled.

bool IsUsageRender#

The value indicating if the resource has the USAGE_RENDER flag enabled.

Members


StructuredBuffer ( ) #

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

void Clear ( ) #

Clears smart pointer.

int Create ( int flags, IntPtr data, uint structure_size, uint num_elements ) #

Creates a StructuredBuffer instance with specified parameters.

Arguments

  • int flags - StructuredBuffer flag.
  • IntPtr data - Pointer to the source data.
  • uint structure_size - The size of the structured buffer.
  • uint num_elements - Number of elements in the structured buffer.

Return value

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

int Create ( int flags, uint structure_size, uint num_elements ) #

Creates a StructuredBuffer instance with specified parameters.

Arguments

  • int flags - StructuredBuffer flag.
  • uint structure_size - The size of the structured buffer.
  • uint 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.

ResourceExternalMemory GetResourceExternalMemory ( ) #

Returns the resource in video memory. If the USAGE_SHARED flag is not enabled for the resource, this method returns NULL.

Return value

The resource in video memory. If the USAGE_SHARED flag is not enabled for the resource, this method returns NULL.

ulong 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: ()