diff options
| author | Ray <[email protected]> | 2021-04-06 13:10:25 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-06 13:10:25 +0200 |
| commit | 5276cb4099f81e4f156bcfd9c4b67a125812d22c (patch) | |
| tree | ac483f089c8828645e16e288838b0dd22b43a355 /cheatsheet/raylib_core.c | |
| parent | 9fa9c30a3d2c27ce210f64e9ab636377792c74be (diff) | |
| download | raylib.com-5276cb4099f81e4f156bcfd9c4b67a125812d22c.tar.gz raylib.com-5276cb4099f81e4f156bcfd9c4b67a125812d22c.zip | |
Update raylib_core.c
Diffstat (limited to 'cheatsheet/raylib_core.c')
| -rw-r--r-- | cheatsheet/raylib_core.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/cheatsheet/raylib_core.c b/cheatsheet/raylib_core.c index b80774a..5c7bd5a 100644 --- a/cheatsheet/raylib_core.c +++ b/cheatsheet/raylib_core.c @@ -60,6 +60,22 @@ void EndTextureMode(void); // Ends drawing to render texture void BeginScissorMode(int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing) void EndScissorMode(void); // End scissor mode + 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 + // NOTE: Shader functionality is not available on OpenGL 1.1 + 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) // Screen-space-related functions Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position @@ -200,20 +216,3 @@ 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) - |
