test version of startmenu root with big icons
[reactos.git] / reactos / lib / mesa32 / src / drivers / windows / gldirect / dglglobals.c
1 /****************************************************************************
2 *
3 * Mesa 3-D graphics library
4 * Direct3D Driver Interface
5 *
6 * ========================================================================
7 *
8 * Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
25 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 * SOFTWARE.
27 *
28 * ======================================================================
29 *
30 * Language: ANSI C
31 * Environment: Windows 9x (Win32)
32 *
33 * Description: Global variables.
34 *
35 ****************************************************************************/
36
37 #include "dglglobals.h"
38
39 // =======================================================================
40 // Global Variables
41 // =======================================================================
42
43 char szCopyright[] = "Copyright (c) 1998 SciTech Software, Inc.";
44 char szDllName[] = "Scitech GLDirect";
45 char szErrorTitle[] = "GLDirect Error";
46
47 DGL_globals glb;
48
49 // Shared result variable
50 HRESULT hResult;
51
52 // ***********************************************************************
53
54 // Patch function for missing function in Mesa
55 int finite(
56 double x)
57 {
58 return _finite(x);
59 };
60
61 // ***********************************************************************
62
63 void dglInitGlobals()
64 {
65 // Zero all fields just in case
66 memset(&glb, 0, sizeof(glb));
67
68 // Set the global defaults
69 glb.bPrimary = FALSE; // Not the primary device
70 glb.bHardware = FALSE; // Not a hardware device
71 // glb.bFullscreen = FALSE; // Not running fullscreen
72 glb.bSquareTextures = FALSE; // Device does not need sq
73 glb.bPAL8 = FALSE; // Device cannot do 8bit
74 glb.dwMemoryType = DDSCAPS_SYSTEMMEMORY;
75 glb.dwRendering = DGL_RENDER_D3D;
76
77 glb.bWaitForRetrace = TRUE; // Sync to vertical retrace
78 glb.bFullscreenBlit = FALSE;
79
80 glb.nPixelFormatCount = 0;
81 glb.lpPF = NULL; // Pixel format list
82 #ifndef _USE_GLD3_WGL
83 glb.nZBufferPFCount = 0;
84 glb.lpZBufferPF = NULL;
85 glb.nDisplayModeCount = 0;
86 glb.lpDisplayModes = NULL;
87 glb.nTextureFormatCount = 0;
88 glb.lpTextureFormat = NULL;
89 #endif // _USE_GLD3_WGL
90
91 glb.wMaxSimultaneousTextures = 1;
92
93 // Enable support for multitexture, if available.
94 glb.bMultitexture = TRUE;
95
96 // Enable support for mipmapping
97 glb.bUseMipmaps = TRUE;
98
99 // Alpha emulation via chroma key
100 glb.bEmulateAlphaTest = FALSE;
101
102 // Use Mesa pipeline always (for compatibility)
103 glb.bForceMesaPipeline = FALSE;
104
105 // Init support for multiple GLRCs
106 glb.bDirectDraw = FALSE;
107 glb.bDirectDrawPrimary = FALSE;
108 glb.bDirect3D = FALSE;
109 glb.bDirect3DDevice = FALSE;
110 glb.bDirectDrawStereo = FALSE;
111 glb.iDirectDrawStereo = 0;
112 glb.hWndActive = NULL;
113 // Init DirectX COM interfaces for multiple GLRCs
114 // glb.lpDD4 = NULL;
115 // glb.lpPrimary4 = NULL;
116 // glb.lpBack4 = NULL;
117 // glb.lpDepth4 = NULL;
118 // glb.lpGlobalPalette = NULL;
119
120 // Init special support options
121 glb.bMessageBoxWarnings = TRUE;
122 glb.bDirectDrawPersistant = FALSE;
123 glb.bPersistantBuffers = FALSE;
124
125 // Do not assume single-precision-only FPU (for compatibility)
126 glb.bFastFPU = FALSE;
127
128 // Allow hot-key support
129 glb.bHotKeySupport = TRUE;
130
131 // Default to single-threaded support (for simplicity)
132 glb.bMultiThreaded = FALSE;
133
134 // Use application-specific customizations (for end-user convenience)
135 glb.bAppCustomizations = TRUE;
136
137 #ifdef _USE_GLD3_WGL
138 // Registry/ini-file settings for GLDirect 3.x
139 glb.dwAdapter = 0; // Primary DX8 adapter
140 glb.dwTnL = 1; // MesaSW TnL
141 glb.dwMultisample = 0; // Multisample Off
142 glb.dwDriver = 2; // Direct3D HW
143
144 // Signal a pixelformat list rebuild
145 glb.bPixelformatsDirty = TRUE;
146 #endif
147 }
148
149 // ***********************************************************************