REVIEWED: DrawLine3D() #1643
This commit is contained in:
parent
0cbb3878c9
commit
8b0574a217
1 changed files with 3 additions and 1 deletions
|
@ -131,6 +131,8 @@ static void InitGLTFBones(Model* model, const cgltf_data* data);
|
||||||
// Draw a line in 3D world space
|
// Draw a line in 3D world space
|
||||||
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
||||||
{
|
{
|
||||||
|
if (rlCheckBufferLimit(2)) rlglDraw();
|
||||||
|
|
||||||
rlBegin(RL_LINES);
|
rlBegin(RL_LINES);
|
||||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||||
rlVertex3f(startPos.x, startPos.y, startPos.z);
|
rlVertex3f(startPos.x, startPos.y, startPos.z);
|
||||||
|
@ -141,7 +143,7 @@ void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
||||||
// Draw a point in 3D space, actually a small line
|
// Draw a point in 3D space, actually a small line
|
||||||
void DrawPoint3D(Vector3 position, Color color)
|
void DrawPoint3D(Vector3 position, Color color)
|
||||||
{
|
{
|
||||||
if (rlCheckBufferLimit(8)) rlglDraw();
|
if (rlCheckBufferLimit(2)) 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