From 830189439f795eaa0036dad58df8719cd9c10b89 Mon Sep 17 00:00:00 2001 From: Maicon Santana Date: Fri, 27 Mar 2026 09:10:11 +0000 Subject: [PATCH] Changing drawpixel to use `RL_POINTS` --- src/rshapes.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/rshapes.c b/src/rshapes.c index e24689040..b46a64c25 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -128,45 +128,10 @@ void DrawPixel(int posX, int posY, Color color) // Draw a pixel (Vector version) void DrawPixelV(Vector2 position, Color color) { -#if SUPPORT_QUADS_DRAW_MODE - rlSetTexture(GetShapesTexture().id); - Rectangle shapeRect = GetShapesTextureRectangle(); - - rlBegin(RL_QUADS); - - rlNormal3f(0.0f, 0.0f, 1.0f); + rlBegin(RL_POINTS); rlColor4ub(color.r, color.g, color.b, color.a); - - rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); rlVertex2f(position.x, position.y); - - rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(position.x, position.y + 1); - - 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)/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(position.x + 1, position.y); - rlEnd(); - - rlSetTexture(0); -#else - rlBegin(RL_TRIANGLES); - - rlColor4ub(color.r, color.g, color.b, color.a); - - rlVertex2f(position.x, position.y); - rlVertex2f(position.x, position.y + 1); - rlVertex2f(position.x + 1, position.y); - - rlVertex2f(position.x + 1, position.y); - rlVertex2f(position.x, position.y + 1); - rlVertex2f(position.x + 1, position.y + 1); - - rlEnd(); -#endif } // Draw a line (using gl lines)