mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-04-07 23:27:12 +00:00
kill some now unused/unnecessary legacy GL functions
This commit is contained in:
parent
cf90556430
commit
59706456ce
3 changed files with 19 additions and 24 deletions
|
@ -2771,12 +2771,11 @@ void DSQ::doSaveSlotMenu(SaveSlotMode ssm, const Vector &position)
|
|||
int x = renderWidth/2 - scrShotWidth/2;
|
||||
int y = renderHeight/2 - scrShotHeight/2;
|
||||
|
||||
glPushAttrib(GL_VIEWPORT_BIT);
|
||||
glViewport(0, 0, renderWidth, renderHeight);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
renderExternal();
|
||||
scrShotData = grabScreenshot(x, y, scrShotWidth, scrShotHeight);
|
||||
glPopAttrib();
|
||||
glViewport(0, 0, width, height);
|
||||
showBuffer();
|
||||
|
||||
prepScreen(0);
|
||||
|
|
|
@ -162,7 +162,6 @@ void Core::setup_opengl()
|
|||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
|
||||
glClearDepth(1.0); // Depth Buffer Setup
|
||||
glDisable(GL_CULL_FACE);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
|
@ -2044,6 +2043,15 @@ void Core::renderInternal(int startLayer, int endLayer, bool allowSkip)
|
|||
if(!r->visible)
|
||||
continue;
|
||||
|
||||
if(glDebugMessageInsertARB)
|
||||
{
|
||||
char msg[64];
|
||||
sprintf(msg, "Render layer %u -> %d", (unsigned)c, i);
|
||||
glDebugMessageInsertARB(GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_OTHER_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, -1, msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(r->preRender)
|
||||
if(!r->preRender(rs))
|
||||
continue;
|
||||
|
@ -2306,19 +2314,7 @@ unsigned char *Core::grabScreenshot(size_t x, size_t y, size_t w, size_t h)
|
|||
const size_t size = sizeof(unsigned char) * N * 4;
|
||||
unsigned char * const imageData = new unsigned char[size];
|
||||
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
glDisable(GL_ALPHA_TEST); glDisable(GL_BLEND);
|
||||
glDisable(GL_DEPTH_TEST); glDisable(GL_DITHER); glDisable(GL_FOG);
|
||||
glDisable(GL_LIGHTING); glDisable(GL_LOGIC_OP);
|
||||
glDisable(GL_STENCIL_TEST); glDisable(GL_TEXTURE_1D);
|
||||
glDisable(GL_TEXTURE_2D); glPixelTransferi(GL_MAP_COLOR, GL_FALSE);
|
||||
glPixelTransferi(GL_RED_SCALE, 1); glPixelTransferi(GL_RED_BIAS, 0);
|
||||
glPixelTransferi(GL_GREEN_SCALE, 1); glPixelTransferi(GL_GREEN_BIAS, 0);
|
||||
glPixelTransferi(GL_BLUE_SCALE, 1); glPixelTransferi(GL_BLUE_BIAS, 0);
|
||||
glPixelTransferi(GL_ALPHA_SCALE, 1); glPixelTransferi(GL_ALPHA_BIAS, 0);
|
||||
glRasterPos2i(0, 0);
|
||||
glReadPixels(x, y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)imageData);
|
||||
glPopAttrib();
|
||||
|
||||
// Force all alpha values to 255.
|
||||
unsigned char *c = imageData;
|
||||
|
|
|
@ -47,9 +47,9 @@ GL_FUNC(void,glLineWidth,(GLfloat width),(width),)
|
|||
GL_FUNC(void,glLoadIdentity,(void),(),)
|
||||
GL_FUNC(void,glMatrixMode,(GLenum mode),(mode),)
|
||||
GL_FUNC(void,glPixelStorei,(GLenum pname, GLint param),(pname,param),)
|
||||
GL_FUNC(void,glPixelTransferi,(GLenum pname, GLint param),(pname,param),)
|
||||
GL_FUNC(void,glPixelTransferf,(GLenum pname, GLfloat param),(pname,param),)
|
||||
GL_FUNC(void,glPixelZoom,(GLfloat xfactor, GLfloat yfactor),(xfactor,yfactor),)
|
||||
//GL_FUNC(void,glPixelTransferi,(GLenum pname, GLint param),(pname,param),)
|
||||
//GL_FUNC(void,glPixelTransferf,(GLenum pname, GLfloat param),(pname,param),)
|
||||
//GL_FUNC(void,glPixelZoom,(GLfloat xfactor, GLfloat yfactor),(xfactor,yfactor),)
|
||||
GL_FUNC(void,glPointSize,(GLfloat size),(size),)
|
||||
GL_FUNC(void,glPopMatrix,(void),(),)
|
||||
GL_FUNC(void,glPushMatrix,(void),(),)
|
||||
|
@ -69,7 +69,7 @@ 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,glClearDepth,(GLclampd x),(x),)
|
||||
//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,glDrawPixels,(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels),(width,height,format,type,pixels),)
|
||||
|
@ -78,11 +78,11 @@ GL_FUNC(void,glColor3f,(GLfloat r,GLfloat g,GLfloat b),(r,g,b),)
|
|||
//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),(),)
|
||||
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,glPopAttrib,(void),(),)
|
||||
//GL_FUNC(void,glPopClientAttrib,(void),(),)
|
||||
//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,glVertex2f,(GLfloat x, GLfloat y),(x,y),)
|
||||
|
|
Loading…
Add table
Reference in a new issue