Add GLAPIENTRY function decorations for correct operation on Windows.
[mesa.git] / src / mesa / main / attrib.c
index 5299c5c1cddf56a434a1c0196a7d1c800ff0184d..8beb0a575b904bedd9519c26eb0bf3a7f583f8b2 100644 (file)
@@ -65,7 +65,7 @@ new_attrib_node( GLbitfield kind )
 }
 
 
-void
+void GLAPIENTRY
 _mesa_PushAttrib(GLbitfield mask)
 {
    struct gl_attrib_node *newnode;
@@ -502,7 +502,7 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
                    GL_POINT_SMOOTH);
    TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth,
                    GL_POINT_SMOOTH);
-   if (ctx->Extensions.NV_point_sprite) {
+   if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite) {
       TEST_AND_UPDATE(ctx->Point.PointSprite, enable->PointSprite,
                       GL_POINT_SPRITE_NV);
    }
@@ -783,7 +783,7 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
  * We could at least check if the value to restore equals the current value
  * and then skip the Mesa call.
  */
-void
+void GLAPIENTRY
 _mesa_PopAttrib(void)
 {
    struct gl_attrib_node *attr, *next;
@@ -838,7 +838,16 @@ _mesa_PopAttrib(void)
                                           color->BlendDstRGB,
                                           color->BlendSrcA,
                                           color->BlendDstA);
-               _mesa_BlendEquation(color->BlendEquation);
+              /* This special case is because glBlendEquationSeparateEXT
+               * cannot take GL_LOGIC_OP as a parameter.
+               */
+              if ( color->BlendEquationRGB == color->BlendEquationA ) {
+                 _mesa_BlendEquation(color->BlendEquationRGB);
+              }
+              else {
+                 _mesa_BlendEquationSeparateEXT(color->BlendEquationRGB,
+                                                color->BlendEquationA);
+              }
                _mesa_BlendColor(color->BlendColor[0],
                                 color->BlendColor[1],
                                 color->BlendColor[2],
@@ -998,7 +1007,8 @@ _mesa_PopAttrib(void)
                   _mesa_PointParameterfEXT(GL_POINT_FADE_THRESHOLD_SIZE_EXT,
                                            point->Threshold);
                }
-               if (ctx->Extensions.NV_point_sprite) {
+               if (ctx->Extensions.NV_point_sprite
+                  || ctx->Extensions.ARB_point_sprite) {
                   GLuint u;
                   for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
                      _mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV,
@@ -1137,7 +1147,7 @@ _mesa_PopAttrib(void)
 #define GL_CLIENT_UNPACK_BIT (1<<21)
 
 
-void
+void GLAPIENTRY
 _mesa_PushClientAttrib(GLbitfield mask)
 {
    struct gl_attrib_node *newnode;
@@ -1189,7 +1199,7 @@ _mesa_PushClientAttrib(GLbitfield mask)
 
 
 
-void
+void GLAPIENTRY
 _mesa_PopClientAttrib(void)
 {
    struct gl_attrib_node *attr, *next;