Changing drawpixel to use RL_POINTS
This commit is contained in:
parent
735ba4ef3e
commit
830189439f
|
|
@ -128,45 +128,10 @@ void DrawPixel(int posX, int posY, Color color)
|
||||||
// Draw a pixel (Vector version)
|
// Draw a pixel (Vector version)
|
||||||
void DrawPixelV(Vector2 position, Color color)
|
void DrawPixelV(Vector2 position, Color color)
|
||||||
{
|
{
|
||||||
#if SUPPORT_QUADS_DRAW_MODE
|
rlBegin(RL_POINTS);
|
||||||
rlSetTexture(GetShapesTexture().id);
|
|
||||||
Rectangle shapeRect = GetShapesTextureRectangle();
|
|
||||||
|
|
||||||
rlBegin(RL_QUADS);
|
|
||||||
|
|
||||||
rlNormal3f(0.0f, 0.0f, 1.0f);
|
|
||||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||||
|
|
||||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
|
||||||
rlVertex2f(position.x, position.y);
|
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();
|
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)
|
// Draw a line (using gl lines)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user