Initial commit
[xorg_rtime.git] / xorg-server-1.4 / hw / xgl / egl / xeglinit.c
blobc28d946acd6cd45e3304ed189fefcb1a0f2be669
1 /*
2 * Copyright © 2004 David Reveman
4 * Permission to use, copy, modify, distribute, and sell this software
5 * and its documentation for any purpose is hereby granted without
6 * fee, provided that the above copyright notice appear in all copies
7 * and that both that copyright notice and this permission notice
8 * appear in supporting documentation, and that the name of
9 * David Reveman not be used in advertising or publicity pertaining to
10 * distribution of the software without specific, written prior permission.
11 * David Reveman makes no representations about the suitability of this
12 * software for any purpose. It is provided "as is" without express or
13 * implied warranty.
15 * DAVID REVEMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
17 * NO EVENT SHALL DAVID REVEMAN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
19 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
20 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
21 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Author: David Reveman <davidr@novell.com>
26 #include "xegl.h"
28 static xglScreenInfoRec xglScreenInfo = {
29 NULL, 0, 0, 0, 0,
30 DEFAULT_GEOMETRY_DATA_TYPE,
31 DEFAULT_GEOMETRY_USAGE,
32 FALSE,
33 XGL_DEFAULT_PBO_MASK,
34 FALSE,
35 FALSE
38 #ifdef GLXEXT
39 static Bool loadGlx = TRUE;
40 #endif
42 void
43 InitOutput (ScreenInfo *pScreenInfo,
44 int argc,
45 char **argv)
48 #ifdef GLXEXT
49 if (loadGlx)
51 if (!xglLoadGLXModules ())
52 FatalError ("No GLX modules loaded");
54 #endif
56 xeglInitOutput (pScreenInfo, argc, argv);
59 Bool
60 LegalModifier (unsigned int key,
61 DeviceIntPtr pDev)
63 return xeglLegalModifier (key, pDev);
66 void
67 ProcessInputEvents (void)
69 xeglProcessInputEvents ();
72 void
73 InitInput (int argc,
74 char **argv)
76 xeglInitInput (argc, argv);
79 void
80 ddxUseMsg (void)
82 ErrorF ("\nXgl usage:\n");
84 #ifdef GLXEXT
85 ErrorF ("-noglx don't load glx extension\n");
86 #endif
88 xglUseMsg ();
89 ErrorF ("\nXegl usage:\n");
90 xeglUseMsg ();
93 int
94 ddxProcessArgument (int argc,
95 char **argv,
96 int i)
98 int skip;
100 #ifdef GLXEXT
101 if (!strcmp (argv[i], "-noglx"))
103 loadGlx = FALSE;
104 return 1;
106 #endif
108 skip = xglProcessArgument (argc, argv, i);
109 if (skip)
110 return skip;
112 return xeglProcessArgument (argc, argv, i);
115 void
116 AbortDDX (void)
118 xeglAbort ();
121 void
122 ddxGiveUp (void)
124 xeglGiveUp ();
127 void
128 OsVendorInit (void)
130 xeglOsVendorInit ();