Some security checks added
This commit is contained in:
parent
25205b5113
commit
e13975beeb
1 changed files with 6 additions and 0 deletions
|
@ -115,6 +115,8 @@ void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
||||||
// Draw a circle in 3D world space
|
// Draw a circle in 3D world space
|
||||||
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color)
|
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color)
|
||||||
{
|
{
|
||||||
|
if (rlCheckBufferLimit(2*36)) rlglDraw();
|
||||||
|
|
||||||
rlPushMatrix();
|
rlPushMatrix();
|
||||||
rlTranslatef(center.x, center.y, center.z);
|
rlTranslatef(center.x, center.y, center.z);
|
||||||
rlRotatef(rotationAngle, rotationAxis.x, rotationAxis.y, rotationAxis.z);
|
rlRotatef(rotationAngle, rotationAxis.x, rotationAxis.y, rotationAxis.z);
|
||||||
|
@ -139,6 +141,8 @@ void DrawCube(Vector3 position, float width, float height, float length, Color c
|
||||||
float y = 0.0f;
|
float y = 0.0f;
|
||||||
float z = 0.0f;
|
float z = 0.0f;
|
||||||
|
|
||||||
|
if (rlCheckBufferLimit(36)) rlglDraw();
|
||||||
|
|
||||||
rlPushMatrix();
|
rlPushMatrix();
|
||||||
// NOTE: Transformation is applied in inverse order (scale -> rotate -> translate)
|
// NOTE: Transformation is applied in inverse order (scale -> rotate -> translate)
|
||||||
rlTranslatef(position.x, position.y, position.z);
|
rlTranslatef(position.x, position.y, position.z);
|
||||||
|
@ -218,6 +222,8 @@ void DrawCubeWires(Vector3 position, float width, float height, float length, Co
|
||||||
float y = 0.0f;
|
float y = 0.0f;
|
||||||
float z = 0.0f;
|
float z = 0.0f;
|
||||||
|
|
||||||
|
if (rlCheckBufferLimit(36)) rlglDraw();
|
||||||
|
|
||||||
rlPushMatrix();
|
rlPushMatrix();
|
||||||
rlTranslatef(position.x, position.y, position.z);
|
rlTranslatef(position.x, position.y, position.z);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue