summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-10-07 20:39:22 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-10-07 20:39:22 +0200
commit5b4c0b864a25fa193e7ba828cf5ce483ca05bd4e (patch)
treef462528c24889bee0665451e9e32664ecf2add3c /progs
parent3f5a316f36e2d376104640033c8bcefef3810ef4 (diff)
parent9fde81bb20bbfd2f8da80749cb84d890843a7bc2 (diff)
Merge branch 'mesa_7_6_branch'
Diffstat (limited to 'progs')
-rw-r--r--progs/tests/random.c2
-rw-r--r--progs/xdemos/pbdemo.c17
2 files changed, 17 insertions, 2 deletions
diff --git a/progs/tests/random.c b/progs/tests/random.c
index 4023674c05..604b4d4088 100644
--- a/progs/tests/random.c
+++ b/progs/tests/random.c
@@ -257,11 +257,11 @@ RandomPrimitive(void)
Vcount++;
for (i = 0; i < len; i++) {
+ int k = RandomInt(9);
Vbuffer[Vcount].v[0] = RandomFloat(-3, 3);
Vbuffer[Vcount].v[1] = RandomFloat(-3, 3);
Vbuffer[Vcount].v[2] = RandomFloat(-3, 3);
Vbuffer[Vcount].v[3] = RandomFloat(-3, 3);
- int k = RandomInt(9);
switch (k) {
case 0:
glVertex2fv(Vbuffer[Vcount].v);
diff --git a/progs/xdemos/pbdemo.c b/progs/xdemos/pbdemo.c
index 7db0017b33..2573209336 100644
--- a/progs/xdemos/pbdemo.c
+++ b/progs/xdemos/pbdemo.c
@@ -143,7 +143,7 @@ MakePbuffer( Display *dpy, int screen, int width, int height )
/* Create the pbuffer using first fbConfig in the list that works. */
for (i=0;i<nConfigs;i++) {
- pBuffer = CreatePbuffer(dpy, screen, fbConfigs[i], width, height, preserve, largest);
+ pBuffer = CreatePbuffer(dpy, screen, fbConfigs[i], width, height, largest, preserve);
if (pBuffer) {
gFBconfig = fbConfigs[i];
gWidth = width;
@@ -210,6 +210,21 @@ Setup(int width, int height)
return 0;
}
+ /* Test drawable queries */
+ {
+ unsigned int v;
+ glXQueryDrawable( gDpy, gPBuffer, GLX_WIDTH, &v);
+ printf("GLX_WIDTH = %u\n", v);
+ glXQueryDrawable( gDpy, gPBuffer, GLX_HEIGHT, &v);
+ printf("GLX_HEIGHT = %u\n", v);
+ glXQueryDrawable( gDpy, gPBuffer, GLX_PRESERVED_CONTENTS, &v);
+ printf("GLX_PRESERVED_CONTENTS = %u\n", v);
+ glXQueryDrawable( gDpy, gPBuffer, GLX_LARGEST_PBUFFER, &v);
+ printf("GLX_LARGEST_PBUFFER = %u\n", v);
+ glXQueryDrawable( gDpy, gPBuffer, GLX_FBCONFIG_ID, &v);
+ printf("GLX_FBCONFIG_ID = %u\n", v);
+ }
+
/* Get corresponding XVisualInfo */
visInfo = GetVisualFromFBConfig(gDpy, gScreen, gFBconfig);
if (!visInfo) {