From 6336dc4f942bc0f61dec7a02104e243f2a351eb5 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 6 May 2013 00:32:48 +0200 Subject: [PATCH] GLFB: remove unused 3D cube code --- generic-pc/glfb.cpp | 84 +++------------------------------------------ generic-pc/glfb.h | 2 -- 2 files changed, 5 insertions(+), 81 deletions(-) diff --git a/generic-pc/glfb.cpp b/generic-pc/glfb.cpp index 68d9838..399d486 100644 --- a/generic-pc/glfb.cpp +++ b/generic-pc/glfb.cpp @@ -20,7 +20,6 @@ http://gitorious.org/neutrino-hd/neutrino-hd-dvbapi TODO: AV-Sync code is "experimental" at best - cleanup carjay's crazy 3D stuff :-) */ #include @@ -334,19 +333,10 @@ void GLFramebuffer::render() glLoadIdentity(); float aspect = static_cast(*mX)/ *mY; float osdaspect = static_cast(mOA.den) / mOA.num; -// if(!mState.go3d) - { - glOrtho(aspect*-osdaspect, aspect*osdaspect, -1.0, 1.0, -1.0, 1.0 ); - glClearColor(0.0, 0.0, 0.0, 1.0); - } -#if 0 - else - { /* carjay is crazy... :-) */ - gluPerspective(45.0, static_cast(mX)/mY, 0.05, 1000.0); - glTranslatef(0.0, 0.0, -2.0); - glClearColor(0.25, 0.25, 0.25, 1.0); - } -#endif + + glOrtho(aspect*-osdaspect, aspect*osdaspect, -1.0, 1.0, -1.0, 1.0 ); + glClearColor(0.0, 0.0, 0.0, 1.0); + glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glEnable(GL_BLEND); @@ -368,24 +358,7 @@ void GLFramebuffer::render() glBindTexture(GL_TEXTURE_2D, mState.osdtex); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -#if 0 - // cube test - if(mState.go3d) - { - glEnable(GL_DEPTH_TEST); - static float ydeg = 0.0; - glPushMatrix(); - glRotatef(ydeg, 0.0, 1.0, 0.0); - glBindTexture(GL_TEXTURE_2D, mState.displaytex); - drawCube(0.5); - glScalef(1.01, 1.01, 1.01); - glBindTexture(GL_TEXTURE_2D, mState.osdtex); - drawCube(0.5); - glPopMatrix(); - ydeg += 0.75f; - } - else -#endif + if (mVAchanged) { mVAchanged = false; @@ -477,53 +450,6 @@ void GLFramebuffer::checkReinit(int x, int y) last_y = y; } -#if 0 -void GLFramebuffer::drawCube(float size) -{ - GLfloat vertices[] = { - 1.0f, 1.0f, 1.0f, - -1.0f, 1.0f, 1.0f, - -1.0f, -1.0f, 1.0f, - 1.0f, -1.0f, 1.0f, - 1.0f, -1.0f, -1.0f, - 1.0f, 1.0f, -1.0f, - -1.0f, 1.0f, -1.0f, - -1.0f, -1.0f, -1.0f - }; - - GLubyte indices[] = { - 0, 1, 2, 3, /* front */ - 0, 3, 4, 5, /* right */ - 0, 5, 6, 1, /* top */ - 1, 6, 7, 2, /* left */ - 7, 4, 3, 2, /* bottom */ - 4, 7, 6, 5 /* back */ - }; - - GLfloat texcoords[] = { - 1.0, 0.0, // v0 - 0.0, 0.0, // v1 - 0.0, 1.0, // v2 - 1.0, 1.0, // v3 - 0.0, 1.0, // v4 - 0.0, 0.0, // v5 - 1.0, 0.0, // v6 - 1.0, 1.0 // v7 - }; - - glPushMatrix(); - glScalef(size, size, size); - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glVertexPointer(3, GL_FLOAT, 0, vertices); - glTexCoordPointer(2, GL_FLOAT, 0, texcoords); - glDrawElements(GL_QUADS, 24, GL_UNSIGNED_BYTE, indices); - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glPopMatrix(); -} -#endif - void GLFramebuffer::drawSquare(float size, float x_factor) { GLfloat vertices[] = { diff --git a/generic-pc/glfb.h b/generic-pc/glfb.h index 74eea35..c6999d5 100644 --- a/generic-pc/glfb.h +++ b/generic-pc/glfb.h @@ -89,7 +89,6 @@ private: void setupOSDBuffer(); /* create the OSD buffer */ void setupGLObjects(); /* PBOs, textures and stuff */ void releaseGLObjects(); - // void drawCube(float size); /* cubes are the building blocks of our society */ void drawSquare(float size, float x_factor = 1); /* do not be square */ struct { @@ -99,7 +98,6 @@ private: GLuint pbo; /* PBO we use for transfer to texture */ GLuint displaytex; /* holds the display texture */ GLuint displaypbo; - //int go3d; bool blit; } mState;