static void r300UpdatePolygonMode(GLcontext * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
- uint32_t hw_mode = 0;
+ uint32_t hw_mode = GA_POLY_MODE_DISABLE;
+ /* Only do something if a polygon mode is wanted, default is GL_FILL */
if (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL) {
GLenum f, b;
+ /* Handle GL_CW (clock wise and GL_CCW (counter clock wise)
+ * correctly by selecting the correct front and back face
+ */
if (ctx->Polygon.FrontFace == GL_CCW) {
f = ctx->Polygon.FrontMode;
b = ctx->Polygon.BackMode;
b = ctx->Polygon.FrontMode;
}
+ /* Enable polygon mode */
hw_mode |= GA_POLY_MODE_DUAL;
switch (f) {
case GL_LINE:
hw_mode |= GA_POLY_MODE_FRONT_PTYPE_LINE;
break;
- case GL_POINT: /* TODO: noops, find out why */
- hw_mode |= GA_POLY_MODE_DISABLE;
+ case GL_POINT:
+ hw_mode |= GA_POLY_MODE_FRONT_PTYPE_POINT;
break;
case GL_FILL:
hw_mode |= GA_POLY_MODE_FRONT_PTYPE_TRI;
case GL_LINE:
hw_mode |= GA_POLY_MODE_BACK_PTYPE_LINE;
break;
- case GL_POINT: /* TODO: noops, find out why */
- hw_mode |= GA_POLY_MODE_DISABLE;
+ case GL_POINT:
+ hw_mode |= GA_POLY_MODE_BACK_PTYPE_POINT;
break;
case GL_FILL:
hw_mode |= GA_POLY_MODE_BACK_PTYPE_TRI;