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

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/copypix.c

    r2962 r3598  
    1 /* $Id: copypix.c,v 1.2 2000-03-01 18:49:25 jeroen Exp $ */
     1/* $Id: copypix.c,v 1.3 2000-05-23 20:40:26 jeroen Exp $ */
    22
    33/*
    44 * Mesa 3-D graphics library
    5  * Version:  3.1
     5 * Version:  3.3
    66 *
    77 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
     
    3232#include "all.h"
    3333#else
    34 #ifndef XFree86Server
    35 #include <string.h>
    36 #else
    37 #include "GL/xf86glx.h"
    38 #endif
     34#include "glheader.h"
    3935#include "types.h"
     36#include "mem.h"
    4037#include "context.h"
    4138#include "copypix.h"
     
    4643#include "pixel.h"
    4744#include "span.h"
     45#include "state.h"
    4846#include "stencil.h"
    4947#include "zoom.h"
     
    7371   }
    7472}
    75 
    7673
    7774
     
    8986   GLint i, j;
    9087   GLboolean changeBuffer;
    91    GLubyte *saveAlpha;
    92    const GLboolean zoom = ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F;
    93    GLboolean needbuffer;
     88   GLubyte *saveReadAlpha;
     89   const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
     90   GLint overlapping;
    9491
    9592   /* Determine if copy should be done bottom-to-top or top-to-bottom */
    96    if (srcy<desty) {
     93   if (srcy < desty) {
    9794      /* top-down  max-to-min */
    9895      sy = srcy + height - 1;
     
    107104   }
    108105
    109    needbuffer = regions_overlap(srcx, srcy, destx, desty, width, height,
    110                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
     106   overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
     107                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
    111108
    112109   if (ctx->Depth.Test || ctx->Fog.Enabled) {
    113110      /* fill in array of z values */
    114       GLint z = (GLint) (ctx->Current.RasterPos[2] * DEPTH_SCALE);
     111      GLdepth z = (GLdepth) (ctx->Current.RasterPos[2] * ctx->Visual->DepthMax);
    115112      for (i=0;i<width;i++) {
    116113         zspan[i] = z;
     
    118115   }
    119116
    120    if (ctx->RasterMask==0 && !zoom
    121        && destx>=0 && destx+width<=ctx->Buffer->Width) {
     117   if (ctx->RasterMask == 0
     118       && !zoom
     119       && destx >= 0
     120       && destx + width <= ctx->DrawBuffer->Width) {
    122121      quick_draw = GL_TRUE;
    123122   }
     
    127126
    128127   /* If read and draw buffer are different we must do buffer switching */
    129    saveAlpha = ctx->Buffer->Alpha;
    130    changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer;
    131 
    132    if (needbuffer) {
     128   saveReadAlpha = ctx->ReadBuffer->Alpha;
     129   changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer
     130               || ctx->DrawBuffer != ctx->ReadBuffer;
     131
     132   if (overlapping) {
    133133      GLint ssy = sy;
    134       prgba = (GLubyte *) MALLOC(width*height*sizeof(GLubyte)*4);
     134      prgba = (GLubyte *) MALLOC(width * height * sizeof(GLubyte) * 4);
    135135      if (!prgba) {
    136136         gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
     
    139139      p = prgba;
    140140      if (changeBuffer) {
    141          (*ctx->Driver.SetBuffer)( ctx, ctx->Pixel.DriverReadBuffer );
     141         (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
     142                                       ctx->Pixel.DriverReadBuffer );
    142143         if (ctx->Pixel.DriverReadBuffer == GL_FRONT_LEFT)
    143             ctx->Buffer->Alpha = ctx->Buffer->FrontLeftAlpha;
     144            ctx->ReadBuffer->Alpha = ctx->ReadBuffer->FrontLeftAlpha;
    144145         else if (ctx->Pixel.DriverReadBuffer == GL_BACK_LEFT)
    145             ctx->Buffer->Alpha = ctx->Buffer->BackLeftAlpha;
     146            ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackLeftAlpha;
    146147         else if (ctx->Pixel.DriverReadBuffer == GL_FRONT_RIGHT)
    147             ctx->Buffer->Alpha = ctx->Buffer->FrontRightAlpha;
     148            ctx->ReadBuffer->Alpha = ctx->ReadBuffer->FrontRightAlpha;
    148149         else
    149             ctx->Buffer->Alpha = ctx->Buffer->BackRightAlpha;
    150       }
    151       for (j=0; j<height; j++, ssy+=stepy) {
    152          gl_read_rgba_span( ctx, width, srcx, ssy,(GLubyte (*)[4]) p );
    153          p += (width*sizeof(GLubyte)*4);
     150            ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackRightAlpha;
     151      }
     152      for (j = 0; j < height; j++, ssy += stepy) {
     153         gl_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy,
     154                            (GLubyte (*)[4]) p );
     155         p += (width * sizeof(GLubyte) * 4);
    154156      }
    155157      p = prgba;
    156158   }
    157 
    158    for (j=0; j<height; j++, sy+=stepy, dy+=stepy) {
    159       if (needbuffer) {
     159   else {
     160      prgba = NULL;                            /* silence compiler warnings*/
     161      p = NULL;
     162   }
     163
     164   for (j = 0; j < height; j++, sy += stepy, dy += stepy) {
     165      if (overlapping) {
    160166         MEMCPY(rgba, p, width * sizeof(GLubyte) * 4);
    161167         p += (width * sizeof(GLubyte) * 4);
     
    163169      else {
    164170         if (changeBuffer) {
    165             (*ctx->Driver.SetBuffer)( ctx, ctx->Pixel.DriverReadBuffer );
    166             if (ctx->Pixel.DriverReadBuffer == GL_FRONT_LEFT)
    167                ctx->Buffer->Alpha = ctx->Buffer->FrontLeftAlpha;
    168             else if (ctx->Pixel.DriverReadBuffer == GL_BACK_LEFT)
    169                ctx->Buffer->Alpha = ctx->Buffer->BackLeftAlpha;
    170             else if (ctx->Pixel.DriverReadBuffer == GL_FRONT_RIGHT)
    171                ctx->Buffer->Alpha = ctx->Buffer->FrontRightAlpha;
    172             else
    173                ctx->Buffer->Alpha = ctx->Buffer->BackRightAlpha;
     171            (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
     172                                          ctx->Pixel.DriverReadBuffer );
     173            if (ctx->Pixel.DriverReadBuffer == GL_FRONT_LEFT) {
     174               ctx->ReadBuffer->Alpha = ctx->ReadBuffer->FrontLeftAlpha;
     175            }
     176            else if (ctx->Pixel.DriverReadBuffer == GL_BACK_LEFT) {
     177               ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackLeftAlpha;
     178            }
     179            else if (ctx->Pixel.DriverReadBuffer == GL_FRONT_RIGHT) {
     180               ctx->ReadBuffer->Alpha = ctx->ReadBuffer->FrontRightAlpha;
     181            }
     182            else {
     183               ctx->ReadBuffer->Alpha = ctx->ReadBuffer->BackRightAlpha;
     184            }
    174185         }
    175          gl_read_rgba_span( ctx, width, srcx, sy, rgba );
    176       }
     186         gl_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, rgba );
     187      }
     188
     189      if (changeBuffer) {
     190         /* read from the draw buffer again (in case of blending) */
     191         (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
     192                                       ctx->Color.DriverDrawBuffer );
     193         ctx->ReadBuffer->Alpha = saveReadAlpha;
     194      }
     195
    177196      if (ctx->Pixel.ScaleOrBiasRGBA) {
    178197         gl_scale_and_bias_rgba( ctx, width, rgba );
     
    181200         gl_map_rgba( ctx, width, rgba );
    182201      }
    183       if (quick_draw && dy>=0 && dy<ctx->Buffer->Height) {
     202      if (quick_draw && dy >= 0 && dy < ctx->DrawBuffer->Height) {
    184203         (*ctx->Driver.WriteRGBASpan)( ctx, width, destx, dy,
    185                                        (const GLubyte (*)[4])rgba, NULL );
    186 
     204                                       (const GLubyte (*)[4])rgba, NULL );
    187205      }
    188206      else if (zoom) {
    189207         gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan,
    190                                     (const GLubyte (*)[4])rgba, desty);
     208                                    (const GLubyte (*)[4])rgba, desty);
    191209      }
    192210      else {
     
    195213   }
    196214
    197    if (needbuffer)
     215   if (overlapping)
    198216      FREE(prgba);
    199 
    200    /* Restore current alpha buffer pointer */
    201    ctx->Buffer->Alpha = saveAlpha;
    202    if (changeBuffer)
    203       (*ctx->Driver.SetBuffer)( ctx, ctx->Color.DriverDrawBuffer );
    204217}
    205218
     
    214227   GLint i, j;
    215228   GLboolean changeBuffer;
    216    const GLboolean zoom = ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F;
     229   const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
    217230   const GLboolean shift_or_offset = ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset;
    218    GLboolean needbuffer;
     231   GLint overlapping;
    219232
    220233   /* Determine if copy should be bottom-to-top or top-to-bottom */
     
    232245   }
    233246
    234    needbuffer = regions_overlap(srcx, srcy, destx, desty, width, height,
    235                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
     247   overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
     248                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
    236249
    237250   if (ctx->Depth.Test || ctx->Fog.Enabled) {
    238251      /* fill in array of z values */
    239       GLint z = (GLint) (ctx->Current.RasterPos[2] * DEPTH_SCALE);
     252      GLdepth z = (GLdepth) (ctx->Current.RasterPos[2] * ctx->Visual->DepthMax);
    240253      for (i=0;i<width;i++) {
    241254         zspan[i] = z;
     
    244257
    245258   /* If read and draw buffer are different we must do buffer switching */
    246    changeBuffer = ctx->Pixel.ReadBuffer!=ctx->Color.DrawBuffer;
    247 
    248    if (needbuffer) {
     259   changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer
     260               || ctx->DrawBuffer != ctx->ReadBuffer;
     261
     262   if (overlapping) {
    249263      GLint ssy = sy;
    250264      pci = (GLuint *) MALLOC(width * height * sizeof(GLuint));
     
    255269      p = pci;
    256270      if (changeBuffer) {
    257          (*ctx->Driver.SetBuffer)( ctx, ctx->Pixel.DriverReadBuffer );
    258       }
    259       for (j=0; j<height; j++, ssy+=stepy) {
    260          gl_read_index_span( ctx, width, srcx, ssy, p );
     271         (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
     272                                       ctx->Pixel.DriverReadBuffer );
     273      }
     274      for (j = 0; j < height; j++, ssy += stepy) {
     275         gl_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p );
    261276         p += width;
    262277      }
    263278      p = pci;
    264279   }
    265 
    266    for (j=0; j<height; j++, sy+=stepy, dy+=stepy) {
     280   else {
     281      pci = NULL;                               /* silence compiler warning*/
     282      p = NULL;
     283   }
     284
     285   for (j = 0; j < height; j++, sy += stepy, dy += stepy) {
    267286      GLuint indexes[MAX_WIDTH];
    268       if (needbuffer) {
     287      if (overlapping) {
    269288         MEMCPY(indexes, p, width * sizeof(GLuint));
    270289         p += width;
     
    272291      else {
    273292         if (changeBuffer) {
    274             (*ctx->Driver.SetBuffer)( ctx, ctx->Pixel.DriverReadBuffer );
     293            (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
     294                                          ctx->Pixel.DriverReadBuffer );
    275295         }
    276          gl_read_index_span( ctx, width, srcx, sy, indexes );
     296         gl_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, indexes );
     297      }
     298
     299      if (changeBuffer) {
     300         /* set read buffer back to draw buffer (in case of logicops) */
     301         (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
     302                                       ctx->Color.DriverDrawBuffer );
    277303      }
    278304
     
    284310      }
    285311
    286       if (changeBuffer) {
    287          (*ctx->Driver.SetBuffer)( ctx, ctx->Color.DrawBuffer );
    288       }
    289312      if (zoom) {
    290313         gl_write_zoomed_index_span( ctx, width, destx, dy, zspan, indexes, desty );
    291314      }
    292315      else {
    293          gl_write_index_span( ctx, width, destx, dy, zspan, indexes, GL_BITMAP );
    294       }
    295    }
    296 
    297    if (needbuffer)
     316         gl_write_index_span(ctx, width, destx, dy, zspan, indexes, GL_BITMAP);
     317      }
     318   }
     319
     320   if (overlapping)
    298321      FREE(pci);
    299 
    300    if (changeBuffer)
    301       (*ctx->Driver.SetBuffer)( ctx, ctx->Color.DriverDrawBuffer );
    302322}
    303323
     
    318338   GLint sy, dy, stepy;
    319339   GLint i, j;
    320    const GLboolean zoom = ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F;
    321    GLboolean needbuffer;
    322 
    323    if (!ctx->Buffer->Depth) {
     340   const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
     341   GLint overlapping;
     342
     343   if (!ctx->ReadBuffer->DepthBuffer || !ctx->DrawBuffer->DepthBuffer) {
    324344      gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
    325345      return;
     
    340360   }
    341361
    342 
    343    needbuffer = regions_overlap(srcx, srcy, destx, desty, width, height,
    344                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
     362   overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
     363                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
    345364
    346365   /* setup colors or indexes */
     
    348367      GLuint *rgba32 = (GLuint *) rgba;
    349368      GLuint color = *(GLuint*)( ctx->Current.ByteColor );
    350       for (i=0; i<width; i++) {
     369      for (i = 0; i < width; i++) {
    351370         rgba32[i] = color;
    352371      }
    353372   }
    354373   else {
    355       for (i=0;i<width;i++) {
     374      for (i = 0; i < width; i++) {
    356375         indexes[i] = ctx->Current.Index;
    357376      }
    358377   }
    359378
    360    if (needbuffer) {
     379   if (overlapping) {
    361380      GLint ssy = sy;
    362381      pdepth = (GLfloat *) MALLOC(width * height * sizeof(GLfloat));
     
    366385      }
    367386      p = pdepth;
    368       for (j=0; j<height; j++, ssy+=stepy) {
    369          (*ctx->Driver.ReadDepthSpanFloat)( ctx, width, srcx, ssy, p );
     387      for (j = 0; j < height; j++, ssy += stepy) {
     388         _mesa_read_depth_span_float(ctx, width, srcx, ssy, p);
    370389         p += width;
    371390      }
    372391      p = pdepth;
    373392   }
    374 
    375    for (j=0; j<height; j++, sy+=stepy, dy+=stepy) {
    376       if (needbuffer) {
     393   else {
     394      pdepth = NULL;                            /* silence compiler warning*/
     395      p = NULL;
     396   }
     397
     398   for (j = 0; j < height; j++, sy += stepy, dy += stepy) {
     399      if (overlapping) {
    377400         MEMCPY(depth, p, width * sizeof(GLfloat));
    378401         p += width;
    379402      }
    380403      else {
    381          (*ctx->Driver.ReadDepthSpanFloat)( ctx, width, srcx, sy, depth );
    382       }
    383 
    384       for (i=0;i<width;i++) {
     404         _mesa_read_depth_span_float(ctx, width, srcx, sy, depth);
     405      }
     406
     407      for (i = 0; i < width; i++) {
    385408         GLfloat d = depth[i] * ctx->Pixel.DepthScale + ctx->Pixel.DepthBias;
    386          zspan[i] = (GLint) (CLAMP( d, 0.0F, 1.0F ) * DEPTH_SCALE);
     409         zspan[i] = (GLdepth) (CLAMP(d, 0.0F, 1.0F) * ctx->Visual->DepthMax);
    387410      }
    388411
     
    390413         if (zoom) {
    391414            gl_write_zoomed_rgba_span( ctx, width, destx, dy, zspan,
    392                                        (const GLubyte (*)[4])rgba, desty );
     415                                       (const GLubyte (*)[4])rgba, desty );
    393416         }
    394417         else {
     
    408431   }
    409432
    410   if (needbuffer)
     433  if (overlapping)
    411434     FREE(pdepth);
    412435}
     
    420443   GLint sy, dy, stepy;
    421444   GLint j;
    422    GLstencil    *p,*psten;
    423    const GLboolean zoom = (ctx->Pixel.ZoomX!=1.0F || ctx->Pixel.ZoomY!=1.0F);
    424    const GLboolean shift_or_offset = ctx->Pixel.IndexShift!=0 || ctx->Pixel.IndexOffset!=0;
    425    GLboolean needbuffer;
    426 
    427    if (!ctx->Buffer->Stencil) {
     445   GLstencil *p, *psten;
     446   const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
     447   const GLboolean shift_or_offset = ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset;
     448   GLint overlapping;
     449
     450   if (!ctx->DrawBuffer->Stencil || !ctx->ReadBuffer->Stencil) {
    428451      gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
    429452      return;
     
    431454
    432455   /* Determine if copy should be bottom-to-top or top-to-bottom */
    433    if (srcy<desty) {
     456   if (srcy < desty) {
    434457      /* top-down  max-to-min */
    435458      sy = srcy + height - 1;
     
    444467   }
    445468
    446    needbuffer = regions_overlap(srcx, srcy, destx, desty, width, height,
    447                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
    448 
    449    if (needbuffer) {
     469   overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
     470                                 ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
     471
     472   if (overlapping) {
    450473      GLint ssy = sy;
    451474      psten = (GLstencil *) MALLOC(width * height * sizeof(GLstencil));
     
    455478      }
    456479      p = psten;
    457       for (j=0; j<height; j++, ssy+=stepy) {
     480      for (j = 0; j < height; j++, ssy += stepy) {
    458481         gl_read_stencil_span( ctx, width, srcx, ssy, p );
    459482         p += width;
     
    461484      p = psten;
    462485   }
    463 
    464    for (j=0; j<height; j++, sy+=stepy, dy+=stepy) {
     486   else {
     487      psten = NULL;                             /* silence compiler warning*/
     488      p = NULL;
     489   }
     490
     491   for (j = 0; j < height; j++, sy += stepy, dy += stepy) {
    465492      GLstencil stencil[MAX_WIDTH];
    466493
    467       if (needbuffer) {
     494      if (overlapping) {
    468495         MEMCPY(stencil, p, width * sizeof(GLstencil));
    469496         p += width;
     
    488515   }
    489516
    490    if (needbuffer)
     517   if (overlapping)
    491518      FREE(psten);
    492519}
     
    495522
    496523
    497 void gl_CopyPixels( GLcontext* ctx, GLint srcx, GLint srcy,
    498                     GLsizei width, GLsizei height, GLenum type )
     524void
     525_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
     526                  GLenum type )
    499527{
     528   GET_CURRENT_CONTEXT(ctx);
    500529   GLint destx, desty;
    501530
    502531   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyPixels");
    503532
    504    if (width<0 || height<0) {
     533   if (width < 0 || height < 0) {
    505534      gl_error( ctx, GL_INVALID_VALUE, "glCopyPixels" );
    506535      return;
     
    514543      /* Destination of copy: */
    515544      if (!ctx->Current.RasterPosValid) {
    516         return;
     545        return;
    517546      }
    518547      destx = (GLint) (ctx->Current.RasterPos[0] + 0.5F);
    519548      desty = (GLint) (ctx->Current.RasterPos[1] + 0.5F);
    520549
    521       if (type==GL_COLOR && ctx->Visual->RGBAflag) {
     550      if (ctx->Driver.CopyPixels &&
     551          (*ctx->Driver.CopyPixels)( ctx, srcx, srcy, width, height,
     552                                     destx, desty, type )) {
     553         return;
     554      }
     555
     556      if (type == GL_COLOR && ctx->Visual->RGBAflag) {
    522557         copy_rgba_pixels( ctx, srcx, srcy, width, height, destx, desty );
    523558      }
    524       else if (type==GL_COLOR && !ctx->Visual->RGBAflag) {
     559      else if (type == GL_COLOR && !ctx->Visual->RGBAflag) {
    525560         copy_ci_pixels( ctx, srcx, srcy, width, height, destx, desty );
    526561      }
    527       else if (type==GL_DEPTH) {
     562      else if (type == GL_DEPTH) {
    528563         copy_depth_pixels( ctx, srcx, srcy, width, height, destx, desty );
    529564      }
    530       else if (type==GL_STENCIL) {
     565      else if (type == GL_STENCIL) {
    531566         copy_stencil_pixels( ctx, srcx, srcy, width, height, destx, desty );
    532567      }
    533568      else {
    534         gl_error( ctx, GL_INVALID_ENUM, "glCopyPixels" );
    535       }
    536    }
    537    else if (ctx->RenderMode==GL_FEEDBACK) {
     569        gl_error( ctx, GL_INVALID_ENUM, "glCopyPixels" );
     570      }
     571   }
     572   else if (ctx->RenderMode == GL_FEEDBACK) {
    538573      GLfloat color[4];
    539574      UBYTE_RGBA_TO_FLOAT_RGBA(color, ctx->Current.ByteColor );
    540575      FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_COPY_PIXEL_TOKEN );
    541576      gl_feedback_vertex( ctx, ctx->Current.RasterPos,
    542                           color, ctx->Current.Index,
    543                           ctx->Current.Texcoord[0] );
    544    }
    545    else if (ctx->RenderMode==GL_SELECT) {
     577                          color, ctx->Current.Index,
     578                          ctx->Current.Texcoord[0] );
     579   }
     580   else if (ctx->RenderMode == GL_SELECT) {
    546581      gl_update_hitflag( ctx, ctx->Current.RasterPos[2] );
    547582   }
Note: See TracChangeset for help on using the changeset viewer.