mesa: Allow setting GL_TEXTURE_MAX_LEVEL to 0 with GL_TEXTURE_RECTANGLE.
[mesa.git] / src / mesa / main / points.c
index b5fc5d5bb84e5f6e8980e7aae01c22337874db74..de26bf96150521bd639db4cb30f168f425ac8d98 100644 (file)
@@ -5,7 +5,6 @@
 
 /*
  * Mesa 3-D graphics library
- * Version:  7.1
  *
  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  */
 
 
@@ -44,7 +44,6 @@ void GLAPIENTRY
 _mesa_PointSize( GLfloat size )
 {
    GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_BEGIN_END(ctx);
 
    if (size <= 0.0) {
       _mesa_error( ctx, GL_INVALID_VALUE, "glPointSize" );
@@ -99,7 +98,6 @@ void GLAPIENTRY
 _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_BEGIN_END(ctx);
 
    /* Drivers that support point sprites must also support point parameters.
     * If point parameters aren't supported, then this function shouldn't even
@@ -124,11 +122,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
          ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
                                    ctx->Point.Params[1] != 0.0 ||
                                    ctx->Point.Params[2] != 0.0);
-
-         if (ctx->Point._Attenuated)
-            ctx->_TriangleCaps |= DD_POINT_ATTEN;
-         else
-            ctx->_TriangleCaps &= ~DD_POINT_ATTEN;
          break;
       case GL_POINT_SIZE_MIN_EXT:
          if (params[0] < 0.0F) {
@@ -255,7 +248,8 @@ _mesa_init_point(struct gl_context *ctx)
     * In a core context, the state will default to true, and the setters and
     * getters are disabled.
     */
-   ctx->Point.PointSprite = (ctx->API == API_OPENGL_CORE);
+   ctx->Point.PointSprite = (ctx->API == API_OPENGL_CORE ||
+                             ctx->API == API_OPENGLES2);
 
    ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
    ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */