This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
Справочник API
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

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: 10.07.2025
Build: ()