ReactOS 0.4.16-dev-197-g92996da
lines.c File Reference
#include "context.h"
#include "depth.h"
#include "feedback.h"
#include "lines.h"
#include "dlist.h"
#include "macros.h"
#include "pb.h"
#include "texstate.h"
#include "types.h"
#include "vb.h"
#include <wine/debug.h>
#include "linetemp.h"
Include dependency graph for lines.c:

Go to the source code of this file.

Macros

#define MAXPOINTS   MAX_WIDTH
 
#define INTERP_XY   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_INDEX   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_INDEX   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define PLOT(X, Y)
 
#define CHECK_FULL(count)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_INDEX   1
 
#define WIDE   1
 
#define STIPPLE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_INDEX   1
 
#define XMAJOR_PLOT(X, Y)
 
#define YMAJOR_PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_INDEX   1
 
#define WIDE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define WIDE   1
 
#define STIPPLE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define XMAJOR_PLOT(X, Y)
 
#define YMAJOR_PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define WIDE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define WIDE   1
 
#define STIPPLE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define XMAJOR_PLOT(X, Y)
 
#define YMAJOR_PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define WIDE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define WIDE   1
 
#define STIPPLE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define XMAJOR_PLOT(X, Y)
 
#define YMAJOR_PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define WIDE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_STW   1
 
#define INTERP_UV   1
 
#define WIDE   1
 
#define STIPPLE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_STW   1
 
#define INTERP_UV   1
 
#define WIDE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define INTERP_STW   1
 
#define INTERP_UV   1
 
#define WIDE   1
 
#define STIPPLE   1
 
#define PLOT(X, Y)
 
#define INTERP_XY   1
 
#define INTERP_Z   1
 
#define INTERP_RGB   1
 
#define INTERP_ALPHA   1
 
#define INTERP_STW   1
 
#define INTERP_UV   1
 
#define WIDE   1
 
#define PLOT(X, Y)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (opengl32)
 
void gl_LineWidth (GLcontext *ctx, GLfloat width)
 
void gl_LineStipple (GLcontext *ctx, GLint factor, GLushort pattern)
 
static void feedback_line (GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv)
 
static void select_line (GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv)
 
static void flat_ci_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void flat_ci_z_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void flat_rgba_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void flat_rgba_z_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void smooth_ci_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void smooth_ci_z_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void smooth_rgba_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void smooth_rgba_z_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void general_smooth_ci_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void general_flat_ci_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void general_smooth_rgba_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void general_flat_rgba_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
 
static void flat_textured_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pv)
 
static void smooth_textured_line (GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pv)
 
static void null_line (GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv)
 
void gl_set_line_function (GLcontext *ctx)
 

Macro Definition Documentation

◆ CHECK_FULL

#define CHECK_FULL (   count)
Value:
if (count >= PB_SIZE-MAX_WIDTH) { \
ctx->PB->count = count; \
gl_flush_pb(ctx); \
count = ctx->PB->count; \
}
#define MAX_WIDTH
Definition: config.h:130
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define PB_SIZE
Definition: pb.h:52

Definition at line 458 of file lines.c.

◆ INTERP_ALPHA [1/7]

#define INTERP_ALPHA   1

◆ INTERP_ALPHA [2/7]

#define INTERP_ALPHA   1

◆ INTERP_ALPHA [3/7]

#define INTERP_ALPHA   1

◆ INTERP_ALPHA [4/7]

#define INTERP_ALPHA   1

◆ INTERP_ALPHA [5/7]

#define INTERP_ALPHA   1

◆ INTERP_ALPHA [6/7]

#define INTERP_ALPHA   1

◆ INTERP_ALPHA [7/7]

#define INTERP_ALPHA   1

◆ INTERP_INDEX [1/5]

#define INTERP_INDEX   1

◆ INTERP_INDEX [2/5]

#define INTERP_INDEX   1

◆ INTERP_INDEX [3/5]

#define INTERP_INDEX   1

◆ INTERP_INDEX [4/5]

#define INTERP_INDEX   1

◆ INTERP_INDEX [5/5]

#define INTERP_INDEX   1

◆ INTERP_RGB [1/7]

#define INTERP_RGB   1

◆ INTERP_RGB [2/7]

#define INTERP_RGB   1

◆ INTERP_RGB [3/7]

#define INTERP_RGB   1

◆ INTERP_RGB [4/7]

#define INTERP_RGB   1

◆ INTERP_RGB [5/7]

#define INTERP_RGB   1

◆ INTERP_RGB [6/7]

#define INTERP_RGB   1

◆ INTERP_RGB [7/7]

#define INTERP_RGB   1

◆ INTERP_STW [1/4]

#define INTERP_STW   1

◆ INTERP_STW [2/4]

#define INTERP_STW   1

◆ INTERP_STW [3/4]

#define INTERP_STW   1

◆ INTERP_STW [4/4]

#define INTERP_STW   1

◆ INTERP_UV [1/4]

#define INTERP_UV   1

◆ INTERP_UV [2/4]

#define INTERP_UV   1

◆ INTERP_UV [3/4]

#define INTERP_UV   1

◆ INTERP_UV [4/4]

#define INTERP_UV   1

◆ INTERP_XY [1/24]

#define INTERP_XY   1

◆ INTERP_XY [2/24]

#define INTERP_XY   1

◆ INTERP_XY [3/24]

#define INTERP_XY   1

◆ INTERP_XY [4/24]

#define INTERP_XY   1

◆ INTERP_XY [5/24]

#define INTERP_XY   1

◆ INTERP_XY [6/24]

#define INTERP_XY   1

◆ INTERP_XY [7/24]

#define INTERP_XY   1

◆ INTERP_XY [8/24]

#define INTERP_XY   1

◆ INTERP_XY [9/24]

#define INTERP_XY   1

◆ INTERP_XY [10/24]

#define INTERP_XY   1

◆ INTERP_XY [11/24]

#define INTERP_XY   1

◆ INTERP_XY [12/24]

#define INTERP_XY   1

◆ INTERP_XY [13/24]

#define INTERP_XY   1

◆ INTERP_XY [14/24]

#define INTERP_XY   1

◆ INTERP_XY [15/24]

#define INTERP_XY   1

◆ INTERP_XY [16/24]

#define INTERP_XY   1

◆ INTERP_XY [17/24]

#define INTERP_XY   1

◆ INTERP_XY [18/24]

#define INTERP_XY   1

◆ INTERP_XY [19/24]

#define INTERP_XY   1

◆ INTERP_XY [20/24]

#define INTERP_XY   1

◆ INTERP_XY [21/24]

#define INTERP_XY   1

◆ INTERP_XY [22/24]

#define INTERP_XY   1

◆ INTERP_XY [23/24]

#define INTERP_XY   1

◆ INTERP_XY [24/24]

#define INTERP_XY   1

◆ INTERP_Z [1/20]

#define INTERP_Z   1

◆ INTERP_Z [2/20]

#define INTERP_Z   1

◆ INTERP_Z [3/20]

#define INTERP_Z   1

◆ INTERP_Z [4/20]

#define INTERP_Z   1

◆ INTERP_Z [5/20]

#define INTERP_Z   1

◆ INTERP_Z [6/20]

#define INTERP_Z   1

◆ INTERP_Z [7/20]

#define INTERP_Z   1

◆ INTERP_Z [8/20]

#define INTERP_Z   1

◆ INTERP_Z [9/20]

#define INTERP_Z   1

◆ INTERP_Z [10/20]

#define INTERP_Z   1

◆ INTERP_Z [11/20]

#define INTERP_Z   1

◆ INTERP_Z [12/20]

#define INTERP_Z   1

◆ INTERP_Z [13/20]

#define INTERP_Z   1

◆ INTERP_Z [14/20]

#define INTERP_Z   1

◆ INTERP_Z [15/20]

#define INTERP_Z   1

◆ INTERP_Z [16/20]

#define INTERP_Z   1

◆ INTERP_Z [17/20]

#define INTERP_Z   1

◆ INTERP_Z [18/20]

#define INTERP_Z   1

◆ INTERP_Z [19/20]

#define INTERP_Z   1

◆ INTERP_Z [20/20]

#define INTERP_Z   1

◆ MAXPOINTS

#define MAXPOINTS   MAX_WIDTH

Definition at line 221 of file lines.c.

◆ PLOT [1/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
count++;
#define Y(I)
#define X(b, s)

◆ PLOT [2/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
count++;
#define Z(I)

◆ PLOT [3/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
count++;

◆ PLOT [4/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
count++;

◆ PLOT [5/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbi[count] = I; \
count++;
#define I(s)
_Inout_ PERBANDINFO * pbi
Definition: winddi.h:3917

◆ PLOT [6/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbi[count] = I; \
count++;

◆ PLOT [7/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbr[count] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); \
count++;
#define FixedToInt(X)
Definition: fixed.h:47

◆ PLOT [8/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbr[count] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); \
count++;

◆ PLOT [9/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbi[count] = I; \
count++; \
CHECK_FULL(count);

◆ PLOT [10/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbi[count] = I; \
count++; \
CHECK_FULL(count);

◆ PLOT [11/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
count++; \
CHECK_FULL(count);

◆ PLOT [12/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
count++; \
CHECK_FULL(count);

◆ PLOT [13/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbr[count] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); \
count++; \
CHECK_FULL(count);

◆ PLOT [14/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbr[count] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); \
count++; \
CHECK_FULL(count);

◆ PLOT [15/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
count++; \
CHECK_FULL(count);

◆ PLOT [16/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
count++; \
CHECK_FULL(count);

◆ PLOT [17/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbs[count] = s0 / w0; \
pbt[count] = t0 / w0; \
pbu[count] = u0 / w0; \
count++; \
CHECK_FULL(count);

◆ PLOT [18/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbs[count] = s0 / w0; \
pbt[count] = t0 / w0; \
pbu[count] = u0 / w0; \
count++; \
CHECK_FULL(count);

◆ PLOT [19/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbs[count] = s0 / w0; \
pbt[count] = t0 / w0; \
pbu[count] = u0 / w0; \
pbr[count] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); \
count++; \
CHECK_FULL(count);

◆ PLOT [20/20]

#define PLOT (   X,
  Y 
)
Value:
pbx[count] = X; \
pby[count] = Y; \
pbz[count] = Z; \
pbs[count] = s0 / w0; \
pbt[count] = t0 / w0; \
pbu[count] = u0 / w0; \
pbr[count] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); \
count++; \
CHECK_FULL(count);

◆ STIPPLE [1/6]

#define STIPPLE   1

◆ STIPPLE [2/6]

#define STIPPLE   1

◆ STIPPLE [3/6]

#define STIPPLE   1

◆ STIPPLE [4/6]

#define STIPPLE   1

◆ STIPPLE [5/6]

#define STIPPLE   1

◆ STIPPLE [6/6]

#define STIPPLE   1

◆ WIDE [1/12]

#define WIDE   1

◆ WIDE [2/12]

#define WIDE   1

◆ WIDE [3/12]

#define WIDE   1

◆ WIDE [4/12]

#define WIDE   1

◆ WIDE [5/12]

#define WIDE   1

◆ WIDE [6/12]

#define WIDE   1

◆ WIDE [7/12]

#define WIDE   1

◆ WIDE [8/12]

#define WIDE   1

◆ WIDE [9/12]

#define WIDE   1

◆ WIDE [10/12]

#define WIDE   1

◆ WIDE [11/12]

#define WIDE   1

◆ WIDE [12/12]

#define WIDE   1

◆ XMAJOR_PLOT [1/4]

#define XMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X; \
pby[count] = Y; pby[count+1] = Y+1; \
pbz[count] = Z; pbz[count+1] = Z; \
pbi[count] = I; pbi[count+1] = I; \
count += 2;

◆ XMAJOR_PLOT [2/4]

#define XMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X; \
pby[count] = Y; pby[count+1] = Y+1; \
pbz[count] = Z; pbz[count+1] = Z; \
count += 2;

◆ XMAJOR_PLOT [3/4]

#define XMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X; \
pby[count] = Y; pby[count+1] = Y+1; \
pbz[count] = Z; pbz[count+1] = Z; \
pbr[count] = FixedToInt(r0); pbr[count+1] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); pbg[count+1] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); pbb[count+1] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); pba[count+1] = FixedToInt(a0); \
count += 2;

◆ XMAJOR_PLOT [4/4]

#define XMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X; \
pby[count] = Y; pby[count+1] = Y+1; \
pbz[count] = Z; pbz[count+1] = Z; \
count += 2;

◆ YMAJOR_PLOT [1/4]

#define YMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X+1; \
pby[count] = Y; pby[count+1] = Y; \
pbz[count] = Z; pbz[count+1] = Z; \
pbi[count] = I; pbi[count+1] = I; \
count += 2;

◆ YMAJOR_PLOT [2/4]

#define YMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X+1; \
pby[count] = Y; pby[count+1] = Y; \
pbz[count] = Z; pbz[count+1] = Z; \
count += 2;

◆ YMAJOR_PLOT [3/4]

#define YMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X+1; \
pby[count] = Y; pby[count+1] = Y; \
pbz[count] = Z; pbz[count+1] = Z; \
pbr[count] = FixedToInt(r0); pbr[count+1] = FixedToInt(r0); \
pbg[count] = FixedToInt(g0); pbg[count+1] = FixedToInt(g0); \
pbb[count] = FixedToInt(b0); pbb[count+1] = FixedToInt(b0); \
pba[count] = FixedToInt(a0); pba[count+1] = FixedToInt(a0); \
count += 2;

◆ YMAJOR_PLOT [4/4]

#define YMAJOR_PLOT (   X,
  Y 
)
Value:
pbx[count] = X; pbx[count+1] = X+1; \
pby[count] = Y; pby[count+1] = Y; \
pbz[count] = Z; pbz[count+1] = Z; \
count += 2;

Function Documentation

◆ feedback_line()

static void feedback_line ( GLcontext ctx,
GLuint  v1,
GLuint  v2,
GLuint  pv 
)
static

Definition at line 155 of file lines.c.

156{
157 struct vertex_buffer *VB = ctx->VB;
158 GLfloat x1, y1, z1, w1;
159 GLfloat x2, y2, z2, w2;
160 GLfloat tex1[4], tex2[4], invq;
161 GLfloat invRedScale = ctx->Visual->InvRedScale;
162 GLfloat invGreenScale = ctx->Visual->InvGreenScale;
163 GLfloat invBlueScale = ctx->Visual->InvBlueScale;
164 GLfloat invAlphaScale = ctx->Visual->InvAlphaScale;
165
166 x1 = VB->Win[v1][0];
167 y1 = VB->Win[v1][1];
168 z1 = VB->Win[v1][2] / DEPTH_SCALE;
169 w1 = VB->Clip[v1][3];
170
171 x2 = VB->Win[v2][0];
172 y2 = VB->Win[v2][1];
173 z2 = VB->Win[v2][2] / DEPTH_SCALE;
174 w2 = VB->Clip[v2][3];
175
176 invq = (VB->TexCoord[v1][3]==0.0) ? 1.0 : (1.0F / VB->TexCoord[v1][3]);
177 tex1[0] = VB->TexCoord[v1][0] * invq;
178 tex1[1] = VB->TexCoord[v1][1] * invq;
179 tex1[2] = VB->TexCoord[v1][2] * invq;
180 tex1[3] = VB->TexCoord[v1][3];
181 invq = (VB->TexCoord[v2][3]==0.0) ? 1.0 : (1.0F / VB->TexCoord[v2][3]);
182 tex2[0] = VB->TexCoord[v2][0] * invq;
183 tex2[1] = VB->TexCoord[v2][1] * invq;
184 tex2[2] = VB->TexCoord[v2][2] * invq;
185 tex2[3] = VB->TexCoord[v2][3];
186
187 if (ctx->StippleCounter==0) {
189 }
190 else {
192 }
193
194 {
195 GLfloat color[4];
196 /* convert color from integer to a float in [0,1] */
197 color[0] = (GLfloat) VB->Color[pv][0] * invRedScale;
198 color[1] = (GLfloat) VB->Color[pv][1] * invGreenScale;
199 color[2] = (GLfloat) VB->Color[pv][2] * invBlueScale;
200 color[3] = (GLfloat) VB->Color[pv][3] * invAlphaScale;
202 (GLfloat) VB->Index[pv], tex1 );
204 (GLfloat) VB->Index[pv], tex2 );
205 }
206
207 ctx->StippleCounter++;
208}
#define DEPTH_SCALE
Definition: config.h:146
void gl_feedback_vertex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w, const GLfloat color[4], GLfloat index, const GLfloat texcoord[4])
Definition: feedback.c:161
#define FEEDBACK_TOKEN(CTX, T)
Definition: feedback.h:39
float GLfloat
Definition: gl.h:161
#define GL_LINE_RESET_TOKEN
Definition: gl.h:399
#define GL_LINE_TOKEN
Definition: gl.h:398
int GLint
Definition: gl.h:156
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble GLdouble w2
Definition: glext.h:8308
GLuint color
Definition: glext.h:6243
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble w1
Definition: glext.h:8308
GLfloat GLfloat v1
Definition: glext.h:6062
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063
struct vertex_buffer * VB
Definition: tritemp.h:139
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
Definition: winddi.h:3709
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3711

Referenced by gl_set_line_function().

◆ flat_ci_line()

static void flat_ci_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 228 of file lines.c.

230{
231 GLint count;
232 GLint *pbx = ctx->PB->x;
233 GLint *pby = ctx->PB->y;
234 PB_SET_INDEX( ctx, ctx->PB, ctx->VB->Index[pvert] );
235 count = ctx->PB->count;
236
237#define INTERP_XY 1
238
239#define PLOT(X,Y) \
240 pbx[count] = X; \
241 pby[count] = Y; \
242 count++;
243
244#include "linetemp.h"
245
246 ctx->PB->count = count;
247 PB_CHECK_FLUSH( ctx, ctx->PB );
248}
#define PB_SET_INDEX(CTX, PB, I)
Definition: pb.h:105
#define PB_CHECK_FLUSH(CTX, PB)
Definition: pb.h:167

Referenced by gl_set_line_function().

◆ flat_ci_z_line()

static void flat_ci_z_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 253 of file lines.c.

255{
256 GLint count;
257 GLint *pbx = ctx->PB->x;
258 GLint *pby = ctx->PB->y;
259 GLdepth *pbz = ctx->PB->z;
260 PB_SET_INDEX( ctx, ctx->PB, ctx->VB->Index[pvert] );
261 count = ctx->PB->count;
262
263#define INTERP_XY 1
264#define INTERP_Z 1
265
266#define PLOT(X,Y) \
267 pbx[count] = X; \
268 pby[count] = Y; \
269 pbz[count] = Z; \
270 count++;
271
272#include "linetemp.h"
273
274 ctx->PB->count = count;
275 PB_CHECK_FLUSH( ctx, ctx->PB );
276}
GLint GLdepth
Definition: types.h:218

Referenced by gl_set_line_function().

◆ flat_rgba_line()

static void flat_rgba_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 281 of file lines.c.

283{
284 GLint count;
285 GLint *pbx = ctx->PB->x;
286 GLint *pby = ctx->PB->y;
287 GLubyte *color = ctx->VB->Color[pvert];
288 PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
289 count = ctx->PB->count;
290
291#define INTERP_XY 1
292
293#define PLOT(X,Y) \
294 pbx[count] = X; \
295 pby[count] = Y; \
296 count++;
297
298#include "linetemp.h"
299
300 ctx->PB->count = count;
301 PB_CHECK_FLUSH( ctx, ctx->PB );
302}
unsigned char GLubyte
Definition: gl.h:157
#define PB_SET_COLOR(CTX, PB, R, G, B, A)
Definition: pb.h:89

Referenced by gl_set_line_function().

◆ flat_rgba_z_line()

static void flat_rgba_z_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 307 of file lines.c.

309{
310 GLint count;
311 GLint *pbx = ctx->PB->x;
312 GLint *pby = ctx->PB->y;
313 GLdepth *pbz = ctx->PB->z;
314 GLubyte *color = ctx->VB->Color[pvert];
315 PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
316 count = ctx->PB->count;
317
318#define INTERP_XY 1
319#define INTERP_Z 1
320
321#define PLOT(X,Y) \
322 pbx[count] = X; \
323 pby[count] = Y; \
324 pbz[count] = Z; \
325 count++;
326
327#include "linetemp.h"
328
329 ctx->PB->count = count;
330 PB_CHECK_FLUSH( ctx, ctx->PB );
331}

Referenced by gl_set_line_function().

◆ flat_textured_line()

static void flat_textured_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pv 
)
static

Definition at line 755 of file lines.c.

757{
758 GLint count;
759 GLint *pbx = ctx->PB->x;
760 GLint *pby = ctx->PB->y;
761 GLdepth *pbz = ctx->PB->z;
762 GLfloat *pbs = ctx->PB->s;
763 GLfloat *pbt = ctx->PB->t;
764 GLfloat *pbu = ctx->PB->u;
765 GLubyte *color = ctx->VB->Color[pv];
766 PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
767 count = ctx->PB->count;
768
769 if (ctx->Line.StippleFlag) {
770 /* stippled */
771#define INTERP_XY 1
772#define INTERP_Z 1
773#define INTERP_STW 1
774#define INTERP_UV 1
775#define WIDE 1
776#define STIPPLE 1
777#define PLOT(X,Y) \
778 pbx[count] = X; \
779 pby[count] = Y; \
780 pbz[count] = Z; \
781 pbs[count] = s0 / w0; \
782 pbt[count] = t0 / w0; \
783 pbu[count] = u0 / w0; \
784 count++; \
785 CHECK_FULL(count);
786#include "linetemp.h"
787 }
788 else {
789 /* unstippled */
790#define INTERP_XY 1
791#define INTERP_Z 1
792#define INTERP_STW 1
793#define INTERP_UV 1
794#define WIDE 1
795#define PLOT(X,Y) \
796 pbx[count] = X; \
797 pby[count] = Y; \
798 pbz[count] = Z; \
799 pbs[count] = s0 / w0; \
800 pbt[count] = t0 / w0; \
801 pbu[count] = u0 / w0; \
802 count++; \
803 CHECK_FULL(count);
804#include "linetemp.h"
805 }
806
807 ctx->PB->count = count;
808 PB_CHECK_FLUSH( ctx, ctx->PB );
809}

Referenced by gl_set_line_function().

◆ general_flat_ci_line()

static void general_flat_ci_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 537 of file lines.c.

539{
540 GLint count;
541 GLint *pbx = ctx->PB->x;
542 GLint *pby = ctx->PB->y;
543 GLdepth *pbz = ctx->PB->z;
544 PB_SET_INDEX( ctx, ctx->PB, ctx->VB->Index[pvert] );
545 count = ctx->PB->count;
546
547 if (ctx->Line.StippleFlag) {
548 /* stippled, any width */
549#define INTERP_XY 1
550#define INTERP_Z 1
551#define WIDE 1
552#define STIPPLE 1
553#define PLOT(X,Y) \
554 pbx[count] = X; \
555 pby[count] = Y; \
556 pbz[count] = Z; \
557 count++; \
558 CHECK_FULL(count);
559#include "linetemp.h"
560 }
561 else {
562 /* unstippled */
563 if (ctx->Line.Width==2.0F) {
564 /* special case: unstippled and width=2 */
565#define INTERP_XY 1
566#define INTERP_Z 1
567#define XMAJOR_PLOT(X,Y) \
568 pbx[count] = X; pbx[count+1] = X; \
569 pby[count] = Y; pby[count+1] = Y+1; \
570 pbz[count] = Z; pbz[count+1] = Z; \
571 count += 2;
572#define YMAJOR_PLOT(X,Y) \
573 pbx[count] = X; pbx[count+1] = X+1; \
574 pby[count] = Y; pby[count+1] = Y; \
575 pbz[count] = Z; pbz[count+1] = Z; \
576 count += 2;
577#include "linetemp.h"
578 }
579 else {
580 /* unstippled, any width */
581#define INTERP_XY 1
582#define INTERP_Z 1
583#define WIDE 1
584#define PLOT(X,Y) \
585 pbx[count] = X; \
586 pby[count] = Y; \
587 pbz[count] = Z; \
588 count++; \
589 CHECK_FULL(count);
590#include "linetemp.h"
591 }
592 }
593
594 ctx->PB->count = count;
595 PB_CHECK_FLUSH( ctx, ctx->PB );
596}

Referenced by gl_set_line_function().

◆ general_flat_rgba_line()

static void general_flat_rgba_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 690 of file lines.c.

692{
693 GLint count;
694 GLint *pbx = ctx->PB->x;
695 GLint *pby = ctx->PB->y;
696 GLdepth *pbz = ctx->PB->z;
697 GLubyte *color = ctx->VB->Color[pvert];
698 PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
699 count = ctx->PB->count;
700
701 if (ctx->Line.StippleFlag) {
702 /* stippled */
703#define INTERP_XY 1
704#define INTERP_Z 1
705#define WIDE 1
706#define STIPPLE 1
707#define PLOT(X,Y) \
708 pbx[count] = X; \
709 pby[count] = Y; \
710 pbz[count] = Z; \
711 count++; \
712 CHECK_FULL(count);
713#include "linetemp.h"
714 }
715 else {
716 /* unstippled */
717 if (ctx->Line.Width==2.0F) {
718 /* special case: unstippled and width=2 */
719#define INTERP_XY 1
720#define INTERP_Z 1
721#define XMAJOR_PLOT(X,Y) \
722 pbx[count] = X; pbx[count+1] = X; \
723 pby[count] = Y; pby[count+1] = Y+1; \
724 pbz[count] = Z; pbz[count+1] = Z; \
725 count += 2;
726#define YMAJOR_PLOT(X,Y) \
727 pbx[count] = X; pbx[count+1] = X+1; \
728 pby[count] = Y; pby[count+1] = Y; \
729 pbz[count] = Z; pbz[count+1] = Z; \
730 count += 2;
731#include "linetemp.h"
732 }
733 else {
734 /* unstippled, any width */
735#define INTERP_XY 1
736#define INTERP_Z 1
737#define WIDE 1
738#define PLOT(X,Y) \
739 pbx[count] = X; \
740 pby[count] = Y; \
741 pbz[count] = Z; \
742 count++; \
743 CHECK_FULL(count);
744#include "linetemp.h"
745 }
746 }
747
748 ctx->PB->count = count;
749 PB_CHECK_FLUSH( ctx, ctx->PB );
750}

Referenced by gl_set_line_function().

◆ general_smooth_ci_line()

static void general_smooth_ci_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 468 of file lines.c.

470{
471 GLint count = ctx->PB->count;
472 GLint *pbx = ctx->PB->x;
473 GLint *pby = ctx->PB->y;
474 GLdepth *pbz = ctx->PB->z;
475 GLuint *pbi = ctx->PB->i;
476
477 if (ctx->Line.StippleFlag) {
478 /* stippled */
479#define INTERP_XY 1
480#define INTERP_Z 1
481#define INTERP_INDEX 1
482#define WIDE 1
483#define STIPPLE 1
484#define PLOT(X,Y) \
485 pbx[count] = X; \
486 pby[count] = Y; \
487 pbz[count] = Z; \
488 pbi[count] = I; \
489 count++; \
490 CHECK_FULL(count);
491#include "linetemp.h"
492 }
493 else {
494 /* unstippled */
495 if (ctx->Line.Width==2.0F) {
496 /* special case: unstippled and width=2 */
497#define INTERP_XY 1
498#define INTERP_Z 1
499#define INTERP_INDEX 1
500#define XMAJOR_PLOT(X,Y) \
501 pbx[count] = X; pbx[count+1] = X; \
502 pby[count] = Y; pby[count+1] = Y+1; \
503 pbz[count] = Z; pbz[count+1] = Z; \
504 pbi[count] = I; pbi[count+1] = I; \
505 count += 2;
506#define YMAJOR_PLOT(X,Y) \
507 pbx[count] = X; pbx[count+1] = X+1; \
508 pby[count] = Y; pby[count+1] = Y; \
509 pbz[count] = Z; pbz[count+1] = Z; \
510 pbi[count] = I; pbi[count+1] = I; \
511 count += 2;
512#include "linetemp.h"
513 }
514 else {
515 /* unstippled, any width */
516#define INTERP_XY 1
517#define INTERP_Z 1
518#define INTERP_INDEX 1
519#define WIDE 1
520#define PLOT(X,Y) \
521 pbx[count] = X; \
522 pby[count] = Y; \
523 pbz[count] = Z; \
524 pbi[count] = I; \
525 count++; \
526 CHECK_FULL(count);
527#include "linetemp.h"
528 }
529 }
530
531 ctx->PB->count = count;
532 PB_CHECK_FLUSH( ctx, ctx->PB );
533}
unsigned int GLuint
Definition: gl.h:159

Referenced by gl_set_line_function().

◆ general_smooth_rgba_line()

static void general_smooth_rgba_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 600 of file lines.c.

602{
603 GLint count = ctx->PB->count;
604 GLint *pbx = ctx->PB->x;
605 GLint *pby = ctx->PB->y;
606 GLdepth *pbz = ctx->PB->z;
607 GLubyte *pbr = ctx->PB->r;
608 GLubyte *pbg = ctx->PB->g;
609 GLubyte *pbb = ctx->PB->b;
610 GLubyte *pba = ctx->PB->a;
611
612 TRACE("Line %3.1f, %3.1f, %3.1f (r%u, g%u, b%u) --> %3.1f, %3.1f, %3.1f (r%u, g%u, b%u)\n",
613 ctx->VB->Win[vert0][0], ctx->VB->Win[vert0][1], ctx->VB->Win[vert0][2], ctx->VB->Color[vert0][0], ctx->VB->Color[vert0][1], ctx->VB->Color[vert0][2],
614 ctx->VB->Win[vert1][0], ctx->VB->Win[vert1][1], ctx->VB->Win[vert1][2], ctx->VB->Color[vert1][0], ctx->VB->Color[vert1][1], ctx->VB->Color[vert1][2]);
615
616 if (ctx->Line.StippleFlag) {
617 /* stippled */
618#define INTERP_XY 1
619#define INTERP_Z 1
620#define INTERP_RGB 1
621#define INTERP_ALPHA 1
622#define WIDE 1
623#define STIPPLE 1
624#define PLOT(X,Y) \
625 pbx[count] = X; \
626 pby[count] = Y; \
627 pbz[count] = Z; \
628 pbr[count] = FixedToInt(r0); \
629 pbg[count] = FixedToInt(g0); \
630 pbb[count] = FixedToInt(b0); \
631 pba[count] = FixedToInt(a0); \
632 count++; \
633 CHECK_FULL(count);
634#include "linetemp.h"
635 }
636 else {
637 /* unstippled */
638 if (ctx->Line.Width==2.0F) {
639 /* special case: unstippled and width=2 */
640#define INTERP_XY 1
641#define INTERP_Z 1
642#define INTERP_RGB 1
643#define INTERP_ALPHA 1
644#define XMAJOR_PLOT(X,Y) \
645 pbx[count] = X; pbx[count+1] = X; \
646 pby[count] = Y; pby[count+1] = Y+1; \
647 pbz[count] = Z; pbz[count+1] = Z; \
648 pbr[count] = FixedToInt(r0); pbr[count+1] = FixedToInt(r0); \
649 pbg[count] = FixedToInt(g0); pbg[count+1] = FixedToInt(g0); \
650 pbb[count] = FixedToInt(b0); pbb[count+1] = FixedToInt(b0); \
651 pba[count] = FixedToInt(a0); pba[count+1] = FixedToInt(a0); \
652 count += 2;
653#define YMAJOR_PLOT(X,Y) \
654 pbx[count] = X; pbx[count+1] = X+1; \
655 pby[count] = Y; pby[count+1] = Y; \
656 pbz[count] = Z; pbz[count+1] = Z; \
657 pbr[count] = FixedToInt(r0); pbr[count+1] = FixedToInt(r0); \
658 pbg[count] = FixedToInt(g0); pbg[count+1] = FixedToInt(g0); \
659 pbb[count] = FixedToInt(b0); pbb[count+1] = FixedToInt(b0); \
660 pba[count] = FixedToInt(a0); pba[count+1] = FixedToInt(a0); \
661 count += 2;
662#include "linetemp.h"
663 }
664 else {
665 /* unstippled, any width */
666#define INTERP_XY 1
667#define INTERP_Z 1
668#define INTERP_RGB 1
669#define INTERP_ALPHA 1
670#define WIDE 1
671#define PLOT(X,Y) \
672 pbx[count] = X; \
673 pby[count] = Y; \
674 pbz[count] = Z; \
675 pbr[count] = FixedToInt(r0); \
676 pbg[count] = FixedToInt(g0); \
677 pbb[count] = FixedToInt(b0); \
678 pba[count] = FixedToInt(a0); \
679 count++; \
680 CHECK_FULL(count);
681#include "linetemp.h"
682 }
683 }
684
685 ctx->PB->count = count;
686 PB_CHECK_FLUSH( ctx, ctx->PB );
687}
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by gl_set_line_function().

◆ gl_LineStipple()

void gl_LineStipple ( GLcontext ctx,
GLint  factor,
GLushort  pattern 
)

Definition at line 120 of file lines.c.

121{
122 if (INSIDE_BEGIN_END(ctx)) {
123 gl_error( ctx, GL_INVALID_OPERATION, "glLineStipple" );
124 return;
125 }
126 ctx->Line.StippleFactor = CLAMP( factor, 1, 256 );
127 ctx->Line.StipplePattern = pattern;
128 ctx->NewState |= NEW_RASTER_OPS;
129}
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
#define NEW_RASTER_OPS
Definition: types.h:1233
#define GL_INVALID_OPERATION
Definition: gl.h:696
GLubyte * pattern
Definition: glext.h:7787
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint factor
Definition: glfuncs.h:178
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
#define CLAMP(f, min, max)
Definition: tif_color.c:177

Referenced by execute_list(), and init_exec_pointers().

◆ gl_LineWidth()

void gl_LineWidth ( GLcontext ctx,
GLfloat  width 
)

Definition at line 104 of file lines.c.

105{
106 if (width<=0.0) {
107 gl_error( ctx, GL_INVALID_VALUE, "glLineWidth" );
108 return;
109 }
110 if (INSIDE_BEGIN_END(ctx)) {
111 gl_error( ctx, GL_INVALID_OPERATION, "glLineWidth" );
112 return;
113 }
114 ctx->Line.Width = width;
115 ctx->NewState |= NEW_RASTER_OPS;
116}
#define GL_INVALID_VALUE
Definition: gl.h:695
GLint GLint GLsizei width
Definition: gl.h:1546

Referenced by execute_list(), and init_exec_pointers().

◆ gl_set_line_function()

void gl_set_line_function ( GLcontext ctx)

Definition at line 898 of file lines.c.

899{
900 GLboolean rgbmode = ctx->Visual->RGBAflag;
901 /* TODO: antialiased lines */
902
903 if (ctx->RenderMode==GL_RENDER) {
904 if (ctx->NoRaster) {
905 ctx->Driver.LineFunc = null_line;
906 return;
907 }
908 if (ctx->Driver.LineFunc) {
909 /* Device driver will draw lines. */
910 ctx->Driver.LineFunc = ctx->Driver.LineFunc;
911 }
912 else if (ctx->Texture.Enabled) {
913 if (ctx->Light.ShadeModel==GL_SMOOTH) {
914 ctx->Driver.LineFunc = smooth_textured_line;
915 }
916 else {
917 ctx->Driver.LineFunc = flat_textured_line;
918 }
919 }
920 else if (ctx->Line.Width!=1.0 || ctx->Line.StippleFlag
921 || ctx->Line.SmoothFlag || ctx->Texture.Enabled) {
922 if (ctx->Light.ShadeModel==GL_SMOOTH) {
923 if (rgbmode)
924 ctx->Driver.LineFunc = general_smooth_rgba_line;
925 else
926 ctx->Driver.LineFunc = general_smooth_ci_line;
927 }
928 else {
929 if (rgbmode)
930 ctx->Driver.LineFunc = general_flat_rgba_line;
931 else
932 ctx->Driver.LineFunc = general_flat_ci_line;
933 }
934 }
935 else {
936 if (ctx->Light.ShadeModel==GL_SMOOTH) {
937 /* Width==1, non-stippled, smooth-shaded */
938 if (ctx->Depth.Test
939 || (ctx->Fog.Enabled && ctx->Hint.Fog==GL_NICEST)) {
940 if (rgbmode)
941 ctx->Driver.LineFunc = smooth_rgba_z_line;
942 else
943 ctx->Driver.LineFunc = smooth_ci_z_line;
944 }
945 else {
946 if (rgbmode)
947 ctx->Driver.LineFunc = smooth_rgba_line;
948 else
949 ctx->Driver.LineFunc = smooth_ci_line;
950 }
951 }
952 else {
953 /* Width==1, non-stippled, flat-shaded */
954 if (ctx->Depth.Test
955 || (ctx->Fog.Enabled && ctx->Hint.Fog==GL_NICEST)) {
956 if (rgbmode)
957 ctx->Driver.LineFunc = flat_rgba_z_line;
958 else
959 ctx->Driver.LineFunc = flat_ci_z_line;
960 }
961 else {
962 if (rgbmode)
963 ctx->Driver.LineFunc = flat_rgba_line;
964 else
965 ctx->Driver.LineFunc = flat_ci_line;
966 }
967 }
968 }
969 }
970 else if (ctx->RenderMode==GL_FEEDBACK) {
971 ctx->Driver.LineFunc = feedback_line;
972 }
973 else {
974 /* GL_SELECT mode */
975 ctx->Driver.LineFunc = select_line;
976 }
977}
static void flat_rgba_z_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:307
static void smooth_rgba_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:391
static void smooth_rgba_z_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:424
static void null_line(GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv)
Definition: lines.c:888
static void feedback_line(GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv)
Definition: lines.c:155
static void general_flat_rgba_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:690
static void flat_ci_z_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:253
static void general_smooth_rgba_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:600
static void general_flat_ci_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:537
static void general_smooth_ci_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:468
static void smooth_textured_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pv)
Definition: lines.c:814
static void smooth_ci_z_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:362
static void flat_rgba_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:281
static void flat_ci_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:228
static void select_line(GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv)
Definition: lines.c:212
static void flat_textured_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pv)
Definition: lines.c:755
static void smooth_ci_line(GLcontext *ctx, GLuint vert0, GLuint vert1, GLuint pvert)
Definition: lines.c:336
#define GL_RENDER
Definition: gl.h:388
#define GL_NICEST
Definition: gl.h:585
#define GL_SMOOTH
Definition: gl.h:339
#define GL_FEEDBACK
Definition: gl.h:387
unsigned char GLboolean
Definition: gl.h:151

Referenced by gl_update_state().

◆ null_line()

static void null_line ( GLcontext ctx,
GLuint  v1,
GLuint  v2,
GLuint  pv 
)
static

Definition at line 888 of file lines.c.

889{
890}

Referenced by gl_set_line_function().

◆ select_line()

static void select_line ( GLcontext ctx,
GLuint  v1,
GLuint  v2,
GLuint  pv 
)
static

Definition at line 212 of file lines.c.

213{
214 gl_update_hitflag( ctx, ctx->VB->Win[v1][2] / DEPTH_SCALE );
215 gl_update_hitflag( ctx, ctx->VB->Win[v2][2] / DEPTH_SCALE );
216}
void gl_update_hitflag(GLcontext *ctx, GLfloat z)
Definition: feedback.c:240

Referenced by gl_set_line_function().

◆ smooth_ci_line()

static void smooth_ci_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 336 of file lines.c.

338{
339 GLint count = ctx->PB->count;
340 GLint *pbx = ctx->PB->x;
341 GLint *pby = ctx->PB->y;
342 GLuint *pbi = ctx->PB->i;
343
344#define INTERP_XY 1
345#define INTERP_INDEX 1
346
347#define PLOT(X,Y) \
348 pbx[count] = X; \
349 pby[count] = Y; \
350 pbi[count] = I; \
351 count++;
352
353#include "linetemp.h"
354
355 ctx->PB->count = count;
356 PB_CHECK_FLUSH( ctx, ctx->PB );
357}

Referenced by gl_set_line_function().

◆ smooth_ci_z_line()

static void smooth_ci_z_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 362 of file lines.c.

364{
365 GLint count = ctx->PB->count;
366 GLint *pbx = ctx->PB->x;
367 GLint *pby = ctx->PB->y;
368 GLdepth *pbz = ctx->PB->z;
369 GLuint *pbi = ctx->PB->i;
370
371#define INTERP_XY 1
372#define INTERP_Z 1
373#define INTERP_INDEX 1
374
375#define PLOT(X,Y) \
376 pbx[count] = X; \
377 pby[count] = Y; \
378 pbz[count] = Z; \
379 pbi[count] = I; \
380 count++;
381
382#include "linetemp.h"
383
384 ctx->PB->count = count;
385 PB_CHECK_FLUSH( ctx, ctx->PB );
386}

Referenced by gl_set_line_function().

◆ smooth_rgba_line()

static void smooth_rgba_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 391 of file lines.c.

393{
394 GLint count = ctx->PB->count;
395 GLint *pbx = ctx->PB->x;
396 GLint *pby = ctx->PB->y;
397 GLubyte *pbr = ctx->PB->r;
398 GLubyte *pbg = ctx->PB->g;
399 GLubyte *pbb = ctx->PB->b;
400 GLubyte *pba = ctx->PB->a;
401
402#define INTERP_XY 1
403#define INTERP_RGB 1
404#define INTERP_ALPHA 1
405
406#define PLOT(X,Y) \
407 pbx[count] = X; \
408 pby[count] = Y; \
409 pbr[count] = FixedToInt(r0); \
410 pbg[count] = FixedToInt(g0); \
411 pbb[count] = FixedToInt(b0); \
412 pba[count] = FixedToInt(a0); \
413 count++;
414
415#include "linetemp.h"
416
417 ctx->PB->count = count;
418 PB_CHECK_FLUSH( ctx, ctx->PB );
419}

Referenced by gl_set_line_function().

◆ smooth_rgba_z_line()

static void smooth_rgba_z_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pvert 
)
static

Definition at line 424 of file lines.c.

426{
427 GLint count = ctx->PB->count;
428 GLint *pbx = ctx->PB->x;
429 GLint *pby = ctx->PB->y;
430 GLdepth *pbz = ctx->PB->z;
431 GLubyte *pbr = ctx->PB->r;
432 GLubyte *pbg = ctx->PB->g;
433 GLubyte *pbb = ctx->PB->b;
434 GLubyte *pba = ctx->PB->a;
435
436#define INTERP_XY 1
437#define INTERP_Z 1
438#define INTERP_RGB 1
439#define INTERP_ALPHA 1
440
441#define PLOT(X,Y) \
442 pbx[count] = X; \
443 pby[count] = Y; \
444 pbz[count] = Z; \
445 pbr[count] = FixedToInt(r0); \
446 pbg[count] = FixedToInt(g0); \
447 pbb[count] = FixedToInt(b0); \
448 pba[count] = FixedToInt(a0); \
449 count++;
450
451#include "linetemp.h"
452
453 ctx->PB->count = count;
454 PB_CHECK_FLUSH( ctx, ctx->PB );
455}

Referenced by gl_set_line_function().

◆ smooth_textured_line()

static void smooth_textured_line ( GLcontext ctx,
GLuint  vert0,
GLuint  vert1,
GLuint  pv 
)
static

Definition at line 814 of file lines.c.

816{
817 GLint count = ctx->PB->count;
818 GLint *pbx = ctx->PB->x;
819 GLint *pby = ctx->PB->y;
820 GLdepth *pbz = ctx->PB->z;
821 GLfloat *pbs = ctx->PB->s;
822 GLfloat *pbt = ctx->PB->t;
823 GLfloat *pbu = ctx->PB->u;
824 GLubyte *pbr = ctx->PB->r;
825 GLubyte *pbg = ctx->PB->g;
826 GLubyte *pbb = ctx->PB->b;
827 GLubyte *pba = ctx->PB->a;
828
829 if (ctx->Line.StippleFlag) {
830 /* stippled */
831#define INTERP_XY 1
832#define INTERP_Z 1
833#define INTERP_RGB 1
834#define INTERP_ALPHA 1
835#define INTERP_STW 1
836#define INTERP_UV 1
837#define WIDE 1
838#define STIPPLE 1
839#define PLOT(X,Y) \
840 pbx[count] = X; \
841 pby[count] = Y; \
842 pbz[count] = Z; \
843 pbs[count] = s0 / w0; \
844 pbt[count] = t0 / w0; \
845 pbu[count] = u0 / w0; \
846 pbr[count] = FixedToInt(r0); \
847 pbg[count] = FixedToInt(g0); \
848 pbb[count] = FixedToInt(b0); \
849 pba[count] = FixedToInt(a0); \
850 count++; \
851 CHECK_FULL(count);
852#include "linetemp.h"
853 }
854 else {
855 /* unstippled */
856#define INTERP_XY 1
857#define INTERP_Z 1
858#define INTERP_RGB 1
859#define INTERP_ALPHA 1
860#define INTERP_STW 1
861#define INTERP_UV 1
862#define WIDE 1
863#define PLOT(X,Y) \
864 pbx[count] = X; \
865 pby[count] = Y; \
866 pbz[count] = Z; \
867 pbs[count] = s0 / w0; \
868 pbt[count] = t0 / w0; \
869 pbu[count] = u0 / w0; \
870 pbr[count] = FixedToInt(r0); \
871 pbg[count] = FixedToInt(g0); \
872 pbb[count] = FixedToInt(b0); \
873 pba[count] = FixedToInt(a0); \
874 count++; \
875 CHECK_FULL(count);
876#include "linetemp.h"
877 }
878
879 ctx->PB->count = count;
880 PB_CHECK_FLUSH( ctx, ctx->PB );
881}

Referenced by gl_set_line_function().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( opengl32  )