diff options
| author | Dave Airlie <airlied@redhat.com> | 2009-02-13 01:11:25 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2009-02-13 01:11:25 +1000 |
| commit | 53116910b10e3b8a05f42970eff311c21808699f (patch) | |
| tree | 6831e50a56a02fed324f8cb119e05d837e00d7cf /progs/trivial/vp-tri.c | |
| parent | 7e104f9cde94279a902b408e8d1cf21779b393a8 (diff) | |
| parent | 0ccbc3c905f0594a35d72887a1f115e148aaa596 (diff) | |
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts:
configure.ac
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_render.c
Diffstat (limited to 'progs/trivial/vp-tri.c')
| -rw-r--r-- | progs/trivial/vp-tri.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/progs/trivial/vp-tri.c b/progs/trivial/vp-tri.c index f8e18654c6..2932977314 100644 --- a/progs/trivial/vp-tri.c +++ b/progs/trivial/vp-tri.c @@ -5,7 +5,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> -#define GL_GLEXT_PROTOTYPES +#include <GL/glew.h> #include <GL/glut.h> static void Init( void ) @@ -43,17 +43,17 @@ static void Init( void ) static void Display( void ) { glClearColor(0.3, 0.3, 0.3, 1); - glClear( GL_COLOR_BUFFER_BIT ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glEnable(GL_VERTEX_PROGRAM_NV); glBegin(GL_TRIANGLES); - glColor3f(0,0,1); - glVertex3f( 0.9, -0.9, 0.0); - glColor3f(0,1,0); - glVertex3f( 0.9, 0.9, 0.0); - glColor3f(1,0,0); - glVertex3f(-0.9, 0.0, 0.0); + glColor3f(0,0,.7); + glVertex3f( 0.9, -0.9, -0.0); + glColor3f(.8,0,0); + glVertex3f( 0.9, 0.9, -0.0); + glColor3f(0,.9,0); + glVertex3f(-0.9, 0.0, -0.0); glEnd(); @@ -93,8 +93,9 @@ int main( int argc, char *argv[] ) glutInit( &argc, argv ); glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 250, 250 ); - glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE ); + glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE ); glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc( Reshape ); glutKeyboardFunc( Key ); glutDisplayFunc( Display ); |
