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::CPUShaderCallableStateless Class

Header: #include <UnigineThread.h>

CPUShaderCallableStateless is a template class that provides a simplified way to execute custom multithreaded logic using the CPUShader class.

Typically, to use a CPUShader, you need to inherit from the base CPUShader class and manually implement the process() method. However, CPUShaderCallableStateless allows you to pass in the processing logic and optional cleanup logic directly as function objects without writing a custom class or managing inheritance.

Unlike CPUShaderCallable, this variant does not require shared state or a destroy function.

Template Parameters:

  • Process - function called per thread.
    Signature: void(int thread_num, int num_threads)

CPUShaderCallableStateless Class

Members


static CPUShaderCallableStatelessPtr create ( Process func_process_ ) #

Creates a new shader task with execution logic.

Arguments

  • Process func_process_ - Function executed on each thread.

void process ( int thread_num, int num_threads ) #

Overridden from CPUShader. Called once per thread during execution. Invokes the provided processing function.

Arguments

  • int thread_num - Index of the current thread.
  • int num_threads - Total number of threads assigned to this task.

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

Last update: 10.07.2025
Build: ()