Fix color type in DrawGridEx function
This commit is contained in:
parent
82a39b3723
commit
07fe0eb362
|
|
@ -1587,7 +1587,7 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color);
|
||||||
RLAPI void DrawPlaneEx(Vector3 centerPos, Vector2 size, Color color, Vector3 normal, Vector3 tangent); // Draw a plane with extended parameters
|
RLAPI void DrawPlaneEx(Vector3 centerPos, Vector2 size, Color color, Vector3 normal, Vector3 tangent); // Draw a plane with extended parameters
|
||||||
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
||||||
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||||
RLAPI void DrawGridEx(int slices, float spacing, Vector3 color, Vector3 position, Vector3 normal, Vector3 tangent); // Draw a grid with extended parameters
|
RLAPI void DrawGridEx(int slices, float spacing, Color color, Vector3 position, Vector3 normal, Vector3 tangent); // Draw a grid with extended parameters
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Model 3d Loading and Drawing Functions (Module: models)
|
// Model 3d Loading and Drawing Functions (Module: models)
|
||||||
|
|
|
||||||
|
|
@ -1127,7 +1127,7 @@ void DrawGrid(int slices, float spacing)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw a grid with extended parameters
|
// Draw a grid with extended parameters
|
||||||
void DrawGridEx(int slices, float spacing, Vector3 color, Vector3 position, Vector3 normal, Vector3 tangent)
|
void DrawGridEx(int slices, float spacing, Color color, Vector3 position, Vector3 normal, Vector3 tangent)
|
||||||
{
|
{
|
||||||
int halfSlices = slices / 2;
|
int halfSlices = slices / 2;
|
||||||
|
|
||||||
|
|
@ -1138,8 +1138,7 @@ void DrawGridEx(int slices, float spacing, Vector3 color, Vector3 position, Vect
|
||||||
t = Vector3CrossProduct(n, b); // Ensure normal and tangent vectors are orthogonal
|
t = Vector3CrossProduct(n, b); // Ensure normal and tangent vectors are orthogonal
|
||||||
|
|
||||||
rlBegin(RL_LINES);
|
rlBegin(RL_LINES);
|
||||||
rlColor3f(color.x, color.y, color.z);
|
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||||
|
|
||||||
for (int i = -halfSlices; i <= halfSlices; i++)
|
for (int i = -halfSlices; i <= halfSlices; i++)
|
||||||
{
|
{
|
||||||
float f = (float)i * spacing;
|
float f = (float)i * spacing;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user