From 9a4dbf1cffc923cd3c6b0e70a6ddf1d9fe085ad2 Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Sun, 7 Aug 2005 02:15:27 +0000 Subject: Fix up some of the sample to work with the r200 EGL driver --- progs/egl/demo3.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'progs/egl/demo3.c') diff --git a/progs/egl/demo3.c b/progs/egl/demo3.c index 6c7358400f9..2693c372054 100644 --- a/progs/egl/demo3.c +++ b/progs/egl/demo3.c @@ -576,7 +576,7 @@ main(int argc, char *argv[]) /* EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); */ - EGLDisplay d = eglGetDisplay("!fb_dri"); + EGLDisplay d = eglGetDisplay(":0"); assert(d); if (!eglInitialize(d, &maj, &min)) { @@ -602,7 +602,7 @@ main(int argc, char *argv[]) printf("failed to create screen surface\n"); return 0; } - + eglShowSurfaceMESA(d, screen, screen_surf, mode); b = eglMakeCurrent(d, screen_surf, screen_surf, ctx); @@ -610,25 +610,24 @@ main(int argc, char *argv[]) printf("make current failed\n"); return 0; } + glViewport(0, 0, 1024, 768); + - Init(); + Init(); Reshape(1024, 768); - glDrawBuffer( GL_FRONT ); - glClearColor( 0, - 1.0, - 0, - 1); + glDrawBuffer( GL_FRONT ); + glClearColor( 0, 1.0, 0, 1); - glClear( GL_COLOR_BUFFER_BIT ); + glClear( GL_COLOR_BUFFER_BIT ); - doubleBuffer = 1; - glDrawBuffer( GL_BACK ); + doubleBuffer = 1; + glDrawBuffer( GL_BACK ); Draw(d, screen_surf); - + write_ppm("dump.ppm", ((struct fb_display *)_eglLookupDisplay(d))->pFB, 1024, 768); - + eglDestroySurface(d, screen_surf); eglDestroyContext(d, ctx); eglTerminate(d); -- cgit v1.2.3