+ } else {
+ /*
+ * OpenGL legacy rasterization rules for non-sprite points.
+ *
+ * Per OpenGL 2.1 spec, section 3.3.1, "Basic Point Rasterization".
+ *
+ * This type of point rasterization is only available in pre 3.0 contexts
+ * (or compatibilility contexts which we don't support) anyway.
+ */
+
+ const int x0 = subpixel_snap(v0[0][0]);
+ const int y0 = subpixel_snap(v0[0][1]) - adj;
+
+ int int_width;
+ /* Point size as fixed point integer. For GL legacy points
+ * the point size is always a whole integer.
+ */
+ fixed_width = MAX2(FIXED_ONE,
+ (subpixel_snap(size) + FIXED_ONE/2 - 1) & ~(FIXED_ONE-1));
+ int_width = fixed_width >> FIXED_ORDER;
+
+ assert(setup->pixel_offset != 0);
+
+ if (int_width == 1) {
+ bbox.x0 = x0 >> FIXED_ORDER;
+ bbox.y0 = y0 >> FIXED_ORDER;
+ bbox.x1 = bbox.x0;
+ bbox.y1 = bbox.y0;
+ } else {
+ if (int_width & 1) {
+ /* Odd width */
+ bbox.x0 = (x0 >> FIXED_ORDER) - (int_width - 1)/2;
+ bbox.y0 = (y0 >> FIXED_ORDER) - (int_width - 1)/2;
+ } else {
+ /* Even width */
+ bbox.x0 = ((x0 + FIXED_ONE/2) >> FIXED_ORDER) - int_width/2;
+ bbox.y0 = ((y0 + FIXED_ONE/2) >> FIXED_ORDER) - int_width/2;
+ }
+
+ bbox.x1 = bbox.x0 + int_width - 1;
+ bbox.y1 = bbox.y0 + int_width - 1;
+ }