diff options
Diffstat (limited to 'progs')
-rw-r--r-- | progs/egl/eglinfo.c | 15 | ||||
-rw-r--r-- | progs/fp/fp-tri.c | 2 | ||||
-rw-r--r-- | progs/fp/local.txt | 11 |
3 files changed, 23 insertions, 5 deletions
diff --git a/progs/egl/eglinfo.c b/progs/egl/eglinfo.c index 89feec9be42..14620a97596 100644 --- a/progs/egl/eglinfo.c +++ b/progs/egl/eglinfo.c @@ -48,9 +48,9 @@ PrintConfigs(EGLDisplay d) eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs); printf("Configurations:\n"); - printf(" bf lv d st colorbuffer dp st vis supported\n"); - printf(" id sz l b ro r g b a th cl id surfaces \n"); - printf("---------------------------------------------------\n"); + printf(" bf lv d st colorbuffer dp st ms vis supported\n"); + printf(" id sz l b ro r g b a th cl ns b id surfaces \n"); + printf("--------------------------------------------------------\n"); for (i = 0; i < numConfigs; i++) { EGLint id, size, level; EGLint red, green, blue, alpha; @@ -58,6 +58,7 @@ PrintConfigs(EGLDisplay d) EGLint surfaces; EGLint doubleBuf = 1, stereo = 0; EGLint vid; + EGLint samples, sampleBuffers; char surfString[100] = ""; eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id); @@ -73,6 +74,9 @@ PrintConfigs(EGLDisplay d) eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_ID, &vid); eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces); + eglGetConfigAttrib(d, configs[i], EGL_SAMPLES, &samples); + eglGetConfigAttrib(d, configs[i], EGL_SAMPLE_BUFFERS, &sampleBuffers); + if (surfaces & EGL_WINDOW_BIT) strcat(surfString, "win,"); if (surfaces & EGL_PBUFFER_BIT) @@ -86,12 +90,13 @@ PrintConfigs(EGLDisplay d) if (strlen(surfString) > 0) surfString[strlen(surfString) - 1] = 0; - printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d 0x%02x %-12s\n", + printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %2d%2d 0x%02x %-12s\n", id, size, level, doubleBuf ? 'y' : '.', stereo ? 'y' : '.', red, green, blue, alpha, - depth, stencil, vid, surfString); + depth, stencil, + samples, sampleBuffers, vid, surfString); } } diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c index c07cfa2076e..843f897871b 100644 --- a/progs/fp/fp-tri.c +++ b/progs/fp/fp-tri.c @@ -130,6 +130,8 @@ static void Display(void) { glClear(GL_COLOR_BUFFER_BIT); + glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, 1.0, 1.0, 0.0, 0.0); + glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 0.0, 0.0, 1.0, 1.0); glBegin(GL_TRIANGLES); glColor3f(0,0,1); glVertex3f( 0.9, -0.9, -30.0); diff --git a/progs/fp/local.txt b/progs/fp/local.txt new file mode 100644 index 00000000000..6cb2a2f13cc --- /dev/null +++ b/progs/fp/local.txt @@ -0,0 +1,11 @@ +!!ARBfp1.0 +TEMP R0; +PARAM c[4] = { { 0, 0, 0, 0 }, + program.local[0..1], + { 1, 1, 1, 1 } }; +MOV R0, c[1]; +SUB R0, R0, c[0]; +ADD R0, R0, c[2]; +MUL R0, R0, c[3]; +MOV result.color, R0; +END |