diff options
| author | Ray <[email protected]> | 2024-02-08 08:45:59 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-02-08 08:45:59 +0100 |
| commit | dd8b5613cab0d62a2464be5e3b45e835adedea0c (patch) | |
| tree | 9f41aededef794d8c28bd5d7757722f32b7490f0 /src/rshapes.c | |
| parent | 8ba7c61625c1a4eb688fcd95bb95a9e9aea53b1c (diff) | |
| download | raylib-dd8b5613cab0d62a2464be5e3b45e835adedea0c.tar.gz raylib-dd8b5613cab0d62a2464be5e3b45e835adedea0c.zip | |
REVIEWED: `DrawPixel()` not drawing
Diffstat (limited to 'src/rshapes.c')
| -rw-r--r-- | src/rshapes.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rshapes.c b/src/rshapes.c index e4eb107b..4b597c4a 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -135,7 +135,6 @@ void DrawPixelV(Vector2 position, Color color) { #if defined(SUPPORT_QUADS_DRAW_MODE) rlSetTexture(GetShapesTexture().id); - Rectangle shapeRect = GetShapesTextureRectangle(); rlBegin(RL_QUADS); @@ -143,16 +142,16 @@ void DrawPixelV(Vector2 position, Color color) rlNormal3f(0.0f, 0.0f, 1.0f); rlColor4ub(color.r, color.g, color.b, color.a); - rlTexCoord2f(shapeRect.x/ shapeRect.width, shapeRect.y/ shapeRect.height); + rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); rlVertex2f(position.x, position.y); - rlTexCoord2f(shapeRect.x/ shapeRect.width, (shapeRect.y + shapeRect.height)/ shapeRect.height); + rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); rlVertex2f(position.x, position.y + 1); - rlTexCoord2f((shapeRect.x + shapeRect.width)/ shapeRect.width, (shapeRect.y + shapeRect.height)/ shapeRect.height); + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); rlVertex2f(position.x + 1, position.y + 1); - rlTexCoord2f((shapeRect.x + shapeRect.width)/ shapeRect.width, shapeRect.y/ shapeRect.height); + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); rlVertex2f(position.x + 1, position.y); rlEnd(); |
