shithub: tinygl

Download patch

ref: 4e33eddac4245cd08c49cfbf12d3c2b6787abc72
parent: 8f4a6a0aafc7e4fc354183b73568e6d2e1a556a1
author: MHS <gek@katherine>
date: Tue Mar 23 08:28:42 EDT 2021

Automatic commit.

--- a/src/ztriangle.c
+++ b/src/ztriangle.c
@@ -5,6 +5,13 @@
 //#include <stdio.h>
 //#warning STDIO INCLUDE!!!
 
+//TODO: Switch from scanline rasterizer to easily parallelized cross product rasterizer.
+static inline GLfloat edgeFunction(GLfloat ax, GLfloat ay, GLfloat bx, GLfloat by, GLfloat cx, GLfloat cy) 
+{
+    return (cx - ax) * (by - ay) - (cy - ay) * (bx - ax); 
+} 
+
+
 #if TGL_FEATURE_RENDER_BITS == 32
 #elif TGL_FEATURE_RENDER_BITS == 16
 #else
@@ -282,11 +289,6 @@
 //#include "ztriangle.h"
 }
 */
-/*
- * Texture mapping with perspective correction.
- * We use the gradient method to make less divisions.
- * TODO: pipeline the division
- */
 
 #if 1 // IF 1