aboutsummaryrefslogtreecommitdiff
path: root/src/raylib.h
diff options
context:
space:
mode:
authorvictorfisac <victorfisac@gmail.com>2016-05-20 17:18:07 +0200
committervictorfisac <victorfisac@gmail.com>2016-05-20 17:18:07 +0200
commit30c8058fca39e4d6566b2fc06ae2498c48c00717 (patch)
treeddb098820e68445b85939df2dffb16786b31295d /src/raylib.h
parentc60cc9ee182dfcb090a2d4f3ab7ac6b397b53e9b (diff)
downloadraylib-30c8058fca39e4d6566b2fc06ae2498c48c00717.tar.gz
raylib-30c8058fca39e4d6566b2fc06ae2498c48c00717.zip
Add standard lighting (1/3)
- Ambient and lambert lighting added. - Ambient and diffuse colors linked to standard shader. - Single light linked to standard shader. - LoadStandardMaterial() and depending functions added.
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/raylib.h b/src/raylib.h
index d98a0797..48534fd6 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -398,7 +398,7 @@ typedef struct Shader {
// Uniform locations
int mvpLoc; // ModelView-Projection matrix uniform location point (vertex shader)
- int tintColorLoc; // Color uniform location point (fragment shader)
+ int tintColorLoc; // Diffuse color uniform location point (fragment shader)
// Texture map locations
int mapDiffuseLoc; // Diffuse map texture uniform location point (fragment shader)
@@ -444,11 +444,8 @@ typedef struct LightData {
float intensity;
Color specular;
- //float specFactor; // Specular intensity ?
-
- //Color ambient; // Required?
- float coneAngle; // SpotLight
+ float coneAngle; // SpotLight
} LightData, *Light;
// Light types
@@ -836,6 +833,7 @@ void SetModelTexture(Model *model, Texture2D texture); // Link a textur
Material LoadMaterial(const char *fileName); // Load material data (from file)
Material LoadDefaultMaterial(void); // Load default material (uses default models shader)
+Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader)
void UnloadMaterial(Material material); // Unload material textures from VRAM
void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
@@ -865,6 +863,7 @@ void UnloadShader(Shader shader); // Unload a
void SetDefaultShader(void); // Set default shader to be used in batch draw
void SetCustomShader(Shader shader); // Set custom shader to be used in batch draw
Shader GetDefaultShader(void); // Get default shader
+Shader GetStandardShader(void); // Get default shader
Texture2D GetDefaultTexture(void); // Get default texture
int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location