From af763d5e4379f6dc3b48fdf76332ffa31a44a5bc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 11 Feb 2000 21:14:27 +0000 Subject: [PATCH] added code for all GL_MESA_window_pos functions --- src/mesa/glapi/glapioffsets.h | 37 +++++++-- src/mesa/glapi/glapitable.h | 27 ++++++- src/mesa/glapi/glapitemp.h | 48 ++++++------ src/mesa/main/dlist.c | 139 +++++++++++++++++++++++++++++++++- src/mesa/main/state.c | 25 +++++- 5 files changed, 241 insertions(+), 35 deletions(-) diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h index 2ebf423517d..91ea19f893f 100644 --- a/src/mesa/glapi/glapioffsets.h +++ b/src/mesa/glapi/glapioffsets.h @@ -1,4 +1,4 @@ -/* $Id: glapioffsets.h,v 1.2 2000/01/16 07:26:35 joshv Exp $ */ +/* $Id: glapioffsets.h,v 1.3 2000/02/11 21:14:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -784,16 +784,39 @@ #define _gloffset_BlendFuncSeparateINGR (_EXTBASE + 107) /* GL_MESA_window_pos */ -#define _gloffset_WindowPos4fMESA (_EXTBASE + 108) +#define _gloffset_WindowPos2dMESA (_EXTBASE + 108) +#define _gloffset_WindowPos2dvMESA (_EXTBASE + 109) +#define _gloffset_WindowPos2fMESA (_EXTBASE + 110) +#define _gloffset_WindowPos2fvMESA (_EXTBASE + 111) +#define _gloffset_WindowPos2iMESA (_EXTBASE + 112) +#define _gloffset_WindowPos2ivMESA (_EXTBASE + 113) +#define _gloffset_WindowPos2sMESA (_EXTBASE + 114) +#define _gloffset_WindowPos2svMESA (_EXTBASE + 115) +#define _gloffset_WindowPos3dMESA (_EXTBASE + 116) +#define _gloffset_WindowPos3dvMESA (_EXTBASE + 117) +#define _gloffset_WindowPos3fMESA (_EXTBASE + 118) +#define _gloffset_WindowPos3fvMESA (_EXTBASE + 119) +#define _gloffset_WindowPos3iMESA (_EXTBASE + 120) +#define _gloffset_WindowPos3ivMESA (_EXTBASE + 121) +#define _gloffset_WindowPos3sMESA (_EXTBASE + 122) +#define _gloffset_WindowPos3svMESA (_EXTBASE + 123) +#define _gloffset_WindowPos4dMESA (_EXTBASE + 124) +#define _gloffset_WindowPos4dvMESA (_EXTBASE + 125) +#define _gloffset_WindowPos4fMESA (_EXTBASE + 126) +#define _gloffset_WindowPos4fvMESA (_EXTBASE + 127) +#define _gloffset_WindowPos4iMESA (_EXTBASE + 128) +#define _gloffset_WindowPos4ivMESA (_EXTBASE + 129) +#define _gloffset_WindowPos4sMESA (_EXTBASE + 130) +#define _gloffset_WindowPos4svMESA (_EXTBASE + 131) /* GL_MESA_resize_buffers */ -#define _gloffset_ResizeBuffersMESA (_EXTBASE + 109) +#define _gloffset_ResizeBuffersMESA (_EXTBASE + 132) /* GL_ARB_transpose_matrix */ -#define _gloffset_LoadTransposeMatrixdARB (_EXTBASE + 110) -#define _gloffset_LoadTransposeMatrixfARB (_EXTBASE + 111) -#define _gloffset_MultTransposeMatrixdARB (_EXTBASE + 112) -#define _gloffset_MultTransposeMatrixfARB (_EXTBASE + 113) +#define _gloffset_LoadTransposeMatrixdARB (_EXTBASE + 133) +#define _gloffset_LoadTransposeMatrixfARB (_EXTBASE + 134) +#define _gloffset_MultTransposeMatrixdARB (_EXTBASE + 135) +#define _gloffset_MultTransposeMatrixfARB (_EXTBASE + 136) diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h index 371581bec99..ecdbb5d35b6 100644 --- a/src/mesa/glapi/glapitable.h +++ b/src/mesa/glapi/glapitable.h @@ -1,4 +1,4 @@ -/* $Id: glapitable.h,v 1.8 2000/02/03 09:35:17 joukj Exp $ */ +/* $Id: glapitable.h,v 1.9 2000/02/11 21:14:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -817,7 +817,30 @@ struct _glapi_table void (*BlendFuncSeparateINGR)(GLenum, GLenum, GLenum, GLenum); /* GL_MESA_window_pos */ - void (*WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void (*WindowPos2dMESA)(GLdouble, GLdouble); + void (*WindowPos2dvMESA)(const GLdouble *); + void (*WindowPos2fMESA)(GLfloat, GLfloat); + void (*WindowPos2fvMESA)(const GLfloat *); + void (*WindowPos2iMESA)(GLint, GLint); + void (*WindowPos2ivMESA)(const GLint *); + void (*WindowPos2sMESA)(GLshort, GLshort); + void (*WindowPos2svMESA)(const GLshort *); + void (*WindowPos3dMESA)(GLdouble, GLdouble, GLdouble); + void (*WindowPos3dvMESA)(const GLdouble *); + void (*WindowPos3fMESA)(GLfloat, GLfloat, GLfloat); + void (*WindowPos3fvMESA)(const GLfloat *); + void (*WindowPos3iMESA)(GLint, GLint, GLint); + void (*WindowPos3ivMESA)(const GLint *); + void (*WindowPos3sMESA)(GLshort, GLshort, GLshort); + void (*WindowPos3svMESA)(const GLshort *); + void (*WindowPos4dMESA)(GLdouble, GLdouble, GLdouble, GLdouble); + void (*WindowPos4dvMESA)(const GLdouble *); + void (*WindowPos4fMESA)(GLfloat, GLfloat, GLfloat, GLfloat); + void (*WindowPos4fvMESA)(const GLfloat *); + void (*WindowPos4iMESA)(GLint, GLint, GLint, GLint); + void (*WindowPos4ivMESA)(const GLint *); + void (*WindowPos4sMESA)(GLshort, GLshort, GLshort, GLshort); + void (*WindowPos4svMESA)(const GLshort *); /* GL_MESA_resize_buffers */ void (*ResizeBuffersMESA)(void); diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h index bac4a8ecec8..2d623e63ff2 100644 --- a/src/mesa/glapi/glapitemp.h +++ b/src/mesa/glapi/glapitemp.h @@ -1,4 +1,4 @@ -/* $Id: glapitemp.h,v 1.13 2000/02/01 01:19:07 brianp Exp $ */ +/* $Id: glapitemp.h,v 1.14 2000/02/11 21:14:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2828,92 +2828,92 @@ KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateINGR)(GLenum sfactorRGB, GLenum dfa KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y) { - DISPATCH(WindowPos4fMESA, (x, y, 0, 1), (F, ";")); + DISPATCH(WindowPos2iMESA, (x, y), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2sMESA)(GLshort x, GLshort y) { - DISPATCH(WindowPos4fMESA, (x, y, 0, 1), (F, ";")); + DISPATCH(WindowPos2sMESA, (x, y), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2fMESA)(GLfloat x, GLfloat y) { - DISPATCH(WindowPos4fMESA, (x, y, 0, 1), (F, ";")); + DISPATCH(WindowPos2fMESA, (x, y), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2dMESA)(GLdouble x, GLdouble y) { - DISPATCH(WindowPos4fMESA, (x, y, 0, 1), (F, ";")); + DISPATCH(WindowPos2dMESA, (x, y), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2ivMESA)(const GLint *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], 0, 1), (F, ";")); + DISPATCH(WindowPos2ivMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2svMESA)(const GLshort *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], 0, 1), (F, ";")); + DISPATCH(WindowPos2svMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2fvMESA)(const GLfloat *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], 0, 1), (F, ";")); + DISPATCH(WindowPos2fvMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos2dvMESA)(const GLdouble *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], 0, 1), (F, ";")); + DISPATCH(WindowPos2dvMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3iMESA)(GLint x, GLint y, GLint z) { - DISPATCH(WindowPos4fMESA, (x, y, z, 1), (F, ";")); + DISPATCH(WindowPos3iMESA, (x, y, z), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z) { - DISPATCH(WindowPos4fMESA, (x, y, z, 1), (F, ";")); + DISPATCH(WindowPos3sMESA, (x, y, z), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z) { - DISPATCH(WindowPos4fMESA, (x, y, z, 1), (F, ";")); + DISPATCH(WindowPos3fMESA, (x, y, z), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z) { - DISPATCH(WindowPos4fMESA, (x, y, z, 1), (F, ";")); + DISPATCH(WindowPos3dMESA, (x, y, z), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3ivMESA)(const GLint *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], 1.0), (F, ";")); + DISPATCH(WindowPos3ivMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3svMESA)(const GLshort *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], 1.0), (F, ";")); + DISPATCH(WindowPos3svMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3fvMESA)(const GLfloat *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], 1.0), (F, ";")); + DISPATCH(WindowPos3fvMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos3dvMESA)(const GLdouble *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], 1.0), (F, ";")); + DISPATCH(WindowPos3dvMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w) { - DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, ";")); + DISPATCH(WindowPos4iMESA, (x, y, z, w), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w) { - DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, ";")); + DISPATCH(WindowPos4sMESA, (x, y, z, w), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) @@ -2923,27 +2923,27 @@ KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GL KEYWORD1 void KEYWORD2 NAME(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { - DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, ";")); + DISPATCH(WindowPos4dMESA, (x, y, z, w), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4ivMESA)(const GLint *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], p[3]), (F, ";")); + DISPATCH(WindowPos4ivMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], p[3]), (F, ";")); + DISPATCH(WindowPos4svMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4fvMESA)(const GLfloat *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], p[3]), (F, ";")); + DISPATCH(WindowPos4fvMESA, (p), (F, ";")); } KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble *p) { - DISPATCH(WindowPos4fMESA, (p[0], p[1], p[2], p[3]), (F, ";")); + DISPATCH(WindowPos4dvMESA, (p), (F, ";")); } diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index ff1b465fd71..98d5b27b04e 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1,4 +1,4 @@ -/* $Id: dlist.c,v 1.28 2000/02/02 19:50:26 brianp Exp $ */ +/* $Id: dlist.c,v 1.29 2000/02/11 21:14:27 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -3051,6 +3051,120 @@ static void save_WindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) } } +static void save_WindowPos2dMESA(GLdouble x, GLdouble y) +{ + save_WindowPos4fMESA(x, y, 0.0F, 1.0F); +} + +static void save_WindowPos2fMESA(GLfloat x, GLfloat y) +{ + save_WindowPos4fMESA(x, y, 0.0F, 1.0F); +} + +static void save_WindowPos2iMESA(GLint x, GLint y) +{ + save_WindowPos4fMESA(x, y, 0.0F, 1.0F); +} + +static void save_WindowPos2sMESA(GLshort x, GLshort y) +{ + save_WindowPos4fMESA(x, y, 0.0F, 1.0F); +} + +static void save_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z) +{ + save_WindowPos4fMESA(x, y, z, 1.0F); +} + +static void save_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) +{ + save_WindowPos4fMESA(x, y, z, 1.0F); +} + +static void save_WindowPos3iMESA(GLint x, GLint y, GLint z) +{ + save_WindowPos4fMESA(x, y, z, 1.0F); +} + +static void save_WindowPos3sMESA(GLshort x, GLshort y, GLshort z) +{ + save_WindowPos4fMESA(x, y, z, 1.0F); +} + +static void save_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + save_WindowPos4fMESA(x, y, z, w); +} + +static void save_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w) +{ + save_WindowPos4fMESA(x, y, z, w); +} + +static void save_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w) +{ + save_WindowPos4fMESA(x, y, z, w); +} + +static void save_WindowPos2dvMESA(const GLdouble *v) +{ + save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F); +} + +static void save_WindowPos2fvMESA(const GLfloat *v) +{ + save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F); +} + +static void save_WindowPos2ivMESA(const GLint *v) +{ + save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F); +} + +static void save_WindowPos2svMESA(const GLshort *v) +{ + save_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F); +} + +static void save_WindowPos3dvMESA(const GLdouble *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F); +} + +static void save_WindowPos3fvMESA(const GLfloat *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F); +} + +static void save_WindowPos3ivMESA(const GLint *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F); +} + +static void save_WindowPos3svMESA(const GLshort *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], 1.0F); +} + +static void save_WindowPos4dvMESA(const GLdouble *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], v[3]); +} + +static void save_WindowPos4fvMESA(const GLfloat *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], v[3]); +} + +static void save_WindowPos4ivMESA(const GLint *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], v[3]); +} + +static void save_WindowPos4svMESA(const GLshort *v) +{ + save_WindowPos4fMESA(v[0], v[1], v[2], v[3]); +} @@ -4509,7 +4623,30 @@ _mesa_init_dlist_table( struct _glapi_table *table ) table->BlendFuncSeparateINGR = save_BlendFuncSeparateINGR; /* GL_MESA_window_pos */ + table->WindowPos2dMESA = save_WindowPos2dMESA; + table->WindowPos2dvMESA = save_WindowPos2dvMESA; + table->WindowPos2fMESA = save_WindowPos2fMESA; + table->WindowPos2fvMESA = save_WindowPos2fvMESA; + table->WindowPos2iMESA = save_WindowPos2iMESA; + table->WindowPos2ivMESA = save_WindowPos2ivMESA; + table->WindowPos2sMESA = save_WindowPos2sMESA; + table->WindowPos2svMESA = save_WindowPos2svMESA; + table->WindowPos3dMESA = save_WindowPos3dMESA; + table->WindowPos3dvMESA = save_WindowPos3dvMESA; + table->WindowPos3fMESA = save_WindowPos3fMESA; + table->WindowPos3fvMESA = save_WindowPos3fvMESA; + table->WindowPos3iMESA = save_WindowPos3iMESA; + table->WindowPos3ivMESA = save_WindowPos3ivMESA; + table->WindowPos3sMESA = save_WindowPos3sMESA; + table->WindowPos3svMESA = save_WindowPos3svMESA; + table->WindowPos4dMESA = save_WindowPos4dMESA; + table->WindowPos4dvMESA = save_WindowPos4dvMESA; table->WindowPos4fMESA = save_WindowPos4fMESA; + table->WindowPos4fvMESA = save_WindowPos4fvMESA; + table->WindowPos4iMESA = save_WindowPos4iMESA; + table->WindowPos4ivMESA = save_WindowPos4ivMESA; + table->WindowPos4sMESA = save_WindowPos4sMESA; + table->WindowPos4svMESA = save_WindowPos4svMESA; /* GL_MESA_resize_buffers */ table->ResizeBuffersMESA = _mesa_ResizeBuffersMESA; diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 3ba8faf9bad..e092f81b616 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -1,4 +1,4 @@ -/* $Id: state.c,v 1.2 2000/02/02 19:34:08 brianp Exp $ */ +/* $Id: state.c,v 1.3 2000/02/11 21:14:29 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -583,7 +583,30 @@ _mesa_init_exec_table(struct _glapi_table *exec) exec->BlendFuncSeparateINGR = _mesa_BlendFuncSeparateINGR; /* GL_MESA_window_pos */ + exec->WindowPos2dMESA = _mesa_WindowPos2dMESA; + exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA; + exec->WindowPos2fMESA = _mesa_WindowPos2fMESA; + exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA; + exec->WindowPos2iMESA = _mesa_WindowPos2iMESA; + exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA; + exec->WindowPos2sMESA = _mesa_WindowPos2sMESA; + exec->WindowPos2svMESA = _mesa_WindowPos2svMESA; + exec->WindowPos3dMESA = _mesa_WindowPos3dMESA; + exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA; + exec->WindowPos3fMESA = _mesa_WindowPos3fMESA; + exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA; + exec->WindowPos3iMESA = _mesa_WindowPos3iMESA; + exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA; + exec->WindowPos3sMESA = _mesa_WindowPos3sMESA; + exec->WindowPos3svMESA = _mesa_WindowPos3svMESA; + exec->WindowPos4dMESA = _mesa_WindowPos4dMESA; + exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA; exec->WindowPos4fMESA = _mesa_WindowPos4fMESA; + exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA; + exec->WindowPos4iMESA = _mesa_WindowPos4iMESA; + exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA; + exec->WindowPos4sMESA = _mesa_WindowPos4sMESA; + exec->WindowPos4svMESA = _mesa_WindowPos4svMESA; /* GL_MESA_resize_buffers */ exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA; -- 2.30.2