Changeset 3598 for trunk/src/opengl/mesa/polygon.c
- Timestamp:
- May 23, 2000, 10:41:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/polygon.c
r2962 r3598 1 /* $Id: polygon.c,v 1. 2 2000-03-01 18:49:35jeroen Exp $ */1 /* $Id: polygon.c,v 1.3 2000-05-23 20:40:51 jeroen Exp $ */ 2 2 3 3 /* 4 4 * Mesa 3-D graphics library 5 * Version: 3. 15 * Version: 3.3 6 6 * 7 7 * Copyright (C) 1999 Brian Paul All Rights Reserved. … … 31 31 #include "all.h" 32 32 #else 33 #ifndef XFree86Server 34 #include <assert.h> 35 #include <stdlib.h> 36 #include <stdio.h> 37 #include <string.h> 38 #else 39 #include "GL/xf86glx.h" 40 #endif 33 #include "glheader.h" 41 34 #include "types.h" 42 35 #include "context.h" … … 45 38 #include "macros.h" 46 39 #include "polygon.h" 40 #include "mem.h" 47 41 #endif 48 42 49 43 50 44 51 void gl_CullFace( GLcontext *ctx, GLenum mode ) 45 void 46 _mesa_CullFace( GLenum mode ) 52 47 { 48 GET_CURRENT_CONTEXT(ctx); 53 49 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCullFace"); 54 50 … … 70 66 71 67 72 void gl_FrontFace( GLcontext *ctx, GLenum mode ) 68 void 69 _mesa_FrontFace( GLenum mode ) 73 70 { 71 GET_CURRENT_CONTEXT(ctx); 74 72 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glFrontFace"); 75 73 … … 92 90 93 91 94 void gl_PolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) 92 void 93 _mesa_PolygonMode( GLenum face, GLenum mode ) 95 94 { 95 GET_CURRENT_CONTEXT(ctx); 96 96 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonMode"); 97 97 98 98 if (MESA_VERBOSE&VERBOSE_API) 99 99 fprintf(stderr, "glPolygonMode %s %s\n", 100 101 100 gl_lookup_enum_by_nr(face), 101 gl_lookup_enum_by_nr(mode)); 102 102 103 103 if (face!=GL_FRONT && face!=GL_BACK && face!=GL_FRONT_AND_BACK) { … … 135 135 136 136 137 /* 138 * NOTE: stipple pattern has already been unpacked. 139 */ 140 void gl_PolygonStipple( GLcontext *ctx, const GLuint pattern[32] ) 137 void 138 _mesa_PolygonStipple( const GLubyte *pattern ) 141 139 { 140 GET_CURRENT_CONTEXT(ctx); 142 141 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonStipple"); 143 142 … … 145 144 fprintf(stderr, "glPolygonStipple\n"); 146 145 147 MEMCPY( ctx->PolygonStipple, pattern, 32 * 4);146 _mesa_unpack_polygon_stipple(pattern, ctx->PolygonStipple, &ctx->Unpack); 148 147 149 148 if (ctx->Polygon.StippleFlag) { 150 149 ctx->NewState |= NEW_RASTER_OPS; 151 150 } 151 152 if (ctx->Driver.PolygonStipple) 153 ctx->Driver.PolygonStipple( ctx, (const GLubyte *) ctx->PolygonStipple ); 152 154 } 153 155 154 156 155 157 156 void gl_GetPolygonStipple( GLcontext *ctx, GLubyte *dest ) 158 void 159 _mesa_GetPolygonStipple( GLubyte *dest ) 157 160 { 161 GET_CURRENT_CONTEXT(ctx); 158 162 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffset"); 159 163 … … 161 165 fprintf(stderr, "glGetPolygonStipple\n"); 162 166 163 gl_pack_polygon_stipple( ctx, ctx->PolygonStipple, dest);167 _mesa_pack_polygon_stipple(ctx->PolygonStipple, dest, &ctx->Pack); 164 168 } 165 169 166 170 167 171 168 void gl_PolygonOffset( GLcontext *ctx,169 172 void 173 _mesa_PolygonOffset( GLfloat factor, GLfloat units ) 170 174 { 175 GET_CURRENT_CONTEXT(ctx); 171 176 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffset"); 172 177 … … 178 183 } 179 184 185 186 187 void 188 _mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ) 189 { 190 GET_CURRENT_CONTEXT(ctx); 191 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffsetEXT"); 192 _mesa_PolygonOffset(factor, bias * ctx->Visual->DepthMaxF ); 193 }
Note:
See TracChangeset
for help on using the changeset viewer.