diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-09-24 15:01:04 +0200 |
---|---|---|
committer | Luca Barbieri <luca@luca-barbieri.com> | 2010-09-24 15:12:19 +0200 |
commit | 7e81c67c8b16c6f87e01320c9d9a7455a52cf91b (patch) | |
tree | 2c4a331340c9444b3e3e28a035d34e2fb4028fc6 /src/gallium/state_trackers/d3d1x/progs/d3d11app | |
parent | db1fbb1efc10ee4853c3fbdf63567e62fdde7447 (diff) |
d3d1x: stop using GLX in demos, just use the default visual
Diffstat (limited to 'src/gallium/state_trackers/d3d1x/progs/d3d11app')
-rwxr-xr-x | src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp index 8eb51d3638..1271499c4d 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp @@ -1,6 +1,5 @@ #include "d3d11app.h"
#include <X11/Xlib.h>
-#include <GL/glx.h>
#include <galliumdxgi.h>
#include <sys/time.h>
@@ -11,14 +10,6 @@ DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM; static ID3D11Device* dev;
static ID3D11DeviceContext* 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;
@@ -29,15 +20,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);
|