Kohi Game Engine
material Struct Reference

A material, which represents various properties of a surface in the world such as texture, colour, bumpiness, shininess and more. More...

#include <resource_types.h>

Data Fields

u32 id
 The material id. More...
 
material_type type
 The material type. More...
 
u32 generation
 The material generation. Incremented every time the material is changed. More...
 
u32 internal_id
 The internal material id. Used by the renderer backend to map to internal resources. More...
 
char name [MATERIAL_NAME_MAX_LENGTH]
 The material name. More...
 
texture_mapmaps
 An array of texture maps. More...
 
u32 property_struct_size
 property structure size. More...
 
void * properties
 array of material property structures, which varies based on material type. e.g. material_phong_properties More...
 
u32 shader_id
 
u64 render_frame_number
 Synced to the renderer's current frame number when the material has been applied that frame. More...
 
u64 render_draw_index
 

Detailed Description

A material, which represents various properties of a surface in the world such as texture, colour, bumpiness, shininess and more.

Field Documentation

◆ generation

u32 generation

The material generation. Incremented every time the material is changed.

◆ id

u32 id

The material id.

◆ internal_id

u32 internal_id

The internal material id. Used by the renderer backend to map to internal resources.

◆ maps

texture_map* maps

An array of texture maps.

◆ name

The material name.

◆ properties

void* properties

array of material property structures, which varies based on material type. e.g. material_phong_properties

◆ property_struct_size

u32 property_struct_size

property structure size.

◆ render_draw_index

u64 render_draw_index

◆ render_frame_number

u64 render_frame_number

Synced to the renderer's current frame number when the material has been applied that frame.

◆ shader_id

u32 shader_id

◆ type

The material type.


The documentation for this struct was generated from the following file: