From 7e81c67c8b16c6f87e01320c9d9a7455a52cf91b Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Fri, 24 Sep 2010 15:01:04 +0200 Subject: d3d1x: stop using GLX in demos, just use the default visual --- .../state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp') diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp index a8f24ae303..efbe322fe6 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp @@ -26,7 +26,6 @@ #include "d3d10app.h" #include -#include #include #include @@ -37,14 +36,6 @@ DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM; static ID3D10Device* dev; static ID3D10Device* ctx; -static int attributeList[] = { - GLX_RGBA, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - None -}; - double get_time() { struct timeval tv; @@ -55,15 +46,15 @@ double get_time() int main(int argc, char** argv) { Display* dpy = XOpenDisplay(0); - XVisualInfo* vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeList); - Colormap cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone); + Visual* visual = DefaultVisual(dpy, DefaultScreen(dpy)); + Colormap cmap = XCreateColormap(dpy, RootWindow(dpy, DefaultScreen(dpy)), visual, AllocNone); XSetWindowAttributes swa; swa.colormap = cmap; swa.border_pixel = 0; swa.event_mask = StructureNotifyMask; width = 512; height = 512; - Window win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, width, height, 0, vi->depth, InputOutput, vi->visual, CWBorderPixel | CWColormap| CWEventMask, &swa); + Window win = XCreateWindow(dpy, RootWindow(dpy, DefaultScreen(dpy)), 0, 0, width, height, 0, CopyFromParent, InputOutput, visual, CWBorderPixel | CWColormap| CWEventMask, &swa); XMapWindow(dpy, win); GalliumDXGIUseX11Display(dpy, 0); -- cgit v1.2.3