aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2019-11-22 00:33:50 +0100
committerRay <raysan5@gmail.com>2019-11-22 00:33:50 +0100
commit2783d0d63e06d388f03ef6e85d1120bca81e53ce (patch)
treea15d4182690e71b3a7aacf4fc948bb8f9314f803
parent5d27c1e6c9d03dabafd4626e1e33643fe9dd8bb1 (diff)
downloadraylib-2783d0d63e06d388f03ef6e85d1120bca81e53ce.tar.gz
raylib-2783d0d63e06d388f03ef6e85d1120bca81e53ce.zip
DrawPoint3D(): PR review
-rw-r--r--src/models.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/models.c b/src/models.c
index 61d84afb..d612f1c9 100644
--- a/src/models.c
+++ b/src/models.c
@@ -110,20 +110,19 @@ void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
rlEnd();
}
-//Draw a point in 3D space--actually a small line.
-void DrawPoint3D(Vector3 pos, Color color) {
-
+// Draw a point in 3D space--actually a small line.
+void DrawPoint3D(Vector3 position, Color color)
+{
if (rlCheckBufferLimit(8)) rlglDraw();
+
rlPushMatrix();
- rlTranslatef(pos.x,pos.y,pos.z);
- rlBegin(RL_LINES);
- rlColor4ub(color.r, color.g, color.b, color.a);
- rlVertex3f(0.0,0.0,0.0);
- rlVertex3f(0.0,0.0,0.1);
- rlEnd();
+ rlTranslatef(position.x, position.y, position.z);
+ rlBegin(RL_LINES);
+ rlColor4ub(color.r, color.g, color.b, color.a);
+ rlVertex3f(0.0,0.0,0.0);
+ rlVertex3f(0.0,0.0,0.1);
+ rlEnd();
rlPopMatrix();
-
-return;
}
// Draw a circle in 3D world space