raylib-cpp
C++ object-oriented wrapper library for raylib.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
raylib::Material Class Reference

Material type (generic) More...

Public Member Functions

 Material ()
 Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
 
 Material (const ::Material &material)
 
 Material (const Material &)=delete
 
 Material (Material &&other)
 
void DrawMesh (const ::Mesh &mesh, ::Matrix *transforms, int instances) const
 Draw multiple mesh instances with material and different transforms.
 
void DrawMesh (const ::Mesh &mesh, ::Matrix transform) const
 Draw a 3d mesh with material and transform.
 
::MaterialMap * GetMaps () const
 Retrieves the maps value for the object. More...
 
::Shader GetShader () const
 Retrieves the shader value for the object. More...
 
bool IsValid () const
 Check if material is ready.
 
Materialoperator= (const ::Material &material)
 
Materialoperator= (const Material &)=delete
 
Materialoperator= (Material &&other) noexcept
 
void SetMaps (::MaterialMap *value)
 Sets the maps value for the object. More...
 
void SetShader (::Shader value)
 Sets the shader value for the object. More...
 
MaterialSetTexture (int mapType, const ::Texture2D &texture)
 Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
 
void Unload ()
 Unload material from memory.
 

Static Public Member Functions

static std::vector< MaterialLoad (const std::string &fileName)
 Load materials from model file.
 

Protected Member Functions

void set (const ::Material &material)
 

Detailed Description

Material type (generic)

Definition at line 14 of file Material.hpp.

Member Function Documentation

◆ GetMaps()

::MaterialMap* raylib::Material::GetMaps ( ) const
inline

Retrieves the maps value for the object.

Returns
The maps value of the object.

Definition at line 49 of file Material.hpp.

◆ GetShader()

::Shader raylib::Material::GetShader ( ) const
inline

Retrieves the shader value for the object.

Returns
The shader value of the object.

Definition at line 48 of file Material.hpp.

◆ SetMaps()

void raylib::Material::SetMaps ( ::MaterialMap *  value)
inline

Sets the maps value for the object.

Parameters
valueThe value of which to set maps to.

Definition at line 49 of file Material.hpp.

◆ SetShader()

void raylib::Material::SetShader ( ::Shader  value)
inline

Sets the shader value for the object.

Parameters
valueThe value of which to set shader to.

Definition at line 48 of file Material.hpp.