diff options
author | alanh <alanh> | 2000-06-07 22:19:14 +0000 |
---|---|---|
committer | alanh <alanh> | 2000-06-07 22:19:14 +0000 |
commit | a425b9b17d33766e0153c242d04296b9cde9a926 (patch) | |
tree | 36bb1d9bd7196a40fceb217c747428f8c5307f48 /xc/lib/GL/mesa/src/drv | |
parent | 69ccbd5127fed1c445dd0cc6e6094fc54e3908a8 (diff) |
Fix a few more macro problems.
Diffstat (limited to 'xc/lib/GL/mesa/src/drv')
-rw-r--r-- | xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c | 411 |
1 files changed, 328 insertions, 83 deletions
diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c index b18109a4b..541f4d69c 100644 --- a/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c +++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c @@ -798,28 +798,28 @@ void _gamma_Color3uiv(const GLuint *v) void _gamma_Color3us(GLushort red, GLushort green, GLushort blue) { - GLuint c; + GLfloat r,g,b; DEBUG_GLCMDS(("Color3us: %d %d %d\n", red, green, blue)); - c = (USHORT_TO_UBYTE(blue) << 16) | (USHORT_TO_UBYTE(green) << 8) | - USHORT_TO_UBYTE(red); + r = USHORT_TO_FLOAT(red); + g = USHORT_TO_FLOAT(green); + b = USHORT_TO_FLOAT(blue); - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PackedColor3, c); + _gamma_Color3f(r,g,b); } void _gamma_Color3usv(const GLushort *v) { - GLuint c; + GLfloat p[3]; DEBUG_GLCMDS(("Color3usv: %d %d %d\n", v[0], v[1], v[2])); - c = (USHORT_TO_UBYTE(v[2]) << 16) | (USHORT_TO_UBYTE(v[1]) << 8) | - USHORT_TO_UBYTE(v[0]); + p[0] = USHORT_TO_FLOAT(v[0]); + p[1] = USHORT_TO_FLOAT(v[1]); + p[2] = USHORT_TO_FLOAT(v[2]); - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PackedColor3, c); + _gamma_Color3fv(p); } void _gamma_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) @@ -918,12 +918,30 @@ void _gamma_Color4iv(const GLint *v) void _gamma_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) { + GLfloat r,g,b,a; + DEBUG_GLCMDS(("Color4s: %d %d %d %d\n", red, green, blue, alpha)); + + r = SHORT_TO_FLOAT(red); + g = SHORT_TO_FLOAT(green); + b = SHORT_TO_FLOAT(blue); + a = SHORT_TO_FLOAT(alpha); + + _gamma_Color4f(r,g,b,a); } void _gamma_Color4sv(const GLshort *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("Color4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); + + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + p[2] = SHORT_TO_FLOAT(v[2]); + p[3] = SHORT_TO_FLOAT(v[3]); + + _gamma_Color4fv(p); } void _gamma_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) @@ -952,26 +970,62 @@ void _gamma_Color4ubv(const GLubyte *v) void _gamma_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) { + GLfloat r,g,b,a; + DEBUG_GLCMDS(("Color4ui: %d %d %d %d\n", (unsigned int)red, (unsigned int)green, (unsigned int)blue, (unsigned int)alpha)); + + r = UINT_TO_FLOAT(red); + g = UINT_TO_FLOAT(green); + b = UINT_TO_FLOAT(blue); + a = UINT_TO_FLOAT(alpha); + + _gamma_Color4f(r,g,b,a); } void _gamma_Color4uiv(const GLuint *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("Color4uiv: %d %d %d %d\n", (unsigned int)v[0], (unsigned int)v[1], (unsigned int)v[2], (unsigned int)v[3])); + + p[0] = UINT_TO_FLOAT(v[0]); + p[1] = UINT_TO_FLOAT(v[1]); + p[2] = UINT_TO_FLOAT(v[2]); + p[3] = UINT_TO_FLOAT(v[3]); + + _gamma_Color4fv(p); } void _gamma_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) { + GLfloat r,g,b,a; + DEBUG_GLCMDS(("Color4us: %d %d %d %d\n", red, green, blue, alpha)); + + r = USHORT_TO_FLOAT(red); + g = USHORT_TO_FLOAT(green); + b = USHORT_TO_FLOAT(blue); + a = USHORT_TO_FLOAT(alpha); + + _gamma_Color4f(r,g,b,a); } void _gamma_Color4usv(const GLushort *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("Color4usv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); + + p[0] = USHORT_TO_FLOAT(v[0]); + p[1] = USHORT_TO_FLOAT(v[1]); + p[2] = USHORT_TO_FLOAT(v[2]); + p[3] = USHORT_TO_FLOAT(v[3]); + + _gamma_Color4fv(p); } void _gamma_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) @@ -1767,7 +1821,7 @@ void _gamma_GetPolygonStipple(GLubyte *mask) const GLubyte *_gamma_GetString(GLenum name) { static unsigned char vendor[] = "Precision Insight, Inc."; - static unsigned char renderer[] = "DRI Glint-Gamma 20000228"; + static unsigned char renderer[] = "DRI Glint-Gamma 20000605"; static unsigned char version[] = "1.1"; static unsigned char ext[] = ""; @@ -2936,6 +2990,8 @@ void _gamma_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { DEBUG_GLCMDS(("Rectf: %f %f %f %f\n", x1, y1, x2, y2)); + /* This should be done with Gamma's Rectangle engine - later */ + _gamma_Begin(GL_POLYGON); _gamma_Vertex2f(x1,y1); _gamma_Vertex2f(x2,y1); @@ -3144,51 +3200,87 @@ void _gamma_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) void _gamma_TexCoord1d(GLdouble s) { DEBUG_GLCMDS(("TexCoord1d: %f\n", s)); + + _gamma_TexCoord1f((GLfloat)s); } void _gamma_TexCoord1dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord1dv: %f\n", *v)); + + _gamma_TexCoord1fv((GLfloat*)v); } void _gamma_TexCoord1f(GLfloat s) { DEBUG_GLCMDS(("TexCoord1f: %f\n", s)); + + WRITEF(gCCPriv->buf, Ts1, s); } void _gamma_TexCoord1fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord1fv: %f\n", *v)); + + WRITEF(gCCPriv->buf, Ts1, v[0]); } void _gamma_TexCoord1i(GLint s) { + GLfloat x; + DEBUG_GLCMDS(("TexCoord1i: %d\n", (int)s)); + + x = INT_TO_FLOAT(s); + + _gamma_TexCoord1f(x); } void _gamma_TexCoord1iv(const GLint *v) { + GLfloat p[1]; + DEBUG_GLCMDS(("TexCoord1iv: %d\n", (int)*v)); + + p[0] = INT_TO_FLOAT(v[0]); + + _gamma_TexCoord1fv(p); } void _gamma_TexCoord1s(GLshort s) { + GLfloat x; + DEBUG_GLCMDS(("TexCoord1s: %d\n", s)); + + x = SHORT_TO_FLOAT(s); + + _gamma_TexCoord1f(x); } void _gamma_TexCoord1sv(const GLshort *v) { + GLfloat p[1]; + DEBUG_GLCMDS(("TexCoord1sv: %d\n", *v)); + + p[0] = SHORT_TO_FLOAT(v[0]); + + _gamma_TexCoord1fv(p); } void _gamma_TexCoord2d(GLdouble s, GLdouble t) { DEBUG_GLCMDS(("TexCoord2d: %f %f\n", s, t)); + + _gamma_TexCoord2f((GLfloat)s,(GLfloat)t); } void _gamma_TexCoord2dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord2dv: %f %f\n", v[0], v[1])); + + _gamma_TexCoord2fv((GLfloat*)v); } void _gamma_TexCoord2f(GLfloat s, GLfloat t) @@ -3203,107 +3295,240 @@ void _gamma_TexCoord2f(GLfloat s, GLfloat t) void _gamma_TexCoord2fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord2fv: %f %f\n", v[0], v[1])); + + CHECK_DMA_BUFFER(gCC, gCCPriv, 2); + WRITEF(gCCPriv->buf, Tt2, v[1]); + WRITEF(gCCPriv->buf, Ts2, v[0]); } void _gamma_TexCoord2i(GLint s, GLint t) { + GLfloat x,y; + DEBUG_GLCMDS(("TexCoord2i: %d %d\n", (int)s, (int)t)); + + x = INT_TO_FLOAT(s); + y = INT_TO_FLOAT(t); + + _gamma_TexCoord2f(x,y); } void _gamma_TexCoord2iv(const GLint *v) { + GLfloat p[2]; + DEBUG_GLCMDS(("TexCoord2iv: %d %d\n", (int)v[0], (int)v[1])); + + p[0] = INT_TO_FLOAT(v[0]); + p[1] = INT_TO_FLOAT(v[1]); + + _gamma_TexCoord2fv(p); } void _gamma_TexCoord2s(GLshort s, GLshort t) { + GLfloat x,y; + DEBUG_GLCMDS(("TexCoord2s: %d %d\n", s, t)); + + x = SHORT_TO_FLOAT(s); + y = SHORT_TO_FLOAT(t); + + _gamma_TexCoord2f(x,y); } void _gamma_TexCoord2sv(const GLshort *v) { + GLfloat p[2]; + DEBUG_GLCMDS(("TexCoord2sv: %d %d\n", v[0], v[1])); + + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + + _gamma_TexCoord2fv(p); } void _gamma_TexCoord3d(GLdouble s, GLdouble t, GLdouble r) { DEBUG_GLCMDS(("TexCoord3d: %f %f %f\n", s, t, r)); + + _gamma_TexCoord3f((GLfloat)s,(GLfloat)t,(GLfloat)r); } void _gamma_TexCoord3dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord3dv: %f %f %f\n", v[0], v[1], v[2])); + + _gamma_TexCoord3fv((GLfloat*)v); } void _gamma_TexCoord3f(GLfloat s, GLfloat t, GLfloat r) { DEBUG_GLCMDS(("TexCoord3f: %f %f %f\n", s, t, r)); + + _gamma_TexCoord4f(s,t,r,1.0f); } void _gamma_TexCoord3fv(const GLfloat *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("TexCoord3fv: %f %f %f\n", v[0], v[1], v[2])); + + p[0] = v[0]; + p[1] = v[1]; + p[2] = v[2]; + p[3] = 1.0f; + + _gamma_TexCoord4fv(p); } void _gamma_TexCoord3i(GLint s, GLint t, GLint r) { + GLfloat x,y,z; + DEBUG_GLCMDS(("TexCoord3i: %d %d %d\n", (int)s, (int)t, (int)r)); + + x = INT_TO_FLOAT(s); + y = INT_TO_FLOAT(t); + z = INT_TO_FLOAT(r); + + _gamma_TexCoord4f(x,y,z,1.0f); } void _gamma_TexCoord3iv(const GLint *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("TexCoord3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); + + p[0] = INT_TO_FLOAT(v[0]); + p[1] = INT_TO_FLOAT(v[1]); + p[2] = INT_TO_FLOAT(v[2]); + p[3] = 1.0f; + + _gamma_TexCoord4fv(p); } void _gamma_TexCoord3s(GLshort s, GLshort t, GLshort r) { + GLfloat x,y,z; + DEBUG_GLCMDS(("TexCoord3s: %d %d %d\n", s, t, r)); + + x = SHORT_TO_FLOAT(s); + y = SHORT_TO_FLOAT(t); + z = SHORT_TO_FLOAT(r); + + _gamma_TexCoord4f(x,y,z,1.0f); } void _gamma_TexCoord3sv(const GLshort *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("TexCoord3sv: %d %d %d\n", v[0], v[1], v[2])); + + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + p[2] = SHORT_TO_FLOAT(v[2]); + p[3] = 1.0f; + + _gamma_TexCoord4fv(p); } void _gamma_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) { DEBUG_GLCMDS(("TexCoord4d: %f %f %f %f\n", s, t, r, q)); + + _gamma_TexCoord4f((GLfloat)s,(GLfloat)t,(GLfloat)r,(GLfloat)q); } void _gamma_TexCoord4dv(const GLdouble *v) { DEBUG_GLCMDS(("TexCoord4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); + + _gamma_TexCoord4fv((GLfloat*)v); } void _gamma_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) { DEBUG_GLCMDS(("TexCoord4f: %f %f %f %f\n", s, t, r, q)); + + CHECK_DMA_BUFFER(gCC, gCCPriv, 4); + WRITEF(gCCPriv->buf, Tq4, q); + WRITEF(gCCPriv->buf, Tr4, r); + WRITEF(gCCPriv->buf, Tt4, t); + WRITEF(gCCPriv->buf, Ts4, s); } void _gamma_TexCoord4fv(const GLfloat *v) { DEBUG_GLCMDS(("TexCoord4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); + + CHECK_DMA_BUFFER(gCC, gCCPriv, 4); + WRITEF(gCCPriv->buf, Tq4, v[3]); + WRITEF(gCCPriv->buf, Tr4, v[2]); + WRITEF(gCCPriv->buf, Tt4, v[1]); + WRITEF(gCCPriv->buf, Ts4, v[0]); } void _gamma_TexCoord4i(GLint s, GLint t, GLint r, GLint q) { + GLfloat x,y,z,a; + DEBUG_GLCMDS(("TexCoord4i: %d %d %d %d\n", (int)s, (int)t, (int)r, (int)q)); + + x = INT_TO_FLOAT(s); + y = INT_TO_FLOAT(t); + z = INT_TO_FLOAT(r); + a = INT_TO_FLOAT(q); + + _gamma_TexCoord4f(x,y,z,a); } void _gamma_TexCoord4iv(const GLint *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("TexCoord4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], (int)v[3])); + + p[0] = INT_TO_FLOAT(v[0]); + p[1] = INT_TO_FLOAT(v[1]); + p[2] = INT_TO_FLOAT(v[2]); + p[3] = INT_TO_FLOAT(v[3]); + + _gamma_TexCoord4fv(p); } void _gamma_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) { + GLfloat x,y,z,a; + DEBUG_GLCMDS(("TexCoord4s: %d %d %d %d\n", s, t, r, q)); + + x = SHORT_TO_FLOAT(s); + y = SHORT_TO_FLOAT(t); + z = SHORT_TO_FLOAT(r); + a = SHORT_TO_FLOAT(q); + + _gamma_TexCoord4f(s,t,r,q); } void _gamma_TexCoord4sv(const GLshort *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("TexCoord4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); + + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + p[2] = SHORT_TO_FLOAT(v[2]); + p[3] = SHORT_TO_FLOAT(v[3]); + + _gamma_TexCoord4fv(p); } void _gamma_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) @@ -3932,18 +4157,14 @@ void _gamma_Vertex2d(GLdouble x, GLdouble y) { DEBUG_GLCMDS(("Vertex2d: %f %f\n", x, y)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx2, (GLfloat)x); + _gamma_Vertex2f((GLfloat)x,(GLfloat)y); } void _gamma_Vertex2dv(const GLdouble *v) { DEBUG_GLCMDS(("Vertex2dv: %f %f\n", v[0], v[1])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx2, (GLfloat)v[0]); + _gamma_Vertex2fv((GLfloat*)v); } void _gamma_Vertex2f(GLfloat x, GLfloat y) @@ -3966,58 +4187,64 @@ void _gamma_Vertex2fv(const GLfloat *v) void _gamma_Vertex2i(GLint x, GLint y) { + GLfloat a,b; + DEBUG_GLCMDS(("Vertex2i: %d %d\n", (int)x, (int)y)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx2, (GLfloat)x); + a = INT_TO_FLOAT(x); + b = INT_TO_FLOAT(y); + + _gamma_Vertex2f(a,b); } void _gamma_Vertex2iv(const GLint *v) { + GLfloat p[2]; + DEBUG_GLCMDS(("Vertex2iv: %d %d\n", (int)v[0], (int)v[1])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx2, (GLfloat)v[0]); + p[0] = INT_TO_FLOAT(v[0]); + p[1] = INT_TO_FLOAT(v[1]); + + _gamma_Vertex2fv(p); } void _gamma_Vertex2s(GLshort x, GLshort y) { + GLfloat a,b; + DEBUG_GLCMDS(("Vertex2s: %d %d\n", x, y)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx2, (GLfloat)x); + a = SHORT_TO_FLOAT(x); + b = SHORT_TO_FLOAT(y); + + _gamma_Vertex2f(a,b); } void _gamma_Vertex2sv(const GLshort *v) { + GLfloat p[2]; + DEBUG_GLCMDS(("Vertex2sv: %d %d\n", v[0], v[1])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx2, (GLfloat)v[0]); + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + + _gamma_Vertex2fv(p); } void _gamma_Vertex3d(GLdouble x, GLdouble y, GLdouble z) { DEBUG_GLCMDS(("Vertex3d: %f %f %f\n", x, y, z)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, (GLfloat)z); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx3, (GLfloat)x); + _gamma_Vertex3f((GLfloat)x,(GLfloat)y,(GLfloat)z); } void _gamma_Vertex3dv(const GLdouble *v) { DEBUG_GLCMDS(("Vertex2fv: %f %f %f\n", v[0], v[1], v[2])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, (GLfloat)v[2]); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx3, (GLfloat)v[0]); + _gamma_Vertex3fv((GLfloat*)v); } void _gamma_Vertex3f(GLfloat x, GLfloat y, GLfloat z) @@ -4042,64 +4269,68 @@ void _gamma_Vertex3fv(const GLfloat *v) void _gamma_Vertex3i(GLint x, GLint y, GLint z) { + GLfloat a,b,c; + DEBUG_GLCMDS(("Vertex3i: %d %d %d\n", (int)x, (int)y, (int)z)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, (GLfloat)z); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx3, (GLfloat)x); + a = INT_TO_FLOAT(x); + b = INT_TO_FLOAT(y); + c = INT_TO_FLOAT(z); + + _gamma_Vertex3f(a,b,c); } void _gamma_Vertex3iv(const GLint *v) { + GLfloat p[3]; + DEBUG_GLCMDS(("Vertex3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, (GLfloat)v[2]); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx3, (GLfloat)v[0]); + p[0] = INT_TO_FLOAT(v[0]); + p[1] = INT_TO_FLOAT(v[1]); + p[2] = INT_TO_FLOAT(v[2]); + + _gamma_Vertex3fv(p); } void _gamma_Vertex3s(GLshort x, GLshort y, GLshort z) { + GLfloat a,b,c; + DEBUG_GLCMDS(("Vertex3s: %d %d %d\n", x, y, z)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, (GLfloat)z); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx3, (GLfloat)x); + a = SHORT_TO_FLOAT(x); + b = SHORT_TO_FLOAT(y); + c = SHORT_TO_FLOAT(z); + + _gamma_Vertex3f(a,b,c); } void _gamma_Vertex3sv(const GLshort *v) { + GLfloat p[3]; + DEBUG_GLCMDS(("Vertex3sv: %d %d %d\n", v[0], v[1], v[2])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, (GLfloat)v[2]); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx3, (GLfloat)v[0]); + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + p[2] = SHORT_TO_FLOAT(v[2]); + + _gamma_Vertex3fv(p); } void _gamma_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { DEBUG_GLCMDS(("Vertex4d: %f %f %f %f\n", x, y, z, w)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, (GLfloat)w); - WRITEF(gCCPriv->buf, Vz, (GLfloat)z); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx4,(GLfloat)x); + _gamma_Vertex4f((GLfloat)x,(GLfloat)y,(GLfloat)z,(GLfloat)w); } void _gamma_Vertex4dv(const GLdouble *v) { DEBUG_GLCMDS(("Vertex4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, (GLfloat)v[3]); - WRITEF(gCCPriv->buf, Vz, (GLfloat)v[2]); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx4, (GLfloat)v[0]); + _gamma_Vertex4fv((GLfloat*)v); } void _gamma_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) @@ -4126,47 +4357,59 @@ void _gamma_Vertex4fv(const GLfloat *v) void _gamma_Vertex4i(GLint x, GLint y, GLint z, GLint w) { + GLfloat a,b,c,d; + DEBUG_GLCMDS(("Vertex4i: %d %d %d %d\n", (int)x, (int)y, (int)z, (int)w)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, (GLfloat)w); - WRITEF(gCCPriv->buf, Vz, (GLfloat)z); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx4, (GLfloat)x); + a = INT_TO_FLOAT(x); + b = INT_TO_FLOAT(y); + c = INT_TO_FLOAT(z); + d = INT_TO_FLOAT(w); + + _gamma_Vertex4f(a,b,c,d); } void _gamma_Vertex4iv(const GLint *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("Vertex4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], (int)v[3])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, (GLfloat)v[3]); - WRITEF(gCCPriv->buf, Vz, (GLfloat)v[2]); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx4, (GLfloat)v[0]); + p[0] = INT_TO_FLOAT(v[0]); + p[1] = INT_TO_FLOAT(v[1]); + p[2] = INT_TO_FLOAT(v[2]); + p[3] = INT_TO_FLOAT(v[3]); + + _gamma_Vertex4fv(p); } void _gamma_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w) { + GLfloat a,b,c,d; + DEBUG_GLCMDS(("Vertex4s: %d %d %d %d\n", x, y, z, w)); - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, (GLfloat)w); - WRITEF(gCCPriv->buf, Vz, (GLfloat)z); - WRITEF(gCCPriv->buf, Vy, (GLfloat)y); - WRITEF(gCCPriv->buf, Vx4,(GLfloat)x); + a = SHORT_TO_FLOAT(x); + b = SHORT_TO_FLOAT(y); + c = SHORT_TO_FLOAT(z); + d = SHORT_TO_FLOAT(w); + + _gamma_Vertex4f(a,b,c,d); } void _gamma_Vertex4sv(const GLshort *v) { + GLfloat p[4]; + DEBUG_GLCMDS(("Vertex4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, (GLfloat)v[3]); - WRITEF(gCCPriv->buf, Vz, (GLfloat)v[2]); - WRITEF(gCCPriv->buf, Vy, (GLfloat)v[1]); - WRITEF(gCCPriv->buf, Vx4, (GLfloat)v[0]); + p[0] = SHORT_TO_FLOAT(v[0]); + p[1] = SHORT_TO_FLOAT(v[1]); + p[2] = SHORT_TO_FLOAT(v[2]); + p[3] = SHORT_TO_FLOAT(v[3]); + + _gamma_Vertex4fv(p); } void _gamma_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) @@ -4211,6 +4454,8 @@ void _gamma_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) static GLint generic_noop(void) { + DEBUG_GLCMDS(("OOPS GENERIC NOOP CALLED\n")); + return 0; } |