summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorRay <[email protected]>2021-04-06 13:10:12 +0200
committerRay <[email protected]>2021-04-06 13:10:12 +0200
commit109d00cb14dc4792ab0b8256112b39f1c10112ba (patch)
treefbdefb1c9b1bccccea31613ab44c25d3598da65c /src/raylib.h
parent551944e15b15f8efce70e7da393755a180c50892 (diff)
downloadraylib-109d00cb14dc4792ab0b8256112b39f1c10112ba.tar.gz
raylib-109d00cb14dc4792ab0b8256112b39f1c10112ba.zip
Reorganized shaders functions
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 6829db10..35981366 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -959,6 +959,22 @@ RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes
RLAPI void EndTextureMode(void); // Ends drawing to render texture
RLAPI void BeginScissorMode(int x, int y, int width, int height); // Begin scissor mode (define screen area for following drawing)
RLAPI void EndScissorMode(void); // End scissor mode
+RLAPI void BeginShaderMode(Shader shader); // Begin custom shader drawing
+RLAPI void EndShaderMode(void); // End custom shader drawing (use default shader)
+RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied)
+RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending)
+
+// Shader management functions
+// NOTE: Shader functionality is not available on OpenGL 1.1
+RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
+RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
+RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
+RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
+RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
+RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector
+RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4)
+RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
+RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
// Screen-space-related functions
RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position
@@ -1108,26 +1124,6 @@ RLAPI void EndVrDrawing(void); // End VR simulator ster
RLAPI VrStereoConfig GetVrConfig(VrDeviceInfo device); // Get stereo rendering configuration parameters
//------------------------------------------------------------------------------------
-// Shaders System Functions (Module: core)
-// NOTE: This functions are useless when using OpenGL 1.1
-//------------------------------------------------------------------------------------
-RLAPI void BeginShaderMode(Shader shader); // Begin custom shader drawing
-RLAPI void EndShaderMode(void); // End custom shader drawing (use default shader)
-RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied)
-RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending)
-
-// Shader management functions
-RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
-RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
-RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
-RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
-RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
-RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector
-RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4)
-RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d)
-RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
-
-//------------------------------------------------------------------------------------
// Basic Shapes Drawing Functions (Module: shapes)
//------------------------------------------------------------------------------------
// Set texture and rectangle to be used on shapes drawing