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/zoom.c

    r2938 r3598  
    1 /* $Id: zoom.c,v 1.1 2000-02-29 00:50:16 sandervl Exp $ */
     1/* $Id: zoom.c,v 1.2 2000-05-23 20:41:08 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 <assert.h>
    36 #else
    37 #include "GL/xf86glx.h"
    38 #endif
     34#include "glheader.h"
    3935#include "macros.h"
    4036#include "span.h"
     
    6460   GLubyte zrgba[MAX_WIDTH][4];  /* zoomed pixel colors */
    6561   GLdepth zdepth[MAX_WIDTH];  /* zoomed depth values */
    66    GLint maxwidth = MIN2( ctx->Buffer->Width, MAX_WIDTH );
     62   GLint maxwidth = MIN2( ctx->DrawBuffer->Width, MAX_WIDTH );
    6763   const GLuint *srcRGBA32 = (const GLuint *) rgba;
    6864   GLuint *dstRGBA32 = (GLuint *) zrgba;
     
    9692      return;
    9793   }
    98    if (r0>=ctx->Buffer->Height && r1>=ctx->Buffer->Height) {
     94   if (r0>=ctx->DrawBuffer->Height && r1>=ctx->DrawBuffer->Height) {
    9995      /* above window */
    10096      return;
     
    115111   }
    116112
    117    assert( m <= MAX_WIDTH );
     113   ASSERT( m <= MAX_WIDTH );
    118114
    119115   /* zoom the span horizontally */
     
    154150   GLubyte zrgba[MAX_WIDTH][4];  /* zoomed pixel colors */
    155151   GLdepth zdepth[MAX_WIDTH];  /* zoomed depth values */
    156    GLint maxwidth = MIN2( ctx->Buffer->Width, MAX_WIDTH );
     152   GLint maxwidth = MIN2( ctx->DrawBuffer->Width, MAX_WIDTH );
    157153
    158154   /* compute width of output row */
     
    184180      return;
    185181   }
    186    if (r0>=ctx->Buffer->Height && r1>=ctx->Buffer->Height) {
     182   if (r0>=ctx->DrawBuffer->Height && r1>=ctx->DrawBuffer->Height) {
    187183      /* above window */
    188184      return;
     
    203199   }
    204200
    205    assert( m <= MAX_WIDTH );
     201   ASSERT( m <= MAX_WIDTH );
    206202
    207203   /* zoom the span horizontally */
     
    251247   GLuint zindexes[MAX_WIDTH];  /* zoomed color indexes */
    252248   GLdepth zdepth[MAX_WIDTH];  /* zoomed depth values */
    253    GLint maxwidth = MIN2( ctx->Buffer->Width, MAX_WIDTH );
     249   GLint maxwidth = MIN2( ctx->DrawBuffer->Width, MAX_WIDTH );
    254250
    255251   /* compute width of output row */
     
    281277      return;
    282278   }
    283    if (r0>=ctx->Buffer->Height && r1>=ctx->Buffer->Height) {
     279   if (r0>=ctx->DrawBuffer->Height && r1>=ctx->DrawBuffer->Height) {
    284280      /* above window */
    285281      return;
     
    300296   }
    301297
    302    assert( m <= MAX_WIDTH );
     298   ASSERT( m <= MAX_WIDTH );
    303299
    304300   /* zoom the span horizontally */
     
    341337   GLint i, j, skipcol;
    342338   GLstencil zstencil[MAX_WIDTH];  /* zoomed stencil values */
    343    GLint maxwidth = MIN2( ctx->Buffer->Width, MAX_WIDTH );
     339   GLint maxwidth = MIN2( ctx->DrawBuffer->Width, MAX_WIDTH );
    344340
    345341   /* compute width of output row */
     
    371367      return;
    372368   }
    373    if (r0>=ctx->Buffer->Height && r1>=ctx->Buffer->Height) {
     369   if (r0>=ctx->DrawBuffer->Height && r1>=ctx->DrawBuffer->Height) {
    374370      /* above window */
    375371      return;
     
    390386   }
    391387
    392    assert( m <= MAX_WIDTH );
     388   ASSERT( m <= MAX_WIDTH );
    393389
    394390   /* zoom the span horizontally */
Note: See TracChangeset for help on using the changeset viewer.