支持抗锯齿

This commit is contained in:
2025-08-23 12:19:28 +08:00
parent dd72a8e3fd
commit 1f7720d54e
23 changed files with 879 additions and 183 deletions
@@ -10,7 +10,9 @@ class DV_CORE_API Rasterizer
{
//Draw Triangle with Larrabee
public:
typedef std::function<void(const std::pair<int32_t, int32_t>& pos, const fVector3& percent)> DrawTriangleCallback;
typedef std::function<
void(const std::pair<int32_t, int32_t>& pos, const fVector3& percent, uint32_t mask)
> DrawTriangleCallback;
struct DebugParam
{
@@ -27,9 +29,10 @@ public:
};
//Larrabee algorithm
static void drawTriangleLarrabee(int32_t canvasWidth, int32_t canvasHeight,
static void drawTriangleLarrabee(AntiAliasingTech aaTech, int32_t canvasWidth, int32_t canvasHeight,
const fVector2& v0, const fVector2& v1, const fVector2& v2,
DrawTriangleCallback callback, bool ccw=true, const DebugParam* debugParam=nullptr);
DrawTriangleCallback callback, bool ccw=true,
const DebugParam* debugParam=nullptr);
public:
//BoundingBox algorithm