Skip to content

Commit 8301894

Browse files
Changing drawpixel to use RL_POINTS
1 parent 735ba4e commit 8301894

1 file changed

Lines changed: 1 addition & 36 deletions

File tree

src/rshapes.c

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -128,45 +128,10 @@ void DrawPixel(int posX, int posY, Color color)
128128
// Draw a pixel (Vector version)
129129
void DrawPixelV(Vector2 position, Color color)
130130
{
131-
#if SUPPORT_QUADS_DRAW_MODE
132-
rlSetTexture(GetShapesTexture().id);
133-
Rectangle shapeRect = GetShapesTextureRectangle();
134-
135-
rlBegin(RL_QUADS);
136-
137-
rlNormal3f(0.0f, 0.0f, 1.0f);
138-
rlColor4ub(color.r, color.g, color.b, color.a);
139-
140-
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
141-
rlVertex2f(position.x, position.y);
142-
143-
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
144-
rlVertex2f(position.x, position.y + 1);
145-
146-
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
147-
rlVertex2f(position.x + 1, position.y + 1);
148-
149-
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
150-
rlVertex2f(position.x + 1, position.y);
151-
152-
rlEnd();
153-
154-
rlSetTexture(0);
155-
#else
156-
rlBegin(RL_TRIANGLES);
157-
131+
rlBegin(RL_POINTS);
158132
rlColor4ub(color.r, color.g, color.b, color.a);
159-
160133
rlVertex2f(position.x, position.y);
161-
rlVertex2f(position.x, position.y + 1);
162-
rlVertex2f(position.x + 1, position.y);
163-
164-
rlVertex2f(position.x + 1, position.y);
165-
rlVertex2f(position.x, position.y + 1);
166-
rlVertex2f(position.x + 1, position.y + 1);
167-
168134
rlEnd();
169-
#endif
170135
}
171136

172137
// Draw a line (using gl lines)

0 commit comments

Comments
 (0)