diff options
-rwxr-xr-x | progs/fp/Makefile | 1 | ||||
-rw-r--r-- | progs/fp/SConscript | 1 | ||||
-rw-r--r-- | progs/fp/tri-inv.c | 111 |
3 files changed, 0 insertions, 113 deletions
diff --git a/progs/fp/Makefile b/progs/fp/Makefile index d77cd32b4d..681928cf26 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 a78318542c..69614e1a9e 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 7e490fa61c..0000000000 --- a/progs/fp/tri-inv.c +++ /dev/null @@ -1,111 +0,0 @@ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <GL/glew.h> -#include <GL/glut.h> - - - -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; -} |