This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API 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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::MeshRender Class

Header: #include <UnigineMeshRender.h>

MeshRender Class

Members

bool isLoaded() const#

Returns the current value indicating if the mesh is loaded.

Return value

true if the mesh is loaded; otherwise false.

MeshRender ( ) #

Constructor. Creates an empty static mesh.

bool load ( const char * path ) #

Loads the mesh using the specified path.

Arguments

  • const char * path - Path to the mesh.

Return value

true if the mesh is loaded successfully; otherwise false.

bool load ( const Ptr<Mesh> & mesh ) #

Loads the specified mesh.

Arguments

  • const Ptr<Mesh> & mesh - The mesh to be loaded.

Return value

true if the mesh is loaded successfully; otherwise false.

void clear ( ) #

Clears the mesh (including its surfaces and bounds).

void bind ( ) #

Binds the mesh data (index and vertex buffers) to the input assembler stage.

void unbind ( ) #

Unbinds the mesh data (index and vertex buffers).

int renderSurface ( int mode, int surface, int target = 0 ) #

Renders the surface.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int surface - Surface number.
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

int renderInstancedSurface ( int mode, int num, int surface, int target = 0 ) #

Renders the specified number of instances of the surface.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int num - Number of instances to be rendered.
  • int surface - Surface number.
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

int render ( int mode, int surface = -1, int target = 0 ) #

Renders the static mesh with the specified settings and mode.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int surface - Surface number (use -1 for all surfaces).
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

int renderInstanced ( int mode, int num, int surface = -1, int target = 0 ) #

Renders the specified number of instances of the surface.

Arguments

  • int mode - Rendering mode. One of the MODE_* variables.
  • int num - Number of instances to be rendered.
  • int surface - Surface number (use -1 for all surfaces).
  • int target - Surface target number. The default value is 0.

Return value

Number of primitives rendered. Primitive type is determined by the rendering mode.

size_t getSystemMemoryUsage ( ) const#

Returns the current amount of system memory used by the static mesh, in bytes.

Return value

System memory amount used by the static mesh, in bytes.

size_t getVideoMemoryUsage ( ) const#

Returns the current amount of video memory used by the static mesh.

Return value

Video memory amount used by the static mesh, in bytes.

void updateDebugName ( ) #

Updates the friendly name for GPU debugging (RenderDoc, NVIDIA Nsight).

void setDebugName ( const char * name ) #

Sets a friendly name 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

  • const char * name - Friendly debug name to be set.

const char * getDebugName ( ) const#

Returns the currently used friendly name 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

Friendly debug name.
Last update: 16.08.2024
Build: ()