#include "window.h"
#include "display.h"
#include "list.h"
+#include "glxcompat.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
d->xshadowoff = 2;
d->yshadowoff = 2;
- if (!glxrender_check_visual(sc)) {
- printf("unable to use the overlay window for GLX\n");
+ if (!(glxrender_find_fb_config(sc, d))) {
+ printf("unable to find FB configs\n");
exit(1);
}
- if (!(glxrender_find_fb_config(sc, d))) {
- printf("unable to find FB configs\n");
+ if (!glxrender_check_visual(sc)) {
+ printf("unable to use the overlay window for GLX\n");
exit(1);
}
uint32_t *vprops, *fbprops;
uint32_t db, stencil, depthsize;
+ {
+ static const uint32_t drawable_tfp_attrs[] = {
+ GLX_CONFIG_CAVEAT, GLX_NONE,
+ GLX_DOUBLEBUFFER, FALSE,
+ GLX_DEPTH_SIZE, 0,
+ GLX_RED_SIZE, 1,
+ GLX_GREEN_SIZE, 1,
+ GLX_BLUE_SIZE, 1,
+ GLX_ALPHA_SIZE, 1,
+ GLX_RENDER_TYPE, GLX_RGBA_BIT,
+ GLX_BIND_TO_TEXTURE_RGBA_EXT, TRUE, /* For TextureFromPixmap */
+ XCB_NONE
+ };
+
+ d_glx_fb_config_t *fbcons;
+ int i, numfb;
+
+ fbcons = glxcompat_choose_fb_config(sc->dpy->conn, sc->num,
+ drawable_tfp_attrs, &numfb);
+ printf("found %d\n", numfb);
+ if (fbcons) {
+ for (i = 0; i < numfb; ++i) {
+ uint32_t v;
+ glxcompat_get_fb_config_attrib(fbcons[i], GLX_FBCONFIG_ID, &v);
+ printf("GLX_FBCONFIG_ID %x\n", v);
+ }
+ free(fbcons);
+ }
+ exit(0);
+ }
+
vck = xcb_glx_get_visual_configs_unchecked(sc->dpy->conn, sc->num);
vrep = xcb_glx_get_visual_configs_reply(sc->dpy->conn, vck, NULL);
if (!vrep) return FALSE;
/* pick the nicest visual for the depth */
for (j = 0; j < nvisuals; ++j) {
uint32_t val;
-
/* find the visual's properties */
for (k = 0; k < vrep->num_visuals; ++k)
if (glxrender_visual_info(vprops, k, nvprops, GLX_VISUAL_ID)