GLFB: remove unused 3D cube code

This commit is contained in:
Stefan Seyfried
2013-05-06 00:32:48 +02:00
parent 9cc35ff0cc
commit 6336dc4f94
2 changed files with 5 additions and 81 deletions

View File

@@ -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 <vector>
@@ -334,19 +333,10 @@ void GLFramebuffer::render()
glLoadIdentity();
float aspect = static_cast<float>(*mX)/ *mY;
float osdaspect = static_cast<float>(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<float>(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[] = {

View File

@@ -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;