#include <string.h>
#include "clip.h"
#include "context.h"
#include "dlist.h"
#include "macros.h"
#include "matrix.h"
#include "types.h"
#include "vb.h"
#include "xform.h"
Go to the source code of this file.
|
#define | LINTERP(T, A, B) ( (A) + (T) * ( (B) - (A) ) ) |
|
#define | EYE_SPACE 1 |
|
#define | CLIP_SPACE 2 |
|
#define | GENERAL_CLIP |
|
#define | X(I) coord[I][0] |
|
#define | Y(I) coord[I][1] |
|
#define | Z(I) coord[I][2] |
|
#define | W(I) coord[I][3] |
|
#define | OUTSIDE(K) (X(K) > W(K)) |
|
#define | COMPUTE_INTERSECTION(new, in, out) |
|
#define | OUTSIDE(K) (X(K) < -W(K)) |
|
#define | COMPUTE_INTERSECTION(new, in, out) |
|
#define | OUTSIDE(K) (Y(K) > W(K)) |
|
#define | COMPUTE_INTERSECTION(new, in, out) |
|
#define | OUTSIDE(K) (Y(K) < -W(K)) |
|
#define | COMPUTE_INTERSECTION(new, in, out) |
|
#define | OUTSIDE(K) (Z(K) > W(K)) |
|
#define | COMPUTE_INTERSECTION(new, in, out) |
|
#define | OUTSIDE(K) (Z(K) < -W(K)) |
|
#define | COMPUTE_INTERSECTION(new, in, out) |
|
#define | GENERAL_CLIP |
|
#define | X(I) coord[I][0] |
|
#define | Y(I) coord[I][1] |
|
#define | Z(I) coord[I][2] |
|
#define | W(I) coord[I][3] |
|
#define | INCOUNT n |
|
#define | OUTCOUNT n2 |
|
#define | INLIST vlist |
|
#define | OUTLIST vlist2 |
|
#define | INSIDE(K) (X(K) <= W(K)) |
|
#define | COMPUTE_INTERSECTION(in, out, new) |
|
#define | INCOUNT n2 |
|
#define | OUTCOUNT n |
|
#define | INLIST vlist2 |
|
#define | OUTLIST vlist |
|
#define | INSIDE(K) (X(K) >= -W(K)) |
|
#define | COMPUTE_INTERSECTION(in, out, new) |
|
#define | INCOUNT n |
|
#define | OUTCOUNT n2 |
|
#define | INLIST vlist |
|
#define | OUTLIST vlist2 |
|
#define | INSIDE(K) (Y(K) <= W(K)) |
|
#define | COMPUTE_INTERSECTION(in, out, new) |
|
#define | INCOUNT n2 |
|
#define | OUTCOUNT n |
|
#define | INLIST vlist2 |
|
#define | OUTLIST vlist |
|
#define | INSIDE(K) (Y(K) >= -W(K)) |
|
#define | COMPUTE_INTERSECTION(in, out, new) |
|
#define | INCOUNT n |
|
#define | OUTCOUNT n2 |
|
#define | INLIST vlist |
|
#define | OUTLIST vlist2 |
|
#define | INSIDE(K) (Z(K) <= W(K)) |
|
#define | COMPUTE_INTERSECTION(in, out, new) |
|
#define | INCOUNT n2 |
|
#define | OUTCOUNT n |
|
#define | INLIST vlist2 |
|
#define | OUTLIST vlist |
|
#define | INSIDE(K) (Z(K) >= -W(K)) |
|
#define | COMPUTE_INTERSECTION(in, out, new) |
|
#define | MAGIC_NUMBER -0.8e-03F |
|
#define | INSIDE(J, A, B, C, D) |
|
#define | OUTSIDE(J, A, B, C, D) |
|
|
void | interpolate_aux (GLcontext *ctx, GLuint space, GLuint dst, GLfloat t, GLuint in, GLuint out) |
|
void | interpolate_aux_color_tex2 (GLcontext *ctx, GLuint space, GLuint dst, GLfloat t, GLuint in, GLuint out) |
|
void | interpolate_aux_tex2 (GLcontext *ctx, GLuint space, GLuint dst, GLfloat t, GLuint in, GLuint out) |
|
void | interpolate_aux_color (GLcontext *ctx, GLuint space, GLuint dst, GLfloat t, GLuint in, GLuint out) |
|
void | gl_ClipPlane (GLcontext *ctx, GLenum plane, const GLfloat *equation) |
|
void | gl_GetClipPlane (GLcontext *ctx, GLenum plane, GLdouble *equation) |
|
GLuint | gl_viewclip_point (const GLfloat v[]) |
|
GLuint | gl_viewclip_line (GLcontext *ctx, GLuint *i, GLuint *j) |
|
GLuint | gl_viewclip_polygon (GLcontext *ctx, GLuint n, GLuint vlist[]) |
|
GLuint | gl_userclip_point (GLcontext *ctx, const GLfloat v[]) |
|
GLuint | gl_userclip_line (GLcontext *ctx, GLuint *i, GLuint *j) |
|
GLuint | gl_userclip_polygon (GLcontext *ctx, GLuint n, GLuint vlist[]) |
|
◆ CLIP_SPACE
◆ COMPUTE_INTERSECTION [1/12]
Value:
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [2/12]
Value:
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [3/12]
Value:
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [4/12]
Value:
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [5/12]
Value: Z(
new) =
Z(
in) +
t * dz; \
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [6/12]
Value: Z(
new) =
Z(
in) +
t * dz; \
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [7/12]
Value: X(new) = neww; \
W(new) = neww;
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [8/12]
Value: X(new) = -neww; \
W(new) = neww;
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [9/12]
Value: Y(new) = neww; \
W(new) = neww;
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [10/12]
Value: Y(new) = -neww; \
W(new) = neww;
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [11/12]
Value: Z(new) = neww; \
W(new) = neww;
REFIID LPVOID DWORD_PTR dw
◆ COMPUTE_INTERSECTION [12/12]
Value: Z(new) = -neww; \
W(new) = neww;
REFIID LPVOID DWORD_PTR dw
◆ EYE_SPACE
◆ GENERAL_CLIP [1/2]
Value: \
return 0; \
} \
else { \
\
\
COMPUTE_INTERSECTION(
VB->Free, jj, ii ) \
VB->Free++; \
} \
} \
else { \
\
\
COMPUTE_INTERSECTION(
VB->Free, ii, jj ); \
VB->Free++; \
} \
\
}
struct vertex_buffer * VB
◆ GENERAL_CLIP [2/2]
◆ INCOUNT [1/6]
◆ INCOUNT [2/6]
◆ INCOUNT [3/6]
◆ INCOUNT [4/6]
◆ INCOUNT [5/6]
◆ INCOUNT [6/6]
◆ INLIST [1/6]
◆ INLIST [2/6]
◆ INLIST [3/6]
◆ INLIST [4/6]
◆ INLIST [5/6]
◆ INLIST [6/6]
◆ INSIDE [1/7]
◆ INSIDE [2/7]
◆ INSIDE [3/7]
◆ INSIDE [4/7]
◆ INSIDE [5/7]
◆ INSIDE [6/7]
◆ INSIDE [7/7]
Value:( (
VB->Eye[J][0] *
A +
VB->Eye[J][1] *
B \
struct vertex_buffer * VB
Definition at line 780 of file clip.c.
◆ LINTERP
◆ MAGIC_NUMBER
#define MAGIC_NUMBER -0.8e-03F |
◆ OUTCOUNT [1/6]
◆ OUTCOUNT [2/6]
◆ OUTCOUNT [3/6]
◆ OUTCOUNT [4/6]
◆ OUTCOUNT [5/6]
◆ OUTCOUNT [6/6]
◆ OUTLIST [1/6]
◆ OUTLIST [2/6]
◆ OUTLIST [3/6]
◆ OUTLIST [4/6]
◆ OUTLIST [5/6]
◆ OUTLIST [6/6]
◆ OUTSIDE [1/7]
◆ OUTSIDE [2/7]
◆ OUTSIDE [3/7]
◆ OUTSIDE [4/7]
◆ OUTSIDE [5/7]
◆ OUTSIDE [6/7]
◆ OUTSIDE [7/7]
Value:( (
VB->Eye[J][0] *
A +
VB->Eye[J][1] *
B \
struct vertex_buffer * VB
Definition at line 786 of file clip.c.
◆ W [1/2]
◆ W [2/2]
◆ X [1/2]
◆ X [2/2]
◆ Y [1/2]
◆ Y [2/2]
◆ Z [1/2]
◆ Z [2/2]
◆ gl_ClipPlane()
Definition at line 204 of file clip.c.
218 if (
ctx->NewModelViewMatrix) {
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum plane
void gl_error(GLcontext *ctx, GLenum error, const char *s)
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum GLdouble * equation
void gl_analyze_modelview_matrix(GLcontext *ctx)
Referenced by execute_list(), and init_exec_pointers().
◆ gl_GetClipPlane()
Definition at line 227 of file clip.c.
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum plane
#define INSIDE_BEGIN_END(CTX)
#define GL_INVALID_OPERATION
void gl_error(GLcontext *ctx, GLenum error, const char *s)
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum GLdouble * equation
Referenced by init_dlist_pointers(), and init_exec_pointers().
◆ gl_userclip_line()
Definition at line 798 of file clip.c.
808 if (
ctx->Transform.ClipEnabled[
p]) {
810 a =
ctx->Transform.ClipEquation[
p][0];
811 b =
ctx->Transform.ClipEquation[
p][1];
812 c =
ctx->Transform.ClipEquation[
p][2];
813 d =
ctx->Transform.ClipEquation[
p][3];
823 dx =
VB->Eye[ii][0] -
VB->Eye[jj][0];
824 dy =
VB->Eye[ii][1] -
VB->Eye[jj][1];
825 dz =
VB->Eye[ii][2] -
VB->Eye[jj][2];
826 dw =
VB->Eye[ii][3] -
VB->Eye[jj][3];
832 t = -(
VB->Eye[jj][0]*
a+
VB->Eye[jj][1]*
b 833 +
VB->Eye[jj][2]*
c+
VB->Eye[jj][3]*
d) / denom;
834 if (
t>1.0
F)
t = 1.0F;
836 VB->Eye[
VB->Free][0] =
VB->Eye[jj][0] +
t *
dx;
837 VB->Eye[
VB->Free][1] =
VB->Eye[jj][1] +
t *
dy;
838 VB->Eye[
VB->Free][2] =
VB->Eye[jj][2] +
t * dz;
839 VB->Eye[
VB->Free][3] =
VB->Eye[jj][3] +
t *
dw;
854 dx =
VB->Eye[jj][0] -
VB->Eye[ii][0];
855 dy =
VB->Eye[jj][1] -
VB->Eye[ii][1];
856 dz =
VB->Eye[jj][2] -
VB->Eye[ii][2];
857 dw =
VB->Eye[jj][3] -
VB->Eye[ii][3];
863 t = -(
VB->Eye[ii][0]*
a+
VB->Eye[ii][1]*
b 864 +
VB->Eye[ii][2]*
c+
VB->Eye[ii][3]*
d) / denom;
865 if (
t>1.0
F)
t = 1.0F;
867 VB->Eye[
VB->Free][0] =
VB->Eye[ii][0] +
t *
dx;
868 VB->Eye[
VB->Free][1] =
VB->Eye[ii][1] +
t *
dy;
869 VB->Eye[
VB->Free][2] =
VB->Eye[ii][2] +
t * dz;
870 VB->Eye[
VB->Free][3] =
VB->Eye[ii][3] +
t *
dw;
REFIID LPVOID DWORD_PTR dw
void interpolate_aux(GLcontext *ctx, GLuint space, GLuint dst, GLfloat t, GLuint in, GLuint out)
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
GLboolean GLboolean GLboolean b
struct vertex_buffer * VB
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLboolean GLboolean GLboolean GLboolean a
Referenced by render_clipped_line().
◆ gl_userclip_point()
Definition at line 756 of file clip.c.
761 if (
ctx->Transform.ClipEnabled[
p]) {
763 +
v[1] *
ctx->Transform.ClipEquation[
p][1]
764 +
v[2] *
ctx->Transform.ClipEquation[
p][2]
765 +
v[3] *
ctx->Transform.ClipEquation[
p][3];
Referenced by gl_RasterPos4f().
◆ gl_userclip_polygon()
Definition at line 902 of file clip.c.
919 if (
ctx->Transform.ClipEnabled[
p]) {
920 register float a =
ctx->Transform.ClipEquation[
p][0];
921 register float b =
ctx->Transform.ClipEquation[
p][1];
922 register float c =
ctx->Transform.ClipEquation[
p][2];
923 register float d =
ctx->Transform.ClipEquation[
p][3];
925 if (incount<3)
return 0;
929 prevj = inlist[previ];
933 for (curri=0;curri<incount;curri++) {
934 currj = inlist[curri];
939 outlist[outcount++] = currj;
945 dx =
VB->Eye[prevj][0] -
VB->Eye[currj][0];
946 dy =
VB->Eye[prevj][1] -
VB->Eye[currj][1];
947 dz =
VB->Eye[prevj][2] -
VB->Eye[currj][2];
948 dw =
VB->Eye[prevj][3] -
VB->Eye[currj][3];
954 t = -(
VB->Eye[currj][0]*
a+
VB->Eye[currj][1]*
b 955 +
VB->Eye[currj][2]*
c+
VB->Eye[currj][3]*
d) / denom;
961 VB->Eye[
VB->Free][0] =
VB->Eye[currj][0] +
t*
dx;
962 VB->Eye[
VB->Free][1] =
VB->Eye[currj][1] +
t*
dy;
963 VB->Eye[
VB->Free][2] =
VB->Eye[currj][2] +
t*dz;
964 VB->Eye[
VB->Free][3] =
VB->Eye[currj][3] +
t*
dw;
970 VB->Edgeflag[
VB->Free] =
VB->Edgeflag[prevj];
973 outlist[outcount++] =
VB->Free;
977 outlist[outcount++] = currj;
985 dx =
VB->Eye[currj][0]-
VB->Eye[prevj][0];
986 dy =
VB->Eye[currj][1]-
VB->Eye[prevj][1];
987 dz =
VB->Eye[currj][2]-
VB->Eye[prevj][2];
988 dw =
VB->Eye[currj][3]-
VB->Eye[prevj][3];
994 t = -(
VB->Eye[prevj][0]*
a+
VB->Eye[prevj][1]*
b 995 +
VB->Eye[prevj][2]*
c+
VB->Eye[prevj][3]*
d) / denom;
1001 VB->Eye[
VB->Free][0] =
VB->Eye[prevj][0] +
t*
dx;
1002 VB->Eye[
VB->Free][1] =
VB->Eye[prevj][1] +
t*
dy;
1003 VB->Eye[
VB->Free][2] =
VB->Eye[prevj][2] +
t*dz;
1004 VB->Eye[
VB->Free][3] =
VB->Eye[prevj][3] +
t*
dw;
1007 if (
ctx->ClipMask) {
1010 VB->Edgeflag[
VB->Free] =
VB->Edgeflag[prevj];
1013 outlist[outcount++] =
VB->Free;
1026 if (outlist!=vlist2) {
1049 if (outlist!=vlist2) {
REFIID LPVOID DWORD_PTR dw
void interpolate_aux(GLcontext *ctx, GLuint space, GLuint dst, GLfloat t, GLuint in, GLuint out)
GLboolean GLboolean GLboolean b
#define MEMCPY(DST, SRC, BYTES)
struct vertex_buffer * VB
GLboolean GLboolean GLboolean GLboolean a
Referenced by render_clipped_polygon().
◆ gl_viewclip_line()
Definition at line 283 of file clip.c.
299 #define GENERAL_CLIP \ 308 COMPUTE_INTERSECTION( VB->Free, jj, ii ) \ 310 ctx->ClipInterpAuxFunc( ctx, CLIP_SPACE, VB->Free, t, jj, ii );\ 313 if (VB->Free==VB_SIZE) VB->Free = 1; \ 320 COMPUTE_INTERSECTION( VB->Free, ii, jj ); \ 322 ctx->ClipInterpAuxFunc( ctx, CLIP_SPACE, VB->Free, t, ii, jj );\ 325 if (VB->Free==VB_SIZE) VB->Free = 1; \ 331 #define X(I) coord[I][0] 332 #define Y(I) coord[I][1] 333 #define Z(I) coord[I][2] 334 #define W(I) coord[I][3] 341 #define OUTSIDE(K) (X(K) > W(K)) 342 #define COMPUTE_INTERSECTION( new, in, out ) \ 343 dx = X(out) - X(in); \ 344 dw = W(out) - W(in); \ 345 t = (X(in) - W(in)) / (dw-dx); \ 346 X(new) = X(in) + t * dx; \ 347 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 348 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 349 W(new) = W(in) + t * dw; 354 #undef COMPUTE_INTERSECTION 358 #define OUTSIDE(K) (X(K) < -W(K)) 359 #define COMPUTE_INTERSECTION( new, in, out ) \ 360 dx = X(out) - X(in); \ 361 dw = W(out) - W(in); \ 362 t = -(X(in) + W(in)) / (dw+dx); \ 363 X(new) = X(in) + t * dx; \ 364 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 365 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 366 W(new) = W(in) + t * dw; 371 #undef COMPUTE_INTERSECTION 375 #define OUTSIDE(K) (Y(K) > W(K)) 376 #define COMPUTE_INTERSECTION( new, in, out ) \ 377 dy = Y(out) - Y(in); \ 378 dw = W(out) - W(in); \ 379 t = (Y(in) - W(in)) / (dw-dy); \ 380 X(new) = X(in) + t * (X(out) - X(in)); \ 381 Y(new) = Y(in) + t * dy; \ 382 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 383 W(new) = W(in) + t * dw; 388 #undef COMPUTE_INTERSECTION 392 #define OUTSIDE(K) (Y(K) < -W(K)) 393 #define COMPUTE_INTERSECTION( new, in, out ) \ 394 dy = Y(out) - Y(in); \ 395 dw = W(out) - W(in); \ 396 t = -(Y(in) + W(in)) / (dw+dy); \ 397 X(new) = X(in) + t * (X(out) - X(in)); \ 398 Y(new) = Y(in) + t * dy; \ 399 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 400 W(new) = W(in) + t * dw; 405 #undef COMPUTE_INTERSECTION 409 #define OUTSIDE(K) (Z(K) > W(K)) 410 #define COMPUTE_INTERSECTION( new, in, out ) \ 411 dz = Z(out) - Z(in); \ 412 dw = W(out) - W(in); \ 413 t = (Z(in) - W(in)) / (dw-dz); \ 414 X(new) = X(in) + t * (X(out) - X(in)); \ 415 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 416 Z(new) = Z(in) + t * dz; \ 417 W(new) = W(in) + t * dw; 422 #undef COMPUTE_INTERSECTION 426 #define OUTSIDE(K) (Z(K) < -W(K)) 427 #define COMPUTE_INTERSECTION( new, in, out ) \ 428 dz = Z(out) - Z(in); \ 429 dw = W(out) - W(in); \ 430 t = -(Z(in) + W(in)) / (dw+dz); \ 431 X(new) = X(in) + t * (X(out) - X(in)); \ 432 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 433 Z(new) = Z(in) + t * dz; \ 434 W(new) = W(in) + t * dw; 439 #undef COMPUTE_INTERSECTION
REFIID LPVOID DWORD_PTR dw
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
struct vertex_buffer * VB
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 GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by render_clipped_line().
◆ gl_viewclip_point()
◆ gl_viewclip_polygon()
Definition at line 458 of file clip.c.
483 #define GENERAL_CLIP \ 484 if (INCOUNT<3) return 0; \ 486 prevj = INLIST[previ]; \ 488 for (curri=0;curri<INCOUNT;curri++) { \ 489 currj = INLIST[curri]; \ 490 if (INSIDE(currj)) { \ 491 if (INSIDE(prevj)) { \ 493 OUTLIST[OUTCOUNT] = currj; \ 498 COMPUTE_INTERSECTION( currj, prevj, VB->Free ) \ 503 ctx->ClipInterpAuxFunc( ctx, CLIP_SPACE, VB->Free, t, currj, prevj ); \ 504 VB->Edgeflag[VB->Free] = VB->Edgeflag[prevj]; \ 506 OUTLIST[OUTCOUNT] = VB->Free; \ 508 if (VB->Free==VB_SIZE) VB->Free = 1; \ 512 OUTLIST[OUTCOUNT] = currj; \ 517 if (INSIDE(prevj)) { \ 519 COMPUTE_INTERSECTION( prevj, currj, VB->Free ) \ 524 ctx->ClipInterpAuxFunc( ctx, CLIP_SPACE, VB->Free, t, prevj, currj ); \ 525 VB->Edgeflag[VB->Free] = VB->Edgeflag[prevj]; \ 527 OUTLIST[OUTCOUNT] = VB->Free; \ 529 if (VB->Free==VB_SIZE) VB->Free = 1; \ 539 if (OUTCOUNT>=VB_SIZE-1) { \ 541 if (OUTLIST==vlist2) { \ 544 for (i=0;i<VB_SIZE;i++) { \ 545 vlist[i] = OUTLIST[i]; \ 553 #define X(I) coord[I][0] 554 #define Y(I) coord[I][1] 555 #define Z(I) coord[I][2] 556 #define W(I) coord[I][3] 564 #define OUTLIST vlist2 565 #define INSIDE(K) (X(K) <= W(K)) 567 #define COMPUTE_INTERSECTION( in, out, new ) \ 568 dx = X(out) - X(in); \ 569 dw = W(out) - W(in); \ 570 t = (X(in)-W(in)) / (dw-dx); \ 571 neww = W(in) + t * dw; \ 573 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 574 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 584 #undef COMPUTE_INTERSECTION 592 #define INLIST vlist2 593 #define OUTLIST vlist 594 #define INSIDE(K) (X(K) >= -W(K)) 595 #define COMPUTE_INTERSECTION( in, out, new ) \ 598 t = -(X(in)+W(in)) / (dw+dx); \ 599 neww = W(in) + t * dw; \ 601 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 602 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 612 #undef COMPUTE_INTERSECTION 621 #define OUTLIST vlist2 622 #define INSIDE(K) (Y(K) <= W(K)) 623 #define COMPUTE_INTERSECTION( in, out, new ) \ 626 t = (Y(in)-W(in)) / (dw-dy); \ 627 neww = W(in) + t * dw; \ 628 X(new) = X(in) + t * (X(out) - X(in)); \ 630 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 640 #undef COMPUTE_INTERSECTION 648 #define INLIST vlist2 649 #define OUTLIST vlist 650 #define INSIDE(K) (Y(K) >= -W(K)) 651 #define COMPUTE_INTERSECTION( in, out, new ) \ 654 t = -(Y(in)+W(in)) / (dw+dy); \ 655 neww = W(in) + t * dw; \ 656 X(new) = X(in) + t * (X(out) - X(in)); \ 658 Z(new) = Z(in) + t * (Z(out) - Z(in)); \ 668 #undef COMPUTE_INTERSECTION 678 #define OUTLIST vlist2 679 #define INSIDE(K) (Z(K) <= W(K)) 680 #define COMPUTE_INTERSECTION( in, out, new ) \ 683 t = (Z(in)-W(in)) / (dw-dz); \ 684 neww = W(in) + t * dw; \ 685 X(new) = X(in) + t * (X(out) - X(in)); \ 686 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 697 #undef COMPUTE_INTERSECTION 705 #define INLIST vlist2 706 #define OUTLIST vlist 707 #define INSIDE(K) (Z(K) >= -W(K)) 708 #define COMPUTE_INTERSECTION( in, out, new ) \ 711 t = -(Z(in)+W(in)) / (dw+dz); \ 712 neww = W(in) + t * dw; \ 713 X(new) = X(in) + t * (X(out) - X(in)); \ 714 Y(new) = Y(in) + t * (Y(out) - Y(in)); \ 724 #undef COMPUTE_INTERSECTION
REFIID LPVOID DWORD_PTR dw
struct vertex_buffer * VB
Referenced by render_clipped_polygon().
◆ interpolate_aux()
◆ interpolate_aux_color()
◆ interpolate_aux_color_tex2()
◆ interpolate_aux_tex2()