Ignore:
Timestamp:
May 23, 2000, 10:41:28 PM (25 years ago)
Author:
jeroen
Message:

* empty log message *

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:35 jeroen Exp $ */
     1/* $Id: polygon.c,v 1.3 2000-05-23 20:40:51 jeroen Exp $ */
    22
    33/*
    44 * Mesa 3-D graphics library
    5  * Version:  3.1
     5 * Version:  3.3
    66 *
    77 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
     
    3131#include "all.h"
    3232#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"
    4134#include "types.h"
    4235#include "context.h"
     
    4538#include "macros.h"
    4639#include "polygon.h"
     40#include "mem.h"
    4741#endif
    4842
    4943
    5044
    51 void gl_CullFace( GLcontext *ctx, GLenum mode )
     45void
     46_mesa_CullFace( GLenum mode )
    5247{
     48   GET_CURRENT_CONTEXT(ctx);
    5349   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCullFace");
    5450
     
    7066
    7167
    72 void gl_FrontFace( GLcontext *ctx, GLenum mode )
     68void
     69_mesa_FrontFace( GLenum mode )
    7370{
     71   GET_CURRENT_CONTEXT(ctx);
    7472   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glFrontFace");
    7573
     
    9290
    9391
    94 void gl_PolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
     92void
     93_mesa_PolygonMode( GLenum face, GLenum mode )
    9594{
     95   GET_CURRENT_CONTEXT(ctx);
    9696   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonMode");
    9797
    9898   if (MESA_VERBOSE&VERBOSE_API)
    9999      fprintf(stderr, "glPolygonMode %s %s\n",
    100               gl_lookup_enum_by_nr(face),
    101               gl_lookup_enum_by_nr(mode));
     100              gl_lookup_enum_by_nr(face),
     101              gl_lookup_enum_by_nr(mode));
    102102
    103103   if (face!=GL_FRONT && face!=GL_BACK && face!=GL_FRONT_AND_BACK) {
     
    135135
    136136
    137 /*
    138  * NOTE:  stipple pattern has already been unpacked.
    139  */
    140 void gl_PolygonStipple( GLcontext *ctx, const GLuint pattern[32] )
     137void
     138_mesa_PolygonStipple( const GLubyte *pattern )
    141139{
     140   GET_CURRENT_CONTEXT(ctx);
    142141   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonStipple");
    143142
     
    145144      fprintf(stderr, "glPolygonStipple\n");
    146145
    147    MEMCPY( ctx->PolygonStipple, pattern, 32 * 4 );
     146   _mesa_unpack_polygon_stipple(pattern, ctx->PolygonStipple, &ctx->Unpack);
    148147
    149148   if (ctx->Polygon.StippleFlag) {
    150149      ctx->NewState |= NEW_RASTER_OPS;
    151150   }
     151
     152   if (ctx->Driver.PolygonStipple)
     153      ctx->Driver.PolygonStipple( ctx, (const GLubyte *) ctx->PolygonStipple );
    152154}
    153155
    154156
    155157
    156 void gl_GetPolygonStipple( GLcontext *ctx, GLubyte *dest )
     158void
     159_mesa_GetPolygonStipple( GLubyte *dest )
    157160{
     161   GET_CURRENT_CONTEXT(ctx);
    158162   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffset");
    159163
     
    161165      fprintf(stderr, "glGetPolygonStipple\n");
    162166
    163    gl_pack_polygon_stipple( ctx, ctx->PolygonStipple, dest );
     167   _mesa_pack_polygon_stipple(ctx->PolygonStipple, dest, &ctx->Pack);
    164168}
    165169
    166170
    167171
    168 void gl_PolygonOffset( GLcontext *ctx,
    169                       GLfloat factor, GLfloat units )
     172void
     173_mesa_PolygonOffset( GLfloat factor, GLfloat units )
    170174{
     175   GET_CURRENT_CONTEXT(ctx);
    171176   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffset");
    172177
     
    178183}
    179184
     185
     186
     187void
     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.