From: Brian Paul Date: Thu, 7 Jan 2010 15:22:37 +0000 (-0700) Subject: progs/fp: remove invalid tri-inv.c test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b7a4b2c0e9b18ed985b0eda34723d53bc2a305b;p=mesa.git progs/fp: remove invalid tri-inv.c test INV is not a valid instruction. --- diff --git a/progs/fp/Makefile b/progs/fp/Makefile index d77cd32b4df..681928cf260 100755 --- a/progs/fp/Makefile +++ b/progs/fp/Makefile @@ -17,7 +17,6 @@ SOURCES = \ tri-depth2.c \ tri-depthwrite.c \ tri-depthwrite2.c \ - tri-inv.c \ tri-param.c \ fp-tri.c diff --git a/progs/fp/SConscript b/progs/fp/SConscript index a78318542c1..69614e1a9e1 100644 --- a/progs/fp/SConscript +++ b/progs/fp/SConscript @@ -17,7 +17,6 @@ progs = [ 'tri-depth2', 'tri-depthwrite', 'tri-depthwrite2', - 'tri-inv', 'tri-param', 'tri-tex', 'point-position', diff --git a/progs/fp/tri-inv.c b/progs/fp/tri-inv.c deleted file mode 100644 index 7e490fa61ca..00000000000 --- a/progs/fp/tri-inv.c +++ /dev/null @@ -1,111 +0,0 @@ - -#include -#include -#include -#include -#include - - - -static void Init( void ) -{ - static const char *modulate2D = - "!!ARBfp1.0\n" - "TEMP R0;\n" - "INV result.color, fragment.color; \n" - "END" - ; - GLuint modulateProg; - - if (!GLEW_ARB_fragment_program) { - printf("Error: GL_ARB_fragment_program not supported!\n"); - exit(1); - } - printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); - - /* Setup the fragment program */ - glGenProgramsARB(1, &modulateProg); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg); - glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(modulate2D), (const GLubyte *)modulate2D); - - printf("glGetError = 0x%x\n", (int) glGetError()); - printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n", - (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB)); - - glEnable(GL_FRAGMENT_PROGRAM_ARB); - - glClearColor(.3, .3, .3, 0); -} - -static void Reshape(int width, int height) -{ - - glViewport(0, 0, (GLint)width, (GLint)height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); - glMatrixMode(GL_MODELVIEW); -} - -static void Key(unsigned char key, int x, int y) -{ - - switch (key) { - case 27: - exit(1); - default: - break; - } - - glutPostRedisplay(); -} - -static void Draw(void) -{ - glClear(GL_COLOR_BUFFER_BIT); - - glBegin(GL_TRIANGLES); - glColor3f(0,0,1); - glVertex3f( 0.9, -0.9, -30.0); - glColor3f(1,0,0); - glVertex3f( 0.9, 0.9, -30.0); - glColor3f(0,1,0); - glVertex3f(-0.9, 0.0, -30.0); - glEnd(); - - glFlush(); - - -} - - -int main(int argc, char **argv) -{ - GLenum type; - - glutInit(&argc, argv); - - - - glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250); - - type = GLUT_RGB; - type |= GLUT_SINGLE; - glutInitDisplayMode(type); - - if (glutCreateWindow("First Tri") == GL_FALSE) { - exit(1); - } - - glewInit(); - - Init(); - - glutReshapeFunc(Reshape); - glutKeyboardFunc(Key); - glutDisplayFunc(Draw); - glutMainLoop(); - return 0; -}