From 4bb6a77519ecb64ff37e9c824552e6173349be0a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 18 Jan 2014 20:50:38 -0800 Subject: [PATCH] softgpu: Cleanup DrawPoint a bit. Mostly in DrawSinglePixel() now. --- GPU/Software/Rasterizer.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index 3521e1ae32..339b200300 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -1146,7 +1146,16 @@ void DrawTriangle(const VertexData& v0, const VertexData& v1, const VertexData& GlobalThreadPool::Loop(std::bind(&DrawTriangleSlice, v0, v1, v2, minX, minY, maxX, maxY, placeholder::_1, placeholder::_2), 0, range); } -void DrawPixel(ScreenCoords pos, Vec3 prim_color_rgb, int prim_color_a, Vec3 sec_color, float s, float t) { +void DrawPoint(const VertexData &v0) +{ + ScreenCoords pos = v0.screenpos; + Vec3 prim_color_rgb = v0.color0.rgb(); + int prim_color_a = v0.color0.a(); + Vec3 sec_color = v0.color1; + // TODO: UVGenMode? + float s = v0.texturecoords.s(); + float t = v0.texturecoords.t(); + ScreenCoords scissorTL(TransformUnit::DrawingToScreen(DrawingCoords(gstate.getScissorX1(), gstate.getScissorY1(), 0))); ScreenCoords scissorBR(TransformUnit::DrawingToScreen(DrawingCoords(gstate.getScissorX2(), gstate.getScissorY2(), 0))); @@ -1216,12 +1225,6 @@ void DrawPixel(ScreenCoords pos, Vec3 prim_color_rgb, int prim_color_a, Vec } } -void DrawPoint(const VertexData &v0) -{ - // TODO: UVGenMode? - DrawPixel(v0.screenpos, v0.color0.rgb(), v0.color0.a(), v0.color1, v0.texturecoords.s(), v0.texturecoords.t()); -} - void DrawLine(const VertexData &v0, const VertexData &v1) { // TODO: Use a proper line drawing algorithm that handles fractional endpoints correctly.