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
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::PoolCPUShaders Class

Header: #include <UnigineThread.h>

PoolCPUShaders is a utility class that manages a thread pool dedicated to executing CPUShader tasks.

The pool allows shaders to run either synchronously (blocking until completion) or asynchronously (in the background). Internally, it handles thread reuse, signaling, task queuing, and process distribution across worker threads.

PoolCPUShaders Class

Members


int isInitialized ( ) #

Returns whether the pool has been initialized.

Return value

Returns 1 if pool is initialized; 0 otherwise.

bool isRunning ( ) #

Returns whether any shader is currently active.

Return value

Returns true if at least one shader is running; false otherwise.

int getNumActiveShaders ( ) #

Returns the number of currently active shaders.

Return value

Number of currently running shader tasks.

int getNumActiveProcesses ( ) #

Returns the number of active shader processes.

Return value

Number of currently queued or running processes.

int getCurrentThreadIndex ( ) #

Returns the index of the current thread within the shader pool.

Return value

Index of the current thread in the pool, if called from a worker thread.

int getNumThreads ( ) #

Returns the number of worker threads available in the pool.

Return value

Total number of threads in the shader pool.

void wait ( ) #

Blocks until all currently active shader tasks have completed.

void signal ( ) #

Signals the worker threads to resume execution (used internally).

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

Last update: 2025-07-10
Build: ()