1 /****************************************************************************
3 * Mesa 3-D graphics library
4 * Direct3D Driver Interface
6 * ========================================================================
8 * Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
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:
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
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
28 * ======================================================================
31 * Environment: Windows 9x (Win32)
33 * Description: Global variables.
35 ****************************************************************************/
37 #include "dglglobals.h"
39 // =======================================================================
41 // =======================================================================
43 char szCopyright
[] = "Copyright (c) 1998 SciTech Software, Inc.";
44 char szDllName
[] = "Scitech GLDirect";
45 char szErrorTitle
[] = "GLDirect Error";
49 // Shared result variable
52 // ***********************************************************************
54 // Patch function for missing function in Mesa
61 // ***********************************************************************
65 // Zero all fields just in case
66 memset(&glb
, 0, sizeof(glb
));
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
;
77 glb
.bWaitForRetrace
= TRUE
; // Sync to vertical retrace
78 glb
.bFullscreenBlit
= FALSE
;
80 glb
.nPixelFormatCount
= 0;
81 glb
.lpPF
= NULL
; // Pixel format list
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
91 glb
.wMaxSimultaneousTextures
= 1;
93 // Enable support for multitexture, if available.
94 glb
.bMultitexture
= TRUE
;
96 // Enable support for mipmapping
97 glb
.bUseMipmaps
= TRUE
;
99 // Alpha emulation via chroma key
100 glb
.bEmulateAlphaTest
= FALSE
;
102 // Use Mesa pipeline always (for compatibility)
103 glb
.bForceMesaPipeline
= FALSE
;
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
115 // glb.lpPrimary4 = NULL;
116 // glb.lpBack4 = NULL;
117 // glb.lpDepth4 = NULL;
118 // glb.lpGlobalPalette = NULL;
120 // Init special support options
121 glb
.bMessageBoxWarnings
= TRUE
;
122 glb
.bDirectDrawPersistant
= FALSE
;
123 glb
.bPersistantBuffers
= FALSE
;
125 // Do not assume single-precision-only FPU (for compatibility)
126 glb
.bFastFPU
= FALSE
;
128 // Allow hot-key support
129 glb
.bHotKeySupport
= TRUE
;
131 // Default to single-threaded support (for simplicity)
132 glb
.bMultiThreaded
= FALSE
;
134 // Use application-specific customizations (for end-user convenience)
135 glb
.bAppCustomizations
= TRUE
;
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
144 // Signal a pixelformat list rebuild
145 glb
.bPixelformatsDirty
= TRUE
;
149 // ***********************************************************************