[Mesa-dev] [PATCH 2/2] gallium: Replaced gl_rasterization_rules with lower_left_origin and half_pixel_center.

Jose Fonseca jfonseca at vmware.com
Sun Apr 21 10:54:47 PDT 2013


----- Original Message -----
> Some suggestions for the name:
> 
> lower_left_edge_rule
> lower_left_rasterization_edge_rule
> gl_edge_rule
> gl_rasterization_edge_rule
> 
> In this case, the name is not as important as the documentation which
> defines the behavior of the state.

On that note, I thought that James' diagrams were pretty good.  Maybe the axis is misleading.


+   /**
+    * Triangle rasterization always uses a 'top,left' rule for pixel ownership,
+    * this just alters what we consider to be the top edge for that test.
+    *
+    * When true, screen coordinates origin is considered to be at bottom-left
+    * (e.g., OpenGL drawables):
+    *
+    *  y ^
+    *    |
+    *    |  +=============+ <- top edge
+    *    |  |             |
+    *    |  |             |
+    *    |  |             |
+    *    |  +-------------+
+    *    |
+    *  0 +--------------------->
+    *    0                    x
+    *
+    *  When false, screen coordinates origin is considered to be at top-left
+    *  (e.g., OpenGL FBOs, D3D):
+    *
+    *    0                    x
+    *  0 +--------------------->
+    *    |
+    *    |  +=============+ <- top edge
+    *    |  |             |
+    *    |  |             |
+    *    |  |             |
+    *    |  +-------------+
+    *    |
+    *  y V
     *
-    * Triangle rasterization always uses a 'top,left' rule for pixel
-    * ownership, this just alters which point we consider the pixel
-    * center for that test.
+    * See also:
+    * - http://www.opengl.org/registry/specs/ARB/fragment_coord_conventions.txt
+    * - http://msdn.microsoft.com/en-us/library/windows/desktop/cc627092.aspx
+    * - http://msdn.microsoft.com/en-us/library/windows/desktop/bb147314.aspx
     */
-   unsigned gl_rasterization_rules:1;
+   unsigned lower_left_origin:1;
 
    /**
     * When true, rasterization is disabled and no pixels are written.

Jose


More information about the mesa-dev mailing list