Changeset 2962 for trunk/src


Ignore:
Timestamp:
Mar 1, 2000, 7:50:02 PM (25 years ago)
Author:
jeroen
Message:

* empty log message *

Location:
trunk/src/opengl/mesa
Files:
20 added
1 deleted
70 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/3dnow.c

    r2938 r2962  
    1 /* $Id: 3dnow.c,v 1.1 2000-02-29 00:49:56 sandervl Exp $ */
     1/* $Id: 3dnow.c,v 1.2 2000-03-01 18:49:20 jeroen Exp $ */
    22
    33/*
     
    3838#include <math.h>
    3939
     40#include "types.h"
    4041#include "context.h"
    41 #include "types.h"
    4242#include "xform.h"
    4343#include "vertices.h"
  • trunk/src/opengl/mesa/GL/wmesa.h

    r2938 r2962  
    1 /* $Id: wmesa.h,v 1.1 2000-02-29 00:43:33 sandervl Exp $ */
     1/* $Id: wmesa.h,v 1.2 2000-03-01 18:49:42 jeroen Exp $ */
    22
    33/*
     
    2525/*
    2626 * $Log: wmesa.h,v $
    27  * Revision 1.1  2000-02-29 00:43:33  sandervl
     27 * Revision 1.2  2000-03-01 18:49:42  jeroen
     28 * *** empty log message ***
     29 *
     30 * Revision 1.1  2000/02/29 00:43:33  sandervl
    2831 * created
    2932 *
     
    112115 * Return:  a WMesa_context or NULL if error.
    113116 */
    114 extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
     117extern WMesaContext WIN32API WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
    115118                                       GLboolean rgb_flag,GLboolean db_flag);
    116119
  • trunk/src/opengl/mesa/OPENGL32.DEF

    r2938 r2962  
    1616   DescribePixelFormat
    1717   SwapBuffers
    18 ;  OSMesaCreateContext=_OSMesaCreateContext@8
    19 ;  OSMesaDestroyContext=_OSMesaDestroyContext@4
    20 ;  OSMesaGetCurrentContext=_OSMesaGetCurrentContext@0
    21 ;  OSMesaGetDepthBuffer=_OSMesaGetDepthBuffer
    22 ;  OSMesaGetIntegerv=_OSMesaGetIntegerv
    23 ;  OSMesaMakeCurrent=_OSMesaMakeCurrent@20
    24 ;  OSMesaPixelStore=_OSMesaPixelStore
    25 ;  WMesaCreateContext=_WMesaCreateContext
    26 ;  WMesaDestroyContext=_WMesaDestroyContext
    27 ;  WMesaMakeCurrent=_WMesaMakeCurrent
    28 ;  WMesaPaletteChange=_WMesaPaletteChange
    29 ;  WMesaSwapBuffers=_WMesaSwapBuffers
    30    glAccum=_glAccum@8                           @8
    31    glAlphaFunc=_glAlphaFunc@8                   @9
    32    glAreTexturesResident=_glAreTexturesResident@12 @10
    33 ;  glAreTexturesResidentEXT=_glAreTexturesResidentEXT
    34    glArrayElement=_glArrayElement@4             @11
    35 ;  glArrayElementEXT=_glArrayElementEXT
    36    glBegin=_glBegin@4                           @12
    37 ;  glBindTexture=_glBindTexture@8               @13
    38 ;  glBindTextureEXT=_glBindTextureEXT
    39    glBitmap=_glBitmap@28                        @14
    40 ;  glBlendColorEXT=_glBlendColorEXT
    41 ;  glBlendEquationEXT=_glBlendEquationEXT
    42    glBlendFunc=_glBlendFunc@8                   @15
    43    glCallList=_glCallList@4                     @16
    44    glCallLists=_glCallLists@12                  @17
    45    glClear=_glClear@4                           @18
    46    glClearAccum=_glClearAccum@16                @19
    47    glClearColor=_glClearColor@16                @20
    48    glClearDepth=_glClearDepth@8                 @21
    49    glClearIndex=_glClearIndex@4                 @22
    50    glClearStencil=_glClearStencil@4             @23
    51    glClipPlane=_glClipPlane@8                   @24
    52    glColor3b=_glColor3b@12                      @25
    53    glColor3bv=_glColor3bv@4                     @26
    54    glColor3d=_glColor3d@24                      @27
    55    glColor3dv=_glColor3dv@4                     @28
    56    glColor3f=_glColor3f@12                      @29
    57    glColor3fv=_glColor3fv@4                     @30
    58    glColor3i=_glColor3i@12                      @31
    59    glColor3iv=_glColor3iv@4                     @32
    60    glColor3s=_glColor3s@12                      @33
    61    glColor3sv=_glColor3sv@4                     @34
    62    glColor3ub=_glColor3ub@12                    @35
    63    glColor3ubv=_glColor3ubv@4                   @36
    64    glColor3ui=_glColor3ui@12                    @37
    65    glColor3uiv=_glColor3uiv@4                   @38
    66    glColor3us=_glColor3us@12                    @39
    67    glColor3usv=_glColor3usv@4                   @40
    68    glColor4b=_glColor4b@16                      @41
    69    glColor4bv=_glColor4bv@4                     @42
    70    glColor4d=_glColor4d@32                      @43
    71    glColor4dv=_glColor4dv@4                     @44
    72    glColor4f=_glColor4f@16                      @45
    73    glColor4fv=_glColor4fv@4                     @46
    74    glColor4i=_glColor4i@16                      @47
    75    glColor4iv=_glColor4iv@4                     @48
    76    glColor4s=_glColor4s@16                      @49
    77    glColor4sv=_glColor4sv@4                     @50
    78    glColor4ub=_glColor4ub@16                    @51
    79    glColor4ubv=_glColor4ubv@4                   @52
    80    glColor4ui=_glColor4ui@16                    @53
    81    glColor4uiv=_glColor4uiv@4                   @54
    82    glColor4us=_glColor4us@16                    @55
    83    glColor4usv=_glColor4usv@4                   @56
    84    glColorMask=_glColorMask@16                  @57
    85    glColorMaterial=_glColorMaterial@8           @58
    86    glColorPointer=_glColorPointer@16            @59
    87 ;  glColorPointerEXT=_glColorPointerEXT
    88 ;  glColorSubTableEXT=_glColorSubTableEXT
    89 ;  glColorTableEXT=_glColorTableEXT
    90    glCopyPixels=_glCopyPixels@20                @60
    91    glCopyTexImage1D=_glCopyTexImage1D@28        @61
    92    glCopyTexImage2D=_glCopyTexImage2D@32        @62
    93    glCopyTexSubImage1D=_glCopyTexSubImage1D@24  @63
    94    glCopyTexSubImage2D=_glCopyTexSubImage2D@32  @64
    95 ;  glCopyTexSubImage3DEXT=_glCopyTexSubImage3DEXT
    96    glCullFace=_glCullFace@4                     @65
    97    glDeleteLists=_glDeleteLists@8               @67
    98 ;   glDebugEntry                                 @66
    99    glDeleteTextures=_glDeleteTextures@8         @68
    100 ;  glDeleteTexturesEXT=_glDeleteTexturesEXT
    101    glDepthFunc=_glDepthFunc@4                   @69
    102    glDepthMask=_glDepthMask@4                   @70
    103    glDepthRange=_glDepthRange@16                @71
    104    glDisable=_glDisable@4                       @72
    105    glDisableClientState=_glDisableClientState@4 @73
    106    glDrawArrays=_glDrawArrays@12                @74
    107 ;  glDrawArraysEXT=_glDrawArraysEXT
    108    glDrawBuffer=_glDrawBuffer@4                 @75
    109    glDrawElements=_glDrawElements@16            @76
    110    glDrawPixels=_glDrawPixels@20                @77
    111    glEdgeFlag=_glEdgeFlag@4                     @78
    112    glEdgeFlagPointer=_glEdgeFlagPointer@8       @79
    113 ;  glEdgeFlagPointerEXT=_glEdgeFlagPointerEXT
    114    glEdgeFlagv=_glEdgeFlagv@4                   @80
    115    glEnable=_glEnable@4                         @81
    116    glEnableClientState=_glEnableClientState@4   @82
    117    glEnd=_glEnd@0                               @83
    118    glEndList=_glEndList@0                       @84
    119    glEvalCoord1d=_glEvalCoord1d@8               @85
    120    glEvalCoord1dv=_glEvalCoord1dv@4             @86
    121    glEvalCoord1f=_glEvalCoord1f@4               @87
    122    glEvalCoord1fv=_glEvalCoord1fv@4             @88
    123    glEvalCoord2d=_glEvalCoord2d@16              @89
    124    glEvalCoord2dv=_glEvalCoord2dv@4             @90
    125    glEvalCoord2f=_glEvalCoord2f@8               @91
    126    glEvalCoord2fv=_glEvalCoord2fv@4             @92
    127    glEvalMesh1=_glEvalMesh1@12                  @93
    128    glEvalMesh2=_glEvalMesh2@20                  @94
    129    glEvalPoint1=_glEvalPoint1@4                 @95
    130    glEvalPoint2=_glEvalPoint2@8                 @96
    131    glFeedbackBuffer=_glFeedbackBuffer@12        @97
    132    glFinish=_glFinish@0                         @98
    133    glFlush=_glFlush@0                           @99
    134    glFogf=_glFogf@8                             @100
    135    glFogfv=_glFogfv@8                           @101
    136    glFogi=_glFogi@8                             @102
    137    glFogiv=_glFogiv@8                           @103
    138    glFrontFace=_glFrontFace@4                   @104
    139    glFrustum=_glFrustum@48                      @105
    140    glGenLists=_glGenLists@4                     @106
    141    glGenTextures=_glGenTextures@8               @107
    142 ;  glGenTexturesEXT=_glGenTexturesEXT
    143    glGetBooleanv=_glGetBooleanv@8               @108
    144    glGetClipPlane=_glGetClipPlane@8             @109
    145 ;  glGetColorTableEXT=_glGetColorTableEXT
    146 ;  glGetColorTableParameterfvEXT=_glGetColorTableParameterfvEXT
    147 ;  glGetColorTableParameterivEXT=_glGetColorTableParameterivEXT
    148    glGetDoublev=_glGetDoublev@8                 @110
    149    glGetError=_glGetError@0                     @111
    150    glGetFloatv=_glGetFloatv@8                   @112
    151    glGetIntegerv=_glGetIntegerv@8               @113
    152    glGetLightfv=_glGetLightfv@12                @114
    153    glGetLightiv=_glGetLightiv@12                @115
    154    glGetMapdv=_glGetMapdv@12                    @116
    155    glGetMapfv=_glGetMapfv@12                    @117
    156    glGetMapiv=_glGetMapiv@12                    @118
    157    glGetMaterialfv=_glGetMaterialfv@12          @119
    158    glGetMaterialiv=_glGetMaterialiv@12          @120
    159    glGetPixelMapfv=_glGetPixelMapfv@8           @121
    160    glGetPixelMapuiv=_glGetPixelMapuiv@8         @122
    161    glGetPixelMapusv=_glGetPixelMapusv@8         @123
    162    glGetPointerv=_glGetPointerv@8               @124
    163 ;  glGetPointervEXT=_glGetPointervEXT
    164    glGetPolygonStipple=_glGetPolygonStipple@4   @125
    165    glGetString=_glGetString@4                   @126
    166    glGetTexEnvfv=_glGetTexEnvfv@12              @127
    167    glGetTexEnviv=_glGetTexEnviv@12              @128
    168    glGetTexGendv=_glGetTexGendv@12              @129
    169    glGetTexGenfv=_glGetTexGenfv@12              @130
    170    glGetTexGeniv=_glGetTexGeniv@12              @131
    171    glGetTexImage=_glGetTexImage@20              @132
    172    glGetTexLevelParameterfv=_glGetTexLevelParameterfv@16  @133
    173    glGetTexLevelParameteriv=_glGetTexLevelParameteriv@16  @134
    174    glGetTexParameterfv=_glGetTexParameterfv@12  @135
    175    glGetTexParameteriv=_glGetTexParameteriv@12  @136
    176    glHint=_glHint@8                             @137
    177    glIndexMask=_glIndexMask@4                   @138
    178    glIndexPointer=_glIndexPointer@12            @139
    179 ;  glIndexPointerEXT=_glIndexPointerEXT
    180    glIndexd=_glIndexd@8                         @140
    181    glIndexdv=_glIndexdv@4                       @141
    182    glIndexf=_glIndexf@4                         @142
    183    glIndexfv=_glIndexfv@4                       @143
    184    glIndexi=_glIndexi@4                         @144
    185    glIndexiv=_glIndexiv@4                       @145
    186    glIndexs=_glIndexs@4                         @146
    187    glIndexsv=_glIndexsv@4                       @147
    188    glIndexub=_glIndexub@4                       @148
    189    glIndexubv=_glIndexubv@4                     @149
    190    glInitNames=_glInitNames@0                   @150
    191    glInterleavedArrays=_glInterleavedArrays@12  @151
    192    glIsEnabled=_glIsEnabled@4                   @152
    193    glIsList=_glIsList@4                         @153
    194    glIsTexture=_glIsTexture@4                   @154
    195 ;  glIsTextureEXT=_glIsTextureEXT
    196    glLightModelf=_glLightModelf@8               @155
    197    glLightModelfv=_glLightModelfv@8             @156
    198    glLightModeli=_glLightModeli@8               @157
    199    glLightModeliv=_glLightModeliv@8             @158
    200    glLightf=_glLightf@12                        @159
    201    glLightfv=_glLightfv@12                      @160
    202    glLighti=_glLighti@12                        @161
    203    glLightiv=_glLightiv@12                      @162
    204    glLineStipple=_glLineStipple@8               @163
    205    glLineWidth=_glLineWidth@4                   @164
    206    glListBase=_glListBase@4                     @165
    207    glLoadIdentity=_glLoadIdentity@0             @166
    208    glLoadMatrixd=_glLoadMatrixd@4               @167
    209    glLoadMatrixf=_glLoadMatrixf@4               @168
    210    glLoadName=_glLoadName@4                     @169
    211    glLogicOp=_glLogicOp@4                       @170
    212    glMap1d=_glMap1d@32                          @171
    213    glMap1f=_glMap1f@24                          @172
    214    glMap2d=_glMap2d@56                          @173
    215    glMap2f=_glMap2f@40                          @174
    216    glMapGrid1d=_glMapGrid1d@20                  @175
    217    glMapGrid1f=_glMapGrid1f@12                  @176
    218    glMapGrid2d=_glMapGrid2d@40                  @177
    219    glMapGrid2f=_glMapGrid2f@24                  @178
    220    glMaterialf=_glMaterialf@12                  @179
    221    glMaterialfv=_glMaterialfv@12                @180
    222    glMateriali=_glMateriali@12                  @181
    223    glMaterialiv=_glMaterialiv@12                @182
    224    glMatrixMode=_glMatrixMode@4                 @183
    225    glMultMatrixd=_glMultMatrixd@4               @184
    226    glMultMatrixf=_glMultMatrixf@4               @185
    227    glNewList=_glNewList@8                       @186
    228    glNormal3b=_glNormal3b@12                    @187
    229    glNormal3bv=_glNormal3bv@4                   @188
    230    glNormal3d=_glNormal3d@24                    @189
    231    glNormal3dv=_glNormal3dv@4                   @190
    232    glNormal3f=_glNormal3f@12                    @191
    233    glNormal3fv=_glNormal3fv@4                   @192
    234    glNormal3i=_glNormal3i@12                    @193
    235    glNormal3iv=_glNormal3iv@4                   @194
    236    glNormal3s=_glNormal3s@12                    @195
    237    glNormal3sv=_glNormal3sv@4                   @196
    238    glNormalPointer=_glNormalPointer@12          @197
    239 ;  glNormalPointerEXT=_glNormalPointerEXT
    240    glOrtho=_glOrtho@48                          @198
    241    glPassThrough=_glPassThrough@4               @199
    242    glPixelMapfv=_glPixelMapfv@12                @200
    243    glPixelMapuiv=_glPixelMapuiv@12              @201
    244    glPixelMapusv=_glPixelMapusv@12              @202
    245    glPixelStoref=_glPixelStoref@8               @203
    246    glPixelStorei=_glPixelStorei@8               @204
    247    glPixelTransferf=_glPixelTransferf@8         @205
    248    glPixelTransferi=_glPixelTransferi@8         @206
    249    glPixelZoom=_glPixelZoom@8                   @207
    250 ;  glPointParameterfEXT=_glPointParameterfEXT
    251 ;  glPointParameterfvEXT=_glPointParameterfvEXT
    252    glPointSize=_glPointSize@4                   @208
    253    glPolygonMode=_glPolygonMode@8               @209
    254    glPolygonOffset=_glPolygonOffset@8           @210
    255 ;  glPolygonOffsetEXT=_glPolygonOffsetEXT
    256    glPolygonStipple=_glPolygonStipple@4         @211
    257    glPopAttrib=_glPopAttrib@0                   @212
    258    glPopClientAttrib=_glPopClientAttrib@0       @213
    259    glPopMatrix=_glPopMatrix@0                   @214
    260    glPopName=_glPopName@0                       @215
    261    glPrioritizeTextures=_glPrioritizeTextures@12  @216
    262 ;  glPrioritizeTexturesEXT=_glPrioritizeTexturesEXT
    263    glPushAttrib=_glPushAttrib@4                 @217
    264    glPushClientAttrib=_glPushClientAttrib@4     @218
    265    glPushMatrix=_glPushMatrix@0                 @219
    266    glPushName=_glPushName@4                     @220
    267    glRasterPos2d=_glRasterPos2d@16              @221
    268    glRasterPos2dv=_glRasterPos2dv@4             @222
    269    glRasterPos2f=_glRasterPos2f@8               @223
    270    glRasterPos2fv=_glRasterPos2fv@4             @224
    271    glRasterPos2i=_glRasterPos2i@8               @225
    272    glRasterPos2iv=_glRasterPos2iv@4             @226
    273    glRasterPos2s=_glRasterPos2s@8               @227
    274    glRasterPos2sv=_glRasterPos2sv@4             @228
    275    glRasterPos3d=_glRasterPos3d@24              @229
    276    glRasterPos3dv=_glRasterPos3dv@4             @230
    277    glRasterPos3f=_glRasterPos3f@12              @231
    278    glRasterPos3fv=_glRasterPos3fv@4             @232
    279    glRasterPos3i=_glRasterPos3i@12              @233
    280    glRasterPos3iv=_glRasterPos3iv@4             @234
    281    glRasterPos3s=_glRasterPos3s@12              @235
    282    glRasterPos3sv=_glRasterPos3sv@4             @236
    283    glRasterPos4d=_glRasterPos4d@32              @237
    284    glRasterPos4dv=_glRasterPos4dv@4             @238
    285    glRasterPos4f=_glRasterPos4f@16              @239
    286    glRasterPos4fv=_glRasterPos4fv@4             @240
    287    glRasterPos4i=_glRasterPos4i@16              @241
    288    glRasterPos4iv=_glRasterPos4iv@4             @242
    289    glRasterPos4s=_glRasterPos4s@16              @243
    290    glRasterPos4sv=_glRasterPos4sv@4             @244
    291    glReadBuffer=_glReadBuffer@4                 @245
    292    glReadPixels=_glReadPixels@28                @246
    293    glRectd=_glRectd@32                          @247
    294    glRectdv=_glRectdv@8                         @248
    295    glRectf=_glRectf@16                          @249
    296    glRectfv=_glRectfv@8                         @250
    297    glRecti=_glRecti@16                          @251
    298    glRectiv=_glRectiv@8                         @252
    299    glRects=_glRects@16                          @253
    300    glRectsv=_glRectsv@8                         @254
    301    glRenderMode=_glRenderMode@4                 @255
    302 ;  glResizeBuffersMESA=_glResizeBuffersMESA
    303    glRotated=_glRotated@32                      @256
    304    glRotatef=_glRotatef@16                      @257
    305    glScaled=_glScaled@24                        @258
    306    glScalef=_glScalef@12                        @259
    307    glScissor=_glScissor@16                      @260
    308    glSelectBuffer=_glSelectBuffer@8             @261
    309    glShadeModel=_glShadeModel@4                 @262
    310    glStencilFunc=_glStencilFunc@12              @263
    311    glStencilMask=_glStencilMask@4               @264
    312    glStencilOp=_glStencilOp@12                  @265
    313    glTexCoord1d=_glTexCoord1d@8                 @266
    314    glTexCoord1dv=_glTexCoord1dv@4               @267
    315    glTexCoord1f=_glTexCoord1f@4                 @268
    316    glTexCoord1fv=_glTexCoord1fv@4               @269
    317    glTexCoord1i=_glTexCoord1i@4                 @270
    318    glTexCoord1iv=_glTexCoord1iv@4               @271
    319    glTexCoord1s=_glTexCoord1s@4                 @272
    320    glTexCoord1sv=_glTexCoord1sv@4               @273
    321    glTexCoord2d=_glTexCoord2d@16                @274
    322    glTexCoord2dv=_glTexCoord2dv@4               @275
    323    glTexCoord2f=_glTexCoord2f@8                 @276
    324    glTexCoord2fv=_glTexCoord2fv@4               @277
    325    glTexCoord2i=_glTexCoord2i@8                 @278
    326    glTexCoord2iv=_glTexCoord2iv@4               @279
    327    glTexCoord2s=_glTexCoord2s@8                 @280
    328    glTexCoord2sv=_glTexCoord2sv@4               @281
    329    glTexCoord3d=_glTexCoord3d@24                @282
    330    glTexCoord3dv=_glTexCoord3dv@4               @283
    331    glTexCoord3f=_glTexCoord3f@12                @284
    332    glTexCoord3fv=_glTexCoord3fv@4               @285
    333    glTexCoord3i=_glTexCoord3i@12                @286
    334    glTexCoord3iv=_glTexCoord3iv@4               @287
    335    glTexCoord3s=_glTexCoord3s@12                @288
    336    glTexCoord3sv=_glTexCoord3sv@4               @289
    337    glTexCoord4d=_glTexCoord4d@32                @290
    338    glTexCoord4dv=_glTexCoord4dv@4               @291
    339    glTexCoord4f=_glTexCoord4f@16                @292
    340    glTexCoord4fv=_glTexCoord4fv@4               @293
    341    glTexCoord4i=_glTexCoord4i@16                @294
    342    glTexCoord4iv=_glTexCoord4iv@4               @295
    343    glTexCoord4s=_glTexCoord4s@16                @296
    344    glTexCoord4sv=_glTexCoord4sv@4               @297
    345    glTexCoordPointer=_glTexCoordPointer@16      @298
    346 ;  glTexCoordPointerEXT=_glTexCoordPointerEXT
    347    glTexEnvf=_glTexEnvf@12                      @299
    348    glTexEnvfv=_glTexEnvfv@12                    @300
    349    glTexEnvi=_glTexEnvi@12                      @301
    350    glTexEnviv=_glTexEnviv@12                    @302
    351    glTexGend=_glTexGend@16                      @303
    352    glTexGendv=_glTexGendv@12                    @304
    353    glTexGenf=_glTexGenf@12                      @305
    354    glTexGenfv=_glTexGenfv@12                    @306
    355    glTexGeni=_glTexGeni@12                      @307
    356    glTexGeniv=_glTexGeniv@12                    @308
    357    glTexImage1D=_glTexImage1D@32                @309
    358    glTexImage2D=_glTexImage2D@36                @310
    359    glTexImage3D=_glTexImage3D@40                @400
    360 ;  glTexImage3DEXT=_glTexImage3DEXT
    361    glTexParameterf=_glTexParameterf@12          @311
    362    glTexParameterfv=_glTexParameterfv@12        @312
    363    glTexParameteri=_glTexParameteri@12          @313
    364    glTexParameteriv=_glTexParameteriv@12        @314
    365    glTexSubImage1D=_glTexSubImage1D@28          @315
    366    glTexSubImage2D=_glTexSubImage2D@36          @316
    367 ;  glTexSubImage3DEXT=_glTexSubImage3DEXT
    368    glTranslated=_glTranslated@24                @317
    369    glTranslatef=_glTranslatef@12                @318
    370    glVertex2d=_glVertex2d@16                    @319
    371    glVertex2dv=_glVertex2dv@4                   @320
    372    glVertex2f=_glVertex2f@8                     @321
    373    glVertex2fv=_glVertex2fv@4                   @322
    374    glVertex2i=_glVertex2i@8                     @323
    375    glVertex2iv=_glVertex2iv@4                   @324
    376    glVertex2s=_glVertex2s@8                     @325
    377    glVertex2sv=_glVertex2sv@4                   @326
    378    glVertex3d=_glVertex3d@24                    @327
    379    glVertex3dv=_glVertex3dv@4                   @328
    380    glVertex3f=_glVertex3f@12                    @329
    381    glVertex3fv=_glVertex3fv@4                   @330
    382    glVertex3i=_glVertex3i@12                    @331
    383    glVertex3iv=_glVertex3iv@4                   @332
    384    glVertex3s=_glVertex3s@12                    @333
    385    glVertex3sv=_glVertex3sv@4                   @334
    386    glVertex4d=_glVertex4d@32                    @335
    387    glVertex4dv=_glVertex4dv@4                   @336
    388    glVertex4f=_glVertex4f@16                    @337
    389    glVertex4fv=_glVertex4fv@4                   @338
    390    glVertex4i=_glVertex4i@16                    @339
    391    glVertex4iv=_glVertex4iv@4                   @340
    392    glVertex4s=_glVertex4s@16                    @341
    393    glVertex4sv=_glVertex4sv@4                   @342
    394 ;  glVertexPointer=_glVertexPointer@20          @343
    395 ;  glVertexPointerEXT=_glVertexPointerEXT
    396    glViewport=_glViewport@16                    @344
    397 ;  glWindowPos2dMESA=_glWindowPos2dMESA
    398 ;  glWindowPos2dvMESA=_glWindowPos2dvMESA
    399 ;  glWindowPos2fMESA=_glWindowPos2fMESA
    400 ;  glWindowPos2fvMESA=_glWindowPos2fvMESA
    401 ;  glWindowPos2iMESA=_glWindowPos2iMESA
    402 ;  glWindowPos2ivMESA=_glWindowPos2ivMESA
    403 ;  glWindowPos2sMESA=_glWindowPos2sMESA
    404 ;  glWindowPos2svMESA=_glWindowPos2svMESA
    405 ;  glWindowPos3dMESA=_glWindowPos3dMESA
    406 ;  glWindowPos3dvMESA=_glWindowPos3dvMESA
    407 ;  glWindowPos3fMESA=_glWindowPos3fMESA
    408 ;  glWindowPos3fvMESA=_glWindowPos3fvMESA
    409 ;  glWindowPos3iMESA=_glWindowPos3iMESA
    410 ;  glWindowPos3ivMESA=_glWindowPos3ivMESA
    411 ;  glWindowPos3sMESA=_glWindowPos3sMESA
    412 ;  glWindowPos3svMESA=_glWindowPos3svMESA
    413 ;  glWindowPos4dMESA=_glWindowPos4dMESA
    414 ;  glWindowPos4dvMESA=_glWindowPos4dvMESA
    415 ;  glWindowPos4fMESA=_glWindowPos4fMESA
    416 ;  glWindowPos4fvMESA=_glWindowPos4fvMESA
    417 ;  glWindowPos4iMESA=_glWindowPos4iMESA
    418 ;  glWindowPos4ivMESA=_glWindowPos4ivMESA
    419 ;  glWindowPos4sMESA=_glWindowPos4sMESA
    420 ;  glWindowPos4svMESA=_glWindowPos4svMESA
    421    wglChoosePixelFormat=_wglChoosePixelFormat@8        @345
    422    wglCopyContext=_wglCopyContext@12                   @346
    423    wglCreateContext=_wglCreateContext@4                @347
    424    wglCreateLayerContext=_wglCreateLayerContext@8      @348
    425    wglDeleteContext=_wglDeleteContext@4                @349
    426    wglDescribeLayerPlane=_wglDescribeLayerPlane@20     @350
    427    wglDescribePixelFormat=_wglDescribePixelFormat@16   @351
    428    wglGetCurrentContext=_wglGetCurrentContext@0        @352
    429    wglGetCurrentDC=_wglGetCurrentDC@0                  @353
    430 ;   wglGetDefaultProcAddress                            @354
    431    wglGetLayerPaletteEntries=_wglGetLayerPaletteEntries@20 @355
    432    wglGetPixelFormat=_wglGetPixelFormat@4                  @356
    433    wglGetProcAddress=_wglGetProcAddress@4                  @357
    434    wglMakeCurrent=_wglMakeCurrent@8                        @358
    435    wglRealizeLayerPalette=_wglRealizeLayerPalette@12       @359
    436    wglSetLayerPaletteEntries=_wglSetLayerPaletteEntries@20 @360
    437    wglSetPixelFormat=_wglSetPixelFormat@12      @361
    438    wglShareLists=_wglShareLists@8               @362
    439    wglSwapBuffers=_wglSwapBuffers@4             @363
    440    wglSwapLayerBuffers=_wglSwapLayerBuffers@8   @364
    441    wglUseFontBitmapsA=_wglUseFontBitmapsA@16    @365
    442    wglUseFontBitmapsW=_wglUseFontBitmapsW@16    @366
    443    wglUseFontOutlinesA=_wglUseFontOutlinesA@32  @367
    444    wglUseFontOutlinesW=_wglUseFontOutlinesW@32  @368
    445 
     18
     19   _InternalOGLQueryBB                                                  @1000
     20   _InternalOGLQueryFB                                                  @1001
     21
     22   OSMesaCreateContext=_OSMesaCreateContext@8                           @401
     23   OSMesaDestroyContext=_OSMesaDestroyContext@4                         @402
     24   OSMesaGetCurrentContext=_OSMesaGetCurrentContext@0                   @403
     25   OSMesaGetDepthBuffer=_OSMesaGetDepthBuffer@20                        @404
     26   OSMesaGetIntegerv=_OSMesaGetIntegerv@8                               @405
     27   OSMesaMakeCurrent=_OSMesaMakeCurrent@20                              @406
     28   OSMesaPixelStore=_OSMesaPixelStore@8                                 @407
     29   WMesaCreateContext=_WMesaCreateContext@16                            @408
     30   WMesaDestroyContext=_WMesaDestroyContext@0                           @409
     31   WMesaMakeCurrent=_WMesaMakeCurrent@4                                 @410
     32   WMesaPaletteChange=_WMesaPaletteChange@4                             @411
     33   WMesaSwapBuffers=_WMesaSwapBuffers@0                                 @412
     34   glAccum=_glAccum@8                                                   @8
     35   glAlphaFunc=_glAlphaFunc@8                                           @9
     36   glAreTexturesResident=_glAreTexturesResident@12                      @10
     37   glAreTexturesResidentEXT=_glAreTexturesResidentEXT@12                @413
     38   glArrayElement=_glArrayElement@4                                     @11
     39   glArrayElementEXT=_glArrayElementEXT@4                               @414
     40   glBegin=_glBegin@4                                                   @12
     41   glBindTexture=_glBindTexture@8                                       @13
     42   glBindTextureEXT=_glBindTextureEXT@8                                 @415
     43   glBitmap=_glBitmap@28                                                @14
     44   glBlendColorEXT=_glBlendColorEXT@16                                  @416
     45   glBlendEquationEXT=_glBlendEquationEXT@4                             @417
     46   glBlendFunc=_glBlendFunc@8                                           @15
     47   glCallList=_glCallList@4                                             @16
     48   glCallLists=_glCallLists@12                                          @17
     49   glClear=_glClear@4                                                   @18
     50   glClearAccum=_glClearAccum@16                                        @19
     51   glClearColor=_glClearColor@16                                        @20
     52   glClearDepth=_glClearDepth@8                                         @21
     53   glClearIndex=_glClearIndex@4                                         @22
     54   glClearStencil=_glClearStencil@4                                     @23
     55   glClipPlane=_glClipPlane@8                                           @24
     56   glColor3b=_glColor3b@12                                              @25
     57   glColor3bv=_glColor3bv@4                                             @26
     58   glColor3d=_glColor3d@24                                              @27
     59   glColor3dv=_glColor3dv@4                                             @28
     60   glColor3f=_glColor3f@12                                              @29
     61   glColor3fv=_glColor3fv@4                                             @30
     62   glColor3i=_glColor3i@12                                              @31
     63   glColor3iv=_glColor3iv@4                                             @32
     64   glColor3s=_glColor3s@12                                              @33
     65   glColor3sv=_glColor3sv@4                                             @34
     66   glColor3ub=_glColor3ub@12                                            @35
     67   glColor3ubv=_glColor3ubv@4                                           @36
     68   glColor3ui=_glColor3ui@12                                            @37
     69   glColor3uiv=_glColor3uiv@4                                           @38
     70   glColor3us=_glColor3us@12                                            @39
     71   glColor3usv=_glColor3usv@4                                           @40
     72   glColor4b=_glColor4b@16                                              @41
     73   glColor4bv=_glColor4bv@4                                             @42
     74   glColor4d=_glColor4d@32                                              @43
     75   glColor4dv=_glColor4dv@4                                             @44
     76   glColor4f=_glColor4f@16                                              @45
     77   glColor4fv=_glColor4fv@4                                             @46
     78   glColor4i=_glColor4i@16                                              @47
     79   glColor4iv=_glColor4iv@4                                             @48
     80   glColor4s=_glColor4s@16                                              @49
     81   glColor4sv=_glColor4sv@4                                             @50
     82   glColor4ub=_glColor4ub@16                                            @51
     83   glColor4ubv=_glColor4ubv@4                                           @52
     84   glColor4ui=_glColor4ui@16                                            @53
     85   glColor4uiv=_glColor4uiv@4                                           @54
     86   glColor4us=_glColor4us@16                                            @55
     87   glColor4usv=_glColor4usv@4                                           @56
     88   glColorMask=_glColorMask@16                                          @57
     89   glColorMaterial=_glColorMaterial@8                                   @58
     90   glColorPointer=_glColorPointer@16                                    @59
     91   glColorPointerEXT=_glColorPointerEXT@20                              @418
     92   glColorSubTableEXT=_glColorSubTableEXT@24                            @419
     93   glColorTableEXT=_glColorTableEXT@24                                  @420
     94   glCopyPixels=_glCopyPixels@20                                        @60
     95   glCopyTexImage1D=_glCopyTexImage1D@28                                @61
     96   glCopyTexImage2D=_glCopyTexImage2D@32                                @62
     97   glCopyTexSubImage1D=_glCopyTexSubImage1D@24                          @63
     98   glCopyTexSubImage2D=_glCopyTexSubImage2D@32                          @64
     99   glCopyTexSubImage3DEXT=_glCopyTexSubImage3DEXT@36                    @421
     100   glCullFace=_glCullFace@4                                             @65
     101   glDeleteLists=_glDeleteLists@8                                       @67
     102;  glDebugEntry                                                         @66
     103   glDeleteTextures=_glDeleteTextures@8                                 @68
     104   glDeleteTexturesEXT=_glDeleteTexturesEXT@8                           @422
     105   glDepthFunc=_glDepthFunc@4                                           @69
     106   glDepthMask=_glDepthMask@4                                           @70
     107   glDepthRange=_glDepthRange@16                                        @71
     108   glDisable=_glDisable@4                                               @72
     109   glDisableClientState=_glDisableClientState@4                         @73
     110   glDrawArrays=_glDrawArrays@12                                        @74
     111   glDrawArraysEXT=_glDrawArraysEXT@12                                  @423
     112   glDrawBuffer=_glDrawBuffer@4                                         @75
     113   glDrawElements=_glDrawElements@16                                    @76
     114   glDrawPixels=_glDrawPixels@20                                        @77
     115   glEdgeFlag=_glEdgeFlag@4                                             @78
     116   glEdgeFlagPointer=_glEdgeFlagPointer@8                               @79
     117   glEdgeFlagPointerEXT=_glEdgeFlagPointerEXT@12                        @424
     118   glEdgeFlagv=_glEdgeFlagv@4                                           @80
     119   glEnable=_glEnable@4                                                 @81
     120   glEnableClientState=_glEnableClientState@4                           @82
     121   glEnd=_glEnd@0                                                       @83
     122   glEndList=_glEndList@0                                               @84
     123   glEvalCoord1d=_glEvalCoord1d@8                                       @85
     124   glEvalCoord1dv=_glEvalCoord1dv@4                                     @86
     125   glEvalCoord1f=_glEvalCoord1f@4                                       @87
     126   glEvalCoord1fv=_glEvalCoord1fv@4                                     @88
     127   glEvalCoord2d=_glEvalCoord2d@16                                      @89
     128   glEvalCoord2dv=_glEvalCoord2dv@4                                     @90
     129   glEvalCoord2f=_glEvalCoord2f@8                                       @91
     130   glEvalCoord2fv=_glEvalCoord2fv@4                                     @92
     131   glEvalMesh1=_glEvalMesh1@12                                          @93
     132   glEvalMesh2=_glEvalMesh2@20                                          @94
     133   glEvalPoint1=_glEvalPoint1@4                                         @95
     134   glEvalPoint2=_glEvalPoint2@8                                         @96
     135   glFeedbackBuffer=_glFeedbackBuffer@12                                @97
     136   glFinish=_glFinish@0                                                 @98
     137   glFlush=_glFlush@0                                                   @99
     138   glFogf=_glFogf@8                                                     @100
     139   glFogfv=_glFogfv@8                                                   @101
     140   glFogi=_glFogi@8                                                     @102
     141   glFogiv=_glFogiv@8                                                   @103
     142   glFrontFace=_glFrontFace@4                                           @104
     143   glFrustum=_glFrustum@48                                              @105
     144   glGenLists=_glGenLists@4                                             @106
     145   glGenTextures=_glGenTextures@8                                       @107
     146   glGenTexturesEXT=_glGenTexturesEXT@8                                 @425
     147   glGetBooleanv=_glGetBooleanv@8                                       @108
     148   glGetClipPlane=_glGetClipPlane@8                                     @109
     149   glGetColorTableEXT=_glGetColorTableEXT@16                            @426
     150   glGetColorTableParameterfvEXT=_glGetColorTableParameterfvEXT@12      @427
     151   glGetColorTableParameterivEXT=_glGetColorTableParameterivEXT@12      @428
     152   glGetDoublev=_glGetDoublev@8                                         @110
     153   glGetError=_glGetError@0                                             @111
     154   glGetFloatv=_glGetFloatv@8                                           @112
     155   glGetIntegerv=_glGetIntegerv@8                                       @113
     156   glGetLightfv=_glGetLightfv@12                                        @114
     157   glGetLightiv=_glGetLightiv@12                                        @115
     158   glGetMapdv=_glGetMapdv@12                                            @116
     159   glGetMapfv=_glGetMapfv@12                                            @117
     160   glGetMapiv=_glGetMapiv@12                                            @118
     161   glGetMaterialfv=_glGetMaterialfv@12                                  @119
     162   glGetMaterialiv=_glGetMaterialiv@12                                  @120
     163   glGetPixelMapfv=_glGetPixelMapfv@8                                   @121
     164   glGetPixelMapuiv=_glGetPixelMapuiv@8                                 @122
     165   glGetPixelMapusv=_glGetPixelMapusv@8                                 @123
     166   glGetPointerv=_glGetPointerv@8                                       @124
     167   glGetPointervEXT=_glGetPointervEXT@8                                 @429
     168   glGetPolygonStipple=_glGetPolygonStipple@4                           @125
     169   glGetString=_glGetString@4                                           @126
     170   glGetTexEnvfv=_glGetTexEnvfv@12                                      @127
     171   glGetTexEnviv=_glGetTexEnviv@12                                      @128
     172   glGetTexGendv=_glGetTexGendv@12                                      @129
     173   glGetTexGenfv=_glGetTexGenfv@12                                      @130
     174   glGetTexGeniv=_glGetTexGeniv@12                                      @131
     175   glGetTexImage=_glGetTexImage@20                                      @132
     176   glGetTexLevelParameterfv=_glGetTexLevelParameterfv@16                @133
     177   glGetTexLevelParameteriv=_glGetTexLevelParameteriv@16                @134
     178   glGetTexParameterfv=_glGetTexParameterfv@12                          @135
     179   glGetTexParameteriv=_glGetTexParameteriv@12                          @136
     180   glHint=_glHint@8                                                     @137
     181   glIndexMask=_glIndexMask@4                                           @138
     182   glIndexPointer=_glIndexPointer@12                                    @139
     183   glIndexPointerEXT=_glIndexPointerEXT@16                              @430
     184   glIndexd=_glIndexd@8                                                 @140
     185   glIndexdv=_glIndexdv@4                                               @141
     186   glIndexf=_glIndexf@4                                                 @142
     187   glIndexfv=_glIndexfv@4                                               @143
     188   glIndexi=_glIndexi@4                                                 @144
     189   glIndexiv=_glIndexiv@4                                               @145
     190   glIndexs=_glIndexs@4                                                 @146
     191   glIndexsv=_glIndexsv@4                                               @147
     192   glIndexub=_glIndexub@4                                               @148
     193   glIndexubv=_glIndexubv@4                                             @149
     194   glInitNames=_glInitNames@0                                           @150
     195   glInterleavedArrays=_glInterleavedArrays@12                          @151
     196   glIsEnabled=_glIsEnabled@4                                           @152
     197   glIsList=_glIsList@4                                                 @153
     198   glIsTexture=_glIsTexture@4                                           @154
     199   glIsTextureEXT=_glIsTextureEXT@4                                     @431
     200   glLightModelf=_glLightModelf@8                                       @155
     201   glLightModelfv=_glLightModelfv@8                                     @156
     202   glLightModeli=_glLightModeli@8                                       @157
     203   glLightModeliv=_glLightModeliv@8                                     @158
     204   glLightf=_glLightf@12                                                @159
     205   glLightfv=_glLightfv@12                                              @160
     206   glLighti=_glLighti@12                                                @161
     207   glLightiv=_glLightiv@12                                              @162
     208   glLineStipple=_glLineStipple@8                                       @163
     209   glLineWidth=_glLineWidth@4                                           @164
     210   glListBase=_glListBase@4                                             @165
     211   glLoadIdentity=_glLoadIdentity@0                                     @166
     212   glLoadMatrixd=_glLoadMatrixd@4                                       @167
     213   glLoadMatrixf=_glLoadMatrixf@4                                       @168
     214   glLoadName=_glLoadName@4                                             @169
     215   glLogicOp=_glLogicOp@4                                               @170
     216   glMap1d=_glMap1d@32                                                  @171
     217   glMap1f=_glMap1f@24                                                  @172
     218   glMap2d=_glMap2d@56                                                  @173
     219   glMap2f=_glMap2f@40                                                  @174
     220   glMapGrid1d=_glMapGrid1d@20                                          @175
     221   glMapGrid1f=_glMapGrid1f@12                                          @176
     222   glMapGrid2d=_glMapGrid2d@40                                          @177
     223   glMapGrid2f=_glMapGrid2f@24                                          @178
     224   glMaterialf=_glMaterialf@12                                          @179
     225   glMaterialfv=_glMaterialfv@12                                        @180
     226   glMateriali=_glMateriali@12                                          @181
     227   glMaterialiv=_glMaterialiv@12                                        @182
     228   glMatrixMode=_glMatrixMode@4                                         @183
     229   glMultMatrixd=_glMultMatrixd@4                                       @184
     230   glMultMatrixf=_glMultMatrixf@4                                       @185
     231   glNewList=_glNewList@8                                               @186
     232   glNormal3b=_glNormal3b@12                                            @187
     233   glNormal3bv=_glNormal3bv@4                                           @188
     234   glNormal3d=_glNormal3d@24                                            @189
     235   glNormal3dv=_glNormal3dv@4                                           @190
     236   glNormal3f=_glNormal3f@12                                            @191
     237   glNormal3fv=_glNormal3fv@4                                           @192
     238   glNormal3i=_glNormal3i@12                                            @193
     239   glNormal3iv=_glNormal3iv@4                                           @194
     240   glNormal3s=_glNormal3s@12                                            @195
     241   glNormal3sv=_glNormal3sv@4                                           @196
     242   glNormalPointer=_glNormalPointer@12                                  @197
     243   glNormalPointerEXT=_glNormalPointerEXT@16                            @432
     244   glOrtho=_glOrtho@48                                                  @198
     245   glPassThrough=_glPassThrough@4                                       @199
     246   glPixelMapfv=_glPixelMapfv@12                                        @200
     247   glPixelMapuiv=_glPixelMapuiv@12                                      @201
     248   glPixelMapusv=_glPixelMapusv@12                                      @202
     249   glPixelStoref=_glPixelStoref@8                                       @203
     250   glPixelStorei=_glPixelStorei@8                                       @204
     251   glPixelTransferf=_glPixelTransferf@8                                 @205
     252   glPixelTransferi=_glPixelTransferi@8                                 @206
     253   glPixelZoom=_glPixelZoom@8                                           @207
     254   glPointParameterfEXT=_glPointParameterfEXT@8                         @462
     255   glPointParameterfvEXT=_glPointParameterfvEXT@8                       @463
     256   glPointSize=_glPointSize@4                                           @208
     257   glPolygonMode=_glPolygonMode@8                                       @209
     258   glPolygonOffset=_glPolygonOffset@8                                   @210
     259   glPolygonOffsetEXT=_glPolygonOffsetEXT@8                             @464
     260   glPolygonStipple=_glPolygonStipple@4                                 @211
     261   glPopAttrib=_glPopAttrib@0                                           @212
     262   glPopClientAttrib=_glPopClientAttrib@0                               @213
     263   glPopMatrix=_glPopMatrix@0                                           @214
     264   glPopName=_glPopName@0                                               @215
     265   glPrioritizeTextures=_glPrioritizeTextures@12                        @216
     266   glPrioritizeTexturesEXT=_glPrioritizeTexturesEXT@12                  @465
     267   glPushAttrib=_glPushAttrib@4                                         @217
     268   glPushClientAttrib=_glPushClientAttrib@4                             @218
     269   glPushMatrix=_glPushMatrix@0                                         @219
     270   glPushName=_glPushName@4                                             @220
     271   glRasterPos2d=_glRasterPos2d@16                                      @221
     272   glRasterPos2dv=_glRasterPos2dv@4                                     @222
     273   glRasterPos2f=_glRasterPos2f@8                                       @223
     274   glRasterPos2fv=_glRasterPos2fv@4                                     @224
     275   glRasterPos2i=_glRasterPos2i@8                                       @225
     276   glRasterPos2iv=_glRasterPos2iv@4                                     @226
     277   glRasterPos2s=_glRasterPos2s@8                                       @227
     278   glRasterPos2sv=_glRasterPos2sv@4                                     @228
     279   glRasterPos3d=_glRasterPos3d@24                                      @229
     280   glRasterPos3dv=_glRasterPos3dv@4                                     @230
     281   glRasterPos3f=_glRasterPos3f@12                                      @231
     282   glRasterPos3fv=_glRasterPos3fv@4                                     @232
     283   glRasterPos3i=_glRasterPos3i@12                                      @233
     284   glRasterPos3iv=_glRasterPos3iv@4                                     @234
     285   glRasterPos3s=_glRasterPos3s@12                                      @235
     286   glRasterPos3sv=_glRasterPos3sv@4                                     @236
     287   glRasterPos4d=_glRasterPos4d@32                                      @237
     288   glRasterPos4dv=_glRasterPos4dv@4                                     @238
     289   glRasterPos4f=_glRasterPos4f@16                                      @239
     290   glRasterPos4fv=_glRasterPos4fv@4                                     @240
     291   glRasterPos4i=_glRasterPos4i@16                                      @241
     292   glRasterPos4iv=_glRasterPos4iv@4                                     @242
     293   glRasterPos4s=_glRasterPos4s@16                                      @243
     294   glRasterPos4sv=_glRasterPos4sv@4                                     @244
     295   glReadBuffer=_glReadBuffer@4                                         @245
     296   glReadPixels=_glReadPixels@28                                        @246
     297   glRectd=_glRectd@32                                                  @247
     298   glRectdv=_glRectdv@8                                                 @248
     299   glRectf=_glRectf@16                                                  @249
     300   glRectfv=_glRectfv@8                                                 @250
     301   glRecti=_glRecti@16                                                  @251
     302   glRectiv=_glRectiv@8                                                 @252
     303   glRects=_glRects@16                                                  @253
     304   glRectsv=_glRectsv@8                                                 @254
     305   glRenderMode=_glRenderMode@4                                         @255
     306   glResizeBuffersMESA=_glResizeBuffersMESA@0                           @433
     307   glRotated=_glRotated@32                                              @256
     308   glRotatef=_glRotatef@16                                              @257
     309   glScaled=_glScaled@24                                                @258
     310   glScalef=_glScalef@12                                                @259
     311   glScissor=_glScissor@16                                              @260
     312   glSelectBuffer=_glSelectBuffer@8                                     @261
     313   glShadeModel=_glShadeModel@4                                         @262
     314   glStencilFunc=_glStencilFunc@12                                      @263
     315   glStencilMask=_glStencilMask@4                                       @264
     316   glStencilOp=_glStencilOp@12                                          @265
     317   glTexCoord1d=_glTexCoord1d@8                                         @266
     318   glTexCoord1dv=_glTexCoord1dv@4                                       @267
     319   glTexCoord1f=_glTexCoord1f@4                                         @268
     320   glTexCoord1fv=_glTexCoord1fv@4                                       @269
     321   glTexCoord1i=_glTexCoord1i@4                                         @270
     322   glTexCoord1iv=_glTexCoord1iv@4                                       @271
     323   glTexCoord1s=_glTexCoord1s@4                                         @272
     324   glTexCoord1sv=_glTexCoord1sv@4                                       @273
     325   glTexCoord2d=_glTexCoord2d@16                                        @274
     326   glTexCoord2dv=_glTexCoord2dv@4                                       @275
     327   glTexCoord2f=_glTexCoord2f@8                                         @276
     328   glTexCoord2fv=_glTexCoord2fv@4                                       @277
     329   glTexCoord2i=_glTexCoord2i@8                                         @278
     330   glTexCoord2iv=_glTexCoord2iv@4                                       @279
     331   glTexCoord2s=_glTexCoord2s@8                                         @280
     332   glTexCoord2sv=_glTexCoord2sv@4                                       @281
     333   glTexCoord3d=_glTexCoord3d@24                                        @282
     334   glTexCoord3dv=_glTexCoord3dv@4                                       @283
     335   glTexCoord3f=_glTexCoord3f@12                                        @284
     336   glTexCoord3fv=_glTexCoord3fv@4                                       @285
     337   glTexCoord3i=_glTexCoord3i@12                                        @286
     338   glTexCoord3iv=_glTexCoord3iv@4                                       @287
     339   glTexCoord3s=_glTexCoord3s@12                                        @288
     340   glTexCoord3sv=_glTexCoord3sv@4                                       @289
     341   glTexCoord4d=_glTexCoord4d@32                                        @290
     342   glTexCoord4dv=_glTexCoord4dv@4                                       @291
     343   glTexCoord4f=_glTexCoord4f@16                                        @292
     344   glTexCoord4fv=_glTexCoord4fv@4                                       @293
     345   glTexCoord4i=_glTexCoord4i@16                                        @294
     346   glTexCoord4iv=_glTexCoord4iv@4                                       @295
     347   glTexCoord4s=_glTexCoord4s@16                                        @296
     348   glTexCoord4sv=_glTexCoord4sv@4                                       @297
     349   glTexCoordPointer=_glTexCoordPointer@16                              @298
     350   glTexCoordPointerEXT=_glTexCoordPointerEXT@20                        @434
     351   glTexEnvf=_glTexEnvf@12                                              @299
     352   glTexEnvfv=_glTexEnvfv@12                                            @300
     353   glTexEnvi=_glTexEnvi@12                                              @301
     354   glTexEnviv=_glTexEnviv@12                                            @302
     355   glTexGend=_glTexGend@16                                              @303
     356   glTexGendv=_glTexGendv@12                                            @304
     357   glTexGenf=_glTexGenf@12                                              @305
     358   glTexGenfv=_glTexGenfv@12                                            @306
     359   glTexGeni=_glTexGeni@12                                              @307
     360   glTexGeniv=_glTexGeniv@12                                            @308
     361   glTexImage1D=_glTexImage1D@32                                        @309
     362   glTexImage2D=_glTexImage2D@36                                        @310
     363   glTexImage3D=_glTexImage3D@40                                        @400
     364   glTexImage3DEXT=_glTexImage3DEXT@40                                  @435
     365   glTexParameterf=_glTexParameterf@12                                  @311
     366   glTexParameterfv=_glTexParameterfv@12                                @312
     367   glTexParameteri=_glTexParameteri@12                                  @313
     368   glTexParameteriv=_glTexParameteriv@12                                @314
     369   glTexSubImage1D=_glTexSubImage1D@28                                  @315
     370   glTexSubImage2D=_glTexSubImage2D@36                                  @316
     371   glTexSubImage3DEXT=_glTexSubImage3DEXT@44                            @436
     372   glTranslated=_glTranslated@24                                        @317
     373   glTranslatef=_glTranslatef@12                                        @318
     374   glVertex2d=_glVertex2d@16                                            @319
     375   glVertex2dv=_glVertex2dv@4                                           @320
     376   glVertex2f=_glVertex2f@8                                             @321
     377   glVertex2fv=_glVertex2fv@4                                           @322
     378   glVertex2i=_glVertex2i@8                                             @323
     379   glVertex2iv=_glVertex2iv@4                                           @324
     380   glVertex2s=_glVertex2s@8                                             @325
     381   glVertex2sv=_glVertex2sv@4                                           @326
     382   glVertex3d=_glVertex3d@24                                            @327
     383   glVertex3dv=_glVertex3dv@4                                           @328
     384   glVertex3f=_glVertex3f@12                                            @329
     385   glVertex3fv=_glVertex3fv@4                                           @330
     386   glVertex3i=_glVertex3i@12                                            @331
     387   glVertex3iv=_glVertex3iv@4                                           @332
     388   glVertex3s=_glVertex3s@12                                            @333
     389   glVertex3sv=_glVertex3sv@4                                           @334
     390   glVertex4d=_glVertex4d@32                                            @335
     391   glVertex4dv=_glVertex4dv@4                                           @336
     392   glVertex4f=_glVertex4f@16                                            @337
     393   glVertex4fv=_glVertex4fv@4                                           @338
     394   glVertex4i=_glVertex4i@16                                            @339
     395   glVertex4iv=_glVertex4iv@4                                           @340
     396   glVertex4s=_glVertex4s@16                                            @341
     397   glVertex4sv=_glVertex4sv@4                                           @342
     398   glVertexPointer=_glVertexPointer@16                                  @343
     399   glVertexPointerEXT=_glVertexPointerEXT@20                            @437
     400   glViewport=_glViewport@16                                            @344
     401   glWindowPos2dMESA=_glWindowPos2dMESA@16                              @438
     402   glWindowPos2dvMESA=_glWindowPos2dvMESA@4                             @439
     403   glWindowPos2fMESA=_glWindowPos2fMESA@8                               @440
     404   glWindowPos2fvMESA=_glWindowPos2fvMESA@4                             @441
     405   glWindowPos2iMESA=_glWindowPos2iMESA@8                               @442
     406   glWindowPos2ivMESA=_glWindowPos2ivMESA@4                             @443
     407   glWindowPos2sMESA=_glWindowPos2sMESA@8                               @444
     408   glWindowPos2svMESA=_glWindowPos2svMESA@4                             @445
     409   glWindowPos3dMESA=_glWindowPos3dMESA@24                              @446
     410   glWindowPos3dvMESA=_glWindowPos3dvMESA@4                             @447
     411   glWindowPos3fMESA=_glWindowPos3fMESA@12                              @448
     412   glWindowPos3fvMESA=_glWindowPos3fvMESA@4                             @449
     413   glWindowPos3iMESA=_glWindowPos3iMESA@12                              @450
     414   glWindowPos3ivMESA=_glWindowPos3ivMESA@4                             @451
     415   glWindowPos3sMESA=_glWindowPos3sMESA@12                              @452
     416   glWindowPos3svMESA=_glWindowPos3svMESA@4                             @453
     417   glWindowPos4dMESA=_glWindowPos4dMESA@32                              @454
     418   glWindowPos4dvMESA=_glWindowPos4dvMESA@4                             @455
     419   glWindowPos4fMESA=_glWindowPos4fMESA@16                              @456
     420   glWindowPos4fvMESA=_glWindowPos4fvMESA@4                             @457
     421   glWindowPos4iMESA=_glWindowPos4iMESA@16                              @458
     422   glWindowPos4ivMESA=_glWindowPos4ivMESA@4                             @459
     423   glWindowPos4sMESA=_glWindowPos4sMESA@16                              @460
     424   glWindowPos4svMESA=_glWindowPos4svMESA@4                             @461
     425   wglChoosePixelFormat=_wglChoosePixelFormat@8                         @345
     426   wglCopyContext=_wglCopyContext@12                                    @346
     427   wglCreateContext=_wglCreateContext@4                                 @347
     428   wglCreateLayerContext=_wglCreateLayerContext@8                       @348
     429   wglDeleteContext=_wglDeleteContext@4                                 @349
     430   wglDescribeLayerPlane=_wglDescribeLayerPlane@20                      @350
     431   wglDescribePixelFormat=_wglDescribePixelFormat@16                    @351
     432   wglGetCurrentContext=_wglGetCurrentContext@0                         @352
     433   wglGetCurrentDC=_wglGetCurrentDC@0                                   @353
     434;  wglGetDefaultProcAddress                                             @354
     435   wglGetLayerPaletteEntries=_wglGetLayerPaletteEntries@20              @355
     436   wglGetPixelFormat=_wglGetPixelFormat@4                               @356
     437   wglGetProcAddress=_wglGetProcAddress@4                               @357
     438   wglMakeCurrent=_wglMakeCurrent@8                                     @358
     439   wglRealizeLayerPalette=_wglRealizeLayerPalette@12                    @359
     440   wglSetLayerPaletteEntries=_wglSetLayerPaletteEntries@20              @360
     441   wglSetPixelFormat=_wglSetPixelFormat@12                              @361
     442   wglShareLists=_wglShareLists@8                                       @362
     443   wglSwapBuffers=_wglSwapBuffers@4                                     @363
     444   wglSwapLayerBuffers=_wglSwapLayerBuffers@8                           @364
     445   wglUseFontBitmapsA=_wglUseFontBitmapsA@16                            @365
     446   wglUseFontBitmapsW=_wglUseFontBitmapsW@16                            @366
     447   wglUseFontOutlinesA=_wglUseFontOutlinesA@32                          @367
     448   wglUseFontOutlinesW=_wglUseFontOutlinesW@32                          @368
     449
  • trunk/src/opengl/mesa/accum.c

    r2938 r2962  
    1 /* $Id: accum.c,v 1.1 2000-02-29 00:49:57 sandervl Exp $ */
     1/* $Id: accum.c,v 1.2 2000-03-01 18:49:22 jeroen Exp $ */
    22
    33/*
     
    4040#endif
    4141#include "accum.h"
     42#include "types.h"
    4243#include "context.h"
    4344#include "macros.h"
    4445#include "masking.h"
    4546#include "span.h"
    46 #include "types.h"
    4747#endif
    4848
     
    204204      case GL_ADD:
    205205         {
    206             const GLaccum intVal = (GLaccum) (value * acc_scale);
    207             GLuint j;
     206            const GLaccum intVal = (GLaccum) (value * acc_scale);
     207            GLuint j;
    208208            /* Leave optimized accum buffer mode */
    209209            if (ctx->IntegerAccumMode)
    210210               rescale_accum(ctx);
    211             for (j = 0; j < height; j++) {
    212                GLaccum * acc = ctx->Buffer->Accum + ypos * width4 + 4 * xpos;
     211            for (j = 0; j < height; j++) {
     212               GLaccum * acc = ctx->Buffer->Accum + ypos * width4 + 4 * xpos;
    213213               GLuint i;
    214                for (i = 0; i < width4; i++) {
     214               for (i = 0; i < width4; i++) {
    215215                  acc[i] += intVal;
    216                }
    217                ypos++;
    218             }
    219         }
    220         break;
     216               }
     217               ypos++;
     218            }
     219        }
     220        break;
    221221
    222222      case GL_MULT:
    223         {
    224             GLuint j;
     223        {
     224            GLuint j;
    225225            /* Leave optimized accum buffer mode */
    226226            if (ctx->IntegerAccumMode)
    227227               rescale_accum(ctx);
    228             for (j = 0; j < height; j++) {
    229                GLaccum *acc = ctx->Buffer->Accum + ypos * width4 + 4 * xpos;
     228            for (j = 0; j < height; j++) {
     229               GLaccum *acc = ctx->Buffer->Accum + ypos * width4 + 4 * xpos;
    230230               GLuint i;
    231                for (i = 0; i < width4; i++) {
     231               for (i = 0; i < width4; i++) {
    232232                  acc[i] = (GLaccum) ( (GLfloat) acc[i] * value );
    233                }
    234                ypos++;
    235             }
    236         }
    237         break;
     233               }
     234               ypos++;
     235            }
     236        }
     237        break;
    238238
    239239      case GL_ACCUM:
     
    287287         }
    288288         (void) (*ctx->Driver.SetBuffer)( ctx, ctx->Color.DriverDrawBuffer );
    289         break;
     289        break;
    290290
    291291      case GL_LOAD:
     
    470470      /* try to alloc accumulation buffer */
    471471      ctx->Buffer->Accum = (GLaccum *)
    472                            MALLOC( buffersize * 4 * sizeof(GLaccum) );
     472                           MALLOC( buffersize * 4 * sizeof(GLaccum) );
    473473   }
    474474
    475475   if (ctx->Buffer->Accum) {
    476476      if (ctx->Scissor.Enabled) {
    477         /* Limit clear to scissor box */
    478         GLaccum r, g, b, a;
    479         GLint i, j;
     477        /* Limit clear to scissor box */
     478        GLaccum r, g, b, a;
     479        GLint i, j;
    480480         GLint width, height;
    481481         GLaccum *row;
    482         r = (GLaccum) (ctx->Accum.ClearColor[0] * acc_scale);
    483         g = (GLaccum) (ctx->Accum.ClearColor[1] * acc_scale);
    484         b = (GLaccum) (ctx->Accum.ClearColor[2] * acc_scale);
    485         a = (GLaccum) (ctx->Accum.ClearColor[3] * acc_scale);
     482        r = (GLaccum) (ctx->Accum.ClearColor[0] * acc_scale);
     483        g = (GLaccum) (ctx->Accum.ClearColor[1] * acc_scale);
     484        b = (GLaccum) (ctx->Accum.ClearColor[2] * acc_scale);
     485        a = (GLaccum) (ctx->Accum.ClearColor[3] * acc_scale);
    486486         /* size of region to clear */
    487487         width = 4 * (ctx->Buffer->Xmax - ctx->Buffer->Xmin + 1);
     
    497497               row[i+2] = b;
    498498               row[i+3] = a;
    499             }
     499            }
    500500            row += 4 * ctx->Buffer->Width;
    501         }
     501        }
    502502      }
    503503      else {
    504         /* clear whole buffer */
    505         if (ctx->Accum.ClearColor[0]==0.0 &&
    506              ctx->Accum.ClearColor[1]==0.0 &&
    507              ctx->Accum.ClearColor[2]==0.0 &&
    508              ctx->Accum.ClearColor[3]==0.0) {
    509             /* Black */
    510             MEMSET( ctx->Buffer->Accum, 0, buffersize * 4 * sizeof(GLaccum) );
    511         }
    512         else {
    513             /* Not black */
    514             GLaccum *acc, r, g, b, a;
    515             GLuint i;
    516 
    517             acc = ctx->Buffer->Accum;
    518             r = (GLaccum) (ctx->Accum.ClearColor[0] * acc_scale);
    519             g = (GLaccum) (ctx->Accum.ClearColor[1] * acc_scale);
    520             b = (GLaccum) (ctx->Accum.ClearColor[2] * acc_scale);
    521             a = (GLaccum) (ctx->Accum.ClearColor[3] * acc_scale);
    522             for (i=0;i<buffersize;i++) {
    523                *acc++ = r;
    524                *acc++ = g;
    525                *acc++ = b;
    526                *acc++ = a;
    527             }
    528         }
     504        /* clear whole buffer */
     505        if (ctx->Accum.ClearColor[0]==0.0 &&
     506             ctx->Accum.ClearColor[1]==0.0 &&
     507             ctx->Accum.ClearColor[2]==0.0 &&
     508             ctx->Accum.ClearColor[3]==0.0) {
     509            /* Black */
     510            MEMSET( ctx->Buffer->Accum, 0, buffersize * 4 * sizeof(GLaccum) );
     511        }
     512        else {
     513            /* Not black */
     514            GLaccum *acc, r, g, b, a;
     515            GLuint i;
     516
     517            acc = ctx->Buffer->Accum;
     518            r = (GLaccum) (ctx->Accum.ClearColor[0] * acc_scale);
     519            g = (GLaccum) (ctx->Accum.ClearColor[1] * acc_scale);
     520            b = (GLaccum) (ctx->Accum.ClearColor[2] * acc_scale);
     521            a = (GLaccum) (ctx->Accum.ClearColor[3] * acc_scale);
     522            for (i=0;i<buffersize;i++) {
     523               *acc++ = r;
     524               *acc++ = g;
     525               *acc++ = b;
     526               *acc++ = a;
     527            }
     528        }
    529529      }
    530530
  • trunk/src/opengl/mesa/alpha.c

    r2938 r2962  
    1 /* $Id: alpha.c,v 1.1 2000-02-29 00:49:57 sandervl Exp $ */
     1/* $Id: alpha.c,v 1.2 2000-03-01 18:49:22 jeroen Exp $ */
    22
    33/*
     
    3636#endif
    3737#include "alpha.h"
     38#include "types.h"
    3839#include "context.h"
    39 #include "types.h"
    4040#include "macros.h"
    4141#include "mmath.h"
     
    9595      case GL_LESS:
    9696         for (i=0;i<n;i++) {
    97             mask[i] &= (rgba[i][ACOMP] < ref);
    98         }
    99         return 1;
     97            mask[i] &= (rgba[i][ACOMP] < ref);
     98        }
     99        return 1;
    100100      case GL_LEQUAL:
    101101         for (i=0;i<n;i++) {
    102             mask[i] &= (rgba[i][ACOMP] <= ref);
    103         }
    104         return 1;
     102            mask[i] &= (rgba[i][ACOMP] <= ref);
     103        }
     104        return 1;
    105105      case GL_GEQUAL:
    106106         for (i=0;i<n;i++) {
    107             mask[i] &= (rgba[i][ACOMP] >= ref);
    108         }
    109         return 1;
     107            mask[i] &= (rgba[i][ACOMP] >= ref);
     108        }
     109        return 1;
    110110      case GL_GREATER:
    111111         for (i=0;i<n;i++) {
    112             mask[i] &= (rgba[i][ACOMP] > ref);
    113         }
    114         return 1;
     112            mask[i] &= (rgba[i][ACOMP] > ref);
     113        }
     114        return 1;
    115115      case GL_NOTEQUAL:
    116116         for (i=0;i<n;i++) {
    117             mask[i] &= (rgba[i][ACOMP] != ref);
    118         }
    119         return 1;
     117            mask[i] &= (rgba[i][ACOMP] != ref);
     118        }
     119        return 1;
    120120      case GL_EQUAL:
    121121         for (i=0;i<n;i++) {
    122             mask[i] &= (rgba[i][ACOMP] == ref);
    123         }
    124         return 1;
     122            mask[i] &= (rgba[i][ACOMP] == ref);
     123        }
     124        return 1;
    125125      case GL_ALWAYS:
    126         /* do nothing */
    127         return 1;
     126        /* do nothing */
     127        return 1;
    128128      case GL_NEVER:
    129129         /* caller should check for zero! */
    130         return 0;
     130        return 0;
    131131      default:
    132         gl_problem( ctx, "Invalid alpha test in gl_alpha_test" );
     132        gl_problem( ctx, "Invalid alpha test in gl_alpha_test" );
    133133         return 0;
    134134   }
  • trunk/src/opengl/mesa/alphabuf.c

    r2938 r2962  
    1 /* $Id: alphabuf.c,v 1.1 2000-02-29 00:49:57 sandervl Exp $ */
     1/* $Id: alphabuf.c,v 1.2 2000-03-01 18:49:22 jeroen Exp $ */
    22
    33/*
     
    3939#include "all.h"
    4040#else
     41#include "types.h"
    4142#include "alphabuf.h"
    4243#include "context.h"
    4344#include "macros.h"
    44 #include "types.h"
    4545#endif
    4646
  • trunk/src/opengl/mesa/api2.c

    r2938 r2962  
    1 /* $Id: api2.c,v 1.1 2000-02-29 00:49:58 sandervl Exp $ */
     1/* $Id: api2.c,v 1.2 2000-03-01 18:49:23 jeroen Exp $ */
    22
    33/*
     
    3737#endif
    3838#include "api.h"
     39#include "types.h"
    3940#include "context.h"
    4041#include "varray.h"
     
    4344#include "matrix.h"
    4445#include "teximage.h"
    45 #include "types.h"
    4646#include "vb.h"
    4747#endif
     
    663663}
    664664
    665 #define TEXCOORD1(s)                            \
    666 {                                               \
    667    GLuint count;                                \
    668    GLfloat *tc;                                 \
    669    GET_IMMEDIATE;                               \
    670    count = IM->Count;                           \
    671    IM->Flag[count] |= VERT_TEX0_1;              \
    672    tc = IM->TexCoord[0][count];                 \
    673    ASSIGN_4V(tc,s,0,0,1);                       \
    674 }
    675 
    676 #define TEXCOORD2(s,t)                          \
    677 {                                               \
    678    GLuint count;                                \
    679    GLfloat *tc;                                 \
    680    GET_IMMEDIATE;                               \
    681    count = IM->Count;                           \
    682    IM->Flag[count] |= VERT_TEX0_12;             \
    683    tc = IM->TexCoord[0][count];                 \
    684    ASSIGN_4V(tc, s,t,0,1);                      \
    685 }
    686 
    687 #define TEXCOORD3(s,t,u)                        \
    688 {                                               \
    689    GLuint count;                                \
    690    GLfloat *tc;                                 \
    691    GET_IMMEDIATE;                               \
    692    count = IM->Count;                           \
    693    IM->Flag[count] |= VERT_TEX0_123;            \
    694    tc = IM->TexCoord[0][count];                 \
    695    ASSIGN_4V(tc, s,t,u,1);                      \
    696 }
    697 
    698 #define TEXCOORD4(s,t,u,v)                      \
    699 {                                               \
    700    GLuint count;                                \
    701    GLfloat *tc;                                 \
    702    GET_IMMEDIATE;                               \
    703    count = IM->Count;                           \
    704    IM->Flag[count] |= VERT_TEX0_1234;           \
    705    tc = IM->TexCoord[0][count];                 \
    706    ASSIGN_4V(tc, s,t,u,v);                      \
     665#define TEXCOORD1(s)                            \
     666{                                               \
     667   GLuint count;                                \
     668   GLfloat *tc;                                 \
     669   GET_IMMEDIATE;                               \
     670   count = IM->Count;                           \
     671   IM->Flag[count] |= VERT_TEX0_1;              \
     672   tc = IM->TexCoord[0][count];                 \
     673   ASSIGN_4V(tc,s,0,0,1);                       \
     674}
     675
     676#define TEXCOORD2(s,t)                          \
     677{                                               \
     678   GLuint count;                                \
     679   GLfloat *tc;                                 \
     680   GET_IMMEDIATE;                               \
     681   count = IM->Count;                           \
     682   IM->Flag[count] |= VERT_TEX0_12;             \
     683   tc = IM->TexCoord[0][count];                 \
     684   ASSIGN_4V(tc, s,t,0,1);                      \
     685}
     686
     687#define TEXCOORD3(s,t,u)                        \
     688{                                               \
     689   GLuint count;                                \
     690   GLfloat *tc;                                 \
     691   GET_IMMEDIATE;                               \
     692   count = IM->Count;                           \
     693   IM->Flag[count] |= VERT_TEX0_123;            \
     694   tc = IM->TexCoord[0][count];                 \
     695   ASSIGN_4V(tc, s,t,u,1);                      \
     696}
     697
     698#define TEXCOORD4(s,t,u,v)                      \
     699{                                               \
     700   GLuint count;                                \
     701   GLfloat *tc;                                 \
     702   GET_IMMEDIATE;                               \
     703   count = IM->Count;                           \
     704   IM->Flag[count] |= VERT_TEX0_1234;           \
     705   tc = IM->TexCoord[0][count];                 \
     706   ASSIGN_4V(tc, s,t,u,v);                      \
    707707}
    708708
     
    11461146 *     the incoming vertices.
    11471147 */
    1148 #define VERTEX2(IM, x,y)                        \
    1149 {                                               \
    1150    GLuint count = IM->Count++;                  \
    1151    GLfloat *dest = IM->Obj[count];              \
    1152    IM->Flag[count] |= VERT_OBJ_2;               \
    1153    ASSIGN_4V(dest, x, y, 0, 1);                 \
    1154    if (dest == IM->Obj[VB_MAX-1])               \
    1155       IM->maybe_transform_vb( IM );             \
    1156 }
    1157 
    1158 #define VERTEX3(IM,x,y,z)                       \
    1159 {                                               \
    1160    GLuint count = IM->Count++;                  \
    1161    GLfloat *dest = IM->Obj[count];              \
    1162    IM->Flag[count] |= VERT_OBJ_23;              \
    1163    ASSIGN_4V(dest, x, y, z, 1);                 \
    1164    if (dest == IM->Obj[VB_MAX-1])               \
    1165       IM->maybe_transform_vb( IM );             \
    1166 }
    1167 
    1168 #define VERTEX4(IM, x,y,z,w)                    \
    1169 {                                               \
    1170    GLuint count = IM->Count++;                  \
    1171    GLfloat *dest = IM->Obj[count];              \
    1172    IM->Flag[count] |= VERT_OBJ_234;             \
    1173    ASSIGN_4V(dest, x, y, z, w);                 \
    1174    if (dest == IM->Obj[VB_MAX-1])               \
    1175       IM->maybe_transform_vb( IM );             \
     1148#define VERTEX2(IM, x,y)                        \
     1149{                                               \
     1150   GLuint count = IM->Count++;                  \
     1151   GLfloat *dest = IM->Obj[count];              \
     1152   IM->Flag[count] |= VERT_OBJ_2;               \
     1153   ASSIGN_4V(dest, x, y, 0, 1);                 \
     1154   if (dest == IM->Obj[VB_MAX-1])               \
     1155      IM->maybe_transform_vb( IM );             \
     1156}
     1157
     1158#define VERTEX3(IM,x,y,z)                       \
     1159{                                               \
     1160   GLuint count = IM->Count++;                  \
     1161   GLfloat *dest = IM->Obj[count];              \
     1162   IM->Flag[count] |= VERT_OBJ_23;              \
     1163   ASSIGN_4V(dest, x, y, z, 1);                 \
     1164   if (dest == IM->Obj[VB_MAX-1])               \
     1165      IM->maybe_transform_vb( IM );             \
     1166}
     1167
     1168#define VERTEX4(IM, x,y,z,w)                    \
     1169{                                               \
     1170   GLuint count = IM->Count++;                  \
     1171   GLfloat *dest = IM->Obj[count];              \
     1172   IM->Flag[count] |= VERT_OBJ_234;             \
     1173   ASSIGN_4V(dest, x, y, z, w);                 \
     1174   if (dest == IM->Obj[VB_MAX-1])               \
     1175      IM->maybe_transform_vb( IM );             \
    11761176}
    11771177
     
    13241324   GET_IMMEDIATE;
    13251325   VERTEX4( IM,
    1326             (GLfloat) v[0], (GLfloat) v[1],
    1327             (GLfloat) v[2], (GLfloat) v[3] );
     1326            (GLfloat) v[0], (GLfloat) v[1],
     1327            (GLfloat) v[2], (GLfloat) v[3] );
    13281328}
    13291329
     
    13401340   GET_IMMEDIATE;
    13411341   VERTEX4( IM,
    1342             (GLfloat) v[0], (GLfloat) v[1],
    1343             (GLfloat) v[2], (GLfloat) v[3] );
     1342            (GLfloat) v[0], (GLfloat) v[1],
     1343            (GLfloat) v[2], (GLfloat) v[3] );
    13441344}
    13451345
     
    13491349   GET_IMMEDIATE;
    13501350   VERTEX4( IM,
    1351             (GLfloat) v[0], (GLfloat) v[1],
    1352             (GLfloat) v[2], (GLfloat) v[3] );
     1351            (GLfloat) v[0], (GLfloat) v[1],
     1352            (GLfloat) v[2], (GLfloat) v[3] );
    13531353}
    13541354
  • trunk/src/opengl/mesa/apiext.c

    r2938 r2962  
    1 /* $Id: apiext.c,v 1.1 2000-02-29 00:49:58 sandervl Exp $ */
     1/* $Id: apiext.c,v 1.2 2000-03-01 18:49:23 jeroen Exp $ */
    22
    33/*
     
    3737#endif
    3838#include "api.h"
     39#include "types.h"
    3940#include "context.h"
    4041#include "cva.h"
    4142#include "image.h"
    42 #include "types.h"
    4343#include "varray.h"
    4444#endif
     
    427427 */
    428428
    429 #define TEXCOORD1(s)                            \
    430 {                                               \
    431    GLuint count;                                \
    432    GLfloat *tc;                                 \
    433    count = IM->Count;                           \
    434    IM->Flag[count] |= IM->TF1[texSet];          \
    435    tc = IM->TexCoordPtr[texSet][count];         \
    436    ASSIGN_4V(tc, s,0,0,1);                      \
    437 }
    438 
    439 
    440 #define TEXCOORD2(s,t)                          \
    441 {                                               \
    442    GLuint count;                                \
    443    GLfloat *tc;                                 \
    444    count = IM->Count;                           \
    445    IM->Flag[count] |= IM->TF2[texSet];          \
    446    tc = IM->TexCoordPtr[texSet][count];         \
    447    ASSIGN_4V(tc, s,t,0,1);                      \
    448 }
    449 
    450 #define TEXCOORD3(s,t,u)                        \
    451 {                                               \
    452    GLuint count;                                \
    453    GLfloat *tc;                                 \
    454    count = IM->Count;                           \
    455    IM->Flag[count] |= IM->TF3[texSet];          \
    456    tc = IM->TexCoordPtr[texSet][count];         \
    457    ASSIGN_4V(tc, s,t,u,1);                      \
    458 }
    459 
    460 #define TEXCOORD4(s,t,u,v)                      \
    461 {                                               \
    462    GLuint count;                                \
    463    GLfloat *tc;                                 \
    464    count = IM->Count;                           \
    465    IM->Flag[count] |= IM->TF4[texSet];          \
    466    tc = IM->TexCoordPtr[texSet][count];         \
    467    ASSIGN_4V(tc, s,t,u,v);                      \
     429#define TEXCOORD1(s)                            \
     430{                                               \
     431   GLuint count;                                \
     432   GLfloat *tc;                                 \
     433   count = IM->Count;                           \
     434   IM->Flag[count] |= IM->TF1[texSet];          \
     435   tc = IM->TexCoordPtr[texSet][count];         \
     436   ASSIGN_4V(tc, s,0,0,1);                      \
     437}
     438
     439
     440#define TEXCOORD2(s,t)                          \
     441{                                               \
     442   GLuint count;                                \
     443   GLfloat *tc;                                 \
     444   count = IM->Count;                           \
     445   IM->Flag[count] |= IM->TF2[texSet];          \
     446   tc = IM->TexCoordPtr[texSet][count];         \
     447   ASSIGN_4V(tc, s,t,0,1);                      \
     448}
     449
     450#define TEXCOORD3(s,t,u)                        \
     451{                                               \
     452   GLuint count;                                \
     453   GLfloat *tc;                                 \
     454   count = IM->Count;                           \
     455   IM->Flag[count] |= IM->TF3[texSet];          \
     456   tc = IM->TexCoordPtr[texSet][count];         \
     457   ASSIGN_4V(tc, s,t,u,1);                      \
     458}
     459
     460#define TEXCOORD4(s,t,u,v)                      \
     461{                                               \
     462   GLuint count;                                \
     463   GLfloat *tc;                                 \
     464   count = IM->Count;                           \
     465   IM->Flag[count] |= IM->TF4[texSet];          \
     466   tc = IM->TexCoordPtr[texSet][count];         \
     467   ASSIGN_4V(tc, s,t,u,v);                      \
    468468}
    469469
     
    480480 */
    481481
    482 #define CHECK_ARB                                                       \
    483    if (target >= GL_TEXTURE0_ARB && target <= GL_TEXTURE1_ARB) {        \
    484       texSet = target - GL_TEXTURE0_ARB;                                \
    485    }                                                                    \
    486    else {                                                               \
    487       gl_error(IM->backref, GL_INVALID_ENUM, "glMultiTexCoord(target)");        \
    488       return;                                                           \
     482#define CHECK_ARB                                                       \
     483   if (target >= GL_TEXTURE0_ARB && target <= GL_TEXTURE1_ARB) {        \
     484      texSet = target - GL_TEXTURE0_ARB;                                \
     485   }                                                                    \
     486   else {                                                               \
     487      gl_error(IM->backref, GL_INVALID_ENUM, "glMultiTexCoord(target)");        \
     488      return;                                                           \
    489489   }
    490490
     
    883883void GLAPIENTRY
    884884glHistogram(CTX_ARG GLenum target, GLsizei width, GLenum internalFormat,
    885              GLboolean sink )
     885             GLboolean sink )
    886886{
    887887   GET_CONTEXT;
     
    907907void GLAPIENTRY
    908908glGetHistogram(CTX_ARG GLenum target, GLboolean reset, GLenum format,
    909                 GLenum type, GLvoid *values )
     909                GLenum type, GLvoid *values )
    910910{
    911911   GET_CONTEXT;
     
    10071007void GLAPIENTRY
    10081008glConvolutionFilter1D(CTX_ARG GLenum target, GLenum internalFormat, GLsizei width,
    1009                        GLenum format, GLenum type, const GLvoid *image )
     1009                       GLenum format, GLenum type, const GLvoid *image )
    10101010{
    10111011   GET_CONTEXT;
     
    10231023void GLAPIENTRY
    10241024glConvolutionFilter2D(CTX_ARG GLenum target, GLenum internalFormat, GLsizei width,
    1025                        GLsizei height, GLenum format, GLenum type,
    1026                        const GLvoid *image )
     1025                       GLsizei height, GLenum format, GLenum type,
     1026                       const GLvoid *image )
    10271027{
    10281028   GET_CONTEXT;
     
    10891089void GLAPIENTRY
    10901090glCopyConvolutionFilter1D(CTX_ARG GLenum target, GLenum internalFormat,
    1091                            GLint x, GLint y, GLsizei width )
     1091                           GLint x, GLint y, GLsizei width )
    10921092{
    10931093   GET_CONTEXT;
     
    11041104void GLAPIENTRY
    11051105glCopyConvolutionFilter2D(CTX_ARG GLenum target, GLenum internalFormat,
    1106                            GLint x, GLint y, GLsizei width, GLsizei height)
     1106                           GLint x, GLint y, GLsizei width, GLsizei height)
    11071107{
    11081108   GET_CONTEXT;
     
    11201120void GLAPIENTRY
    11211121glGetConvolutionFilter(CTX_ARG GLenum target, GLenum format,
    1122                         GLenum type, GLvoid *image )
     1122                        GLenum type, GLvoid *image )
    11231123{
    11241124   GET_CONTEXT;
     
    11581158void GLAPIENTRY
    11591159glSeparableFilter2D(CTX_ARG GLenum target, GLenum internalFormat,
    1160                      GLsizei width, GLsizei height, GLenum format,
    1161                      GLenum type, const GLvoid *row, const GLvoid *column )
     1160                     GLsizei width, GLsizei height, GLenum format,
     1161                     GLenum type, const GLvoid *row, const GLvoid *column )
    11621162{
    11631163   GET_CONTEXT;
     
    11781178void GLAPIENTRY
    11791179glGetSeparableFilter(CTX_ARG GLenum target, GLenum format, GLenum type,
    1180                       GLvoid *row, GLvoid *column, GLvoid *span )
     1180                      GLvoid *row, GLvoid *column, GLvoid *span )
    11811181{
    11821182   GET_CONTEXT;
     
    11941194void GLAPIENTRY
    11951195glCopyColorSubTable(CTX_ARG GLenum target, GLsizei start, GLint x, GLint y,
    1196                      GLsizei width )
     1196                     GLsizei width )
    11971197{
    11981198   GET_CONTEXT;
     
    12091209void GLAPIENTRY
    12101210glCopyColorTable(CTX_ARG GLenum target, GLenum internalFormat,
    1211                   GLint x, GLint y, GLsizei width )
     1211                  GLint x, GLint y, GLsizei width )
    12121212{
    12131213   GET_CONTEXT;
  • trunk/src/opengl/mesa/blend.c

    r2938 r2962  
    1 /* $Id: blend.c,v 1.1 2000-02-29 00:49:59 sandervl Exp $ */
     1/* $Id: blend.c,v 1.2 2000-03-01 18:49:23 jeroen Exp $ */
    22
    33/*
     
    275275 * Common transparency blending mode.
    276276 */
    277 static void blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
     277static void __cdecl blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
    278278                                GLubyte rgba[][4], CONST GLubyte dest[][4] )
    279279{
     
    320320 * Add src and dest.
    321321 */
    322 static void blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[],
     322static void __cdecl blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[],
    323323                       GLubyte rgba[][4], CONST GLubyte dest[][4] )
    324324{
     
    348348 * Blend min function  (for GL_EXT_blend_minmax)
    349349 */
    350 static void blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[],
     350static void __cdecl blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[],
    351351                       GLubyte rgba[][4], CONST GLubyte dest[][4] )
    352352{
     
    370370 * Blend max function  (for GL_EXT_blend_minmax)
    371371 */
    372 static void blend_max( GLcontext *ctx, GLuint n, const GLubyte mask[],
     372static void __cdecl blend_max( GLcontext *ctx, GLuint n, const GLubyte mask[],
    373373                       GLubyte rgba[][4], CONST GLubyte dest[][4] )
    374374{
     
    392392 * Modulate:  result = src * dest
    393393 */
    394 static void blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[],
     394static void __cdecl blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[],
    395395                            GLubyte rgba[][4], CONST GLubyte dest[][4] )
    396396{
     
    421421 * Input:  dest - the pixels from the dest color buffer
    422422 */
    423 static void blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
     423static void __cdecl blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
    424424                           GLubyte rgba[][4], CONST GLubyte dest[][4] )
    425425{
     
    481481               break;
    482482            case GL_SRC_ALPHA_SATURATE:
     483#ifdef __WIN32OS2__
     484               if(As < 255 - Ad) {
     485#else
    483486               if (As < 1.0F - (GLfloat) Ad * ascale) {
     487#endif
    484488                  sR = sG = sB = (GLfloat) As * ascale;
    485489               }
  • trunk/src/opengl/mesa/clip.c

    r2938 r2962  
    1 /* $Id: clip.c,v 1.1 2000-02-29 00:49:59 sandervl Exp $ */
     1/* $Id: clip.c,v 1.2 2000-03-01 18:49:24 jeroen Exp $ */
    22
    33/*
     
    4040#endif
    4141#include "clip.h"
     42#include "types.h"
    4243#include "context.h"
    4344#include "macros.h"
    4445#include "matrix.h"
    4546#include "mmath.h"
    46 #include "types.h"
    4747#include "vb.h"
    4848#include "xform.h"
  • trunk/src/opengl/mesa/clip_tmp.h

    r2938 r2962  
    1 /* $Id: clip_tmp.h,v 1.1 2000-02-29 00:48:26 sandervl Exp $ */
     1/* $Id: clip_tmp.h,v 1.2 2000-03-01 18:49:24 jeroen Exp $ */
    22
    33/*
     
    3636 * and an asm implementation needn't replicate that behaviour.
    3737 */
    38 static GLvector4f * TAG(cliptest_points4)( GLvector4f *clip_vec,
    39                                            GLvector4f *proj_vec,
    40                                            GLubyte clipMask[],
    41                                            GLubyte *orMask,
    42                                            GLubyte *andMask )
     38static GLvector4f * __cdecl TAG(cliptest_points4)( GLvector4f *clip_vec,
     39                                           GLvector4f *proj_vec,
     40                                           GLubyte clipMask[],
     41                                           GLubyte *orMask,
     42                                           GLubyte *andMask )
    4343{
    4444   const GLuint stride = clip_vec->stride;
     
    7676      clipMask[i] = mask;
    7777      if (mask) {
    78         c++;
    79         tmpAndMask &= mask;
    80         tmpOrMask |= mask;
    81          vProj[i][0] = 0;       /* no longer required? */
    82         vProj[i][1] = 0;
    83         vProj[i][2] = 0;
    84         vProj[i][3] = 1;
     78        c++;
     79        tmpAndMask &= mask;
     80        tmpOrMask |= mask;
     81         vProj[i][0] = 0;       /* no longer required? */
     82        vProj[i][1] = 0;
     83        vProj[i][2] = 0;
     84        vProj[i][3] = 1;
    8585      } else {
    86          GLfloat oow = 1.0F / cw;       
    87         vProj[i][3] = oow;
    88         vProj[i][0] = cx * oow;
    89         vProj[i][1] = cy * oow;
    90         vProj[i][2] = cz * oow;
    91       } 
     86         GLfloat oow = 1.0F / cw;
     87        vProj[i][3] = oow;
     88        vProj[i][0] = cx * oow;
     89        vProj[i][1] = cy * oow;
     90        vProj[i][2] = cz * oow;
     91      }
    9292   }
    9393
     
    101101}
    102102
    103 static GLvector4f * TAG(cliptest_points3)( GLvector4f *clip_vec,
    104                                            GLvector4f *proj_vec,
    105                                            GLubyte clipMask[],
    106                                            GLubyte *orMask,
    107                                            GLubyte *andMask )
     103static GLvector4f * __cdecl TAG(cliptest_points3)( GLvector4f *clip_vec,
     104                                           GLvector4f *proj_vec,
     105                                           GLubyte clipMask[],
     106                                           GLubyte *orMask,
     107                                           GLubyte *andMask )
    108108{
    109109   const GLuint stride = clip_vec->stride;
     
    135135}
    136136
    137 static GLvector4f * TAG(cliptest_points2)( GLvector4f *clip_vec,
    138                                            GLvector4f *proj_vec,
    139                                            GLubyte clipMask[],
    140                                            GLubyte *orMask,
    141                                            GLubyte *andMask )
     137static GLvector4f * __cdecl TAG(cliptest_points2)( GLvector4f *clip_vec,
     138                                           GLvector4f *proj_vec,
     139                                           GLubyte clipMask[],
     140                                           GLubyte *orMask,
     141                                           GLubyte *andMask )
    142142{
    143143   const GLuint stride = clip_vec->stride;
  • trunk/src/opengl/mesa/colors.h

    r2938 r2962  
    1 /* $Id: colors.h,v 1.1 2000-02-29 00:48:26 sandervl Exp $ */
     1/* $Id: colors.h,v 1.2 2000-03-01 18:49:24 jeroen Exp $ */
    22
    33/*      File name       :       colors.h
     
    2727/*
    2828 * $Log: colors.h,v $
    29  * Revision 1.1  2000-02-29 00:48:26  sandervl
    30  * created
     29 * Revision 1.2  2000-03-01 18:49:24  jeroen
     30 * *** empty log message ***
    3131 *
    3232 * Revision 1.1.1.1  1999/08/19 00:55:42  jtg
     
    4545/*
    4646 * $Log: colors.h,v $
    47  * Revision 1.1  2000-02-29 00:48:26  sandervl
    48  * created
     47 * Revision 1.2  2000-03-01 18:49:24  jeroen
     48 * *** empty log message ***
    4949 *
    5050 * Revision 1.1.1.1  1999/08/19 00:55:42  jtg
     
    6363/*
    6464 * $Log: colors.h,v $
    65  * Revision 1.1  2000-02-29 00:48:26  sandervl
    66  * created
     65 * Revision 1.2  2000-03-01 18:49:24  jeroen
     66 * *** empty log message ***
    6767 *
    6868 * Revision 1.1.1.1  1999/08/19 00:55:42  jtg
     
    8989#define PF_INDEX8               12
    9090
    91 char ColorMap16[] = {
     91static char ColorMap16[] = {
    92920x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    93930x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
     
    1231230x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F};
    124124
    125 #define BGR8(r,g,b)             (unsigned)(((BYTE)(b & 0xc0 | (g & 0xe0)>>2 | (r & 0xe0)>>5)))
     125#define BGR8(r,g,b)             (unsigned)(((BYTE)(b & 0xc0 | (g & 0xe0)>>2 | (r & 0xe0)>>5)))
    126126#ifdef DDRAW
    127 #define BGR16(r,g,b)    ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
     127#define BGR16(r,g,b)    ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(g&0xfc) << 3)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
    128128#else
    129 #ifdef __WIN32OS2__
    130 #define BGR16(r,g,b)    ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(ColorMap16[g]*2) << 5)) | (((WORD)(BYTE)(ColorMap16[r])) << 11)))
    131 #else
    132 #define BGR16(r,g,b)    ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(ColorMap16[g]) << 5)) | (((WORD)(BYTE)(ColorMap16[r])) << 10)))
     129#define BGR16(r,g,b)    ((WORD)(((BYTE)(ColorMap16[b]) | ((BYTE)(ColorMap16[g]) << 5)) | (((WORD)(BYTE)(ColorMap16[r])) << 10)))
    133130#endif
    134 #endif
    135 #define BGR24(r,g,b)    (unsigned long)(((DWORD)(((BYTE)(b)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(r))<<16))))
    136 #define BGR32(r,g,b)    (unsigned long)((DWORD)(((BYTE)(b)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(r))<<16)))
     131/* JvdH -- FIX! In BGR24 don't shift another 8 bits (was <<8) */
     132#define BGR24(r,g,b)    (unsigned long)(((DWORD)(((BYTE)(b)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(r))<<16))))
     133#define BGR32(r,g,b)    (unsigned long)((DWORD)(((BYTE)(b)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(r))<<16)))
    137134
    138135
     
    141138 * If pixelformat==PF_8A8B8G8R:
    142139 */
    143 #define PACK_8A8B8G8R( R, G, B, A )     \
    144         ( ((A) << 24) | ((B) << 16) | ((G) << 8) | (R) )
     140#define PACK_8A8B8G8R( R, G, B, A )     \
     141        ( ((A) << 24) | ((B) << 16) | ((G) << 8) | (R) )
    145142
    146143
     
    148145 * If pixelformat==PF_8R8G8B:
    149146 */
    150 #define PACK_8R8G8B( R, G, B)    ( ((R) << 16) | ((G) << 8) | (B) )
     147#define PACK_8R8G8B( R, G, B)    ( ((R) << 16) | ((G) << 8) | (B) )
    151148
    152149
     
    160157#else
    161158#ifdef __WIN32OS2__
    162 #define PACK_5R6G5B( R, G, B)   ((WORD)(((BYTE)(ColorMap16[B]) | ((BYTE)(ColorMap16[G]*2) << 5)) | (((WORD)(BYTE)(ColorMap16[R])) << 11)))
     159#define PACK_5R6G5B( R, G, B)   ((WORD)(((BYTE)(ColorMap16[B]) | ((BYTE)(ColorMap16[G]*2) << 5)) | (((WORD)(BYTE)(ColorMap16[R])) << 11)))
    163160#else
    164 #define PACK_5R6G5B( R, G, B)   ((WORD)(((BYTE)(ColorMap16[B]) | ((BYTE)(ColorMap16[G]) << 5)) | (((WORD)(BYTE)(ColorMap16[R])) << 10)))
     161#define PACK_5R6G5B( R, G, B)   ((WORD)(((BYTE)(ColorMap16[B]) | ((BYTE)(ColorMap16[G]) << 5)) | (((WORD)(BYTE)(ColorMap16[R])) << 10)))
    165162#endif
    166163#endif
  • trunk/src/opengl/mesa/common_x86.c

    r2938 r2962  
    1 /* $Id: common_x86.c,v 1.1 2000-02-29 00:49:59 sandervl Exp $ */
     1/* $Id: common_x86.c,v 1.2 2000-03-01 18:49:24 jeroen Exp $ */
    22
    33/*
     
    5454{
    5555#ifdef USE_X86_ASM
     56
    5657#ifdef __WIN32OS2__
    5758   /* Odin specific - use 'built in' cpuhlp lib */
    5859   if(CPUFeatures & CPUID_FPU_PRESENT)
    59      gl_init_x86_asm_transforms();
     60     {
     61       dprintf(("OPENGL32: Initializing Assembly Transforms"));
     62       gl_init_x86_asm_transforms();
     63     }
    6064
    6165#if defined(USE_3DNOW_ASM)
    6266   if(CPUFeatures /*& CPUID_3DNOW*/)
    63      gl_init_3dnow_asm_transforms();
    64 #endif
    65 #else
     67     {
     68       dprintf(("OPENGL32: Initializing 3DNow! Transforms"));
     69       gl_init_3dnow_asm_transforms();
     70     }
     71#endif                                 /* USE_3DNOW_ASM                    */
     72
     73#else                                  /* __WIN32OS2__                     */
    6674   gl_x86_cpu_features = gl_identify_x86_cpu_features ();
    6775   gl_x86_cpu_features |= GL_CPU_AnyX86;
     
    8795      }
    8896   }
    89 #endif
     97#endif                                 /* USE_MMX_ASM                      */
    9098
    9199
     
    100108      }
    101109   }
    102 #endif
    103 #endif
    104 #endif
     110#endif                                 /* USE_3DNOW_ASM                    */
     111
     112#endif                                 /* __WIN32OS2__                     */
     113
     114#endif                                 /* USE_X86_ASM                      */
    105115}
    106116
  • trunk/src/opengl/mesa/config.h

    r2938 r2962  
    1 /* $Id: config.h,v 1.1 2000-02-29 00:48:27 sandervl Exp $ */
     1/* $Id: config.h,v 1.2 2000-03-01 18:49:24 jeroen Exp $ */
    22
    33/*
     
    217217
    218218typedef struct gl_context GLcontext;
     219typedef struct gl_visual  GLvisual;
     220typedef struct gl_frame_buffer GLframebuffer;
    219221
    220222extern void gl_read_config_file( struct gl_context *ctx );
  • trunk/src/opengl/mesa/context.c

    r2938 r2962  
    1 /* $Id: context.c,v 1.1 2000-02-29 00:50:00 sandervl Exp $ */
     1/* $Id: context.c,v 1.2 2000-03-01 18:49:25 jeroen Exp $ */
    22
    33/*
     
    3535 * the address space.
    3636 */
     37
     38#ifdef __WIN32OS2__
     39#include <os2win.h>
     40#ifdef DIVE
     41#include "types.h"
     42#include "wmesadef.h"
     43#include "mesadive.h"
     44#endif
     45#endif
    3746
    3847#ifdef PC_HEADER
     
    138147#ifdef THREADS
    139148
    140 #include "mthreads.h" /* Mesa platform independent threads interface */
     149#include "mthreads.h"        /* Mesa platform independent threads interface*/
    141150
    142151static MesaTSD mesa_ctx_tsd;
     
    333342{
    334343   static GLboolean alreadyCalled = GL_FALSE;
     344
    335345   if (!alreadyCalled) {
    336346      gl_init_clip();
     
    346356      gl_init_vbxform();
    347357      gl_init_vertices();
     358#ifdef THREADS
     359      mesa_ctx_thread_init();
     360#endif
    348361      alreadyCalled = GL_TRUE;
    349362   }
     
    12621275
    12631276   ctx->VB = gl_vb_create_for_immediate( ctx );
     1277
    12641278   if (!ctx->VB) {
    12651279      FREE( ctx );
     
    12691283
    12701284   ctx->PB = gl_alloc_pb();
     1285
    12711286   if (!ctx->PB) {
    12721287      FREE( ctx->VB );
     
    13821397      gl_matrix_dtr( &ctx->ModelView );
    13831398      for (i = 0 ; i < MAX_MODELVIEW_STACK_DEPTH ; i++) {
    1384         gl_matrix_dtr( &ctx->ModelViewStack[i] );
     1399        gl_matrix_dtr( &ctx->ModelViewStack[i] );
    13851400      }
    13861401      gl_matrix_dtr( &ctx->ProjectionMatrix );
    13871402      for (i = 0 ; i < MAX_PROJECTION_STACK_DEPTH ; i++) {
    1388         gl_matrix_dtr( &ctx->ProjectionStack[i] );
     1403        gl_matrix_dtr( &ctx->ProjectionStack[i] );
    13891404      }
    13901405
     
    13991414      assert(ctx->Shared->RefCount>=0);
    14001415      if (ctx->Shared->RefCount==0) {
    1401         /* free shared state */
    1402         free_shared_state( ctx, ctx->Shared );
     1416        /* free shared state */
     1417        free_shared_state( ctx, ctx->Shared );
    14031418      }
    14041419
    14051420      foreach_s( s, tmps, ctx->ShineTabList ) {
    1406         FREE( s );
     1421        FREE( s );
    14071422      }
    14081423      FREE( ctx->ShineTabList );
     
    14651480      if (ctx==CC) {
    14661481         CC = NULL;
    1467         CURRENT_INPUT = NULL;
     1482        CURRENT_INPUT = NULL;
    14681483      }
    14691484#endif
     
    15401555    */
    15411556   if (CC) {
    1542       ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(CC, "gl_make_current");
     1557     ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(CC, "gl_make_current");
    15431558   }
    15441559
     
    15511566      CC->Buffer = NULL;
    15521567   }
     1568
    15531569   CC = ctx;
    15541570   if (ctx) {
    1555       SET_IMMEDIATE(ctx, ctx->input);
     1571   SET_IMMEDIATE(ctx, ctx->input);
    15561572   }
    15571573#endif
    1558 
    1559    if (MESA_VERBOSE) fprintf(stderr, "gl_make_current()\n");
    15601574
    15611575   if (ctx && buffer) {
    15621576      /* TODO: check if ctx and buffer's visual match??? */
    1563       ctx->Buffer = buffer;      /* Bind the frame buffer to the context */
    1564       ctx->NewState = NEW_ALL;   /* just to be safe */
     1577      ctx->Buffer = buffer;         /* Bind the frame buffer to the context*/
     1578      ctx->NewState = NEW_ALL;                           /* just to be safe*/
    15651579      gl_update_state( ctx );
    15661580   }
     
    15711585    * information.
    15721586    */
    1573    if (ctx && ctx->FirstTimeCurrent) {
    1574       if (getenv("MESA_INFO")) {
    1575          fprintf(stderr, "Mesa GL_VERSION = %s\n", (char *) gl_GetString(ctx, GL_VERSION));
    1576          fprintf(stderr, "Mesa GL_RENDERER = %s\n", (char *) gl_GetString(ctx, GL_RENDERER));
    1577          fprintf(stderr, "Mesa GL_VENDOR = %s\n", (char *) gl_GetString(ctx, GL_VENDOR));
    1578          fprintf(stderr, "Mesa GL_EXTENSIONS = %s\n", (char *) gl_GetString(ctx, GL_EXTENSIONS));
    1579       }
    1580       ctx->FirstTimeCurrent = GL_FALSE;
    1581    }
     1587   if (ctx && ctx->FirstTimeCurrent)
     1588     {
     1589        dprintf(("Mesa GL_VERSION = %s\n", (char *) gl_GetString(ctx, GL_VERSION)));
     1590        dprintf(("Mesa GL_RENDERER = %s\n", (char *) gl_GetString(ctx, GL_RENDERER)));
     1591        dprintf(("Mesa GL_VENDOR = %s\n", (char *) gl_GetString(ctx, GL_VENDOR)));
     1592        dprintf(("Mesa GL_EXTENSIONS = %s\n", (char *) gl_GetString(ctx, GL_EXTENSIONS)));
     1593
     1594        ctx->FirstTimeCurrent = GL_FALSE;
     1595     }
    15821596}
    15831597
     
    16491663   }
    16501664   if (mask & GL_POLYGON_STIPPLE_BIT) {
     1665#ifdef __WIN32OS2__
     1666      MEMCPY( &dst->PolygonStipple, &src->PolygonStipple, 32*sizeof(GLint) );
     1667#else
    16511668      /* Use loop instead of MEMCPY due to problem with Portland Group's
    16521669       * C compiler.  Reported by John Stone.
     
    16561673         dst->PolygonStipple[i] = src->PolygonStipple[i];
    16571674      }
     1675#endif
    16581676   }
    16591677   if (mask & GL_SCISSOR_BIT) {
     
    17071725void gl_problem( const GLcontext *ctx, const char *s )
    17081726{
     1727#ifdef __WIN32OS2__
     1728   dprintf(("OPENGL32: Mesa implementation error: %s\n", s) );
     1729   dprintf(("OPENGL32: Report to J.vandenHorn@fibre.a2000.nl\n" ));
     1730#else
    17091731   fprintf( stderr, "Mesa implementation error: %s\n", s );
    17101732   fprintf( stderr, "Report to mesa-bugs@mesa3d.org\n" );
    17111733   (void) ctx;
     1734#endif
    17121735}
    17131736
     
    17321755   }
    17331756#endif
     1757#ifdef __WIN32OS2__
     1758   dprintf(("OPENGL32: Mesa warning: %s\n", s ));
     1759#else
    17341760   if (debug) {
    17351761      fprintf( stderr, "Mesa warning: %s\n", s );
    17361762   }
     1763#endif
    17371764   (void) ctx;
    17381765}
     
    17721799   }
    17731800#endif
    1774 
     1801#ifdef __WIN32OS2__
     1802              {
     1803#else
    17751804   if (debug) {
     1805#endif
    17761806      char errstr[1000];
    17771807
    17781808      switch (error) {
    1779          case GL_NO_ERROR:
    1780             strcpy( errstr, "GL_NO_ERROR" );
    1781             break;
    1782          case GL_INVALID_VALUE:
    1783             strcpy( errstr, "GL_INVALID_VALUE" );
    1784             break;
    1785          case GL_INVALID_ENUM:
    1786             strcpy( errstr, "GL_INVALID_ENUM" );
    1787             break;
    1788          case GL_INVALID_OPERATION:
    1789             strcpy( errstr, "GL_INVALID_OPERATION" );
    1790             break;
    1791          case GL_STACK_OVERFLOW:
    1792             strcpy( errstr, "GL_STACK_OVERFLOW" );
    1793             break;
    1794          case GL_STACK_UNDERFLOW:
    1795             strcpy( errstr, "GL_STACK_UNDERFLOW" );
    1796             break;
    1797          case GL_OUT_OF_MEMORY:
    1798             strcpy( errstr, "GL_OUT_OF_MEMORY" );
    1799             break;
    1800          default:
    1801             strcpy( errstr, "unknown" );
    1802             break;
    1803       }
     1809         case GL_NO_ERROR:
     1810            strcpy( errstr, "GL_NO_ERROR" );
     1811            break;
     1812         case GL_INVALID_VALUE:
     1813            strcpy( errstr, "GL_INVALID_VALUE" );
     1814            break;
     1815         case GL_INVALID_ENUM:
     1816            strcpy( errstr, "GL_INVALID_ENUM" );
     1817            break;
     1818         case GL_INVALID_OPERATION:
     1819            strcpy( errstr, "GL_INVALID_OPERATION" );
     1820            break;
     1821         case GL_STACK_OVERFLOW:
     1822            strcpy( errstr, "GL_STACK_OVERFLOW" );
     1823            break;
     1824         case GL_STACK_UNDERFLOW:
     1825            strcpy( errstr, "GL_STACK_UNDERFLOW" );
     1826            break;
     1827         case GL_OUT_OF_MEMORY:
     1828            strcpy( errstr, "GL_OUT_OF_MEMORY" );
     1829            break;
     1830         default:
     1831            strcpy( errstr, "unknown" );
     1832            break;
     1833      }
     1834#ifdef __WIN32OS2__
     1835      dprintf( ("OPENGL32: Mesa user error: %s in %s\n", errstr, s ));
     1836#else
    18041837      fprintf( stderr, "Mesa user error: %s in %s\n", errstr, s );
     1838#endif
    18051839   }
    18061840
     
    18441878   /* ask device driver for size of output buffer */
    18451879   (*ctx->Driver.GetBufferSize)( ctx, &buf_width, &buf_height );
     1880
     1881   dprintf(("OPENGL32: gl_ResizeBuffersMESA - new w/h %d/%d\n",buf_width,buf_height));
    18461882
    18471883   /* see if size of device driver's color buffer (window) has changed */
     
    18501886      return;
    18511887
    1852    ctx->NewState |= NEW_RASTER_OPS;  /* to update scissor / window bounds */
     1888   ctx->NewState |= NEW_RASTER_OPS;    /* to update scissor / window bounds*/
    18531889
    18541890   /* save buffer size */
     
    18721908      gl_alloc_alpha_buffers( ctx );
    18731909   }
     1910
     1911#ifdef DIVE
     1912   DiveResizeBuffers(ctx->Buffer->Width,ctx->Buffer->Height);
     1913#endif
    18741914}
    18751915
     
    18921932      /* RGBA mode blending w/ Logic Op */
    18931933      if (ctx->Color.ColorLogicOpEnabled) {
    1894         if (ctx->Driver.LogicOp
     1934        if (ctx->Driver.LogicOp
    18951935             && (*ctx->Driver.LogicOp)( ctx, ctx->Color.LogicOp )) {
    1896             /* Device driver can do logic, don't have to do it in software */
    1897             ctx->Color.SWLogicOpEnabled = GL_FALSE;
    1898         }
    1899         else {
    1900             /* Device driver can't do logic op so we do it in software */
    1901             ctx->Color.SWLogicOpEnabled = GL_TRUE;
    1902         }
     1936            /* Device driver can do logic, don't have to do it in software */
     1937            ctx->Color.SWLogicOpEnabled = GL_FALSE;
     1938        }
     1939        else {
     1940            /* Device driver can't do logic op so we do it in software */
     1941            ctx->Color.SWLogicOpEnabled = GL_TRUE;
     1942        }
    19031943      }
    19041944      else {
    1905         /* no logic op */
    1906         if (ctx->Driver.LogicOp) {
     1945        /* no logic op */
     1946        if (ctx->Driver.LogicOp) {
    19071947            (void) (*ctx->Driver.LogicOp)( ctx, GL_COPY );
    19081948         }
    1909         ctx->Color.SWLogicOpEnabled = GL_FALSE;
     1949        ctx->Color.SWLogicOpEnabled = GL_FALSE;
    19101950      }
    19111951   }
     
    19131953      /* CI mode Logic Op */
    19141954      if (ctx->Color.IndexLogicOpEnabled) {
    1915         if (ctx->Driver.LogicOp
     1955        if (ctx->Driver.LogicOp
    19161956             && (*ctx->Driver.LogicOp)( ctx, ctx->Color.LogicOp )) {
    1917             /* Device driver can do logic, don't have to do it in software */
    1918             ctx->Color.SWLogicOpEnabled = GL_FALSE;
    1919         }
    1920         else {
    1921             /* Device driver can't do logic op so we do it in software */
    1922             ctx->Color.SWLogicOpEnabled = GL_TRUE;
    1923         }
     1957            /* Device driver can do logic, don't have to do it in software */
     1958            ctx->Color.SWLogicOpEnabled = GL_FALSE;
     1959        }
     1960        else {
     1961            /* Device driver can't do logic op so we do it in software */
     1962            ctx->Color.SWLogicOpEnabled = GL_TRUE;
     1963        }
    19241964      }
    19251965      else {
    1926         /* no logic op */
    1927         if (ctx->Driver.LogicOp) {
     1966        /* no logic op */
     1967        if (ctx->Driver.LogicOp) {
    19281968            (void) (*ctx->Driver.LogicOp)( ctx, GL_COPY );
    19291969         }
    1930         ctx->Color.SWLogicOpEnabled = GL_FALSE;
     1970        ctx->Color.SWLogicOpEnabled = GL_FALSE;
    19311971      }
    19321972   }
     
    19992039
    20002040      if (ctx->Texture.Enabled || ctx->Hint.Fog == GL_NICEST)
    2001         ctx->FogMode = FOG_FRAGMENT;
     2041        ctx->FogMode = FOG_FRAGMENT;
    20022042
    20032043      if ( ctx->Driver.GetParameteri &&
    2004            ctx->Driver.GetParameteri( ctx, DD_HAVE_HARDWARE_FOG ) )
    2005         ctx->FogMode = FOG_FRAGMENT;
     2044           ctx->Driver.GetParameteri( ctx, DD_HAVE_HARDWARE_FOG ) )
     2045        ctx->FogMode = FOG_FRAGMENT;
    20062046   }
    20072047
     
    20192059   ctx->RasterMask = 0;
    20202060
    2021    if (ctx->Color.AlphaEnabled)         ctx->RasterMask |= ALPHATEST_BIT;
    2022    if (ctx->Color.BlendEnabled)         ctx->RasterMask |= BLEND_BIT;
    2023    if (ctx->Depth.Test)                 ctx->RasterMask |= DEPTH_BIT;
    2024    if (ctx->FogMode==FOG_FRAGMENT)      ctx->RasterMask |= FOG_BIT;
    2025    if (ctx->Color.SWLogicOpEnabled)     ctx->RasterMask |= LOGIC_OP_BIT;
    2026    if (ctx->Scissor.Enabled)            ctx->RasterMask |= SCISSOR_BIT;
    2027    if (ctx->Stencil.Enabled)            ctx->RasterMask |= STENCIL_BIT;
    2028    if (ctx->Color.SWmasking)            ctx->RasterMask |= MASKING_BIT;
     2061   if (ctx->Color.AlphaEnabled)         ctx->RasterMask |= ALPHATEST_BIT;
     2062   if (ctx->Color.BlendEnabled)         ctx->RasterMask |= BLEND_BIT;
     2063   if (ctx->Depth.Test)                 ctx->RasterMask |= DEPTH_BIT;
     2064   if (ctx->FogMode==FOG_FRAGMENT)      ctx->RasterMask |= FOG_BIT;
     2065   if (ctx->Color.SWLogicOpEnabled)     ctx->RasterMask |= LOGIC_OP_BIT;
     2066   if (ctx->Scissor.Enabled)            ctx->RasterMask |= SCISSOR_BIT;
     2067   if (ctx->Stencil.Enabled)            ctx->RasterMask |= STENCIL_BIT;
     2068   if (ctx->Color.SWmasking)            ctx->RasterMask |= MASKING_BIT;
    20292069
    20302070   if (ctx->Visual->SoftwareAlpha && ctx->Color.ColorMask[ACOMP]
     
    20722112{
    20732113   fprintf(stderr,
    2074            "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
    2075            msg,
    2076            state,
    2077            (state & NEW_LIGHTING)         ? "lighting, " : "",
    2078            (state & NEW_RASTER_OPS)       ? "raster-ops, " : "",
    2079            (state & NEW_TEXTURING)        ? "texturing, " : "",
    2080            (state & NEW_POLYGON)          ? "polygon, " : "",
    2081            (state & NEW_DRVSTATE0)        ? "driver-0, " : "",
    2082            (state & NEW_DRVSTATE1)        ? "driver-1, " : "",
    2083            (state & NEW_DRVSTATE2)        ? "driver-2, " : "",
    2084            (state & NEW_DRVSTATE3)        ? "driver-3, " : "",
    2085            (state & NEW_MODELVIEW)        ? "modelview, " : "",
    2086            (state & NEW_PROJECTION)       ? "projection, " : "",
    2087            (state & NEW_TEXTURE_MATRIX)   ? "texture-matrix, " : "",
    2088            (state & NEW_USER_CLIP)        ? "user-clip, " : "",
    2089            (state & NEW_TEXTURE_ENV)      ? "texture-env, " : "",
    2090            (state & NEW_CLIENT_STATE)     ? "client-state, " : "",
    2091            (state & NEW_FOG)              ? "fog, " : "",
    2092            (state & NEW_NORMAL_TRANSFORM) ? "normal-transform, " : "",
    2093            (state & NEW_VIEWPORT)         ? "viewport, " : "",
    2094            (state & NEW_TEXTURE_ENABLE)   ? "texture-enable, " : "");
     2114           "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
     2115           msg,
     2116           state,
     2117           (state & NEW_LIGHTING)         ? "lighting, " : "",
     2118           (state & NEW_RASTER_OPS)       ? "raster-ops, " : "",
     2119           (state & NEW_TEXTURING)        ? "texturing, " : "",
     2120           (state & NEW_POLYGON)          ? "polygon, " : "",
     2121           (state & NEW_DRVSTATE0)        ? "driver-0, " : "",
     2122           (state & NEW_DRVSTATE1)        ? "driver-1, " : "",
     2123           (state & NEW_DRVSTATE2)        ? "driver-2, " : "",
     2124           (state & NEW_DRVSTATE3)        ? "driver-3, " : "",
     2125           (state & NEW_MODELVIEW)        ? "modelview, " : "",
     2126           (state & NEW_PROJECTION)       ? "projection, " : "",
     2127           (state & NEW_TEXTURE_MATRIX)   ? "texture-matrix, " : "",
     2128           (state & NEW_USER_CLIP)        ? "user-clip, " : "",
     2129           (state & NEW_TEXTURE_ENV)      ? "texture-env, " : "",
     2130           (state & NEW_CLIENT_STATE)     ? "client-state, " : "",
     2131           (state & NEW_FOG)              ? "fog, " : "",
     2132           (state & NEW_NORMAL_TRANSFORM) ? "normal-transform, " : "",
     2133           (state & NEW_VIEWPORT)         ? "viewport, " : "",
     2134           (state & NEW_TEXTURE_ENABLE)   ? "texture-enable, " : "");
    20952135}
    20962136
     
    20982138{
    20992139   fprintf(stderr,
    2100            "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s\n",
    2101            msg,
    2102            flags,
    2103            (flags & ENABLE_TEX0)       ? "tex-0, " : "",
    2104            (flags & ENABLE_TEX1)       ? "tex-1, " : "",
    2105            (flags & ENABLE_LIGHT)      ? "light, " : "",
    2106            (flags & ENABLE_FOG)        ? "fog, " : "",
    2107            (flags & ENABLE_USERCLIP)   ? "userclip, " : "",
    2108            (flags & ENABLE_TEXGEN0)    ? "tex-gen-0, " : "",
    2109            (flags & ENABLE_TEXGEN1)    ? "tex-gen-1, " : "",
    2110            (flags & ENABLE_TEXMAT0)    ? "tex-mat-0, " : "",
    2111            (flags & ENABLE_TEXMAT1)    ? "tex-mat-1, " : "",
    2112            (flags & ENABLE_NORMALIZE)  ? "normalize, " : "",
    2113            (flags & ENABLE_RESCALE)    ? "rescale, " : "");
     2140           "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s\n",
     2141           msg,
     2142           flags,
     2143           (flags & ENABLE_TEX0)       ? "tex-0, " : "",
     2144           (flags & ENABLE_TEX1)       ? "tex-1, " : "",
     2145           (flags & ENABLE_LIGHT)      ? "light, " : "",
     2146           (flags & ENABLE_FOG)        ? "fog, " : "",
     2147           (flags & ENABLE_USERCLIP)   ? "userclip, " : "",
     2148           (flags & ENABLE_TEXGEN0)    ? "tex-gen-0, " : "",
     2149           (flags & ENABLE_TEXGEN1)    ? "tex-gen-1, " : "",
     2150           (flags & ENABLE_TEXMAT0)    ? "tex-mat-0, " : "",
     2151           (flags & ENABLE_TEXMAT1)    ? "tex-mat-1, " : "",
     2152           (flags & ENABLE_NORMALIZE)  ? "normalize, " : "",
     2153           (flags & ENABLE_RESCALE)    ? "rescale, " : "");
    21142154}
    21152155
     
    21362176   if (ctx->NewState & NEW_TEXTURE_ENV) {
    21372177      if (ctx->Texture.Unit[0].EnvMode == ctx->Texture.Unit[0].LastEnvMode &&
    2138           ctx->Texture.Unit[1].EnvMode == ctx->Texture.Unit[1].LastEnvMode)
    2139         ctx->NewState &= ~NEW_TEXTURE_ENV;
     2178          ctx->Texture.Unit[1].EnvMode == ctx->Texture.Unit[1].LastEnvMode)
     2179        ctx->NewState &= ~NEW_TEXTURE_ENV;
    21402180      ctx->Texture.Unit[0].LastEnvMode = ctx->Texture.Unit[0].EnvMode;
    21412181      ctx->Texture.Unit[1].LastEnvMode = ctx->Texture.Unit[1].EnvMode;
     
    21462186
    21472187      for (i=0; i < MAX_TEXTURE_UNITS; i++) {
    2148         if (ctx->TextureMatrix[i].flags & MAT_DIRTY_ALL_OVER)
    2149         {
    2150             gl_matrix_analyze( &ctx->TextureMatrix[i] );
    2151             ctx->TextureMatrix[i].flags &= ~MAT_DIRTY_DEPENDENTS;
    2152 
    2153             if (ctx->Texture.Unit[i].Enabled &&
    2154                 ctx->TextureMatrix[i].type != MATRIX_IDENTITY)
    2155                ctx->Enabled |= ENABLE_TEXMAT0 << i;
    2156         }
     2188        if (ctx->TextureMatrix[i].flags & MAT_DIRTY_ALL_OVER)
     2189        {
     2190            gl_matrix_analyze( &ctx->TextureMatrix[i] );
     2191            ctx->TextureMatrix[i].flags &= ~MAT_DIRTY_DEPENDENTS;
     2192
     2193            if (ctx->Texture.Unit[i].Enabled &&
     2194                ctx->TextureMatrix[i].type != MATRIX_IDENTITY)
     2195               ctx->Enabled |= ENABLE_TEXMAT0 << i;
     2196        }
    21572197      }
    21582198   }
     
    21652205
    21662206      for (i=0; i < MAX_TEXTURE_UNITS; i++) {
    2167         if (ctx->Texture.Unit[i].Enabled) {
    2168             gl_update_texture_unit( ctx, &ctx->Texture.Unit[i] );
    2169 
    2170             ctx->Texture.ReallyEnabled |=
    2171                ctx->Texture.Unit[i].ReallyEnabled<<(i*4);
    2172 
    2173             if (ctx->Texture.Unit[i].GenFlags != 0) {
    2174                ctx->Enabled |= ENABLE_TEXGEN0 << i;
    2175 
    2176                if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_NORMALS)
    2177                {
    2178                   ctx->Texture.NeedNormals = GL_TRUE;
    2179                   ctx->Texture.NeedEyeCoords = GL_TRUE;
    2180                }
    2181 
    2182                if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_EYE_COORD)
    2183                {
    2184                   ctx->Texture.NeedEyeCoords = GL_TRUE;
    2185                }
    2186             }
    2187         }
     2207        if (ctx->Texture.Unit[i].Enabled) {
     2208            gl_update_texture_unit( ctx, &ctx->Texture.Unit[i] );
     2209
     2210            ctx->Texture.ReallyEnabled |=
     2211               ctx->Texture.Unit[i].ReallyEnabled<<(i*4);
     2212
     2213            if (ctx->Texture.Unit[i].GenFlags != 0) {
     2214               ctx->Enabled |= ENABLE_TEXGEN0 << i;
     2215
     2216               if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_NORMALS)
     2217               {
     2218                  ctx->Texture.NeedNormals = GL_TRUE;
     2219                  ctx->Texture.NeedEyeCoords = GL_TRUE;
     2220               }
     2221
     2222               if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_EYE_COORD)
     2223               {
     2224                  ctx->Texture.NeedEyeCoords = GL_TRUE;
     2225               }
     2226            }
     2227        }
    21882228      }
    21892229
     
    21962236
    21972237      if (ctx->NewState & NEW_RASTER_OPS) {
    2198         update_pixel_logic(ctx);
    2199         update_pixel_masking(ctx);
    2200         update_fog_mode(ctx);
    2201         update_rasterflags(ctx);
    2202         if (ctx->Driver.Dither) {
    2203             (*ctx->Driver.Dither)( ctx, ctx->Color.DitherFlag );
    2204         }
    2205 
    2206         /* Check if incoming colors can be modified during rasterization */
    2207         if (ctx->Fog.Enabled ||
    2208              ctx->Texture.Enabled ||
    2209              ctx->Color.BlendEnabled ||
    2210              ctx->Color.SWmasking ||
    2211              ctx->Color.SWLogicOpEnabled) {
    2212             ctx->MutablePixels = GL_TRUE;
    2213         }
    2214         else {
    2215             ctx->MutablePixels = GL_FALSE;
    2216         }
    2217 
    2218         /* update scissor region */
    2219 
    2220         ctx->Buffer->Xmin = 0;
    2221         ctx->Buffer->Ymin = 0;
    2222         ctx->Buffer->Xmax = ctx->Buffer->Width-1;
    2223         ctx->Buffer->Ymax = ctx->Buffer->Height-1;
    2224         if (ctx->Scissor.Enabled) {
    2225             if (ctx->Scissor.X > ctx->Buffer->Xmin) {
    2226                ctx->Buffer->Xmin = ctx->Scissor.X;
    2227             }
    2228             if (ctx->Scissor.Y > ctx->Buffer->Ymin) {
    2229                ctx->Buffer->Ymin = ctx->Scissor.Y;
    2230             }
    2231             if (ctx->Scissor.X + ctx->Scissor.Width - 1 < ctx->Buffer->Xmax) {
    2232                ctx->Buffer->Xmax = ctx->Scissor.X + ctx->Scissor.Width - 1;
    2233             }
    2234             if (ctx->Scissor.Y + ctx->Scissor.Height - 1 < ctx->Buffer->Ymax) {
    2235                ctx->Buffer->Ymax = ctx->Scissor.Y + ctx->Scissor.Height - 1;
    2236             }
    2237         }
    2238 
    2239         /* The driver isn't managing the depth buffer.
    2240           */
    2241         if (ctx->Driver.AllocDepthBuffer == gl_alloc_depth_buffer)
    2242         {
    2243             if (ctx->Depth.Mask) {
    2244                switch (ctx->Depth.Func) {
    2245                case GL_LESS:
    2246                   ctx->Driver.DepthTestSpan = gl_depth_test_span_less;
    2247                   ctx->Driver.DepthTestPixels = gl_depth_test_pixels_less;
    2248                   break;
    2249                case GL_GREATER:
    2250                   ctx->Driver.DepthTestSpan = gl_depth_test_span_greater;
    2251                   ctx->Driver.DepthTestPixels = gl_depth_test_pixels_greater;
    2252                   break;
    2253                default:
    2254                   ctx->Driver.DepthTestSpan = gl_depth_test_span_generic;
    2255                   ctx->Driver.DepthTestPixels = gl_depth_test_pixels_generic;
    2256                }
    2257             }
    2258             else {
    2259                ctx->Driver.DepthTestSpan = gl_depth_test_span_generic;
    2260                ctx->Driver.DepthTestPixels = gl_depth_test_pixels_generic;
    2261             }
    2262         }
     2238        update_pixel_logic(ctx);
     2239        update_pixel_masking(ctx);
     2240        update_fog_mode(ctx);
     2241        update_rasterflags(ctx);
     2242        if (ctx->Driver.Dither) {
     2243            (*ctx->Driver.Dither)( ctx, ctx->Color.DitherFlag );
     2244        }
     2245
     2246        /* Check if incoming colors can be modified during rasterization */
     2247        if (ctx->Fog.Enabled ||
     2248             ctx->Texture.Enabled ||
     2249             ctx->Color.BlendEnabled ||
     2250             ctx->Color.SWmasking ||
     2251             ctx->Color.SWLogicOpEnabled) {
     2252            ctx->MutablePixels = GL_TRUE;
     2253        }
     2254        else {
     2255            ctx->MutablePixels = GL_FALSE;
     2256        }
     2257
     2258        /* update scissor region */
     2259
     2260        ctx->Buffer->Xmin = 0;
     2261        ctx->Buffer->Ymin = 0;
     2262        ctx->Buffer->Xmax = ctx->Buffer->Width-1;
     2263        ctx->Buffer->Ymax = ctx->Buffer->Height-1;
     2264        if (ctx->Scissor.Enabled) {
     2265            if (ctx->Scissor.X > ctx->Buffer->Xmin) {
     2266               ctx->Buffer->Xmin = ctx->Scissor.X;
     2267            }
     2268            if (ctx->Scissor.Y > ctx->Buffer->Ymin) {
     2269               ctx->Buffer->Ymin = ctx->Scissor.Y;
     2270            }
     2271            if (ctx->Scissor.X + ctx->Scissor.Width - 1 < ctx->Buffer->Xmax) {
     2272               ctx->Buffer->Xmax = ctx->Scissor.X + ctx->Scissor.Width - 1;
     2273            }
     2274            if (ctx->Scissor.Y + ctx->Scissor.Height - 1 < ctx->Buffer->Ymax) {
     2275               ctx->Buffer->Ymax = ctx->Scissor.Y + ctx->Scissor.Height - 1;
     2276            }
     2277        }
     2278
     2279        /* The driver isn't managing the depth buffer.
     2280          */
     2281        if (ctx->Driver.AllocDepthBuffer == gl_alloc_depth_buffer)
     2282        {
     2283            if (ctx->Depth.Mask) {
     2284               switch (ctx->Depth.Func) {
     2285               case GL_LESS:
     2286                  ctx->Driver.DepthTestSpan = gl_depth_test_span_less;
     2287                  ctx->Driver.DepthTestPixels = gl_depth_test_pixels_less;
     2288                  break;
     2289               case GL_GREATER:
     2290                  ctx->Driver.DepthTestSpan = gl_depth_test_span_greater;
     2291                  ctx->Driver.DepthTestPixels = gl_depth_test_pixels_greater;
     2292                  break;
     2293               default:
     2294                  ctx->Driver.DepthTestSpan = gl_depth_test_span_generic;
     2295                  ctx->Driver.DepthTestPixels = gl_depth_test_pixels_generic;
     2296               }
     2297            }
     2298            else {
     2299               ctx->Driver.DepthTestSpan = gl_depth_test_span_generic;
     2300               ctx->Driver.DepthTestPixels = gl_depth_test_pixels_generic;
     2301            }
     2302        }
    22632303      }
    22642304
    22652305      if (ctx->NewState & NEW_LIGHTING) {
    2266         ctx->TriangleCaps &= ~(DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
    2267         if (ctx->Light.Enabled) {
    2268             if (ctx->Light.Model.TwoSide)
    2269                ctx->TriangleCaps |= (DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
    2270             gl_update_lighting(ctx);
    2271         }
     2306        ctx->TriangleCaps &= ~(DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
     2307        if (ctx->Light.Enabled) {
     2308            if (ctx->Light.Model.TwoSide)
     2309               ctx->TriangleCaps |= (DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
     2310            gl_update_lighting(ctx);
     2311        }
    22722312      }
    22732313   }
     
    22782318
    22792319      if (ctx->NewState & NEW_POLYGON) {
    2280         /* Setup CullBits bitmask */
    2281         if (ctx->Polygon.CullFlag) {
    2282             ctx->backface_sign = 1;
    2283             switch(ctx->Polygon.CullFaceMode) {
    2284             case GL_BACK:
    2285                if(ctx->Polygon.FrontFace==GL_CCW)
    2286                   ctx->backface_sign = -1;
    2287                ctx->Polygon.CullBits = 1;
    2288                break;
    2289             case GL_FRONT:
    2290                if(ctx->Polygon.FrontFace!=GL_CCW)
    2291                   ctx->backface_sign = -1;
    2292                ctx->Polygon.CullBits = 2;
    2293                break;
    2294             default:
    2295             case GL_FRONT_AND_BACK:
    2296                ctx->backface_sign = 0;
    2297                ctx->Polygon.CullBits = 0;
    2298                ctx->TriangleCaps |= DD_TRI_CULL_FRONT_BACK;
    2299                break;
    2300             }
    2301         }
    2302         else {
    2303             ctx->Polygon.CullBits = 3;
    2304             ctx->backface_sign = 0;
    2305         }
    2306 
    2307         /* Any Polygon offsets enabled? */
    2308         ctx->TriangleCaps &= ~DD_TRI_OFFSET;
    2309 
    2310         if (ctx->Polygon.OffsetPoint ||
    2311              ctx->Polygon.OffsetLine ||
    2312              ctx->Polygon.OffsetFill)
    2313             ctx->TriangleCaps |= DD_TRI_OFFSET;
    2314 
    2315         /* reset Z offsets now */
    2316         ctx->PointZoffset   = 0.0;
    2317         ctx->LineZoffset    = 0.0;
    2318         ctx->PolygonZoffset = 0.0;
     2320        /* Setup CullBits bitmask */
     2321        if (ctx->Polygon.CullFlag) {
     2322            ctx->backface_sign = 1;
     2323            switch(ctx->Polygon.CullFaceMode) {
     2324            case GL_BACK:
     2325               if(ctx->Polygon.FrontFace==GL_CCW)
     2326                  ctx->backface_sign = -1;
     2327               ctx->Polygon.CullBits = 1;
     2328               break;
     2329            case GL_FRONT:
     2330               if(ctx->Polygon.FrontFace!=GL_CCW)
     2331                  ctx->backface_sign = -1;
     2332               ctx->Polygon.CullBits = 2;
     2333               break;
     2334            default:
     2335            case GL_FRONT_AND_BACK:
     2336               ctx->backface_sign = 0;
     2337               ctx->Polygon.CullBits = 0;
     2338               ctx->TriangleCaps |= DD_TRI_CULL_FRONT_BACK;
     2339               break;
     2340            }
     2341        }
     2342        else {
     2343            ctx->Polygon.CullBits = 3;
     2344            ctx->backface_sign = 0;
     2345        }
     2346
     2347        /* Any Polygon offsets enabled? */
     2348        ctx->TriangleCaps &= ~DD_TRI_OFFSET;
     2349
     2350        if (ctx->Polygon.OffsetPoint ||
     2351             ctx->Polygon.OffsetLine ||
     2352             ctx->Polygon.OffsetFill)
     2353            ctx->TriangleCaps |= DD_TRI_OFFSET;
     2354
     2355        /* reset Z offsets now */
     2356        ctx->PointZoffset   = 0.0;
     2357        ctx->LineZoffset    = 0.0;
     2358        ctx->PolygonZoffset = 0.0;
    23192359      }
    23202360   }
    23212361
    23222362   if (ctx->NewState & ~(NEW_CLIENT_STATE|
    2323                         NEW_DRIVER_STATE|NEW_USER_CLIP|
    2324                         NEW_POLYGON))
     2363                        NEW_DRIVER_STATE|NEW_USER_CLIP|
     2364                        NEW_POLYGON))
    23252365      gl_update_clipmask(ctx);
    23262366
    23272367   if (ctx->NewState & (NEW_LIGHTING|
    2328                         NEW_RASTER_OPS|
    2329                         NEW_TEXTURING|
    2330                         NEW_TEXTURE_ENABLE|
    2331                         NEW_TEXTURE_ENV|
    2332                         NEW_POLYGON|
    2333                         NEW_DRVSTATE0|
    2334                         NEW_DRVSTATE1|
    2335                         NEW_DRVSTATE2|
    2336                         NEW_DRVSTATE3|
    2337                         NEW_USER_CLIP))
     2368                        NEW_RASTER_OPS|
     2369                        NEW_TEXTURING|
     2370                        NEW_TEXTURE_ENABLE|
     2371                        NEW_TEXTURE_ENV|
     2372                        NEW_POLYGON|
     2373                        NEW_DRVSTATE0|
     2374                        NEW_DRVSTATE1|
     2375                        NEW_DRVSTATE2|
     2376                        NEW_DRVSTATE3|
     2377                        NEW_USER_CLIP))
    23382378   {
    23392379      ctx->IndirectTriangles = ctx->TriangleCaps & ~ctx->Driver.TriangleCaps;
     
    23412381
    23422382      if (MESA_VERBOSE&VERBOSE_CULL)
    2343         gl_print_tri_caps("initial indirect tris", ctx->IndirectTriangles);
     2383        gl_print_tri_caps("initial indirect tris", ctx->IndirectTriangles);
    23442384
    23452385      ctx->Driver.PointsFunc = NULL;
     
    23592399
    23602400      if (MESA_VERBOSE&VERBOSE_CULL)
    2361         gl_print_tri_caps("indirect tris", ctx->IndirectTriangles);
     2401        gl_print_tri_caps("indirect tris", ctx->IndirectTriangles);
    23622402
    23632403      /*
     
    23672407       */
    23682408      if (ctx->IndirectTriangles & DD_SW_RASTERIZE) {
    2369         gl_set_point_function(ctx);
    2370         gl_set_line_function(ctx);
    2371         gl_set_triangle_function(ctx);
    2372         gl_set_quad_function(ctx);
    2373 
    2374         if ((ctx->IndirectTriangles &
    2375               (DD_TRI_SW_RASTERIZE|DD_QUAD_SW_RASTERIZE|DD_TRI_CULL)) ==
    2376              (DD_TRI_SW_RASTERIZE|DD_QUAD_SW_RASTERIZE|DD_TRI_CULL))
    2377             ctx->IndirectTriangles &= ~DD_TRI_CULL;
     2409        gl_set_point_function(ctx);
     2410        gl_set_line_function(ctx);
     2411        gl_set_triangle_function(ctx);
     2412        gl_set_quad_function(ctx);
     2413
     2414        if ((ctx->IndirectTriangles &
     2415              (DD_TRI_SW_RASTERIZE|DD_QUAD_SW_RASTERIZE|DD_TRI_CULL)) ==
     2416             (DD_TRI_SW_RASTERIZE|DD_QUAD_SW_RASTERIZE|DD_TRI_CULL))
     2417            ctx->IndirectTriangles &= ~DD_TRI_CULL;
    23782418      }
    23792419
    23802420      if (MESA_VERBOSE&VERBOSE_CULL)
    2381         gl_print_tri_caps("indirect tris 2", ctx->IndirectTriangles);
     2421        gl_print_tri_caps("indirect tris 2", ctx->IndirectTriangles);
    23822422
    23832423      gl_set_render_vb_function(ctx);
     
    23882428   if (ctx->NewState & (NEW_MODELVIEW|NEW_PROJECTION)) {
    23892429      if (ctx->NewState & NEW_MODELVIEW) {
    2390         gl_matrix_analyze( &ctx->ModelView );
    2391         ctx->ProjectionMatrix.flags &= ~MAT_DIRTY_DEPENDENTS;
     2430        gl_matrix_analyze( &ctx->ModelView );
     2431        ctx->ProjectionMatrix.flags &= ~MAT_DIRTY_DEPENDENTS;
    23922432      }
    23932433
    23942434      if (ctx->NewState & NEW_PROJECTION) {
    2395         gl_matrix_analyze( &ctx->ProjectionMatrix );
    2396         ctx->ProjectionMatrix.flags &= ~MAT_DIRTY_DEPENDENTS;
    2397 
    2398         if (ctx->Transform.AnyClip) {
    2399             gl_update_userclip( ctx );
    2400         }
     2435        gl_matrix_analyze( &ctx->ProjectionMatrix );
     2436        ctx->ProjectionMatrix.flags &= ~MAT_DIRTY_DEPENDENTS;
     2437
     2438        if (ctx->Transform.AnyClip) {
     2439            gl_update_userclip( ctx );
     2440        }
    24012441      }
    24022442
     
    24092449    */
    24102450   if ((ctx->Enabled & (ENABLE_POINT_ATTEN | ENABLE_LIGHT | ENABLE_FOG |
    2411                         ENABLE_TEXGEN0 | ENABLE_TEXGEN1)) &&
     2451                        ENABLE_TEXGEN0 | ENABLE_TEXGEN1)) &&
    24122452       (ctx->NewState & (NEW_LIGHTING |
    24132453                         NEW_FOG |
    2414                         NEW_MODELVIEW |
    2415                         NEW_PROJECTION |
    2416                         NEW_TEXTURING |
    2417                         NEW_RASTER_OPS |
    2418                         NEW_USER_CLIP)))
     2454                        NEW_MODELVIEW |
     2455                        NEW_PROJECTION |
     2456                        NEW_TEXTURING |
     2457                        NEW_RASTER_OPS |
     2458                        NEW_USER_CLIP)))
    24192459   {
    24202460      GLboolean oldcoord, oldnorm;
     
    24252465      ctx->NeedNormals = (ctx->Light.Enabled || ctx->Texture.NeedNormals);
    24262466      ctx->NeedEyeCoords = (ctx->FogMode == FOG_VERTEX ||
    2427                             ctx->Point.Attenuated);
     2467                            ctx->Point.Attenuated);
    24282468      ctx->NeedEyeNormals = GL_FALSE;
    24292469
    24302470      if (ctx->Light.Enabled) {
    2431         if (ctx->Light.Flags & LIGHT_POSITIONAL) {
    2432             /* Need length for attenuation */
    2433             if (!TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_LENGTH_PRESERVING))
    2434                ctx->NeedEyeCoords = GL_TRUE;
    2435         } else if (ctx->Light.NeedVertices) {
    2436             /* Need angle for spot calculations */
    2437             if (!TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_ANGLE_PRESERVING))
    2438                ctx->NeedEyeCoords = GL_TRUE;
    2439         }
    2440         ctx->NeedEyeNormals = ctx->NeedEyeCoords;
     2471        if (ctx->Light.Flags & LIGHT_POSITIONAL) {
     2472            /* Need length for attenuation */
     2473            if (!TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_LENGTH_PRESERVING))
     2474               ctx->NeedEyeCoords = GL_TRUE;
     2475        } else if (ctx->Light.NeedVertices) {
     2476            /* Need angle for spot calculations */
     2477            if (!TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_ANGLE_PRESERVING))
     2478               ctx->NeedEyeCoords = GL_TRUE;
     2479        }
     2480        ctx->NeedEyeNormals = ctx->NeedEyeCoords;
    24412481      }
    24422482      if (ctx->Texture.Enabled || ctx->RenderMode==GL_FEEDBACK) {
    2443         if (ctx->Texture.NeedEyeCoords) ctx->NeedEyeCoords = GL_TRUE;
    2444         if (ctx->Texture.NeedNormals)
    2445             ctx->NeedNormals = ctx->NeedEyeNormals = GL_TRUE;
     2483        if (ctx->Texture.NeedEyeCoords) ctx->NeedEyeCoords = GL_TRUE;
     2484        if (ctx->Texture.NeedNormals)
     2485            ctx->NeedNormals = ctx->NeedEyeNormals = GL_TRUE;
    24462486      }
    24472487
     
    24492489
    24502490      if (ctx->NeedEyeCoords)
    2451         ctx->vb_proj_matrix = &ctx->ProjectionMatrix;
     2491        ctx->vb_proj_matrix = &ctx->ProjectionMatrix;
    24522492
    24532493      if (ctx->Light.Enabled) {
    2454         gl_update_lighting_function(ctx);
    2455 
    2456         if ( (ctx->NewState & NEW_LIGHTING) ||
    2457               ((ctx->NewState & (NEW_MODELVIEW| NEW_PROJECTION)) &&
    2458                !ctx->NeedEyeCoords) ||
    2459               oldcoord != ctx->NeedEyeCoords ||
    2460               oldnorm != ctx->NeedEyeNormals) {
    2461             gl_compute_light_positions(ctx);
    2462         }
    2463 
    2464         ctx->rescale_factor = 1.0F;
    2465 
    2466         if (ctx->ModelView.flags & (MAT_FLAG_UNIFORM_SCALE |
    2467                                      MAT_FLAG_GENERAL_SCALE |
    2468                                      MAT_FLAG_GENERAL_3D |
    2469                                      MAT_FLAG_GENERAL) )
    2470 
    2471         {
    2472             GLfloat *m = ctx->ModelView.inv;
    2473             GLfloat f = m[2]*m[2] + m[6]*m[6] + m[10]*m[10];
    2474             if (f > 1e-12 && (f-1)*(f-1) > 1e-12)
    2475                ctx->rescale_factor = 1.0/GL_SQRT(f);
    2476         }
     2494        gl_update_lighting_function(ctx);
     2495
     2496        if ( (ctx->NewState & NEW_LIGHTING) ||
     2497              ((ctx->NewState & (NEW_MODELVIEW| NEW_PROJECTION)) &&
     2498               !ctx->NeedEyeCoords) ||
     2499              oldcoord != ctx->NeedEyeCoords ||
     2500              oldnorm != ctx->NeedEyeNormals) {
     2501            gl_compute_light_positions(ctx);
     2502        }
     2503
     2504        ctx->rescale_factor = 1.0F;
     2505
     2506        if (ctx->ModelView.flags & (MAT_FLAG_UNIFORM_SCALE |
     2507                                     MAT_FLAG_GENERAL_SCALE |
     2508                                     MAT_FLAG_GENERAL_3D |
     2509                                     MAT_FLAG_GENERAL) )
     2510
     2511        {
     2512            GLfloat *m = ctx->ModelView.inv;
     2513            GLfloat f = m[2]*m[2] + m[6]*m[6] + m[10]*m[10];
     2514            if (f > 1e-12 && (f-1)*(f-1) > 1e-12)
     2515               ctx->rescale_factor = 1.0/GL_SQRT(f);
     2516        }
    24772517      }
    24782518
  • trunk/src/opengl/mesa/context.h

    r2938 r2962  
    1 /* $Id: context.h,v 1.1 2000-02-29 00:48:27 sandervl Exp $ */
     1/* $Id: context.h,v 1.2 2000-03-01 18:49:25 jeroen Exp $ */
    22
    33/*
     
    3333
    3434
    35 #include "types.h"
    36 
    37 
     35                                       /* #include "types.h"               */
    3836
    3937#ifdef THREADS
  • trunk/src/opengl/mesa/copypix.c

    r2938 r2962  
    1 /* $Id: copypix.c,v 1.1 2000-02-29 00:50:01 sandervl Exp $ */
     1/* $Id: copypix.c,v 1.2 2000-03-01 18:49:25 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "copypix.h"
     
    4647#include "span.h"
    4748#include "stencil.h"
    48 #include "types.h"
    4949#include "zoom.h"
    5050#endif
  • trunk/src/opengl/mesa/ddsample.c

    r2938 r2962  
    1 /* $Id: ddsample.c,v 1.1 2000-02-29 00:50:01 sandervl Exp $ */
     1/* $Id: ddsample.c,v 1.2 2000-03-01 18:49:26 jeroen Exp $ */
    22
    33/*
     
    6363#endif
    6464#include "GL/FooMesa.h"
     65#include "types.h"
    6566#include "context.h"
    6667#include "matrix.h"
    67 #include "types.h"
    6868#include "vb.h"
    6969
     
    7676struct foo_mesa_visual {
    7777   GLvisual *gl_visual;
    78    GLboolean db_flag;           /* double buffered? */
    79    GLboolean rgb_flag;          /* RGB mode? */
    80    GLuint depth;                /* bits per pixel (1, 8, 24, etc) */
     78   GLboolean db_flag;           /* double buffered? */
     79   GLboolean rgb_flag;          /* RGB mode? */
     80   GLuint depth;                /* bits per pixel (1, 8, 24, etc) */
    8181};
    8282
  • trunk/src/opengl/mesa/depth.c

    r2938 r2962  
    1 /* $Id: depth.c,v 1.1 2000-02-29 00:50:02 sandervl Exp $ */
     1/* $Id: depth.c,v 1.2 2000-03-01 18:49:26 jeroen Exp $ */
    22
    33/*
     
    4343#include "GL/xf86glx.h"
    4444#endif
     45#include "types.h"
    4546#include "context.h"
    4647#include "enums.h"
    4748#include "depth.h"
    4849#include "macros.h"
    49 #include "types.h"
    5050#endif
    5151
  • trunk/src/opengl/mesa/dlist.c

    r2938 r2962  
    1 /* $Id: dlist.c,v 1.1 2000-02-29 00:50:02 sandervl Exp $ */
     1/* $Id: dlist.c,v 1.2 2000-03-01 18:49:26 jeroen Exp $ */
    22
    33/*
     
    4848#include "clip.h"
    4949#include "colortab.h"
     50#include "types.h"
    5051#include "context.h"
    5152#include "copypix.h"
     
    8182#include "teximage.h"
    8283#include "texstate.h"
    83 #include "types.h"
    8484#include "varray.h"
    8585#include "vb.h"
  • trunk/src/opengl/mesa/drawpix.c

    r2938 r2962  
    1 /* $Id: drawpix.c,v 1.1 2000-02-29 00:50:02 sandervl Exp $ */
     1/* $Id: drawpix.c,v 1.2 2000-03-01 18:49:27 jeroen Exp $ */
    22
    33/*
     
    3939#include "GL/xf86glx.h"
    4040#endif
     41#include "types.h"
    4142#include "context.h"
    4243#include "drawpix.h"
     
    4849#include "span.h"
    4950#include "stencil.h"
    50 #include "types.h"
    5151#include "zoom.h"
    5252#endif
  • trunk/src/opengl/mesa/enable.c

    r2938 r2962  
    1 /* $Id: enable.c,v 1.1 2000-02-29 00:50:02 sandervl Exp $ */
     1/* $Id: enable.c,v 1.2 2000-03-01 18:49:27 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "enable.h"
     
    4445#include "mmath.h"
    4546#include "simple_list.h"
    46 #include "types.h"
    4747#include "vbfill.h"
    4848#include "xform.h"
  • trunk/src/opengl/mesa/eval.c

    r2938 r2962  
    1 /* $Id: eval.c,v 1.1 2000-02-29 00:50:03 sandervl Exp $ */
     1/* $Id: eval.c,v 1.2 2000-03-01 18:49:28 jeroen Exp $ */
    22
    33/*
     
    4949#include "GL/xf86glx.h"
    5050#endif
     51#include "types.h"
    5152#include "context.h"
    5253#include "eval.h"
  • trunk/src/opengl/mesa/extensions.c

    r2938 r2962  
    1 /* $Id: extensions.c,v 1.1 2000-02-29 00:50:03 sandervl Exp $ */
     1/* $Id: extensions.c,v 1.2 2000-03-01 18:49:28 jeroen Exp $ */
    22
    33/*
     
    3131#include "GL/xf86glx.h"
    3232#endif
     33#include "types.h"
    3334#include "context.h"
    3435#include "extensions.h"
    3536#include "simple_list.h"
    36 #include "types.h"
    3737
    3838
  • trunk/src/opengl/mesa/feedback.c

    r2938 r2962  
    1 /* $Id: feedback.c,v 1.1 2000-02-29 00:50:03 sandervl Exp $ */
     1/* $Id: feedback.c,v 1.2 2000-03-01 18:49:28 jeroen Exp $ */
    22
    33/*
     
    3838#include "GL/xf86glx.h"
    3939#endif
     40#include "types.h"
    4041#include "context.h"
    4142#include "enums.h"
     
    4344#include "macros.h"
    4445#include "mmath.h"
    45 #include "types.h"
    4646#include "triangle.h"
    4747#endif
     
    4949
    5050
    51 #define FB_3D           0x01
    52 #define FB_4D           0x02
    53 #define FB_INDEX        0x04
    54 #define FB_COLOR        0x08
    55 #define FB_TEXTURE      0X10
     51#define FB_3D           0x01
     52#define FB_4D           0x02
     53#define FB_INDEX        0x04
     54#define FB_COLOR        0x08
     55#define FB_TEXTURE      0X10
    5656
    5757
  • trunk/src/opengl/mesa/fog.c

    r2938 r2962  
    1 /* $Id: fog.c,v 1.1 2000-02-29 00:50:04 sandervl Exp $ */
     1/* $Id: fog.c,v 1.2 2000-03-01 18:49:28 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "fog.h"
    4142#include "macros.h"
    4243#include "mmath.h"
    43 #include "types.h"
    4444#include "xform.h"
    4545#endif
  • trunk/src/opengl/mesa/get.c

    r2938 r2962  
    1 /* $Id: get.c,v 1.1 2000-02-29 00:50:04 sandervl Exp $ */
     1/* $Id: get.c,v 1.2 2000-03-01 18:49:29 jeroen Exp $ */
    22
    33/*
     
    3838#include "GL/xf86glx.h"
    3939#endif
     40#include "types.h"
    4041#include "context.h"
    4142#include "enable.h"
     
    4546#include "macros.h"
    4647#include "mmath.h"
    47 #include "types.h"
    4848#include "vb.h"
    4949#endif
     
    5151
    5252
    53 #define FLOAT_TO_BOOL(X)        ( (X)==0.0F ? GL_FALSE : GL_TRUE )
    54 #define INT_TO_BOOL(I)          ( (I)==0 ? GL_FALSE : GL_TRUE )
    55 #define ENUM_TO_BOOL(E)         ( (E)==0 ? GL_FALSE : GL_TRUE )
     53#define FLOAT_TO_BOOL(X)        ( (X)==0.0F ? GL_FALSE : GL_TRUE )
     54#define INT_TO_BOOL(I)          ( (I)==0 ? GL_FALSE : GL_TRUE )
     55#define ENUM_TO_BOOL(E)         ( (E)==0 ? GL_FALSE : GL_TRUE )
    5656
    5757#ifdef SPECIALCAST
  • trunk/src/opengl/mesa/glmisc.c

    r2938 r2962  
    1 /* $Id: glmisc.c,v 1.1 2000-02-29 00:50:04 sandervl Exp $ */
     1/* $Id: glmisc.c,v 1.2 2000-03-01 18:49:29 jeroen Exp $ */
    22
    33/*
     
    5656{
    5757   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glClearIndex");
     58
    5859   ctx->Color.ClearIndex = (GLuint) c;
    5960   if (!ctx->Visual->RGBAflag) {
     
    8384   }
    8485}
    85 
    86 
    87 
    8886
    8987/*
     
    126124         gl_mask_rgba_span( ctx, width, x, y, rgba );
    127125         (*ctx->Driver.WriteRGBASpan)( ctx, width, x, y,
    128                                        (const GLubyte (*)[4])rgba, NULL );
     126                                       (const GLubyte (*)[4])rgba, NULL );
    129127      }
    130128   }
     
    153151static void clear_color_buffers( GLcontext *ctx )
    154152{
    155 
    156153   if (ctx->RasterMask & MULTI_DRAW_BIT) {
    157154      GLuint bufferBit;
     
    200197   else {
    201198      /* normal case:  clear exactly one color buffer */
    202 
     199#ifndef DIVE
    203200      if (ctx->Color.SWmasking) {
    204201         clear_color_buffer_with_masking( ctx );
     
    213210                                      x, y, width, height );
    214211      }
     212#endif
    215213   }
    216214}
     
    281279   /* Don't compile into display list */
    282280   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glFinish");
     281
    283282   if (ctx->Driver.Finish) {
    284283      (*ctx->Driver.Finish)( ctx );
     
    286285}
    287286
    288 
    289 
    290287void gl_Flush( GLcontext *ctx )
    291288{
    292289   /* Don't compile into display list */
    293290   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glFlush");
     291
    294292   if (ctx->Driver.Flush) {
    295293      (*ctx->Driver.Flush)( ctx );
    296294   }
    297295}
    298 
    299 
    300296
    301297GLboolean gl_Hint( GLcontext *ctx, GLenum target, GLenum mode )
     
    337333   case GL_ALWAYS_FAST_HINT_PGI:
    338334      if (mode) {
    339         ctx->Hint.AllowDrawWin = GL_TRUE;
    340         ctx->Hint.AllowDrawSpn = GL_FALSE;
    341         ctx->Hint.AllowDrawMem = GL_FALSE;
     335        ctx->Hint.AllowDrawWin = GL_TRUE;
     336        ctx->Hint.AllowDrawSpn = GL_FALSE;
     337        ctx->Hint.AllowDrawMem = GL_FALSE;
    342338      } else {
    343         ctx->Hint.AllowDrawWin = GL_TRUE;
    344         ctx->Hint.AllowDrawSpn = GL_TRUE;
    345         ctx->Hint.AllowDrawMem = GL_TRUE;
     339        ctx->Hint.AllowDrawWin = GL_TRUE;
     340        ctx->Hint.AllowDrawSpn = GL_TRUE;
     341        ctx->Hint.AllowDrawMem = GL_TRUE;
    346342      }
    347343      break;
     
    386382   return GL_TRUE;
    387383}
    388 
    389 
    390384
    391385void gl_DrawBuffer( GLcontext *ctx, GLenum mode )
     
    538532}
    539533
    540 
    541 
    542534void gl_ReadBuffer( GLcontext *ctx, GLenum mode )
    543535{
  • trunk/src/opengl/mesa/hash.c

    r2938 r2962  
    1 /* $Id: hash.c,v 1.1 2000-02-29 00:50:04 sandervl Exp $ */
     1/* $Id: hash.c,v 1.2 2000-03-01 18:49:29 jeroen Exp $ */
    22
    33/*
     
    8585      struct HashEntry *entry = table->Table[i];
    8686      while (entry) {
    87         struct HashEntry *next = entry->Next;
    88         FREE(entry);
    89         entry = next;
     87        struct HashEntry *next = entry->Next;
     88        FREE(entry);
     89        entry = next;
    9090      }
    9191   }
     
    106106   const struct HashEntry *entry;
    107107
    108   assert(table);
     108/* assert(table);
    109109   assert(key);
    110 
     110*/
    111111   pos = key & (TABLE_SIZE-1);
    112112   entry = table->Table[pos];
    113113   while (entry) {
    114114      if (entry->Key == key) {
    115         return entry->Data;
     115        return entry->Data;
    116116      }
    117117      entry = entry->Next;
     
    146146      if (entry->Key == key) {
    147147         /* replace entry's data */
    148         entry->Data = data;
    149         return;
     148        entry->Data = data;
     149        return;
    150150      }
    151151      entry = entry->Next;
     
    188188         }
    189189         FREE(entry);
    190         return;
     190        return;
    191191      }
    192192      prev = entry;
     
    225225      const struct HashEntry *entry = table->Table[i];
    226226      while (entry) {
    227         printf("%u %p\n", entry->Key, entry->Data);
    228         entry = entry->Next;
     227        printf("%u %p\n", entry->Key, entry->Data);
     228        entry = entry->Next;
    229229      }
    230230   }
     
    252252      GLuint key;
    253253      for (key=0; key!=maxKey; key++) {
    254         if (HashLookup(table, key)) {
    255             /* darn, this key is already in use */
    256             freeCount = 0;
    257             freeStart = key+1;
    258         }
    259         else {
    260             /* this key not in use, check if we've found enough */
    261             freeCount++;
    262             if (freeCount == numKeys) {
    263                return freeStart;
    264             }
    265         }
     254        if (HashLookup(table, key)) {
     255            /* darn, this key is already in use */
     256            freeCount = 0;
     257            freeStart = key+1;
     258        }
     259        else {
     260            /* this key not in use, check if we've found enough */
     261            freeCount++;
     262            if (freeCount == numKeys) {
     263               return freeStart;
     264            }
     265        }
    266266      }
    267267      /* cannot allocate a block of numKeys consecutive keys */
  • trunk/src/opengl/mesa/image.c

    r2938 r2962  
    1 /* $Id: image.c,v 1.1 2000-02-29 00:50:05 sandervl Exp $ */
     1/* $Id: image.c,v 1.2 2000-03-01 18:49:30 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "image.h"
     
    4243#include "mmath.h"
    4344#include "pixel.h"
    44 #include "types.h"
    4545#endif
    4646
  • trunk/src/opengl/mesa/initterm.cpp

    r2938 r2962  
    1 /* $Id: initterm.cpp,v 1.1 2000-02-29 00:50:05 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-03-01 18:49:30 jeroen Exp $ */
    22
    33/*
     
    4040void CDECL _ctordtorTerm( void );
    4141}
     42
     43#ifdef DIVE
     44void _System DiveGlobalInitialize(void);
     45void _System DiveGlobalTerminate(void);
     46#endif
    4247
    4348/*-------------------------------------------------------------------*/
     
    8792         if(rc)
    8893                return 0UL;
     94
     95#ifdef DIVE
     96           /* Dive specific - get capabilities */
     97         DiveGlobalInitialize();
     98#endif
    8999         break;
    90100
     
    106116static void APIENTRY cleanup(ULONG ulReason)
    107117{
     118   DiveGlobalTerminate();
     119
    108120   _ctordtorTerm();
    109121
  • trunk/src/opengl/mesa/light.c

    r2938 r2962  
    1 /* $Id: light.c,v 1.1 2000-02-29 00:50:05 sandervl Exp $ */
     1/* $Id: light.c,v 1.2 2000-03-01 18:49:31 jeroen Exp $ */
    22
    33/*
     
    4242#include "GL/xf86glx.h"
    4343#endif
     44#include "types.h"
    4445#include "context.h"
    4546#include "enums.h"
     
    4950#include "mmath.h"
    5051#include "simple_list.h"
    51 #include "types.h"
    5252#include "vb.h"
    5353#include "xform.h"
  • trunk/src/opengl/mesa/lines.c

    r2938 r2962  
    1 /* $Id: lines.c,v 1.1 2000-02-29 00:50:06 sandervl Exp $ */
     1/* $Id: lines.c,v 1.2 2000-03-01 18:49:31 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "depth.h"
     
    4546#include "pb.h"
    4647#include "texstate.h"
    47 #include "types.h"
    4848#include "vb.h"
    4949#endif
  • trunk/src/opengl/mesa/logic.c

    r2938 r2962  
    1 /* $Id: logic.c,v 1.1 2000-02-29 00:50:06 sandervl Exp $ */
     1/* $Id: logic.c,v 1.2 2000-03-01 18:49:31 jeroen Exp $ */
    22
    33/*
     
    3838#endif
    3939#include "alphabuf.h"
     40#include "types.h"
    4041#include "context.h"
    4142#include "logic.h"
     
    4344#include "pb.h"
    4445#include "span.h"
    45 #include "types.h"
    4646#endif
    4747
  • trunk/src/opengl/mesa/makefile

    r2961 r2962  
    1 # $Id: makefile,v 1.2 2000-03-01 14:50:16 sandervl Exp $
     1# $Id: makefile,v 1.3 2000-03-01 18:49:31 jeroen Exp $
    22#
    33# PD-Win32
     
    1717!endif
    1818
    19 #MESADEFS=-DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DTHREADS -DDDRAW \
    20 MESADEFS=-DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DTHREADS \
    21          -DUSE_X86_ASM_NOT -DUSE_MMX_ASM_NOT -DUSE_3DNOW_ASM_NOT
     19MESADEFS=-DNO_PARALLEL -DNO_STEREO -DGL_MESA_window_pos -DTHREADS -DDIVE \
     20         -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM_NOT
    2221
    2322CFLAGS = -I. -IGL $(CFLAGS_WIN32APP) -I$(PDWIN32_INCLUDE) -I..\glut $(MESADEFS) /Tdp /Wcnd-
     
    102101  texture.obj \
    103102  mthreads.obj \
    104   wmesa.obj
     103  wmesa.obj \
     104  x86a.obj \
     105  vertex.obj \
     106  mmx_blend.obj \
     107  osmesa.obj \
     108  resource.obj \
     109  mesadive.obj \
     110  internal.obj
     111
     112resource.asm: $(TARGET).rc
     113    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
    105114
    106115$(TARGET).DLL: $(OBJS) $(TARGET).lrf $(TARGET).def
     
    118127$(RTLLIB_O)
    119128OS2386.LIB
     129MMPM2.LIB
    120130$(TARGET).def
    121131<<keep
     
    137147
    138148clean:
    139         $(RM) *.obj 
    140         $(RM) *.dll 
    141         $(RM) *.lib 
     149        $(RM) *.obj
     150        $(RM) *.dll
     151        $(RM) *.lib
    142152        $(RM) *.lrf
    143153        $(RM) resource.asm
  • trunk/src/opengl/mesa/masking.c

    r2938 r2962  
    1 /* $Id: masking.c,v 1.1 2000-02-29 00:50:06 sandervl Exp $ */
     1/* $Id: masking.c,v 1.2 2000-03-01 18:49:31 jeroen Exp $ */
    22
    33/*
     
    4444#endif
    4545#include "alphabuf.h"
     46#include "types.h"
    4647#include "context.h"
    4748#include "enums.h"
     
    5051#include "pb.h"
    5152#include "span.h"
    52 #include "types.h"
    5353#endif
    5454
  • trunk/src/opengl/mesa/matrix.c

    r2938 r2962  
    1 /* $Id: matrix.c,v 1.1 2000-02-29 00:50:06 sandervl Exp $ */
     1/* $Id: matrix.c,v 1.2 2000-03-01 18:49:31 jeroen Exp $ */
    22
    33/*
     
    5252#include "GL/xf86glx.h"
    5353#endif
     54#include "types.h"
    5455#include "context.h"
    5556#include "enums.h"
     
    5758#include "matrix.h"
    5859#include "mmath.h"
    59 #include "types.h"
    6060#endif
    6161
  • trunk/src/opengl/mesa/mmx.h

    r2938 r2962  
    1 /* $Id: mmx.h,v 1.1 2000-02-29 00:48:34 sandervl Exp $ */
     1/* $Id: mmx.h,v 1.2 2000-03-01 18:49:32 jeroen Exp $ */
    22
    33/*
     
    3333
    3434
    35 extern void
     35extern void __cdecl
    3636gl_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
    3737                           GLubyte rgba[][4], const GLubyte dest[][4] );
  • trunk/src/opengl/mesa/pipeline.c

    r2938 r2962  
    1 /* $Id: pipeline.c,v 1.1 2000-02-29 00:50:07 sandervl Exp $ */
     1/* $Id: pipeline.c,v 1.2 2000-03-01 18:49:33 jeroen Exp $ */
    22
    33/*
     
    3636#include "bbox.h"
    3737#include "clip.h"
     38#include "types.h"
    3839#include "context.h"
    3940#include "cva.h"
     
    4849#include "shade.h"
    4950#include "stages.h"
    50 #include "types.h"
    5151#include "translate.h"
    5252#include "xform.h"
  • trunk/src/opengl/mesa/pixel.c

    r2938 r2962  
    1 /* $Id: pixel.c,v 1.1 2000-02-29 00:50:08 sandervl Exp $ */
     1/* $Id: pixel.c,v 1.2 2000-03-01 18:49:33 jeroen Exp $ */
    22
    33/*
     
    4444#include "GL/xf86glx.h"
    4545#endif
     46#include "types.h"
    4647#include "context.h"
    4748#include "macros.h"
    4849#include "pixel.h"
    49 #include "types.h"
    5050#endif
    5151
  • trunk/src/opengl/mesa/pointers.c

    r2938 r2962  
    1 /* $Id: pointers.c,v 1.1 2000-02-29 00:50:08 sandervl Exp $ */
     1/* $Id: pointers.c,v 1.2 2000-03-01 18:49:34 jeroen Exp $ */
    22
    33/*
     
    4545#include "blend.h"
    4646#include "clip.h"
     47#include "types.h"
    4748#include "context.h"
    4849#include "colortab.h"
     
    7677#include "texobj.h"
    7778#include "texstate.h"
    78 #include "types.h"
    7979#include "varray.h"
    8080#include "vbfill.h"
  • trunk/src/opengl/mesa/points.c

    r2938 r2962  
    1 /* $Id: points.c,v 1.1 2000-02-29 00:50:08 sandervl Exp $ */
     1/* $Id: points.c,v 1.2 2000-03-01 18:49:34 jeroen Exp $ */
    22
    33/*
     
    3636#include "GL/xf86glx.h"
    3737#endif
     38#include "types.h"
    3839#include "context.h"
    3940#include "feedback.h"
     
    4445#include "span.h"
    4546#include "texstate.h"
    46 #include "types.h"
    4747#include "vb.h"
    4848#include "mmath.h"
  • trunk/src/opengl/mesa/polygon.c

    r2938 r2962  
    1 /* $Id: polygon.c,v 1.1 2000-02-29 00:50:09 sandervl Exp $ */
     1/* $Id: polygon.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    3939#include "GL/xf86glx.h"
    4040#endif
     41#include "types.h"
    4142#include "context.h"
    4243#include "image.h"
     
    4445#include "macros.h"
    4546#include "polygon.h"
    46 #include "types.h"
    4747#endif
    4848
  • trunk/src/opengl/mesa/rastpos.c

    r2938 r2962  
    1 /* $Id: rastpos.c,v 1.1 2000-02-29 00:50:09 sandervl Exp $ */
     1/* $Id: rastpos.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    3939#endif
    4040#include "clip.h"
     41#include "types.h"
    4142#include "context.h"
    4243#include "feedback.h"
     
    4748#include "rastpos.h"
    4849#include "shade.h"
    49 #include "types.h"
    5050#include "xform.h"
    5151#endif
  • trunk/src/opengl/mesa/readpix.c

    r2938 r2962  
    1 /* $Id: readpix.c,v 1.1 2000-02-29 00:50:09 sandervl Exp $ */
     1/* $Id: readpix.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    4040#endif
    4141#include "alphabuf.h"
     42#include "types.h"
    4243#include "context.h"
    4344#include "depth.h"
     
    4950#include "span.h"
    5051#include "stencil.h"
    51 #include "types.h"
    5252#endif
    5353
     
    6060static void read_index_pixels( GLcontext *ctx,
    6161                               GLint x, GLint y,
    62                                GLsizei width, GLsizei height,
     62                               GLsizei width, GLsizei height,
    6363                               GLenum type, GLvoid *pixels,
    6464                               const struct gl_pixelstore_attrib *packing )
  • trunk/src/opengl/mesa/rect.c

    r2938 r2962  
    1 /* $Id: rect.c,v 1.1 2000-02-29 00:50:09 sandervl Exp $ */
     1/* $Id: rect.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "macros.h"
  • trunk/src/opengl/mesa/scissor.c

    r2938 r2962  
    1 /* $Id: scissor.c,v 1.1 2000-02-29 00:50:09 sandervl Exp $ */
     1/* $Id: scissor.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    3838#include "GL/xf86glx.h"
    3939#endif
     40#include "types.h"
    4041#include "context.h"
    4142#include "macros.h"
    4243#include "scissor.h"
    43 #include "types.h"
    4444#endif
    4545
  • trunk/src/opengl/mesa/stages.c

    r2938 r2962  
    1 /* $Id: stages.c,v 1.1 2000-02-29 00:50:10 sandervl Exp $ */
     1/* $Id: stages.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    3636#include "bbox.h"
    3737#include "clip.h"
     38#include "types.h"
    3839#include "context.h"
    3940#include "cva.h"
     
    4445#include "shade.h"
    4546#include "stages.h"
    46 #include "types.h"
    4747#include "translate.h"
    4848#include "vbcull.h"
  • trunk/src/opengl/mesa/stencil.c

    r2938 r2962  
    1 /* $Id: stencil.c,v 1.1 2000-02-29 00:50:10 sandervl Exp $ */
     1/* $Id: stencil.c,v 1.2 2000-03-01 18:49:35 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "macros.h"
    4142#include "pb.h"
    4243#include "stencil.h"
    43 #include "types.h"
    4444#include "enable.h"
    4545#endif
  • trunk/src/opengl/mesa/teximage.c

    r2938 r2962  
    1 /* $Id: teximage.c,v 1.1 2000-02-29 00:50:11 sandervl Exp $ */
     1/* $Id: teximage.c,v 1.2 2000-03-01 18:49:36 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "image.h"
     
    4445#include "teximage.h"
    4546#include "texstate.h"
    46 #include "types.h"
    4747#endif
    4848
  • trunk/src/opengl/mesa/texobj.c

    r2938 r2962  
    1 /* $Id: texobj.c,v 1.1 2000-02-29 00:50:11 sandervl Exp $ */
     1/* $Id: texobj.c,v 1.2 2000-03-01 18:49:36 jeroen Exp $ */
    22
    33/*
     
    3939#include "GL/xf86glx.h"
    4040#endif
     41#include "types.h"
    4142#include "context.h"
    4243#include "enums.h"
     
    4647#include "texstate.h"
    4748#include "texobj.h"
    48 #include "types.h"
    4949#endif
    5050
  • trunk/src/opengl/mesa/texstate.c

    r2938 r2962  
    1 /* $Id: texstate.c,v 1.1 2000-02-29 00:50:12 sandervl Exp $ */
     1/* $Id: texstate.c,v 1.2 2000-03-01 18:49:36 jeroen Exp $ */
    22
    33/*
     
    3636#include "GL/xf86glx.h"
    3737#endif
     38#include "types.h"
    3839#include "context.h"
    3940#include "enums.h"
     
    4445#include "texstate.h"
    4546#include "texture.h"
    46 #include "types.h"
    4747#include "xform.h"
    4848#endif
  • trunk/src/opengl/mesa/texture.c

    r2938 r2962  
    1 /* $Id: texture.c,v 1.1 2000-02-29 00:50:12 sandervl Exp $ */
     1/* $Id: texture.c,v 1.2 2000-03-01 18:49:37 jeroen Exp $ */
    22
    33/*
     
    3636#include "GL/xf86glx.h"
    3737#endif
     38#include "types.h"
    3839#include "context.h"
    3940#include "macros.h"
     
    4142#include "pb.h"
    4243#include "texture.h"
    43 #include "types.h"
    4444#include "xform.h"
    4545#endif
  • trunk/src/opengl/mesa/triangle.c

    r2938 r2962  
    1 /* $Id: triangle.c,v 1.1 2000-02-29 00:50:12 sandervl Exp $ */
     1/* $Id: triangle.c,v 1.2 2000-03-01 18:49:38 jeroen Exp $ */
    22
    33/*
     
    4545#include "GL/xf86glx.h"
    4646#endif
     47#include "types.h"
    4748#include "context.h"
    4849#include "depth.h"
     
    5354#include "texstate.h"
    5455#include "triangle.h"
    55 #include "types.h"
    5656#include "vb.h"
    5757#endif
     
    5959
    6060GLboolean gl_cull_triangle( GLcontext *ctx,
    61                             GLuint v0, GLuint v1, GLuint v2, GLuint pv )
     61                            GLuint v0, GLuint v1, GLuint v2, GLuint pv )
    6262{
    6363   struct vertex_buffer *VB = ctx->VB;
  • trunk/src/opengl/mesa/types.h

    r2938 r2962  
    1 /* $Id: types.h,v 1.1 2000-02-29 00:48:41 sandervl Exp $ */
     1/* $Id: types.h,v 1.2 2000-03-01 18:49:38 jeroen Exp $ */
    22
    33/*
     
    184184 * Blending function
    185185 */
    186 typedef void (*blend_func)( GLcontext *ctx, GLuint n, const GLubyte mask[],
     186typedef void (* __cdecl blend_func)( GLcontext *ctx, GLuint n, const GLubyte mask[],
    187187                            GLubyte src[][4], CONST GLubyte dst[][4] );
    188188
  • trunk/src/opengl/mesa/varray.c

    r2938 r2962  
    1 /* $Id: varray.c,v 1.1 2000-02-29 00:50:13 sandervl Exp $ */
     1/* $Id: varray.c,v 1.2 2000-03-01 18:49:38 jeroen Exp $ */
    22
    33/*
     
    3535#include "GL/xf86glx.h"
    3636#endif
     37#include "types.h"
    3738#include "context.h"
    3839#include "api.h"
     
    4748#include "texstate.h"
    4849#include "translate.h"
    49 #include "types.h"
    5050#include "varray.h"
    5151#include "vb.h"
  • trunk/src/opengl/mesa/vbcull.c

    r2938 r2962  
    1 /* $Id: vbcull.c,v 1.1 2000-02-29 00:50:13 sandervl Exp $ */
     1/* $Id: vbcull.c,v 1.2 2000-03-01 18:49:39 jeroen Exp $ */
    22
    33/*
     
    3838#include "GL/xf86glx.h"
    3939#endif
     40#include "types.h"
    4041#include "context.h"
    4142#include "macros.h"
    42 #include "types.h"
    4343#include "vb.h"
    4444#include "vbcull.h"
  • trunk/src/opengl/mesa/vbfill.c

    r2938 r2962  
    1 /* $Id: vbfill.c,v 1.1 2000-02-29 00:50:14 sandervl Exp $ */
     1/* $Id: vbfill.c,v 1.2 2000-03-01 18:49:39 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "enums.h"
     
    4344#include "matrix.h"
    4445#include "mmath.h"
    45 #include "types.h"
    4646#include "varray.h"
    4747#include "vb.h"
  • trunk/src/opengl/mesa/vbrender.c

    r2938 r2962  
    1 /* $Id: vbrender.c,v 1.1 2000-02-29 00:50:14 sandervl Exp $ */
     1/* $Id: vbrender.c,v 1.2 2000-03-01 18:49:39 jeroen Exp $ */
    22
    33/*
     
    4848#endif
    4949#include "clip.h"
     50#include "types.h"
    5051#include "context.h"
    5152#include "light.h"
     
    5758#include "pipeline.h"
    5859#include "stages.h"
    59 #include "types.h"
    6060#include "vb.h"
    6161#include "vbcull.h"
  • trunk/src/opengl/mesa/vbxform.c

    r2938 r2962  
    1 /* $Id: vbxform.c,v 1.1 2000-02-29 00:50:14 sandervl Exp $ */
     1/* $Id: vbxform.c,v 1.2 2000-03-01 18:49:39 jeroen Exp $ */
    22
    33/*
     
    3737#include "GL/xf86glx.h"
    3838#endif
     39#include "types.h"
    3940#include "context.h"
    4041#include "cva.h"
     
    5152#include "shade.h"
    5253#include "texture.h"
    53 #include "types.h"
    5454#include "varray.h"
    5555#include "vb.h"
  • trunk/src/opengl/mesa/vertices.c

    r2938 r2962  
    1 /* $Id: vertices.c,v 1.1 2000-02-29 00:50:15 sandervl Exp $ */
     1/* $Id: vertices.c,v 1.2 2000-03-01 18:49:39 jeroen Exp $ */
    22
    33/*
     
    6868
    6969
    70 static void transform_v16(GLfloat *f,
    71                           const GLfloat *m,
    72                           const GLfloat *obj,
    73                           GLuint obj_stride,
    74                           GLuint count )
     70static void __cdecl transform_v16(GLfloat *f,
     71                          const GLfloat *m,
     72                          const GLfloat *obj,
     73                          GLuint obj_stride,
     74                          GLuint count )
    7575{
    7676   GLuint i;
     
    122122      if (!*clipmask) {
    123123         const GLfloat oow = 1.0F / f[3];
    124         f[0] = sx * f[0] * oow + tx;
    125         f[1] = sy * f[1] * oow + ty;
    126         f[2] = sz * f[2] * oow + tz;
    127         f[3] = oow;
     124        f[0] = sx * f[0] * oow + tx;
     125        f[1] = sy * f[1] * oow + ty;
     126        f[2] = sz * f[2] * oow + tz;
     127        f[3] = oow;
    128128      }
    129129   }
     
    133133
    134134
    135 static void cliptest_v16( GLfloat *first,
    136                           GLfloat *last,
    137                           GLubyte *p_clipOr,
    138                           GLubyte *p_clipAnd,
    139                           GLubyte *clipmask )
    140 {       
     135static void __cdecl cliptest_v16( GLfloat *first,
     136                          GLfloat *last,
     137                          GLubyte *p_clipOr,
     138                          GLubyte *p_clipAnd,
     139                          GLubyte *clipmask )
     140{
    141141   GLubyte clipAnd = (GLubyte) ~0;
    142142   GLubyte clipOr = 0;
  • trunk/src/opengl/mesa/vertices.h

    r2938 r2962  
    1 /* $Id: vertices.h,v 1.1 2000-02-29 00:48:43 sandervl Exp $ */
     1/* $Id: vertices.h,v 1.2 2000-03-01 18:49:39 jeroen Exp $ */
    22
    33/*
     
    3030
    3131
    32 typedef void (*gl_transform_func)( GLfloat *first_vert,
    33                                    const GLfloat *m,
    34                                    const GLfloat *src,
    35                                    GLuint src_stride,
    36                                    GLuint count );
     32typedef void (* __cdecl gl_transform_func)( GLfloat *first_vert,
     33                                   const GLfloat *m,
     34                                   const GLfloat *src,
     35                                   GLuint src_stride,
     36                                   GLuint count );
    3737
    38 typedef void (*gl_cliptest_func)( GLfloat *first_vert,
    39                                   GLfloat *last_vert, /* use count instead? */
    40                                   GLubyte *or_mask,
    41                                   GLubyte *and_mask,
    42                                   GLubyte *clip_mask );
     38typedef void (* __cdecl gl_cliptest_func)( GLfloat *first_vert,
     39                                  GLfloat *last_vert, /* use count instead? */
     40                                  GLubyte *or_mask,
     41                                  GLubyte *and_mask,
     42                                  GLubyte *clip_mask );
    4343
    4444typedef void (*gl_project_clipped_func)( GLfloat *first,
  • trunk/src/opengl/mesa/wgl.c

    r2938 r2962  
    1 /* $Id: wgl.c,v 1.1 2000-02-29 00:50:15 sandervl Exp $ */
     1/* $Id: wgl.c,v 1.2 2000-03-01 18:49:40 jeroen Exp $ */
    22
    33/*
     
    3838#include <tchar.h>
    3939#include "gl.h"
     40#include "types.h"
     41#include "context.h"
    4042#include "wmesadef.h"
    4143#include "wmesa.h"
    42 #include "types.h"
    4344
    4445#define MAX_MESA_ATTRS  20
     
    484485}
    485486
    486 GLAPI BOOL GLWINAPI wglSetPixelFormat(HDC hdc,int iPixelFormat,
     487GLAPI BOOL GLWINAPI wglSetPixelFormat(HDC hdc, int iPixelFormat,
    487488                                PIXELFORMATDESCRIPTOR *ppfd)
    488489{
     
    512513}
    513514
    514 #endif /* WIN32 or __WIN32OS2__ */
     515#endif                                 /* WIN32 or __WIN32OS2__            */
  • trunk/src/opengl/mesa/winpos.c

    r2938 r2962  
    1 /* $Id: winpos.c,v 1.1 2000-02-29 00:50:15 sandervl Exp $ */
     1/* $Id: winpos.c,v 1.2 2000-03-01 18:49:40 jeroen Exp $ */
    22
    33/*
     
    8686 * OpenGL implementation of glWindowPos*MESA()
    8787 */
    88 /* FIX: JvdH - was glWindowPos4fMESA */
    8988void glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
    9089{
  • trunk/src/opengl/mesa/wmesa.c

    r2938 r2962  
    1 /* $Id: wmesa.c,v 1.1 2000-02-29 00:50:15 sandervl Exp $ */
     1/* $Id: wmesa.c,v 1.2 2000-03-01 18:49:40 jeroen Exp $ */
    22
    33/*
     
    2323/*
    2424 * $Log: wmesa.c,v $
    25  * Revision 1.1  2000-02-29 00:50:15  sandervl
    26  * created
     25 * Revision 1.2  2000-03-01 18:49:40  jeroen
     26 * *** empty log message ***
    2727 *
    2828 * Revision 1.1.1.1  1999/08/19 00:55:42  jtg
     
    6767#define WMESA_STEREO_C
    6868
     69#ifdef __WIN32OS2__
     70#include <os2win.h>
     71#else
    6972#include <windows.h>
     73#endif
    7074#include <stdio.h>
    7175#include <stdlib.h>
     
    7478#include "colors.h"
    7579#include "macros.h"
     80#include "types.h"
    7681#include "context.h"
    7782#include "dd.h"
     
    8489#ifndef __WIN32OS2__
    8590#pragma warning ( disable : 4133 4761 )
     91#else
     92#ifdef DIVE
     93#include <mesadive.h>
     94extern HWND Win32ToOS2Handle(HWND);
     95#endif
    8696#endif
    8797
     
    122132/* end of added code*/
    123133
    124 static PWMC Current = NULL;
     134PWMC Current = NULL;
    125135WMesaContext WC = NULL;
    126136
     
    134144    char Msg[512];
    135145    sprintf(Msg,"%s %s %d",Cond,File,Line);
     146#ifdef __WIN32OS2__
     147    dprintf((Msg,"%s %s %d",Cond,File,Line));
     148#endif
    136149    MessageBox(NULL,Msg,"Assertion failed.",MB_OK);
    137150    exit(1);
     
    214227static void wmSetPixelFormat( PWMC wc, HDC hDC)
    215228{
     229  dprintf(("OPENGL32: Setting PixelFormat\n"));
     230
     231#ifdef DIVE
     232  wc->cColorBits=DiveQueryDepth();
     233
     234  wc->pixelformat=DiveQueryNativePixelFormat();
     235#else
    216236    if(wc->rgb_flag)
    217         wc->cColorBits = GetDeviceCaps(hDC, BITSPIXEL);
     237      wc->cColorBits = GetDeviceCaps(hDC, BITSPIXEL);
    218238    else
    219         wc->cColorBits = 8;
     239      wc->cColorBits = 8;
     240
    220241    switch(wc->cColorBits){
    221242    case 8:
     
    225246            wc->pixelformat = PF_DITHER8;
    226247        break;
     248
    227249    case 16:
    228250        wc->pixelformat = PF_5R6G5B;
    229251        break;
     252
    230253    case 32:
    231254        wc->pixelformat = PF_8R8G8B;
    232255        break;
    233     default:
     256
     257    default:                                    /* This also handles 24 bpp*/
    234258        wc->pixelformat = PF_BADFORMAT;
    235     }
     259      break;
     260    }
     261#endif
     262
     263  dprintf(("OPENGL32: Color Bits: %d\n",wc->cColorBits));
    236264}
    237265
    238266//
    239 // This function sets the color table of a DIB section
    240 // to match that of the destination DC
     267                     /* This function sets the color table of a DIB section*/
     268                                     /* to match that of the destination DC*/
    241269//
    242270BOOL /*WINAPI*/ wmSetDibColors(PWMC pwc)
     
    297325    LPBITMAPINFO pbmi = &(pwc->bmi);
    298326    int     iUsage;
     327
     328    dprintf(("OPENGL32: Creating BackingStore for %08X\n",pwc));
    299329
    300330    pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
     
    341371    DWORD   dwScanWidth = (uiScanWidth * nBypp);
    342372
    343     dprintf(("OPENGL32: wmSetDIBits\n"));
    344 
    345373    //
    346374    // We need to round up to the nearest DWORD
     
    400428        }
    401429        ENDPROFILE(flush)
    402 
    403 }
    404 
    405 
     430}
    406431
    407432/*
     
    433458* or index as specified by one of the two functions above.
    434459*/
    435 //static void clear(GLcontext* ctx,
    436 //                  GLboolean all,GLint x, GLint y, GLint width, GLint height )
    437 // TODO: I modified this function to match the prototype in dd.h. (swansma@geocities.com)
    438 //       dd.h does not explain what the return type is so I could not set this to the proper
    439 //       value.
     460                                       /* static void clear(GLcontext* ctx,*/
     461             /* GLboolean all,GLint x, GLint y, GLint width, GLint height )*/
     462/* TODO: I modified this function to match the prototype in dd.h. (swansma@geocities.com)*/
     463/* dd.h does not explain what the return type is so I could not set this to the proper*/
     464                                       /* value.                           */
    440465static GLbitfield clear(GLcontext* ctx, GLbitfield mask,
    441466                  GLboolean all, GLint x, GLint y, GLint width, GLint height)
     
    449474    int     lines;
    450475
    451     dprintf(("OPENGL32: clear\n"));
     476    dprintf(("OPENGL32: clear - all %08d - x %d - y %d - width %d - height %d\n",
     477             all,x,y,width,height));
    452478
    453479    STARTPROFILE
     
    458484            height=Current->height;
    459485        }
     486
     487    dprintf(("OPENGL32: clear - all %08d - x %d - y %d - width %d - height %d\n",
     488             all,x,y,width,height));
     489
    460490        if(Current->db_flag==GL_TRUE){
    461491            UINT    nBypp = Current->cColorBits / 8;
    462492            int     i = 0;
    463493            int     iSize = 0;
     494
     495            dprintf(("OPENGL32: Clearing BackBuffer\n"));
    464496
    465497            if(nBypp ==1 ){
     
    520552            while (i<lines-1);
    521553        }
    522         else { // For single buffer
     554        else
     555          {                                            /* For single buffer*/
     556            dprintf(("OPENGL32: Clearing FrontBuffer\n"));
     557
    523558            HDC DC=DD_GETDC;
     559
     560            dprintf(("OPENGL32: Clearing FrontBuffer DC is %08X\n",DC));
     561
    524562            HPEN Pen=CreatePen(PS_SOLID,1,Current->clearpixel);
    525563            HBRUSH Brush=CreateSolidBrush(Current->clearpixel);
    526564            HPEN Old_Pen=SelectObject(DC,Pen);
    527565            HBRUSH Old_Brush=SelectObject(DC,Brush);
    528 //            Rectangle(DC,x,y,x+width,y+height);
     566
     567            Rectangle(DC,x,y,x+width,y+height);
     568
    529569            SelectObject(DC,Old_Pen);
    530570            SelectObject(DC,Old_Brush);
    531571            DeleteObject(Pen);
    532572            DeleteObject(Brush);
     573
    533574            DD_RELEASEDC;
    534         }
    535 
    536 
     575          }
    537576
    538577        ENDPROFILE(clear)
    539578
    540                 return mask;    // TODO: I doubt this is correct. dd.h doesn't explain what this should
    541                                 //       be...
     579                return mask;/* TODO: I doubt this is correct. dd.h doesn't explain what this should*/
     580                                       /* be...                            */
    542581}
    543582
     
    640679
    641680   STARTPROFILE
     681
    642682   GetClientRect(Current->Window,&CR);
    643683
     
    651691      Current->height=*height;
    652692      Current->ScanWidth=Current->width;
     693
    653694      if ((Current->ScanWidth%sizeof(long))!=0)
    654695         Current->ScanWidth+=(sizeof(long)-(Current->ScanWidth%sizeof(long)));
    655696
    656697      if (Current->db_flag){
     698#ifdef DIVE
     699         if(!DiveDirectAccess())
     700           if (Current->rgb_flag==GL_TRUE && Current->dither_flag!=GL_TRUE){
     701              wmDeleteBackingStore(Current);
     702              wmCreateBackingStore(Current, Current->width, Current->height);
     703           }
     704#else
    657705#ifdef DDRAW
    658706         DDDeleteOffScreen(Current);
     
    663711            wmCreateBackingStore(Current, Current->width, Current->height);
    664712         }
     713#endif
    665714#endif
    666715      }
     
    719768            }
    720769        }
    721         //   DD_RELEASEDC;
     770
     771                                       /* DD_RELEASEDC;                    */
    722772        ENDPROFILE(fast_rgb_points)
    723773}
     
    753803
    754804    if (0 /*Current->gl_ctx->VB->MonoColor*/) {
    755         pixel = Current->pixel;  /* use current color */
     805        pixel = Current->pixel;                        /* use current color*/
    756806    }
    757807    else {
    758         pixel = RGB((GLubyte)(Current->gl_ctx->VB->ColorPtr->data[pv][0]),
    759                     (GLubyte)(Current->gl_ctx->VB->ColorPtr->data[pv][1]),
    760                     (GLubyte)(Current->gl_ctx->VB->ColorPtr->data[pv][2]));
     808        dprintf(("OPENGL32: READADDR: %08X - pv %d - LINE R-G-B is %d,%d,%d\n",
     809                 Current->gl_ctx->VB->ColorPtr->data[pv],
     810                 pv,
     811                 Current->gl_ctx->VB->ColorPtr->data[pv][0],
     812                 Current->gl_ctx->VB->ColorPtr->data[pv][1],
     813                 Current->gl_ctx->VB->ColorPtr->data[pv][2]));
     814
     815        pixel = RGB((GLubyte)(Current->gl_ctx->VB->ColorPtr->data[pv][0]/* *255.0*/),
     816                    (GLubyte)(Current->gl_ctx->VB->ColorPtr->data[pv][1]/* *255.0*/),
     817                    (GLubyte)(Current->gl_ctx->VB->ColorPtr->data[pv][2]/* *255.0*/));
     818
     819        dprintf(("OPENGL32: PIXEL set to %08X",pixel));
    761820    }
    762821
     
    769828    BEGINGDICALL
    770829
    771     Pen=CreatePen(PS_SOLID,1,pixel);
     830    Pen=CreatePen(PS_SOLID,1,(COLORREF)pixel);
    772831    Old_Pen=SelectObject(DC,Pen);
    773832    MoveToEx(DC,x0,y0,NULL);
     
    902961        }
    903962    }
     963
    904964    ENDPROFILE(write_rgba_span)
    905965
     
    9451005        }
    9461006    }
     1007
    9471008    ENDPROFILE(write_rgb_span)
    9481009
     
    9631024    assert(Current->rgb_flag==GL_TRUE);
    9641025    y=FLIP(y);
     1026
    9651027    if(Current->rgb_flag==GL_TRUE){
    9661028        for (i=0; i<n; i++)
    9671029            if (mask[i])
    968                 // Trying
     1030                                       /* Trying                           */
    9691031                wmSetPixel(pwc,y,x+i,GetRValue(Current->pixel), GetGValue(Current->pixel), GetBValue(Current->pixel));
    9701032    }
     
    9751037    }
    9761038    DD_RELEASEDC;
     1039
    9771040    ENDPROFILE(write_mono_rgba_span)
    9781041}
     
    10331096{
    10341097    STARTPROFILE
     1098
    10351099        GLuint i;
    10361100    PWMC    pwc = Current;
    10371101    HDC DC=DD_GETDC;
    10381102    assert(Current->rgb_flag==GL_TRUE);
     1103
    10391104    for (i=0; i<n; i++)
    10401105       if (mask[i])
    10411106          wmSetPixel(pwc, FLIP(y[i]),x[i],rgba[i][RCOMP],rgba[i][GCOMP],rgba[i][BCOMP]);
     1107
    10421108    DD_RELEASEDC;
    10431109    ENDPROFILE(write_rgba_pixels)
     
    10601126    HDC DC=DD_GETDC;
    10611127    assert(Current->rgb_flag==GL_TRUE);
     1128
    10621129    for (i=0; i<n; i++)
    10631130        if (mask[i])
    10641131            wmSetPixel(pwc, FLIP(y[i]),x[i],GetRValue(Current->pixel),
    10651132                       GetGValue(Current->pixel), GetBValue(Current->pixel));
     1133
    10661134    DD_RELEASEDC;
    10671135    ENDPROFILE(write_mono_rgba_pixels)
     
    12851353}
    12861354
    1287 
    1288 WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
     1355void WMesaUpdateScreenPos(PWMC c,HWND hWnd)
     1356{
     1357  RECT CR;
     1358
     1359  GetWindowRect(hWnd,&CR);
     1360
     1361  c->WinPos.x=CR.left+GetSystemMetrics(SM_CXFRAME);
     1362  c->WinPos.y=CR.top+GetSystemMetrics(SM_CYCAPTION)+GetSystemMetrics(SM_CYFRAME);
     1363
     1364  c->width=CR.right-CR.left-2*GetSystemMetrics(SM_CXFRAME);
     1365  c->height=CR.bottom-CR.top-GetSystemMetrics(SM_CYCAPTION)-2*GetSystemMetrics(SM_CYFRAME);
     1366
     1367  dprintf(("OPENGL32: WMesaUpdateScreenPos %08X - x/y %d/%d, w/h %d/%d\n",
     1368           hWnd,
     1369           c->WinPos.x,
     1370           c->WinPos.y,
     1371           c->width,
     1372           c->height));
     1373}
     1374
     1375WMesaContext WIN32API WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
    12891376                                GLboolean rgb_flag,
    12901377                                GLboolean db_flag )
     
    12941381    GLboolean true_color_flag;
    12951382    c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
     1383
     1384    dprintf(("OPENGL32: Creating MESA Context (%s)\n",
     1385             db_flag?"DOUBLE BUFFERED":"SINGLE_BUFFERED"));
     1386
    12961387    if (!c)
    12971388        return NULL;
     
    13001391    c->hDC = GetDC(hWnd);
    13011392    true_color_flag = GetDeviceCaps(c->hDC, BITSPIXEL) > 8;
    1302 #ifdef DDRAW
     1393
     1394#if defined(DDRAW) || defined(DIVE)
    13031395    if(true_color_flag) c->rgb_flag = rgb_flag = GL_TRUE;
    13041396#endif
     
    13161408#endif
    13171409
     1410    dprintf(("OPENGL32: WMesaCreateContext - db_flag is %d\n",db_flag));
    13181411
    13191412    if (rgb_flag==GL_FALSE)
    13201413    {
    13211414        c->rgb_flag = GL_FALSE;
    1322         //    c->pixel = 1;
    1323         c->db_flag = db_flag =GL_TRUE; // WinG requires double buffering
    1324         printf("Single buffer is not supported in color index mode, setting to double buffer.\n");
     1415#ifndef DIVE
     1416        c->db_flag = db_flag =GL_TRUE;    /* WinG requires double buffering*/
     1417
     1418        dprintf(("OPENGL32: Single buffer is not supported in color index mode, setting to double buffer.\n"));
     1419#endif
    13251420    }
    13261421    else
    13271422    {
    13281423        c->rgb_flag = GL_TRUE;
    1329         //    c->pixel = 0;
    1330     }
     1424                                       /* c->pixel = 0;                    */
     1425    }
     1426
    13311427    GetClientRect(c->Window,&CR);
     1428
    13321429    c->width=CR.right;
    13331430    c->height=CR.bottom;
     1431
    13341432    if (db_flag)
    13351433    {
    13361434        c->db_flag = 1;
    13371435        /* Double buffered */
    1338 #ifndef DDRAW
    1339         //  if (c->rgb_flag==GL_TRUE && c->dither_flag != GL_TRUE )
     1436#if !defined(DDRAW) && !defined(DIVE)
     1437                 /* if (c->rgb_flag==GL_TRUE && c->dither_flag != GL_TRUE )*/
    13401438        {
    13411439            wmCreateBackingStore(c, c->width, c->height);
    13421440
    13431441        }
     1442#else
     1443#ifdef DIVE
     1444            /* Dive direct access unavailable - switch to DIB mode */
     1445            if(!DiveDirectAccess())
     1446              wmCreateBackingStore(c, c->width, c->height);
     1447#endif
    13441448#endif
    13451449    }
     
    13501454            c->db_flag = 0;
    13511455    }
     1456
     1457    /* Also set the correct PixelFormat now! */
     1458    wmSetPixelFormat(c, c->hDC);
     1459
     1460#ifdef DIVE
     1461    /* Store window position for DIVE draws - all x/y's are relative to this */
     1462    /* base position of the screen...                                        */
     1463    dprintf(("OPENGL32: Creating context (%08X)\n",c));
     1464
     1465    WMesaUpdateScreenPos(c,hWnd);
     1466
     1467    if(DiveDirectAccess())
     1468      if(!DiveInit(c,hWnd))
     1469        {
     1470          free( (void *) c );
     1471          Current=0;
     1472          dprintf(("OPENGL32: DIVEINIT failed - exiting!\n"));
     1473          MessageBoxA( hWnd, "Dive Init FAILED", "", MB_OK );
     1474          exit(1);
     1475        }
     1476#else
    13521477#ifdef DDRAW
    13531478    if (DDInit(c,hWnd) == GL_FALSE) {
    13541479        free( (void *) c );
     1480        dprintf(("OPENGL32: DIVEINIT failed - exiting!\n"));
    13551481        exit(1);
    13561482    }
    13571483#endif
    1358 
     1484#endif
     1485
     1486/* JvdH - Enable software Alpha! (was FALSE!!) */
    13591487
    13601488    c->gl_visual = gl_create_visual(rgb_flag,
    1361                                     GL_FALSE,   /* software alpha */
    1362                                     db_flag,    /* db_flag */
    1363                                     GL_FALSE,   /* stereo */
    1364                                     16,         /* depth_bits */
    1365                                     8,          /* stencil_bits */
    1366                                     8,          /* accum_bits */
    1367                                     0,          /* index bits */
    1368                                     8,8,8,8 );  /* r, g, b, a bits */
     1489                                    GL_TRUE,              /* software alpha*/
     1490                                    db_flag,                     /* db_flag*/
     1491                                    GL_FALSE,                     /* stereo*/
     1492                                    16,                       /* depth_bits*/
     1493                                    8,                      /* stencil_bits*/
     1494                                    8,                        /* accum_bits*/
     1495                                    0,                        /* index bits*/
     1496                                    8,8,8,8 );           /* r, g, b, a bits*/
    13691497
    13701498    if (!c->gl_visual) {
     
    13821510
    13831511    c->gl_buffer = gl_create_framebuffer( c->gl_visual );
     1512
    13841513    if (!c->gl_buffer) {
    13851514        gl_destroy_visual( c->gl_visual );
     
    13891518    }
    13901519
    1391         c->gl_ctx->Driver.UpdateState = setup_DD_pointers;
    1392 
    1393     //  setup_DD_pointers(c->gl_ctx);
     1520    c->gl_ctx->Driver.UpdateState = setup_DD_pointers;
     1521
     1522                                       /* setup_DD_pointers(c->gl_ctx);    */
     1523
     1524    dprintf(("OPENGL32: Created context %08X - (%s)\n",c,c->db_flag?"DOUBLE":"SINGLE"));
    13941525
    13951526    return c;
    13961527}
    13971528
    1398 void WMesaDestroyContext( void )
     1529void WIN32API WMesaDestroyContext( void )
    13991530{
    14001531    WMesaContext c = Current;
     1532
    14011533    ReleaseDC(c->Window,c->hDC);
     1534
    14021535    WC = c;
     1536
    14031537    if(c->hPalHalfTone != NULL)
    14041538        DeleteObject(c->hPalHalfTone);
     1539
    14051540    gl_destroy_visual( c->gl_visual );
    14061541    gl_destroy_framebuffer( c->gl_buffer );
     
    14081543
    14091544    if (c->db_flag)
     1545#ifdef DIVE
     1546    if(DiveDirectAccess())
     1547      {
     1548        DiveFree(c);
     1549                                       /* Clean up the screen on exit      */
     1550        RedrawWindow( NULL, NULL, NULL, RDW_INVALIDATE | RDW_ERASE |
     1551            RDW_ALLCHILDREN );
     1552      }
     1553    else
     1554      wmDeleteBackingStore(c);
     1555#else
    14101556#ifdef DDRAW
     1557      {
    14111558        DDFree(c);
     1559      }
    14121560#else
    14131561    wmDeleteBackingStore(c);
    14141562#endif
     1563#endif
    14151564    free( (void *) c );
    1416     //Following code is added to enable parallel render
    1417     // Parallel render only work in double buffer mode
     1565
     1566    /* Set current context to 0, otherwise exitlist-routine will trap */
     1567    Current=0;
     1568                       /* Following code is added to enable parallel render*/
     1569                         /* Parallel render only work in double buffer mode*/
    14181570#if !defined(NO_PARALLEL)
    14191571    if(parallelMachine)
    14201572        PRDestroyRenderBuffer();
    14211573#endif
    1422     // End modification
    1423 }
    1424 
    1425 
     1574                                       /* End modification                 */
     1575}
    14261576
    14271577void WIN32API WMesaMakeCurrent( WMesaContext c )
    14281578{
     1579  dprintf(("OPENGL32: WMesaMakeCurrent %08X\n",c));
     1580
    14291581    if(!c){
    14301582        Current = c;
     
    14591611{
    14601612    HDC DC = Current->hDC;
     1613
     1614    dprintf(("OPENGL32: WMesaSwapBuffers() - Current %08X (%s)\n",
     1615             Current,Current->db_flag?"DOUBLE":"SINGLE"));
     1616
    14611617    if (Current->db_flag)
    14621618        wmFlush(Current);
     
    14691625    int vRet;
    14701626    LPPALETTEENTRY pPal;
     1627    ULONG rc;
     1628
     1629    dprintf(("OPENGL32: WMesaPaletteChange - Pal %08X",Pal));
     1630
    14711631    if (Current && (Current->rgb_flag==GL_FALSE || Current->dither_flag == GL_TRUE))
    14721632    {
    14731633        pPal = (PALETTEENTRY *)malloc( 256 * sizeof(PALETTEENTRY));
    14741634        Current->hPal=Pal;
    1475         //  GetPaletteEntries( Pal, 0, 256, pPal );
     1635                                 /* GetPaletteEntries( Pal, 0, 256, pPal );*/
    14761636        GetPalette( Pal, (RGBQUAD *)pPal );
     1637#ifdef DIVE
     1638/*        rc=DiveSetSourcePalette(Current->hDiveInstance,
     1639                                0,
     1640                                256,
     1641                                (PBYTE)pPal);
     1642*/
     1643        dprintf(("OPENGL32: DiveSetupSourcePalette rc %d\n",rc));
     1644#else
    14771645#ifdef DDRAW
    14781646        Current->lpDD->lpVtbl->CreatePalette(Current->lpDD,DDPCAPS_8BIT,
     
    14811649            Current->lpDDSPrimary->lpVtbl->SetPalette(Current->lpDDSPrimary,Current->lpDDPal);
    14821650#else
    1483         vRet = SetDIBColorTable(Current->dib.hDC,0,256,(RGBQUAD *)pPal);
     1651        vRet = SetDIBColorTable(Current->dib.hDC,0,256, (RGBQUAD *)pPal);
     1652#endif
    14841653#endif
    14851654        free( pPal );
     
    15771746}
    15781747
     1748void DibSetPixel(PWMC pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b)
     1749{
     1750   if (Current->db_flag)
     1751   {
     1752       LPBYTE  lpb = pwc->pbPixels;
     1753       LPDWORD lpdw;
     1754       LPWORD  lpw;
     1755       UINT    nBypp = pwc->cColorBits >> 3;
     1756       UINT    nOffset = iPixel % nBypp;
     1757
     1758       // Move the pixel buffer pointer to the scanline that we
     1759       // want to access
     1760
     1761       //      pwc->dib.fFlushed = FALSE;
     1762
     1763       lpb += pwc->ScanWidth * iScanLine;
     1764                                      /* Now move to the desired pixel    */
     1765       lpb += iPixel * nBypp;
     1766       lpb = PIXELADDR(iPixel, iScanLine);
     1767       lpdw = (LPDWORD)lpb;
     1768       lpw = (LPWORD)lpb;
     1769
     1770       if(nBypp == 1){
     1771           if(pwc->dither_flag)
     1772               *lpb = DITHER_RGB_2_8BIT(r,g,b,iScanLine,iPixel);
     1773           else
     1774               *lpb = BGR8(r,g,b);
     1775       }
     1776       else if(nBypp == 2)
     1777           *lpw = BGR16(r,g,b);
     1778       else if (nBypp == 3){
     1779           *lpdw = BGR24(r,g,b);
     1780       }
     1781       else if (nBypp == 4)
     1782           *lpdw = BGR32(r,g,b);
     1783   }
     1784   else{
     1785       SetPixel(Current->hDC, iPixel, iScanLine, RGB(r,g,b));
     1786       DD_RELEASEDC;
     1787   }
     1788}
     1789
    15791790void /*WINAPI*/ wmSetPixel(PWMC pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b)
    15801791{
    1581     if (Current->db_flag) {
    1582         LPBYTE  lpb = pwc->pbPixels;
    1583         LPDWORD lpdw;
    1584         LPWORD  lpw;
    1585         UINT    nBypp = pwc->cColorBits >> 3;
    1586         UINT    nOffset = iPixel % nBypp;
    1587 
    1588         // Move the pixel buffer pointer to the scanline that we
    1589         // want to access
    1590 
    1591         //      pwc->dib.fFlushed = FALSE;
    1592 
    1593         lpb += pwc->ScanWidth * iScanLine;
    1594         // Now move to the desired pixel
    1595         lpb += iPixel * nBypp;
    1596         lpb = PIXELADDR(iPixel, iScanLine);
    1597         lpdw = (LPDWORD)lpb;
    1598         lpw = (LPWORD)lpb;
    1599 
    1600         if(nBypp == 1){
    1601             if(pwc->dither_flag)
    1602                 *lpb = DITHER_RGB_2_8BIT(r,g,b,iScanLine,iPixel);
    1603             else
    1604                 *lpb = BGR8(r,g,b);
     1792#ifdef DIVE
     1793  if(DiveDirectAccess())
     1794    {
     1795      if (Current->db_flag)
     1796        {
     1797          /* We're using a buffered context - write to the backbuffer */
     1798          DiveWriteBackbuffer(pwc,iScanLine,iPixel,r,g,b);
    16051799        }
    1606         else if(nBypp == 2)
    1607             *lpw = BGR16(r,g,b);
    1608         else if (nBypp == 3){
    1609             *lpdw = BGR24(r,g,b);
     1800      else
     1801        {
     1802          /* We're using a non-buffered context - write to the video mem! */
     1803          /* TODO: What about cards that do not support direct access??   */
     1804          DiveWriteFrontbuffer(pwc,iScanLine,iPixel,r,g,b);
    16101805        }
    1611         else if (nBypp == 4)
    1612             *lpdw = BGR32(r,g,b);
    1613     }
    1614     else{
    1615         SetPixel(Current->hDC, iPixel, iScanLine, RGB(r,g,b));
    1616         DD_RELEASEDC;
    1617     }
     1806    }
     1807  else
     1808    DibSetPixel(pwc, iScanLine, iPixel, r, g, b);
     1809#else
     1810   DibSetPixel(pwc, iScanLine, iPixel, r, g, b);
     1811#endif
    16181812}
    16191813
    16201814void /*WINAPI*/ wmCreateDIBSection(
    16211815                                   HDC   hDC,
    1622                                    PWMC pwc,    // handle of device context
    1623                                    CONST BITMAPINFO *pbmi,  // address of structure containing bitmap size, format, and color data
    1624                                    UINT iUsage  // color data type indicator: RGB values or palette indices
     1816                                   PWMC pwc,   /* handle of device context */
     1817                                   CONST BITMAPINFO *pbmi,/* address of structure containing bitmap size, format, and color data*/
     1818                                   UINT iUsage/* color data type indicator: RGB values or palette indices*/
    16251819                                   )
    16261820{
     
    16411835    dwSize = sizeof(BITMAPINFO) + (dwScanWidth * pwc->height);
    16421836
     1837#ifdef __WIN32OS2__
     1838    pwc->dib.hFileMap = CreateFileMappingA((HANDLE)PAGE_FILE,
     1839#else
    16431840    pwc->dib.hFileMap = CreateFileMapping((HANDLE)PAGE_FILE,
     1841#endif
    16441842        NULL,
    16451843        PAGE_READWRITE | SEC_COMMIT,
     
    16681866    memcpy(pwc->dib.base, pbmi, sizeof(BITMAPINFO));
    16691867
     1868#ifdef __WIN32OS2__
     1869    hic = CreateICA("display", NULL, NULL, NULL);
     1870#else
    16701871    hic = CreateIC("display", NULL, NULL, NULL);
     1872#endif
    16711873    pwc->dib.hDC = CreateCompatibleDC(hic);
    16721874
     
    16931895        0);
    16941896    */
    1695     dprintf(("CreateDIBSection set pix %08X\n",pwc->pbPixels));
    16961897
    16971898    pwc->ScreenMem = pwc->addrOffScreen = pwc->pbPixels;
     
    17111912    BOOL    bRet = 0;
    17121913    DWORD   dwErr = 0;
     1914#ifdef DIVE
     1915    ULONG rc;
     1916#endif
    17131917#ifdef DDRAW
    17141918    HRESULT             ddrval;
    17151919#endif
    17161920
    1717     // Now search through the torus frames and mark used colors
    17181921    if(pwc->db_flag){
     1922#ifdef DIVE
     1923       if(DiveDirectAccess())
     1924         DiveFlush(pwc);
     1925       else
     1926         bRet = BitBlt(pwc->hDC, 0, 0, pwc->width, pwc->height,
     1927                       pwc->dib.hDC, 0, 0, SRCCOPY);
     1928#else
    17191929#ifdef DDRAW
    17201930        if (pwc->lpDDSOffScreen == NULL)
     
    17561966                pwc->dib.hDC, 0, 0, SRCCOPY);
    17571967#endif
     1968#endif
    17581969    }
    17591970
     
    19562167{
    19572168    DDFree(wc);
     2169#ifdef __WIN32OS2__
     2170    MessageBoxA( hwnd, "DirectDraw Init FAILED", "", MB_OK );
     2171#else
    19582172    MessageBox( hwnd, "DirectDraw Init FAILED", "", MB_OK );
     2173#endif
    19592174    return FALSE;
    19602175
     
    21242339
    21252340   return 0; /* Eliminate compiler warning */
    2126 } /* DDInit */
     2341}                                                                 /* DDInit*/
    21272342
    21282343static void DDFree( WMesaContext wc)
     
    21352350        wc->lpDD = NULL;
    21362351    }
    2137     // Clean up the screen on exit
     2352                                       /* Clean up the screen on exit      */
    21382353    RedrawWindow( NULL, NULL, NULL, RDW_INVALIDATE | RDW_ERASE |
    21392354        RDW_ALLCHILDREN );
     
    21532368    }
    21542369}
    2155 
    2156 
    21572370
    21582371/*
  • trunk/src/opengl/mesa/wmesadef.h

    r2938 r2962  
    1 /* $Id: wmesadef.h,v 1.1 2000-02-29 00:48:44 sandervl Exp $ */
     1/* $Id: wmesadef.h,v 1.2 2000-03-01 18:49:40 jeroen Exp $ */
    22/*      File name       :       wmesadef.h
    33 *  Version             :       2.3
     
    2020/*
    2121 * $Log: wmesadef.h,v $
    22  * Revision 1.1  2000-02-29 00:48:44  sandervl
     22 * Revision 1.2  2000-03-01 18:49:40  jeroen
     23 * *** empty log message ***
     24 *
     25 * Revision 1.1  2000/02/29 00:48:44  sandervl
    2326 * created
    2427 *
     
    3437/*
    3538 * $Log: wmesadef.h,v $
    36  * Revision 1.1  2000-02-29 00:48:44  sandervl
     39 * Revision 1.2  2000-03-01 18:49:40  jeroen
     40 * *** empty log message ***
     41 *
     42 * Revision 1.1  2000/02/29 00:48:44  sandervl
    3743 * created
    3844 *
     
    5056/*
    5157 * $Log: wmesadef.h,v $
    52  * Revision 1.1  2000-02-29 00:48:44  sandervl
     58 * Revision 1.2  2000-03-01 18:49:40  jeroen
     59 * *** empty log message ***
     60 *
     61 * Revision 1.1  2000/02/29 00:48:44  sandervl
    5362 * created
    5463 *
     
    6877#define DDMESADEF_H
    6978
    70 #ifdef __WIN32OS2__
    71 #include <os2win.h>
     79#ifdef __WIN32OS2__/* Nope, we use this hdr in DIVE code, so instead include*/
     80                   /* os2win.h in the source if it is needed! */
     81//#include <os2win.h>
    7282#else
    7383#include <windows.h>
     
    7888#endif
    7989
    80 #include "gl.h"
    81 #include "context.h"
     90//#include "gl.h"
     91//#include "context.h"
    8292//#include "profile.h"
    8393
     
    96106}WMDIBSECTION, *PWMDIBSECTION;
    97107
     108typedef struct tagMY_RECTL
     109  {
     110    LONG xLeft,xRight,yBottom,yTop;
     111  }MY_RECTL;
    98112
    99113typedef struct wmesa_context{
    100     GLcontext *gl_ctx;          /* The core GL/Mesa context */
    101         GLvisual *gl_visual;            /* Describes the buffers */
    102     GLframebuffer *gl_buffer;   /* Depth, stencil, accum, etc buffers */
     114  /* This defs *MUST* be at the TOP, since some structure definitions below  */
     115  /* are NOT correct!! This is because of the fact that wmesa is WIN based,  */
     116  /* whereas this file is OS/2 based. If we put this stuff at the end of the */
     117  /* structure the offsets to for example the hDiveInstance will be          */
     118  /* interpreted differently in this file and in wmesa.c.                    */
     119#ifdef DIVE
     120    ULONG               hDiveInstance; /* This actually is a DIVE Handle   */
     121    ULONG               BackBufferNumber;
     122    PVOID               ppFrameBuffer;
     123    ULONG               ScanLineBytes,ScanLines;
     124    POINT               WinPos;
     125    WNDPROC             hWndProc;
     126    BOOL                DiveSoftwareBlit;/* If BlitSetup failed do it in SW*/
     127    ULONG               NumClipRects;  /* Clip-info is maintained here     */
     128    MY_RECTL            rctls[50];
     129    HRGN                hrgn;
     130    HDC                 hps;
     131    BOOL                BackBufferOwnAllocation;
     132    GLint               awidth,aheight; /* Allocated w/h for ImageBuffer */
     133#endif
     134    PBYTE               pbPixels;
     135    int                 nColors;
     136    BYTE                cColorBits;
     137    int                 pixelformat;
     138    GLboolean           db_flag;       /* double buffered?                 */
     139    GLboolean           rgb_flag;      /* RGB mode?                        */
     140    GLboolean           dither_flag;/* use dither when 256 color mode for RGB?*/
     141    GLuint              depth;         /* bits per pixel (1, 8, 24, etc)   */
     142    ULONG               pixel;   /* current color index or RGBA pixel value*/
     143    ULONG               clearpixel; //* pixel for clearing the color buffers*/
     144    GLuint              width;
     145    GLuint              height;
     146    unsigned long       ScanWidth;
    103147
    104 
    105         HWND                            Window;
     148    GLcontext          *gl_ctx;                 /* The core GL/Mesa context*/
     149    GLvisual           *gl_visual;                 /* Describes the buffers*/
     150    GLframebuffer      *gl_buffer;    /* Depth, stencil, accum, etc buffers*/
     151    RECT                drawRect;
     152    UINT                uiDIBoffset;
     153    PBYTE               ScreenMem;     /* WinG memory                      */
     154    HPALETTE            hPal;          /* Current Palette                  */
     155    HPALETTE            hPalHalfTone;
     156    HPALETTE            hGLPalette;
     157    WMDIBSECTION        dib;
     158    BITMAPINFO         *IndexFormat;
     159    BITMAPINFO          bmi;
     160    HBITMAP             hbmDIB;
     161    HBITMAP             hOldBitmap;
     162    HBITMAP             Old_Compat_BM;
     163    HBITMAP             Compat_BM;     /* Bitmap for double buffering      */
     164    HWND                Window;
    106165    HDC                 hDC;
    107166    HPALETTE            hPalette;
     
    111170    HCURSOR             hOldCursor;
    112171    COLORREF            crColor;
    113     // 3D projection stuff
    114     RECT                drawRect;
    115     UINT                uiDIBoffset;
    116     // OpenGL stuff
    117     HPALETTE            hGLPalette;
    118         GLuint                          width;
    119         GLuint                          height;
    120         GLuint                          ScanWidth;
    121         GLboolean                       db_flag;        //* double buffered?
    122         GLboolean                       rgb_flag;       //* RGB mode?
    123         GLboolean                       dither_flag;    //* use dither when 256 color mode for RGB?
    124         GLuint                          depth;          //* bits per pixel (1, 8, 24, etc)
    125         ULONG                           pixel;  // current color index or RGBA pixel value
    126         ULONG                           clearpixel; //* pixel for clearing the color buffers
    127         PBYTE                           ScreenMem; // WinG memory
    128         BITMAPINFO                      *IndexFormat;
    129         HPALETTE                        hPal; // Current Palette
    130         HPALETTE                        hPalHalfTone;
    131 
    132 
    133         WMDIBSECTION            dib;
    134     BITMAPINFO          bmi;
    135     HBITMAP             hbmDIB;
    136     HBITMAP             hOldBitmap;
    137         HBITMAP                         Old_Compat_BM;
    138         HBITMAP                         Compat_BM;            // Bitmap for double buffering
    139     PBYTE               pbPixels;
    140     int                 nColors;
    141         BYTE                            cColorBits;
    142         int                                     pixelformat;
    143 
    144172#ifdef DDRAW
    145         LPDIRECTDRAW            lpDD;           // DirectDraw object
    146 //      LPDIRECTDRAW2            lpDD2;           // DirectDraw object
    147         LPDIRECTDRAWSURFACE     lpDDSPrimary;   // DirectDraw primary surface
     173        LPDIRECTDRAW            lpDD;  /* DirectDraw object                */
     174//      LPDIRECTDRAW2            lpDD2;                /* DirectDraw object*/
     175        LPDIRECTDRAWSURFACE     lpDDSPrimary; /* DirectDraw primary surface*/
    148176        LPDIRECTDRAWSURFACE     lpDDSOffScreen; // DirectDraw off screen surface
    149177        LPDIRECTDRAWPALETTE     lpDDPal;        // DirectDraw palette
    150         BOOL                    bActive;        // is application active?
     178        BOOL                    bActive;       /* is application active?   */
    151179        DDSURFACEDESC           ddsd;
    152180        int                                     fullScreen;
     
    158186        DWORD                                   pitch;
    159187        PBYTE                                   addrOffScreen;
    160 //#ifdef PROFILE
    161 //      MESAPROF        profile;
    162 //#endif
     188                                       /* #ifdef PROFILE                   */
     189                                       /* MESAPROF        profile;         */
     190                                       /* #endif                           */
    163191}  *PWMC;
    164192
  • trunk/src/opengl/mesa/x86.c

    r2938 r2962  
    1 /* $Id: x86.c,v 1.1 2000-02-29 00:50:16 sandervl Exp $ */
     1/* $Id: x86.c,v 1.2 2000-03-01 18:49:40 jeroen Exp $ */
    22
    33/*
     
    3535#include <math.h>
    3636
     37#include "types.h"
    3738#include "context.h"
    38 #include "types.h"
    3939#include "vertices.h"
    4040#include "xform.h"
    4141#include "x86.h"
    4242
    43 extern void gl_v16_x86_cliptest_points4(GLfloat *first_vert,
     43extern void __cdecl gl_v16_x86_cliptest_points4(GLfloat *first_vert,
    4444                                        GLfloat *last_vert,
    4545                                        GLubyte *or_mask,
     
    4848
    4949
    50 extern void gl_v16_x86_general_xform(GLfloat *dest,
     50extern void __cdecl gl_v16_x86_general_xform(GLfloat *dest,
    5151                                     const GLfloat *m,
    5252                                     const GLfloat *src,
     
    6363
    6464#define DECLARE_XFORM_GROUP(pfx, vsize, masked) \
    65  extern void gl_##pfx##_transform_points##vsize##_general_##masked(XFORM_ARGS);         \
    66  extern void gl_##pfx##_transform_points##vsize##_identity_##masked(XFORM_ARGS);        \
    67  extern void gl_##pfx##_transform_points##vsize##_3d_no_rot_##masked(XFORM_ARGS);       \
    68  extern void gl_##pfx##_transform_points##vsize##_perspective_##masked(XFORM_ARGS);     \
    69  extern void gl_##pfx##_transform_points##vsize##_2d_##masked(XFORM_ARGS);              \
    70  extern void gl_##pfx##_transform_points##vsize##_2d_no_rot_##masked(XFORM_ARGS);       \
    71  extern void gl_##pfx##_transform_points##vsize##_3d_##masked(XFORM_ARGS);
     65 extern void __cdecl gl_##pfx##_transform_points##vsize##_general_##masked(XFORM_ARGS);         \
     66 extern void __cdecl gl_##pfx##_transform_points##vsize##_identity_##masked(XFORM_ARGS);        \
     67 extern void __cdecl gl_##pfx##_transform_points##vsize##_3d_no_rot_##masked(XFORM_ARGS);       \
     68 extern void __cdecl gl_##pfx##_transform_points##vsize##_perspective_##masked(XFORM_ARGS);     \
     69 extern void __cdecl gl_##pfx##_transform_points##vsize##_2d_##masked(XFORM_ARGS);              \
     70 extern void __cdecl gl_##pfx##_transform_points##vsize##_2d_no_rot_##masked(XFORM_ARGS);       \
     71 extern void __cdecl gl_##pfx##_transform_points##vsize##_3d_##masked(XFORM_ARGS);
    7272
    7373#define ASSIGN_XFORM_GROUP( pfx, cma, vsize, masked )           \
     
    9797   DECLARE_XFORM_GROUP( x86, 4, masked )
    9898
    99    extern GLvector4f *gl_x86_cliptest_points4( GLvector4f *clip_vec,
     99   extern GLvector4f * __cdecl gl_x86_cliptest_points4( GLvector4f *clip_vec,
    100100                                               GLvector4f *proj_vec,
    101101                                               GLubyte clipMask[],
  • trunk/src/opengl/mesa/xform.c

    r2938 r2962  
    1 /* $Id: xform.c,v 1.1 2000-02-29 00:50:16 sandervl Exp $ */
     1/* $Id: xform.c,v 1.2 2000-03-01 18:49:41 jeroen Exp $ */
    22
    33/*
     
    5050#endif
    5151#include "vb.h"
     52#include "types.h"
    5253#include "context.h"
    5354#include "mmath.h"
    54 #include "types.h"
    5555#include "vb.h"
    5656#include "xform.h"
  • trunk/src/opengl/mesa/xform.h

    r2938 r2962  
    1 /* $Id: xform.h,v 1.1 2000-02-29 00:48:44 sandervl Exp $ */
     1/* $Id: xform.h,v 1.2 2000-03-01 18:49:41 jeroen Exp $ */
    22
    33/*
     
    104104 * automatically available.
    105105 */
    106 typedef GLvector4f *(*clip_func)( GLvector4f *vClip,
    107                                   GLvector4f *vProj,
    108                                   GLubyte clipMask[],
    109                                   GLubyte *orMask,
    110                                   GLubyte *andMask );
     106typedef GLvector4f *(* __cdecl clip_func)( GLvector4f *vClip,
     107                                  GLvector4f *vProj,
     108                                  GLubyte clipMask[],
     109                                  GLubyte *orMask,
     110                                  GLubyte *andMask );
    111111
    112112
    113113typedef void (*dotprod_func)( GLvector4f *out_vec,
    114                               GLuint elt,
    115                               const GLvector4f *coord_vec,
    116                               const GLfloat plane[4],
    117                               const GLubyte mask[]);
     114                              GLuint elt,
     115                              const GLvector4f *coord_vec,
     116                              const GLfloat plane[4],
     117                              const GLubyte mask[]);
    118118
    119119typedef void (*vec_copy_func)( GLvector4f *to,
    120                                const GLvector4f *from,
    121                                const GLubyte mask[]);
     120                               const GLvector4f *from,
     121                               const GLubyte mask[]);
    122122
    123123
     
    129129 *     parameter, to allow a unified interface.
    130130 */
    131 typedef void (*transform_func)( GLvector4f *to_vec,
    132                                 const GLmatrix *mat,
    133                                 const GLvector4f *from_vec,
    134                                 const GLubyte *clipmask,
    135                                 const GLubyte flag );
     131typedef void (* __cdecl transform_func)( GLvector4f *to_vec,
     132                                const GLmatrix *mat,
     133                                const GLvector4f *from_vec,
     134                                const GLubyte *clipmask,
     135                                const GLubyte flag );
    136136
    137137
    138138extern GLvector4f *gl_project_points( GLvector4f *to,
    139                                const GLvector4f *from );
     139                               const GLvector4f *from );
    140140
    141141extern void gl_transform_bounds3( GLubyte *orMask, GLubyte *andMask,
    142                            const GLmatrix *mat,
     142                           const GLmatrix *mat,
    143143                           CONST GLfloat src[][3] );
    144144
  • trunk/src/opengl/mesa/xform_tmp.h

    r2938 r2962  
    1 /* $Id: xform_tmp.h,v 1.1 2000-02-29 00:48:45 sandervl Exp $ */
     1/* $Id: xform_tmp.h,v 1.2 2000-03-01 18:49:41 jeroen Exp $ */
    22
    33/*
     
    6666 */
    6767
    68 static void TAG(transform_points1_general)( GLvector4f *to_vec,
    69                                             const GLmatrix *mat,
    70                                             const GLvector4f *from_vec,
    71                                             const GLubyte *mask,
    72                                             const GLubyte flag )
     68static void __cdecl TAG(transform_points1_general)( GLvector4f *to_vec,
     69                                            const GLmatrix *mat,
     70                                            const GLvector4f *from_vec,
     71                                            const GLubyte *mask,
     72                                            const GLubyte flag )
    7373{
    7474   const GLuint stride = from_vec->stride;
     
    8888         const GLfloat ox = from[0];
    8989         to[i][0] = m0 * ox + m12;
    90         to[i][1] = m1 * ox + m13;
    91         to[i][2] = m2 * ox + m14;
    92         to[i][3] = m3 * ox + m15;
    93       }
    94    }
    95 
    96    to_vec->size = 4;
    97    to_vec->flags |= VEC_SIZE_4;
    98    to_vec->count = from_vec->count;
    99 }
    100 
    101 static void TAG(transform_points1_identity)( GLvector4f *to_vec,
    102                                              const GLmatrix *mat,
    103                                              const GLvector4f *from_vec,
    104                                              const GLubyte *mask,
    105                                              const GLubyte flag )
     90        to[i][1] = m1 * ox + m13;
     91        to[i][2] = m2 * ox + m14;
     92        to[i][3] = m3 * ox + m15;
     93      }
     94   }
     95
     96   to_vec->size = 4;
     97   to_vec->flags |= VEC_SIZE_4;
     98   to_vec->count = from_vec->count;
     99}
     100
     101static void __cdecl TAG(transform_points1_identity)( GLvector4f *to_vec,
     102                                             const GLmatrix *mat,
     103                                             const GLvector4f *from_vec,
     104                                             const GLubyte *mask,
     105                                             const GLubyte flag )
    106106{
    107107   const GLuint stride = from_vec->stride;
     
    117117   STRIDE_LOOP {
    118118      CLIP_CHECK {
    119         to[i][0] = from[0];
     119        to[i][0] = from[0];
    120120      }
    121121   }
     
    126126}
    127127
    128 static void TAG(transform_points1_2d)( GLvector4f *to_vec,
    129                                        const GLmatrix *mat,
    130                                        const GLvector4f *from_vec,
    131                                        const GLubyte *mask,
    132                                        const GLubyte flag )
     128static void __cdecl TAG(transform_points1_2d)( GLvector4f *to_vec,
     129                                       const GLmatrix *mat,
     130                                       const GLvector4f *from_vec,
     131                                       const GLubyte *mask,
     132                                       const GLubyte flag )
    133133{
    134134   const GLuint stride = from_vec->stride;
     
    145145   STRIDE_LOOP {
    146146      CLIP_CHECK {
    147         const GLfloat ox = from[0];
    148         to[i][0] = m0 * ox + m12;
    149         to[i][1] = m1 * ox + m13;
     147        const GLfloat ox = from[0];
     148        to[i][0] = m0 * ox + m12;
     149        to[i][1] = m1 * ox + m13;
    150150      }
    151151   }
     
    155155}
    156156
    157 static void TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
    158                                               const GLmatrix *mat,
    159                                               const GLvector4f *from_vec,
    160                                               const GLubyte *mask,
    161                                               const GLubyte flag )
     157static void __cdecl TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
     158                                              const GLmatrix *mat,
     159                                              const GLvector4f *from_vec,
     160                                              const GLubyte *mask,
     161                                              const GLubyte flag )
    162162{
    163163   const GLuint stride = from_vec->stride;
     
    173173   STRIDE_LOOP {
    174174      CLIP_CHECK {
    175         const GLfloat ox = from[0];
    176         to[i][0] = m0 * ox + m12;
    177         to[i][1] =           m13;
     175        const GLfloat ox = from[0];
     176        to[i][0] = m0 * ox + m12;
     177        to[i][1] =           m13;
    178178      }
    179179   }
     
    184184}
    185185
    186 static void TAG(transform_points1_3d)( GLvector4f *to_vec,
    187                                        const GLmatrix *mat,
    188                                        const GLvector4f *from_vec,
    189                                        const GLubyte *mask,
    190                                        const GLubyte flag )
     186static void __cdecl TAG(transform_points1_3d)( GLvector4f *to_vec,
     187                                       const GLmatrix *mat,
     188                                       const GLvector4f *from_vec,
     189                                       const GLubyte *mask,
     190                                       const GLubyte flag )
    191191{
    192192   const GLuint stride = from_vec->stride;
     
    204204      CLIP_CHECK {
    205205         const GLfloat ox = from[0];
    206         to[i][0] = m0 * ox + m12;
    207         to[i][1] = m1 * ox + m13;
    208         to[i][2] = m2 * ox + m14;
     206        to[i][0] = m0 * ox + m12;
     207        to[i][1] = m1 * ox + m13;
     208        to[i][2] = m2 * ox + m14;
    209209      }
    210210   }
     
    215215
    216216
    217 static void TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
    218                                               const GLmatrix *mat,
    219                                               const GLvector4f *from_vec,
    220                                               const GLubyte *mask,
    221                                               const GLubyte flag )
     217static void __cdecl TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
     218                                              const GLmatrix *mat,
     219                                              const GLvector4f *from_vec,
     220                                              const GLubyte *mask,
     221                                              const GLubyte flag )
    222222{
    223223   const GLuint stride = from_vec->stride;
     
    234234   STRIDE_LOOP {
    235235      CLIP_CHECK {
    236         const GLfloat ox = from[0];
    237         to[i][0] = m0 * ox           + m12;
    238         to[i][1] =                     m13;
    239         to[i][2] =                     m14;
     236        const GLfloat ox = from[0];
     237        to[i][0] = m0 * ox           + m12;
     238        to[i][1] =                     m13;
     239        to[i][2] =                     m14;
    240240      }
    241241   }
     
    245245}
    246246
    247 static void TAG(transform_points1_perspective)( GLvector4f *to_vec,
    248                                                 const GLmatrix *mat,
    249                                                 const GLvector4f *from_vec,
    250                                                 const GLubyte *mask,
    251                                                 const GLubyte flag )
     247static void __cdecl TAG(transform_points1_perspective)( GLvector4f *to_vec,
     248                                                const GLmatrix *mat,
     249                                                const GLvector4f *from_vec,
     250                                                const GLubyte *mask,
     251                                                const GLubyte flag )
    252252{
    253253   const GLuint stride = from_vec->stride;
     
    282282 * texture pipeline.
    283283 */
    284 static void TAG(transform_points2_general)( GLvector4f *to_vec,
    285                                             const GLmatrix *mat,
    286                                             const GLvector4f *from_vec,
    287                                             const GLubyte *mask,
    288                                             const GLubyte flag )
     284static void __cdecl TAG(transform_points2_general)( GLvector4f *to_vec,
     285                                            const GLmatrix *mat,
     286                                            const GLvector4f *from_vec,
     287                                            const GLubyte *mask,
     288                                            const GLubyte flag )
    289289{
    290290   const GLuint stride = from_vec->stride;
     
    303303      CLIP_CHECK {
    304304         const GLfloat ox = from[0], oy = from[1];
    305         to[i][0] = m0 * ox + m4 * oy + m12;
    306         to[i][1] = m1 * ox + m5 * oy + m13;
    307         to[i][2] = m2 * ox + m6 * oy + m14;
    308         to[i][3] = m3 * ox + m7 * oy + m15;
    309       }
    310    }
    311    to_vec->size = 4;
    312    to_vec->flags |= VEC_SIZE_4;
    313    to_vec->count = from_vec->count;
    314 }
    315 
    316 static void TAG(transform_points2_identity)( GLvector4f *to_vec,
    317                                              const GLmatrix *mat,
    318                                              const GLvector4f *from_vec,
    319                                              const GLubyte *mask,
    320                                              const GLubyte flag )
     305        to[i][0] = m0 * ox + m4 * oy + m12;
     306        to[i][1] = m1 * ox + m5 * oy + m13;
     307        to[i][2] = m2 * ox + m6 * oy + m14;
     308        to[i][3] = m3 * ox + m7 * oy + m15;
     309      }
     310   }
     311   to_vec->size = 4;
     312   to_vec->flags |= VEC_SIZE_4;
     313   to_vec->count = from_vec->count;
     314}
     315
     316static void __cdecl TAG(transform_points2_identity)( GLvector4f *to_vec,
     317                                             const GLmatrix *mat,
     318                                             const GLvector4f *from_vec,
     319                                             const GLubyte *mask,
     320                                             const GLubyte flag )
    321321{
    322322   const GLuint stride = from_vec->stride;
     
    332332   STRIDE_LOOP {
    333333      CLIP_CHECK {
    334         to[i][0] = from[0];
    335         to[i][1] = from[1];
     334        to[i][0] = from[0];
     335        to[i][1] = from[1];
    336336      }
    337337   }
     
    341341}
    342342
    343 static void TAG(transform_points2_2d)( GLvector4f *to_vec,
    344                                        const GLmatrix *mat,
    345                                        const GLvector4f *from_vec,
    346                                        const GLubyte *mask,
    347                                        const GLubyte flag )
     343static void __cdecl TAG(transform_points2_2d)( GLvector4f *to_vec,
     344                                       const GLmatrix *mat,
     345                                       const GLvector4f *from_vec,
     346                                       const GLubyte *mask,
     347                                       const GLubyte flag )
    348348{
    349349   const GLuint stride = from_vec->stride;
     
    360360   STRIDE_LOOP {
    361361      CLIP_CHECK {
    362         const GLfloat ox = from[0], oy = from[1];
    363         to[i][0] = m0 * ox + m4 * oy + m12;
    364         to[i][1] = m1 * ox + m5 * oy + m13;
     362        const GLfloat ox = from[0], oy = from[1];
     363        to[i][0] = m0 * ox + m4 * oy + m12;
     364        to[i][1] = m1 * ox + m5 * oy + m13;
    365365      }
    366366   }
     
    371371}
    372372
    373 static void TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
    374                                               const GLmatrix *mat,
    375                                               const GLvector4f *from_vec,
    376                                               const GLubyte *mask,
    377                                               const GLubyte flag )
     373static void __cdecl TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
     374                                              const GLmatrix *mat,
     375                                              const GLvector4f *from_vec,
     376                                              const GLubyte *mask,
     377                                              const GLubyte flag )
    378378{
    379379   const GLuint stride = from_vec->stride;
     
    389389   STRIDE_LOOP {
    390390      CLIP_CHECK {
    391         const GLfloat ox = from[0], oy = from[1];
    392         to[i][0] = m0 * ox           + m12;
    393         to[i][1] =           m5 * oy + m13;
     391        const GLfloat ox = from[0], oy = from[1];
     392        to[i][0] = m0 * ox           + m12;
     393        to[i][1] =           m5 * oy + m13;
    394394      }
    395395   }
     
    400400}
    401401
    402 static void TAG(transform_points2_3d)( GLvector4f *to_vec,
    403                                        const GLmatrix *mat,
    404                                        const GLvector4f *from_vec,
    405                                        const GLubyte *mask,
    406                                        const GLubyte flag )
     402static void __cdecl TAG(transform_points2_3d)( GLvector4f *to_vec,
     403                                       const GLmatrix *mat,
     404                                       const GLvector4f *from_vec,
     405                                       const GLubyte *mask,
     406                                       const GLubyte flag )
    407407{
    408408   const GLuint stride = from_vec->stride;
     
    434434 * a texture transformation point of view.
    435435 */
    436 static void TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
    437                                               const GLmatrix *mat,
    438                                               const GLvector4f *from_vec,
    439                                               const GLubyte *mask,
    440                                               const GLubyte flag )
     436static void __cdecl TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
     437                                              const GLmatrix *mat,
     438                                              const GLvector4f *from_vec,
     439                                              const GLubyte *mask,
     440                                              const GLubyte flag )
    441441{
    442442   const GLuint stride = from_vec->stride;
     
    473473 * attached to the assertions that have appeared in them.
    474474 */
    475 static void TAG(transform_points2_perspective)( GLvector4f *to_vec,
    476                                                 const GLmatrix *mat,
    477                                                 const GLvector4f *from_vec,
    478                                                 const GLubyte *mask,
    479                                                 const GLubyte flag )
     475static void __cdecl TAG(transform_points2_perspective)( GLvector4f *to_vec,
     476                                                const GLmatrix *mat,
     477                                                const GLvector4f *from_vec,
     478                                                const GLubyte *mask,
     479                                                const GLubyte flag )
    480480{
    481481   const GLuint stride = from_vec->stride;
     
    494494         to[i][0] = m0 * ox                ;
    495495         to[i][1] =           m5 * oy      ;
    496         to[i][2] =                     m14;
    497         to[i][3] = 0;
    498       }
    499    }
    500    to_vec->size = 4;
    501    to_vec->flags |= VEC_SIZE_4;
    502    to_vec->count = from_vec->count;
    503 }
    504 
    505 
    506 
    507 static void TAG(transform_points3_general)( GLvector4f *to_vec,
    508                                             const GLmatrix *mat,
    509                                             const GLvector4f *from_vec,
    510                                             const GLubyte *mask,
    511                                             const GLubyte flag )
     496        to[i][2] =                     m14;
     497        to[i][3] = 0;
     498      }
     499   }
     500   to_vec->size = 4;
     501   to_vec->flags |= VEC_SIZE_4;
     502   to_vec->count = from_vec->count;
     503}
     504
     505
     506
     507static void __cdecl TAG(transform_points3_general)( GLvector4f *to_vec,
     508                                            const GLmatrix *mat,
     509                                            const GLvector4f *from_vec,
     510                                            const GLubyte *mask,
     511                                            const GLubyte flag )
    512512{
    513513   const GLuint stride = from_vec->stride;
     
    526526   STRIDE_LOOP {
    527527      CLIP_CHECK {
    528         const GLfloat ox = from[0], oy = from[1], oz = from[2];
    529         to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12;
    530         to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13;
    531         to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14;
    532         to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15;
    533       }
    534    }
    535    to_vec->size = 4;
    536    to_vec->flags |= VEC_SIZE_4;
    537    to_vec->count = from_vec->count;
    538 }
    539 
    540 static void TAG(transform_points3_identity)( GLvector4f *to_vec,
    541                                              const GLmatrix *mat,
    542                                              const GLvector4f *from_vec,
    543                                              const GLubyte *mask,
    544                                              const GLubyte flag )
     528        const GLfloat ox = from[0], oy = from[1], oz = from[2];
     529        to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12;
     530        to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13;
     531        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14;
     532        to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15;
     533      }
     534   }
     535   to_vec->size = 4;
     536   to_vec->flags |= VEC_SIZE_4;
     537   to_vec->count = from_vec->count;
     538}
     539
     540static void __cdecl TAG(transform_points3_identity)( GLvector4f *to_vec,
     541                                             const GLmatrix *mat,
     542                                             const GLvector4f *from_vec,
     543                                             const GLubyte *mask,
     544                                             const GLubyte flag )
    545545{
    546546   const GLuint stride = from_vec->stride;
     
    556556   STRIDE_LOOP {
    557557      CLIP_CHECK {
    558         to[i][0] = from[0];
    559         to[i][1] = from[1];
    560         to[i][2] = from[2];
     558        to[i][0] = from[0];
     559        to[i][1] = from[1];
     560        to[i][2] = from[2];
    561561      }
    562562   }
     
    566566}
    567567
    568 static void TAG(transform_points3_2d)( GLvector4f *to_vec,
    569                                        const GLmatrix *mat,
    570                                        const GLvector4f *from_vec,
    571                                        const GLubyte *mask,
    572                                        const GLubyte flag )
     568static void __cdecl TAG(transform_points3_2d)( GLvector4f *to_vec,
     569                                       const GLmatrix *mat,
     570                                       const GLvector4f *from_vec,
     571                                       const GLubyte *mask,
     572                                       const GLubyte flag )
    573573{
    574574   const GLuint stride = from_vec->stride;
     
    585585   STRIDE_LOOP {
    586586      CLIP_CHECK {
    587         const GLfloat ox = from[0], oy = from[1], oz = from[2];
    588         to[i][0] = m0 * ox + m4 * oy            + m12       ;
    589         to[i][1] = m1 * ox + m5 * oy            + m13       ;
    590         to[i][2] =                   +       oz             ;
     587        const GLfloat ox = from[0], oy = from[1], oz = from[2];
     588        to[i][0] = m0 * ox + m4 * oy            + m12       ;
     589        to[i][1] = m1 * ox + m5 * oy            + m13       ;
     590        to[i][2] =                   +       oz             ;
    591591      }
    592592   }
     
    596596}
    597597
    598 static void TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
    599                                               const GLmatrix *mat,
    600                                               const GLvector4f *from_vec,
    601                                               const GLubyte *mask,
    602                                               const GLubyte flag )
     598static void __cdecl TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
     599                                              const GLmatrix *mat,
     600                                              const GLvector4f *from_vec,
     601                                              const GLubyte *mask,
     602                                              const GLubyte flag )
    603603{
    604604   const GLuint stride = from_vec->stride;
     
    614614   STRIDE_LOOP {
    615615      CLIP_CHECK {
    616         const GLfloat ox = from[0], oy = from[1], oz = from[2];
    617         to[i][0] = m0 * ox                      + m12       ;
    618         to[i][1] =           m5 * oy            + m13       ;
    619         to[i][2] =                   +       oz             ;
     616        const GLfloat ox = from[0], oy = from[1], oz = from[2];
     617        to[i][0] = m0 * ox                      + m12       ;
     618        to[i][1] =           m5 * oy            + m13       ;
     619        to[i][2] =                   +       oz             ;
    620620      }
    621621   }
     
    625625}
    626626
    627 static void TAG(transform_points3_3d)( GLvector4f *to_vec,
    628                                        const GLmatrix *mat,
    629                                        const GLvector4f *from_vec,
    630                                        const GLubyte *mask,
    631                                        const GLubyte flag )
     627static void __cdecl TAG(transform_points3_3d)( GLvector4f *to_vec,
     628                                       const GLmatrix *mat,
     629                                       const GLvector4f *from_vec,
     630                                       const GLubyte *mask,
     631                                       const GLubyte flag )
    632632{
    633633   const GLuint stride = from_vec->stride;
     
    645645   STRIDE_LOOP {
    646646      CLIP_CHECK {
    647         const GLfloat ox = from[0], oy = from[1], oz = from[2];
    648         to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12       ;
    649         to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13       ;
    650         to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14       ;
     647        const GLfloat ox = from[0], oy = from[1], oz = from[2];
     648        to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12       ;
     649        to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13       ;
     650        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14       ;
    651651      }
    652652   }
     
    658658/* previously known as ortho...
    659659 */
    660 static void TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
    661                                               const GLmatrix *mat,
    662                                               const GLvector4f *from_vec,
    663                                               const GLubyte *mask,
    664                                               const GLubyte flag )
     660static void __cdecl TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
     661                                              const GLmatrix *mat,
     662                                              const GLvector4f *from_vec,
     663                                              const GLubyte *mask,
     664                                              const GLubyte flag )
    665665{
    666666   const GLuint stride = from_vec->stride;
     
    677677   STRIDE_LOOP {
    678678      CLIP_CHECK {
    679         const GLfloat ox = from[0], oy = from[1], oz = from[2];
    680         to[i][0] = m0 * ox                      + m12       ;
    681         to[i][1] =           m5 * oy            + m13       ;
    682         to[i][2] =                     m10 * oz + m14       ;
     679        const GLfloat ox = from[0], oy = from[1], oz = from[2];
     680        to[i][0] = m0 * ox                      + m12       ;
     681        to[i][1] =           m5 * oy            + m13       ;
     682        to[i][2] =                     m10 * oz + m14       ;
    683683      }
    684684   }
     
    688688}
    689689
    690 static void TAG(transform_points3_perspective)( GLvector4f *to_vec,
    691                                                 const GLmatrix *mat,
    692                                                 const GLvector4f *from_vec,
    693                                                 const GLubyte *mask,
    694                                                 const GLubyte flag )
     690static void __cdecl TAG(transform_points3_perspective)( GLvector4f *to_vec,
     691                                                const GLmatrix *mat,
     692                                                const GLvector4f *from_vec,
     693                                                const GLubyte *mask,
     694                                                const GLubyte flag )
    695695{
    696696   const GLuint stride = from_vec->stride;
     
    707707   STRIDE_LOOP {
    708708      CLIP_CHECK {
    709         const GLfloat ox = from[0], oy = from[1], oz = from[2];
    710         to[i][0] = m0 * ox           + m8  * oz       ;
    711         to[i][1] =           m5 * oy + m9  * oz       ;
    712         to[i][2] =                     m10 * oz + m14 ;
    713         to[i][3] =                          -oz       ;
    714       }
    715    }
    716    to_vec->size = 4;
    717    to_vec->flags |= VEC_SIZE_4;
    718    to_vec->count = from_vec->count;
    719 }
    720 
    721 
    722 
    723 static void TAG(transform_points4_general)( GLvector4f *to_vec,
    724                                             const GLmatrix *mat,
    725                                             const GLvector4f *from_vec,
    726                                             const GLubyte *mask,
    727                                             const GLubyte flag )
     709        const GLfloat ox = from[0], oy = from[1], oz = from[2];
     710        to[i][0] = m0 * ox           + m8  * oz       ;
     711        to[i][1] =           m5 * oy + m9  * oz       ;
     712        to[i][2] =                     m10 * oz + m14 ;
     713        to[i][3] =                          -oz       ;
     714      }
     715   }
     716   to_vec->size = 4;
     717   to_vec->flags |= VEC_SIZE_4;
     718   to_vec->count = from_vec->count;
     719}
     720
     721
     722
     723static void __cdecl TAG(transform_points4_general)( GLvector4f *to_vec,
     724                                            const GLmatrix *mat,
     725                                            const GLvector4f *from_vec,
     726                                            const GLubyte *mask,
     727                                            const GLubyte flag )
    728728{
    729729   const GLuint stride = from_vec->stride;
     
    742742   STRIDE_LOOP {
    743743      CLIP_CHECK {
    744         const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
    745         to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12 * ow;
    746         to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13 * ow;
    747         to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
    748         to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow;
    749       }
    750    }
    751    to_vec->size = 4;
    752    to_vec->flags |= VEC_SIZE_4;
    753    to_vec->count = from_vec->count;
    754 }
    755 
    756 static void TAG(transform_points4_identity)( GLvector4f *to_vec,
    757                                              const GLmatrix *mat,
    758                                              const GLvector4f *from_vec,
    759                                              const GLubyte *mask,
    760                                              const GLubyte flag )
     744        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
     745        to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12 * ow;
     746        to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13 * ow;
     747        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
     748        to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow;
     749      }
     750   }
     751   to_vec->size = 4;
     752   to_vec->flags |= VEC_SIZE_4;
     753   to_vec->count = from_vec->count;
     754}
     755
     756static void __cdecl TAG(transform_points4_identity)( GLvector4f *to_vec,
     757                                             const GLmatrix *mat,
     758                                             const GLvector4f *from_vec,
     759                                             const GLubyte *mask,
     760                                             const GLubyte flag )
    761761{
    762762   const GLuint stride = from_vec->stride;
     
    772772   STRIDE_LOOP {
    773773      CLIP_CHECK {
    774         to[i][0] = from[0];
    775         to[i][1] = from[1];
    776         to[i][2] = from[2];
    777         to[i][3] = from[3];
    778       }
    779    }
    780    to_vec->size = 4;
    781    to_vec->flags |= VEC_SIZE_4;
    782    to_vec->count = from_vec->count;
    783 }
    784 
    785 static void TAG(transform_points4_2d)( GLvector4f *to_vec,
    786                                        const GLmatrix *mat,
    787                                        const GLvector4f *from_vec,
    788                                        const GLubyte *mask,
    789                                        const GLubyte flag )
     774        to[i][0] = from[0];
     775        to[i][1] = from[1];
     776        to[i][2] = from[2];
     777        to[i][3] = from[3];
     778      }
     779   }
     780   to_vec->size = 4;
     781   to_vec->flags |= VEC_SIZE_4;
     782   to_vec->count = from_vec->count;
     783}
     784
     785static void __cdecl TAG(transform_points4_2d)( GLvector4f *to_vec,
     786                                       const GLmatrix *mat,
     787                                       const GLvector4f *from_vec,
     788                                       const GLubyte *mask,
     789                                       const GLubyte flag )
    790790{
    791791   const GLuint stride = from_vec->stride;
     
    802802   STRIDE_LOOP {
    803803      CLIP_CHECK {
    804         const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
    805         to[i][0] = m0 * ox + m4 * oy            + m12 * ow;
    806         to[i][1] = m1 * ox + m5 * oy            + m13 * ow;
    807         to[i][2] =                   +       oz           ;
    808         to[i][3] =                                      ow;
    809       }
    810    }
    811    to_vec->size = 4;
    812    to_vec->flags |= VEC_SIZE_4;
    813    to_vec->count = from_vec->count;
    814 }
    815 
    816 static void TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
    817                                               const GLmatrix *mat,
    818                                               const GLvector4f *from_vec,
    819                                               const GLubyte *mask,
    820                                               const GLubyte flag )
     804        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
     805        to[i][0] = m0 * ox + m4 * oy            + m12 * ow;
     806        to[i][1] = m1 * ox + m5 * oy            + m13 * ow;
     807        to[i][2] =                   +       oz           ;
     808        to[i][3] =                                      ow;
     809      }
     810   }
     811   to_vec->size = 4;
     812   to_vec->flags |= VEC_SIZE_4;
     813   to_vec->count = from_vec->count;
     814}
     815
     816static void __cdecl TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
     817                                              const GLmatrix *mat,
     818                                              const GLvector4f *from_vec,
     819                                              const GLubyte *mask,
     820                                              const GLubyte flag )
    821821{
    822822   const GLuint stride = from_vec->stride;
     
    832832   STRIDE_LOOP {
    833833      CLIP_CHECK {
    834         const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
    835         to[i][0] = m0 * ox                      + m12 * ow;
    836         to[i][1] =           m5 * oy            + m13 * ow;
    837         to[i][2] =                   +       oz           ;
    838         to[i][3] =                                      ow;
    839       }
    840    }
    841    to_vec->size = 4;
    842    to_vec->flags |= VEC_SIZE_4;
    843    to_vec->count = from_vec->count;
    844 }
    845 
    846 static void TAG(transform_points4_3d)( GLvector4f *to_vec,
    847                                        const GLmatrix *mat,
    848                                        const GLvector4f *from_vec,
    849                                        const GLubyte *mask,
    850                                        const GLubyte flag )
     834        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
     835        to[i][0] = m0 * ox                      + m12 * ow;
     836        to[i][1] =           m5 * oy            + m13 * ow;
     837        to[i][2] =                   +       oz           ;
     838        to[i][3] =                                      ow;
     839      }
     840   }
     841   to_vec->size = 4;
     842   to_vec->flags |= VEC_SIZE_4;
     843   to_vec->count = from_vec->count;
     844}
     845
     846static void __cdecl TAG(transform_points4_3d)( GLvector4f *to_vec,
     847                                       const GLmatrix *mat,
     848                                       const GLvector4f *from_vec,
     849                                       const GLubyte *mask,
     850                                       const GLubyte flag )
    851851{
    852852   const GLuint stride = from_vec->stride;
     
    864864   STRIDE_LOOP {
    865865      CLIP_CHECK {
    866         const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
    867         to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12 * ow;
    868         to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13 * ow;
    869         to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
    870         to[i][3] =                                      ow;
    871       }
    872    }
    873    to_vec->size = 4;
    874    to_vec->flags |= VEC_SIZE_4;
    875    to_vec->count = from_vec->count;
    876 }
    877 
    878 static void TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
    879                                               const GLmatrix *mat,
    880                                               const GLvector4f *from_vec,
    881                                               const GLubyte *mask,
    882                                               const GLubyte flag )
     866        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
     867        to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12 * ow;
     868        to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13 * ow;
     869        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
     870        to[i][3] =                                      ow;
     871      }
     872   }
     873   to_vec->size = 4;
     874   to_vec->flags |= VEC_SIZE_4;
     875   to_vec->count = from_vec->count;
     876}
     877
     878static void __cdecl TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
     879                                              const GLmatrix *mat,
     880                                              const GLvector4f *from_vec,
     881                                              const GLubyte *mask,
     882                                              const GLubyte flag )
    883883{
    884884   const GLuint stride = from_vec->stride;
     
    895895   STRIDE_LOOP {
    896896      CLIP_CHECK {
    897         const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
    898         to[i][0] = m0 * ox                      + m12 * ow;
    899         to[i][1] =           m5 * oy            + m13 * ow;
    900         to[i][2] =                     m10 * oz + m14 * ow;
    901         to[i][3] =                                      ow;
    902       }
    903    }
    904    to_vec->size = 4;
    905    to_vec->flags |= VEC_SIZE_4;
    906    to_vec->count = from_vec->count;
    907 }
    908 
    909 static void TAG(transform_points4_perspective)( GLvector4f *to_vec,
    910                                                 const GLmatrix *mat,
    911                                                 const GLvector4f *from_vec,
    912                                                 const GLubyte *mask,
    913                                                 const GLubyte flag )
     897        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
     898        to[i][0] = m0 * ox                      + m12 * ow;
     899        to[i][1] =           m5 * oy            + m13 * ow;
     900        to[i][2] =                     m10 * oz + m14 * ow;
     901        to[i][3] =                                      ow;
     902      }
     903   }
     904   to_vec->size = 4;
     905   to_vec->flags |= VEC_SIZE_4;
     906   to_vec->count = from_vec->count;
     907}
     908
     909static void __cdecl TAG(transform_points4_perspective)( GLvector4f *to_vec,
     910                                                const GLmatrix *mat,
     911                                                const GLvector4f *from_vec,
     912                                                const GLubyte *mask,
     913                                                const GLubyte flag )
    914914{
    915915   const GLuint stride = from_vec->stride;
     
    926926   STRIDE_LOOP {
    927927      CLIP_CHECK {
    928         const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
    929         to[i][0] = m0 * ox           + m8  * oz            ;
    930         to[i][1] =           m5 * oy + m9  * oz            ;
    931         to[i][2] =                     m10 * oz + m14 * ow ;
    932         to[i][3] =                          -oz            ;
     928        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
     929        to[i][0] = m0 * ox           + m8  * oz            ;
     930        to[i][1] =           m5 * oy + m9  * oz            ;
     931        to[i][2] =                     m10 * oz + m14 * ow ;
     932        to[i][3] =                          -oz            ;
    933933      }
    934934   }
Note: See TracChangeset for help on using the changeset viewer.