summaryrefslogtreecommitdiffhomepage
path: root/src/rshapes.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-12-04 19:56:02 +0100
committerRay <[email protected]>2021-12-04 19:56:02 +0100
commite637ad9d2a62fdcc2d4917de63defef5f8fb0591 (patch)
tree3299b60b57742a668a11cbb11b88264a22e4da6c /src/rshapes.c
parent48d4806e531e721d73995d61bfceaaeb955fd526 (diff)
downloadraylib-e637ad9d2a62fdcc2d4917de63defef5f8fb0591.tar.gz
raylib-e637ad9d2a62fdcc2d4917de63defef5f8fb0591.zip
Support custom modules inclusion
Allow to choose which modules are compiled with raylib, if some modules are excluded from compilation, required functionality is not available but smaller builds are possible.
Diffstat (limited to 'src/rshapes.c')
-rw-r--r--src/rshapes.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rshapes.c b/src/rshapes.c
index a60d52b4..23559e43 100644
--- a/src/rshapes.c
+++ b/src/rshapes.c
@@ -17,6 +17,9 @@
*
* CONFIGURATION:
*
+* #define SUPPORT_MODULE_RSHAPES
+* rshapes module is included in the build
+*
* #define SUPPORT_QUADS_DRAW_MODE
* Use QUADS instead of TRIANGLES for drawing when possible. Lines-based shapes still use LINES
*
@@ -49,6 +52,8 @@
#include "config.h" // Defines module configuration flags
#endif
+#if defined(SUPPORT_MODULE_RSHAPES)
+
#include "rlgl.h" // OpenGL abstraction layer to OpenGL 1.1, 2.1, 3.3+ or ES2
#include <math.h> // Required for: sinf(), asinf(), cosf(), acosf(), sqrtf(), fabsf()
@@ -75,8 +80,8 @@
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
-Texture2D texShapes = { 1, 1, 1, 1, 7 }; // Texture used on shapes drawing (usually a white pixel)
-Rectangle texShapesRec = { 0, 0, 1, 1 }; // Texture source rectangle used on shapes drawing
+Texture2D texShapes = { 1, 1, 1, 1, 7 }; // Texture used on shapes drawing (usually a white pixel)
+Rectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rectangle used on shapes drawing
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
@@ -1810,3 +1815,5 @@ static float EaseCubicInOut(float t, float b, float c, float d)
return 0.5f*c*(t*t*t + 2.0f) + b;
}
+
+#endif // SUPPORT_MODULE_RSHAPES