From 16235a4ad1e91f0907931eb1b3f85fd0b79d7ea1 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Tue, 18 Jul 2023 18:59:09 +0200 Subject: [PATCH] Get rid of GL functions with double precision that were accidentally used --- BBGE/AfterEffect.cpp | 8 ++++---- BBGE/OpenGLStubs.h | 20 ++++++++++---------- BBGE/ScreenTransition.cpp | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/BBGE/AfterEffect.cpp b/BBGE/AfterEffect.cpp index 1a0e5e7..07d7f4d 100644 --- a/BBGE/AfterEffect.cpp +++ b/BBGE/AfterEffect.cpp @@ -284,13 +284,13 @@ void AfterEffectManager::renderGrid() const // note that offx, offy are negative here! glBegin(GL_QUADS); - glTexCoord2d(0.0f, 0.0f); + glTexCoord2f(0.0f, 0.0f); glVertex3f(offx, vh+offy, 0.0f); - glTexCoord2d(percentX, 0.0f); + glTexCoord2f(percentX, 0.0f); glVertex3f( vw+offx, vh+offy, 0.0f); - glTexCoord2d(percentX, percentY); + glTexCoord2f(percentX, percentY); glVertex3f( vw+offx, offy, 0.0f); - glTexCoord2d(0.0f, percentY); + glTexCoord2f(0.0f, percentY); glVertex3f(offx, offy, 0.0f); glEnd(); diff --git a/BBGE/OpenGLStubs.h b/BBGE/OpenGLStubs.h index 91d838a..63c9b41 100644 --- a/BBGE/OpenGLStubs.h +++ b/BBGE/OpenGLStubs.h @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ GL_FUNC(void,glBindTexture,(GLenum target,GLuint name),(target,name),) -GL_FUNC(void,glBitmap,(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap),(width,height,xorig,yorig,xmove,ymove,bitmap),) +//GL_FUNC(void,glBitmap,(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap),(width,height,xorig,yorig,xmove,ymove,bitmap),) GL_FUNC(void,glBlendFunc,(GLenum f,GLenum x),(f,x),) GL_FUNC(void,glClear,(GLbitfield a),(a),) GL_FUNC(void,glClearColor,(GLclampf r,GLclampf g,GLclampf b,GLclampf a),(r,g,b,a),) @@ -65,17 +65,17 @@ GL_FUNC(void,glViewport,(GLint x, GLint y, GLsizei width, GLsizei height),(x,y,w //GL_FUNC(void,glScissor,(GLint x, GLint y, GLsizei width, GLsizei height),(x,y,width,height),) GL_FUNC(void,glBegin,(GLenum e),(e),) GL_FUNC(void,glEnd,(void),(),) -GL_FUNC(void,glEndList,(void),(),) -GL_FUNC(void,glCallList,(GLuint list),(list),) +//GL_FUNC(void,glEndList,(void),(),) +//GL_FUNC(void,glCallList,(GLuint list),(list),) GL_FUNC(void,glClearDepth,(GLclampd x),(x),) GL_FUNC(void,glColor3f,(GLfloat r,GLfloat g,GLfloat b),(r,g,b),) -GL_FUNC(void,glDeleteLists,(GLuint list, GLsizei range),(list,range),) +//GL_FUNC(void,glDeleteLists,(GLuint list, GLsizei range),(list,range),) GL_FUNC(void,glDrawArrays,(GLenum mode, GLint first, GLsizei count), (mode,first,count),) -GL_FUNC(void,glDrawPixels,(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels),(width,height,format,type,pixels),) -GL_FUNC(GLuint,glGenLists,(GLsizei range),(range),return) -GL_FUNC(void,glNewList,(GLuint list, GLenum mode),(list,mode),) -GL_FUNC(void,glNormal3d,(GLdouble nx, GLdouble ny, GLdouble nz),(nx,ny,nz),) -GL_FUNC(void,glNormal3dv,(const GLdouble *v),(v),) +//GL_FUNC(void,glDrawPixels,(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels),(width,height,format,type,pixels),) +//GL_FUNC(GLuint,glGenLists,(GLsizei range),(range),return) +//GL_FUNC(void,glNewList,(GLuint list, GLenum mode),(list,mode),) +//GL_FUNC(void,glNormal3d,(GLdouble nx, GLdouble ny, GLdouble nz),(nx,ny,nz),) +//GL_FUNC(void,glNormal3dv,(const GLdouble *v),(v),) GL_FUNC(void,glOrtho,(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar),(left,right,bottom,top,zNear,zFar),) GL_FUNC(void,glPopAttrib,(void),(),) GL_FUNC(void,glPopClientAttrib,(void),(),) @@ -83,7 +83,7 @@ GL_FUNC(void,glPushAttrib,(GLbitfield mask),(mask),) GL_FUNC(void,glPushClientAttrib,(GLbitfield mask),(mask),) GL_FUNC(void,glRasterPos2i,(GLint x, GLint y),(x,y),) GL_FUNC(void,glTexCoord2f,(GLfloat s, GLfloat t),(s,t),) -GL_FUNC(void,glTexCoord2d,(GLdouble s, GLdouble t),(s,t),) +//GL_FUNC(void,glTexCoord2d,(GLdouble s, GLdouble t),(s,t),) GL_FUNC(void,glVertex2f,(GLfloat x, GLfloat y),(x,y),) GL_FUNC(void,glVertex3f,(GLfloat x, GLfloat y, GLfloat z),(x,y,z),) GL_FUNC(void,glVertex3i,(GLint x, GLint y, GLint z),(x,y,z),) diff --git a/BBGE/ScreenTransition.cpp b/BBGE/ScreenTransition.cpp index e451ac5..8138ebe 100644 --- a/BBGE/ScreenTransition.cpp +++ b/BBGE/ScreenTransition.cpp @@ -124,13 +124,13 @@ void ScreenTransition::onRender(const RenderState& rs) const glBindTexture(GL_TEXTURE_2D, screen_texture); glBegin(GL_QUADS); - glTexCoord2d(0, 0); + glTexCoord2f(0, 0); glVertex3f(-width2, height2, 0.0); - glTexCoord2d(pw, 0); + glTexCoord2f(pw, 0); glVertex3f( width2, height2, 0.0); - glTexCoord2d(pw, ph); + glTexCoord2f(pw, ph); glVertex3f( width2, -height2, 0.0); - glTexCoord2d(0, ph); + glTexCoord2f(0, ph); glVertex3f(-width2, -height2, 0.0); glEnd();