#Fixed glVertex2f to perform as the standard defines. glKosVertex2f is added for direct submission to PVR of 2D vertices with no transform.

This commit is contained in:
U-PH3NOM-PC\PH3NOM 2014-08-26 18:11:41 -07:00
parent 4390d627bf
commit 0711f10b1f
2 changed files with 16 additions and 11 deletions

View File

@ -72,10 +72,6 @@ static GLubyte GL_ENABLE_SUPERSAMP = 0;
static GLubyte GL_FACE_FRONT = 0;
static GLubyte GL_CLAMP_ST = 0;
/* Primitive 2D Position Submission */
void (*glVertex2f)(float, float);
void (*glVertex2fv)(float *);
/* Primitive 3D Position Submission */
void (*glVertex3f)(float, float, float);
void (*glVertex3fv)(float *);
@ -1038,9 +1034,6 @@ void glBegin(unsigned int mode) {
glVertex3f = _glKosVertex3ft;
glVertex3fv = _glKosVertex3ftv;
}
glVertex2f = _glKosVertex2ft;
glVertex2fv = _glKosVertex2ftv;
}
void _glKosTransformClipBuf(pvr_vertex_t *v, GLuint verts) {
@ -1133,7 +1126,15 @@ void glEnd() {
}
}
void _glKosVertex2ft(float x, float y) {
void glVertex2f(GLfloat x, GLfloat y) {
return _glKosVertex3ft(x, y, 0.0f);
}
void glVertex2fv(GLfloat *xy) {
return _glKosVertex3ft(xy[0], xy[1], 0.0f);
}
void glKosVertex2f(GLfloat x, GLfloat y) {
pvr_vertex_t *v = _glKosVertexBufPointer();
v->x = x;
@ -1149,7 +1150,7 @@ void _glKosVertex2ft(float x, float y) {
++GL_VERTICES;
}
void _glKosVertex2ftv(float *xy) {
void glKosVertex2fv(GLfloat *xy) {
pvr_vertex_t *v = _glKosVertexBufPointer();
v->x = xy[0];

View File

@ -352,8 +352,12 @@ GLAPI void APIENTRY glNormal3f(float x, float y, float z);
GLAPI void APIENTRY glNormal3fv(float *xyz);
/* Primitive 2D Position Submission */
GLAPI void APIENTRY(*glVertex2f)(float, float);
GLAPI void APIENTRY(*glVertex2fv)(float *);
GLAPI void APIENTRY glVertex2f(GLfloat x, GLfloat y);
GLAPI void APIENTRY glVertex2fv(GLfloat *xy);
/* Non-Standard KOS Primitive 2D Submission. This will perform no tranformations on the vertices. */
GLAPI void APIENTRY glKosVertex2f(GLfloat x, GLfloat y);
GLAPI void APIENTRY glKosVertex2fv(GLfloat *xy);
/* Primitive 3D Position Submission */
GLAPI void APIENTRY(*glVertex3f)(float, float, float);