diff options
| author | Ray <[email protected]> | 2019-01-11 18:54:48 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-01-11 18:54:48 +0100 |
| commit | e13975beeba89825c52db3bf4050260c63eac101 (patch) | |
| tree | 017bfce4a53253e69bb509fe3992306aaa646ef1 /src/models.c | |
| parent | 25205b5113587af71af0f39549c9bb0a3c1faf49 (diff) | |
| download | raylib-e13975beeba89825c52db3bf4050260c63eac101.tar.gz raylib-e13975beeba89825c52db3bf4050260c63eac101.zip | |
Some security checks added
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/models.c b/src/models.c index 4efde340..39e8781e 100644 --- a/src/models.c +++ b/src/models.c @@ -115,6 +115,8 @@ void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color) // Draw a circle in 3D world space void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color) { + if (rlCheckBufferLimit(2*36)) rlglDraw(); + rlPushMatrix(); rlTranslatef(center.x, center.y, center.z); rlRotatef(rotationAngle, rotationAxis.x, rotationAxis.y, rotationAxis.z); @@ -138,6 +140,8 @@ void DrawCube(Vector3 position, float width, float height, float length, Color c float x = 0.0f; float y = 0.0f; float z = 0.0f; + + if (rlCheckBufferLimit(36)) rlglDraw(); rlPushMatrix(); // NOTE: Transformation is applied in inverse order (scale -> rotate -> translate) @@ -217,6 +221,8 @@ void DrawCubeWires(Vector3 position, float width, float height, float length, Co float x = 0.0f; float y = 0.0f; float z = 0.0f; + + if (rlCheckBufferLimit(36)) rlglDraw(); rlPushMatrix(); rlTranslatef(position.x, position.y, position.z); |
