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
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.MeshRender Class

MeshRender Class

Properties

bool IsLoaded#

The value indicating if the mesh is loaded.

Members


MeshRender ( ) #

Constructor. Creates an empty static mesh.

bool Load ( string path ) #

Loads the mesh using the specified path.

Arguments

  • string path - Path to the mesh.

Return value

true if the mesh is loaded successfully; otherwise false.

bool Load ( Mesh mesh ) #

Loads the specified mesh.

Arguments

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

ulong GetSystemMemoryUsage ( ) #

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.

ulong GetVideoMemoryUsage ( ) #

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 ( string 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

  • string name - Friendly debug name to be set.

string GetDebugName ( ) #

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: 2024-07-12
Build: ()