Add multi texture support for materials in GLTF format (#979)

* Initial commit of addition for GLTF materials.. should support loading more than just albedo map.

* Clean up

* fixed seg faults and leaks

* temp don't overwrite defuse colour when rendering

* undid something dumb!

* correctly mixed diffuse map color when rendering to preserve not overwrite it
This commit is contained in:
Tyler Jessilynn Bezera 2019-10-21 08:38:23 -07:00 committed by Ray
parent ab52f98480
commit 3f7fa6d6e7
2 changed files with 133 additions and 96 deletions

View file

@ -106,7 +106,7 @@
#ifndef RL_FREE
#define RL_FREE(p) free(p)
#endif
// NOTE: MSC C++ compiler does not support compound literals (C99 feature)
// Plain structures in C++ (without constructors) can be initialized from { } initializers.
#if defined(__cplusplus)
@ -336,6 +336,7 @@ typedef struct MaterialMap {
// Material type (generic)
typedef struct Material {
char* name; // Material name
Shader shader; // Material shader
MaterialMap *maps; // Material maps array (MAX_MATERIAL_MAPS)
float *params; // Material generic parameters (if required)
@ -1406,7 +1407,7 @@ RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check i
RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
//------------------------------------------------------------------------------------
// Network (Module: network)
//------------------------------------------------------------------------------------