API FP ABI conformity fixes.
This commit is contained in:
parent
36ba8099bb
commit
dc0c8148cb
4
GL/glu.c
4
GL/glu.c
@ -2,8 +2,8 @@
|
||||
#include "private.h"
|
||||
|
||||
/* Set the Perspective */
|
||||
void APIENTRY gluPerspective(GLfloat angle, GLfloat aspect,
|
||||
GLfloat znear, GLfloat zfar) {
|
||||
void APIENTRY gluPerspective(GLdouble angle, GLdouble aspect,
|
||||
GLdouble znear, GLdouble zfar) {
|
||||
GLfloat fW, fH;
|
||||
|
||||
fH = tanf(angle * (M_PI / 360.0f)) * znear;
|
||||
|
20
GL/matrix.c
20
GL/matrix.c
@ -221,9 +221,9 @@ void APIENTRY glLoadMatrixf(const GLfloat *m) {
|
||||
}
|
||||
|
||||
/* Ortho */
|
||||
void APIENTRY glOrtho(GLfloat left, GLfloat right,
|
||||
GLfloat bottom, GLfloat top,
|
||||
GLfloat znear, GLfloat zfar) {
|
||||
void APIENTRY glOrtho(GLdouble left, GLdouble right,
|
||||
GLdouble bottom, GLdouble top,
|
||||
GLdouble znear, GLdouble zfar) {
|
||||
|
||||
Matrix4x4 ortho __attribute__((aligned(32))) = {
|
||||
1.0f, 0.0f, 0.0f, 0.0f,
|
||||
@ -244,9 +244,9 @@ void APIENTRY glOrtho(GLfloat left, GLfloat right,
|
||||
|
||||
|
||||
/* Set the GL frustum */
|
||||
void APIENTRY glFrustum(GLfloat left, GLfloat right,
|
||||
GLfloat bottom, GLfloat top,
|
||||
GLfloat znear, GLfloat zfar) {
|
||||
void APIENTRY glFrustum(GLdouble left, GLdouble right,
|
||||
GLdouble bottom, GLdouble top,
|
||||
GLdouble znear, GLdouble zfar) {
|
||||
|
||||
Matrix4x4 frustum __attribute__((aligned(32)));
|
||||
MEMSET(frustum, 0, sizeof(float) * 16);
|
||||
@ -360,7 +360,7 @@ void APIENTRY glDepthRangef(GLclampf n, GLclampf f) {
|
||||
DEPTH_RANGE_MULTIPLIER_H = (n + f) / 2.0f;
|
||||
}
|
||||
|
||||
void APIENTRY glDepthRange(GLclampf n, GLclampf f){
|
||||
void APIENTRY glDepthRange(GLdouble n, GLdouble f){
|
||||
glDepthRangef(n,f);
|
||||
}
|
||||
|
||||
@ -384,9 +384,9 @@ GL_FORCE_INLINE void vec3f_normalize_sh4(float *v){
|
||||
}
|
||||
}
|
||||
|
||||
void gluLookAt(GLfloat eyex, GLfloat eyey, GLfloat eyez, GLfloat centerx,
|
||||
GLfloat centery, GLfloat centerz, GLfloat upx, GLfloat upy,
|
||||
GLfloat upz) {
|
||||
void gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx,
|
||||
GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy,
|
||||
GLdouble upz) {
|
||||
GLfloat m [16] __attribute__((aligned(32)));
|
||||
GLfloat f [3];
|
||||
GLfloat u [3];
|
||||
|
@ -679,14 +679,14 @@ GLAPI void APIENTRY glClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
|
||||
|
||||
/* Depth Testing */
|
||||
GLAPI void APIENTRY glClearDepthf(GLfloat depth) {
|
||||
glClearDepth(depth);
|
||||
}
|
||||
|
||||
GLAPI void APIENTRY glClearDepth(GLfloat depth) {
|
||||
/* We reverse because using invW means that farther Z == lower number */
|
||||
GPUSetClearDepth(MIN(1.0f - depth, PVR_MIN_Z));
|
||||
}
|
||||
|
||||
GLAPI void APIENTRY glClearDepth(GLdouble depth) {
|
||||
glClearDepthf(depth);
|
||||
}
|
||||
|
||||
GLAPI void APIENTRY glDrawBuffer(GLenum mode) {
|
||||
_GL_UNUSED(mode);
|
||||
|
||||
|
@ -446,7 +446,7 @@ __BEGIN_DECLS
|
||||
#define GLshort short
|
||||
#define GLint int
|
||||
#define GLfloat float
|
||||
#define GLdouble float
|
||||
#define GLdouble double
|
||||
#define GLvoid void
|
||||
#define GLushort unsigned short
|
||||
#define GLuint unsigned int
|
||||
@ -454,7 +454,7 @@ __BEGIN_DECLS
|
||||
#define GLsizei unsigned int
|
||||
#define GLfixed const unsigned int
|
||||
#define GLclampf float
|
||||
#define GLclampd float
|
||||
#define GLclampd double
|
||||
#define GLubyte unsigned char
|
||||
#define GLbitfield unsigned int
|
||||
#define GLboolean unsigned char
|
||||
@ -579,12 +579,12 @@ GLAPI void APIENTRY glReadBuffer(GLenum mode);
|
||||
GLAPI void APIENTRY glDrawBuffer(GLenum mode);
|
||||
|
||||
/* Depth Testing */
|
||||
GLAPI void APIENTRY glClearDepth(GLfloat depth);
|
||||
GLAPI void APIENTRY glClearDepth(GLdouble depth);
|
||||
GLAPI void APIENTRY glClearDepthf(GLfloat depth);
|
||||
GLAPI void APIENTRY glDepthMask(GLboolean flag);
|
||||
GLAPI void APIENTRY glDepthFunc(GLenum func);
|
||||
GLAPI void APIENTRY glDepthRange(GLclampf n, GLclampf f);
|
||||
GLAPI void APIENTRY glDepthRangef(GLclampf n, GLclampf f);
|
||||
GLAPI void APIENTRY glDepthRange(GLdouble n, GLdouble f);
|
||||
GLAPI void APIENTRY glDepthRangef(GLfloat n, GLfloat f);
|
||||
|
||||
/* Hints */
|
||||
/* Currently Supported Capabilities:
|
||||
@ -696,9 +696,9 @@ GLAPI void APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z);
|
||||
GLAPI void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
#define glRotated glRotatef
|
||||
|
||||
GLAPI void APIENTRY glOrtho(GLfloat left, GLfloat right,
|
||||
GLfloat bottom, GLfloat top,
|
||||
GLfloat znear, GLfloat zfar);
|
||||
GLAPI void APIENTRY glOrtho(GLdouble left, GLdouble right,
|
||||
GLdouble bottom, GLdouble top,
|
||||
GLdouble znear, GLdouble zfar);
|
||||
|
||||
GLAPI void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
@ -706,9 +706,9 @@ GLAPI void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
GLAPI void APIENTRY glKosGetMatrix(GLenum mode, GLfloat *params);
|
||||
|
||||
GLAPI void APIENTRY glFrustum(GLfloat left, GLfloat right,
|
||||
GLfloat bottom, GLfloat top,
|
||||
GLfloat znear, GLfloat zfar);
|
||||
GLAPI void APIENTRY glFrustum(GLdouble left, GLdouble right,
|
||||
GLdouble bottom, GLdouble top,
|
||||
GLdouble znear, GLdouble zfar);
|
||||
|
||||
/* Fog Functions - client must enable GL_FOG for this to take effect */
|
||||
GLAPI void APIENTRY glFogi(GLenum pname, GLint param);
|
||||
|
@ -30,9 +30,9 @@ GLAPI void APIENTRY gluPerspective(GLdouble fovy, GLdouble aspect,
|
||||
GLdouble zNear, GLdouble zFar);
|
||||
|
||||
/* gluLookAt - Set Camera Position for Rendering. */
|
||||
GLAPI void APIENTRY gluLookAt(GLfloat eyex, GLfloat eyey, GLfloat eyez,
|
||||
GLfloat centerx, GLfloat centery, GLfloat centerz,
|
||||
GLfloat upx, GLfloat upy, GLfloat upz);
|
||||
GLAPI void APIENTRY gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez,
|
||||
GLdouble centerx, GLdouble centery, GLdouble centerz,
|
||||
GLdouble upx, GLdouble upy, GLdouble upz);
|
||||
|
||||
/* generate mipmaps for any image provided by the user and then pass them to OpenGL */
|
||||
GLAPI GLint APIENTRY gluBuild2DMipmaps(GLenum target, GLint internalFormat,
|
||||
|
Loading…
Reference in New Issue
Block a user