#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:
parent
4390d627bf
commit
0711f10b1f
19
gl-api.c
19
gl-api.c
|
@ -72,10 +72,6 @@ static GLubyte GL_ENABLE_SUPERSAMP = 0;
|
||||||
static GLubyte GL_FACE_FRONT = 0;
|
static GLubyte GL_FACE_FRONT = 0;
|
||||||
static GLubyte GL_CLAMP_ST = 0;
|
static GLubyte GL_CLAMP_ST = 0;
|
||||||
|
|
||||||
/* Primitive 2D Position Submission */
|
|
||||||
void (*glVertex2f)(float, float);
|
|
||||||
void (*glVertex2fv)(float *);
|
|
||||||
|
|
||||||
/* Primitive 3D Position Submission */
|
/* Primitive 3D Position Submission */
|
||||||
void (*glVertex3f)(float, float, float);
|
void (*glVertex3f)(float, float, float);
|
||||||
void (*glVertex3fv)(float *);
|
void (*glVertex3fv)(float *);
|
||||||
|
@ -1038,9 +1034,6 @@ void glBegin(unsigned int mode) {
|
||||||
glVertex3f = _glKosVertex3ft;
|
glVertex3f = _glKosVertex3ft;
|
||||||
glVertex3fv = _glKosVertex3ftv;
|
glVertex3fv = _glKosVertex3ftv;
|
||||||
}
|
}
|
||||||
|
|
||||||
glVertex2f = _glKosVertex2ft;
|
|
||||||
glVertex2fv = _glKosVertex2ftv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glKosTransformClipBuf(pvr_vertex_t *v, GLuint verts) {
|
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();
|
pvr_vertex_t *v = _glKosVertexBufPointer();
|
||||||
|
|
||||||
v->x = x;
|
v->x = x;
|
||||||
|
@ -1149,7 +1150,7 @@ void _glKosVertex2ft(float x, float y) {
|
||||||
++GL_VERTICES;
|
++GL_VERTICES;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glKosVertex2ftv(float *xy) {
|
void glKosVertex2fv(GLfloat *xy) {
|
||||||
pvr_vertex_t *v = _glKosVertexBufPointer();
|
pvr_vertex_t *v = _glKosVertexBufPointer();
|
||||||
|
|
||||||
v->x = xy[0];
|
v->x = xy[0];
|
||||||
|
|
|
@ -352,8 +352,12 @@ GLAPI void APIENTRY glNormal3f(float x, float y, float z);
|
||||||
GLAPI void APIENTRY glNormal3fv(float *xyz);
|
GLAPI void APIENTRY glNormal3fv(float *xyz);
|
||||||
|
|
||||||
/* Primitive 2D Position Submission */
|
/* Primitive 2D Position Submission */
|
||||||
GLAPI void APIENTRY(*glVertex2f)(float, float);
|
GLAPI void APIENTRY glVertex2f(GLfloat x, GLfloat y);
|
||||||
GLAPI void APIENTRY(*glVertex2fv)(float *);
|
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 */
|
/* Primitive 3D Position Submission */
|
||||||
GLAPI void APIENTRY(*glVertex3f)(float, float, float);
|
GLAPI void APIENTRY(*glVertex3f)(float, float, float);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user