Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendglglobals.h
Go to the documentation of this file.
00001 /**************************************************************************** 00002 * 00003 * Mesa 3-D graphics library 00004 * Direct3D Driver Interface 00005 * 00006 * ======================================================================== 00007 * 00008 * Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved. 00009 * 00010 * Permission is hereby granted, free of charge, to any person obtaining a 00011 * copy of this software and associated documentation files (the "Software"), 00012 * to deal in the Software without restriction, including without limitation 00013 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00014 * and/or sell copies of the Software, and to permit persons to whom the 00015 * Software is furnished to do so, subject to the following conditions: 00016 * 00017 * The above copyright notice and this permission notice shall be included 00018 * in all copies or substantial portions of the Software. 00019 * 00020 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00021 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00022 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00023 * SCITECH SOFTWARE INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00024 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 00025 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00026 * SOFTWARE. 00027 * 00028 * ====================================================================== 00029 * 00030 * Language: ANSI C 00031 * Environment: Windows 9x (Win32) 00032 * 00033 * Description: Globals. 00034 * 00035 ****************************************************************************/ 00036 00037 #ifndef __DGLGLOBALS_H 00038 #define __DGLGLOBALS_H 00039 00040 #include "dglcontext.h" 00041 #include "dglpf.h" // Pixel format 00042 #ifndef _USE_GLD3_WGL 00043 #include "d3dtexture.h" 00044 #endif 00045 00046 /*---------------------- Macros and type definitions ----------------------*/ 00047 00048 typedef enum { 00049 DGL_RENDER_MESASW = 0, 00050 DGL_RENDER_D3D = 1, 00051 DGL_RENDER_FORCE_DWORD = 0x7ffffff, 00052 } DGL_renderType; 00053 00054 #ifdef _USE_GLD3_WGL 00055 00056 // Same as DGL_renderType? KeithH 00057 typedef enum { 00058 GLDS_DRIVER_MESA_SW = 0, // Mesa SW rendering 00059 GLDS_DRIVER_REF = 1, // Direct3D Reference Rasteriser 00060 GLDS_DRIVER_HAL = 2, // Direct3D HW rendering 00061 } GLDS_DRIVER; 00062 00063 typedef enum { 00064 GLDS_TNL_DEFAULT = 0, // Choose best TnL method 00065 GLDS_TNL_MESA = 1, // Mesa TnL 00066 GLDS_TNL_D3DSW = 2, // D3D Software TnL 00067 GLDS_TNL_D3DHW = 3, // D3D Hardware TnL 00068 } GLDS_TNL; 00069 00070 typedef enum { 00071 GLDS_MULTISAMPLE_NONE = 0, 00072 GLDS_MULTISAMPLE_FASTEST = 1, 00073 GLDS_MULTISAMPLE_NICEST = 2, 00074 } GLDS_MULTISAMPLE; 00075 #endif 00076 00077 typedef struct { 00078 // Registry settings 00079 char szDDName[MAX_DDDEVICEID_STRING]; // DirectDraw device name 00080 char szD3DName[MAX_DDDEVICEID_STRING]; // Direct3D driver name 00081 BOOL bPrimary; // Is ddraw device the Primary device? 00082 BOOL bHardware; // Is the d3d driver a Hardware driver? 00083 #ifndef _USE_GLD3_WGL 00084 GUID ddGuid; // GUID of the ddraw device 00085 GUID d3dGuid; // GUID of the direct3d driver 00086 #endif // _USE_GLD3_WGL 00087 // BOOL bFullscreen; // Force fullscreen - only useful for primary adaptors. 00088 BOOL bSquareTextures; // Does this driver require square textures? 00089 DWORD dwRendering; // Type of rendering required 00090 00091 BOOL bWaitForRetrace; // Sync to vertical retrace 00092 BOOL bFullscreenBlit; // Use Blt instead of Flip in fullscreen modes 00093 00094 // Multitexture 00095 BOOL bMultitexture; 00096 00097 BOOL bUseMipmaps; 00098 00099 DWORD dwMemoryType; // Sysmem or Vidmem 00100 00101 // Global palette 00102 BOOL bPAL8; 00103 DDPIXELFORMAT ddpfPAL8; 00104 00105 // Multitexture 00106 WORD wMaxSimultaneousTextures; 00107 00108 // Win32 internals 00109 BOOL bAppActive; // Keep track of Alt-Tab 00110 LONG lpfnWndProc; // WndProc of calling app 00111 00112 // Pixel Format Descriptior list. 00113 int nPixelFormatCount; 00114 DGL_pixelFormat *lpPF; 00115 #ifndef _USE_GLD3_WGL 00116 // ZBuffer pixel formats 00117 int nZBufferPFCount; // Count of Zbuffer pixel formats 00118 DDPIXELFORMAT *lpZBufferPF; // ZBuffer pixel formats 00119 00120 // Display modes (for secondary devices) 00121 int nDisplayModeCount; 00122 DDSURFACEDESC2 *lpDisplayModes; 00123 00124 // Texture pixel formats 00125 int nTextureFormatCount; 00126 DGL_textureFormat *lpTextureFormat; 00127 #endif // _USE_GLD3_WGL 00128 // Alpha emulation via chroma key 00129 BOOL bEmulateAlphaTest; 00130 00131 // Geom pipeline override. 00132 // If this is set TRUE then the D3D pipeline will never be used, 00133 // and the Mesa pipline will always be used. 00134 BOOL bForceMesaPipeline; 00135 00136 #ifdef _USE_GLD3_WGL 00137 BOOL bPixelformatsDirty; // Signal a list rebuild 00138 #endif 00139 00140 // Additional globals to support multiple GL rendering contexts, GLRCs 00141 BOOL bDirectDraw; // DirectDraw interface exists ? 00142 BOOL bDirectDrawPrimary; // DirectDraw primary surface exists ? 00143 BOOL bDirect3D; // Direct3D interface exists ? 00144 BOOL bDirect3DDevice; // Direct3D device exists ? 00145 00146 BOOL bDirectDrawStereo; // DirectDraw Stereo driver started ? 00147 int iDirectDrawStereo; // DirectDraw Stereo driver reference count 00148 HWND hWndActive; // copy of active window 00149 00150 // Copies of DirectX COM interfaces for re-referencing across multiple GLRCs 00151 // IDirectDraw4 *lpDD4; // copy of DirectDraw interface 00152 // IDirectDrawSurface4 *lpPrimary4; // copy of DirectDraw primary surface 00153 // IDirectDrawSurface4 *lpBack4; 00154 // IDirectDrawSurface4 *lpDepth4; 00155 // IDirectDrawPalette *lpGlobalPalette; 00156 00157 // Aids for heavy-duty MFC-windowed OGL apps, like AutoCAD 00158 BOOL bMessageBoxWarnings; // popup message box warning 00159 BOOL bDirectDrawPersistant; // DirectDraw is persisitant 00160 BOOL bPersistantBuffers; // DirectDraw buffers persisitant 00161 00162 // FPU setup option for CAD precision (AutoCAD) vs GAME speed (Quake) 00163 BOOL bFastFPU; // single-precision-only FPU ? 00164 00165 // Hot-Key support, like for real-time stereo parallax adjustments 00166 BOOL bHotKeySupport; // hot-key support ? 00167 00168 // Multi-threaded support, for apps like 3DStudio 00169 BOOL bMultiThreaded; // multi-threaded ? 00170 00171 // Detect and use app-specific customizations for apps like 3DStudio 00172 BOOL bAppCustomizations; // app customizations ? 00173 00174 #ifdef _USE_GLD3_WGL 00175 DWORD dwAdapter; // Primary DX8 adapter 00176 DWORD dwTnL; // MesaSW TnL 00177 DWORD dwMultisample; // Multisample Off 00178 DWORD dwDriver; // Direct3D HW 00179 void *pDrvPrivate; // Driver-specific data 00180 #endif 00181 00182 } DGL_globals; 00183 00184 /*------------------------- Function Prototypes ---------------------------*/ 00185 00186 #ifdef __cplusplus 00187 extern "C" { 00188 #endif 00189 00190 DGL_globals glb; 00191 00192 void dglInitGlobals(); 00193 00194 #ifdef __cplusplus 00195 } 00196 #endif 00197 00198 #endif Generated on Sun May 27 2012 04:19:58 for ReactOS by
1.7.6.1
|