diff options
| author | Ray <[email protected]> | 2021-04-06 13:02:57 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-06 13:02:57 +0200 |
| commit | 9fa9c30a3d2c27ce210f64e9ab636377792c74be (patch) | |
| tree | d887fefb84f3fb09e164c129737cdeafd8086aa3 /cheatsheet/raylib_core.c | |
| parent | 8940a2f553026e46fc97f49c449fe199df36745a (diff) | |
| download | raylib.com-9fa9c30a3d2c27ce210f64e9ab636377792c74be.tar.gz raylib.com-9fa9c30a3d2c27ce210f64e9ab636377792c74be.zip | |
Cheatsheet: move shaders funcs to core
Diffstat (limited to 'cheatsheet/raylib_core.c')
| -rw-r--r-- | cheatsheet/raylib_core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cheatsheet/raylib_core.c b/cheatsheet/raylib_core.c index d6d92d7..b80774a 100644 --- a/cheatsheet/raylib_core.c +++ b/cheatsheet/raylib_core.c @@ -200,3 +200,20 @@ void EndVrDrawing(void); // End VR simulator stereo rendering VrStereoConfig GetVrConfig(VrDeviceInfo device); // Get stereo rendering configuration parameters + // Shaders System Functions + void BeginShaderMode(Shader shader); // Begin custom shader drawing + void EndShaderMode(void); // End custom shader drawing (use default shader) + void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) + void EndBlendMode(void); // End blending mode (reset to default: alpha blending) + + // Shader management functions + Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations + Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations + int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location + int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location + void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value + void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector + void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4) + void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d) + void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) + |
