ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

dglglobals.c
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:  Global variables.
00034 *
00035 ****************************************************************************/
00036 
00037 #include "dglglobals.h"
00038 
00039 // =======================================================================
00040 // Global Variables
00041 // =======================================================================
00042 
00043 char szCopyright[]  = "Copyright (c) 1998 SciTech Software, Inc.";
00044 char szDllName[]    = "Scitech GLDirect";
00045 char szErrorTitle[] = "GLDirect Error";
00046 
00047 DGL_globals glb;
00048 
00049 // Shared result variable
00050 HRESULT hResult;
00051 
00052 // ***********************************************************************
00053 
00054 // Patch function for missing function in Mesa
00055 int finite(
00056     double x)
00057 {
00058     return _finite(x);
00059 };
00060 
00061 // ***********************************************************************
00062 
00063 void dglInitGlobals()
00064 {
00065     // Zero all fields just in case
00066     memset(&glb, 0, sizeof(glb));
00067 
00068     // Set the global defaults
00069     glb.bPrimary            = FALSE;        // Not the primary device
00070     glb.bHardware           = FALSE;        // Not a hardware device
00071 //  glb.bFullscreen         = FALSE;        // Not running fullscreen
00072     glb.bSquareTextures     = FALSE;        // Device does not need sq
00073     glb.bPAL8               = FALSE;        // Device cannot do 8bit
00074     glb.dwMemoryType        = DDSCAPS_SYSTEMMEMORY;
00075     glb.dwRendering         = DGL_RENDER_D3D;
00076 
00077     glb.bWaitForRetrace     = TRUE;         // Sync to vertical retrace
00078     glb.bFullscreenBlit     = FALSE;
00079 
00080     glb.nPixelFormatCount   = 0;
00081     glb.lpPF                = NULL;         // Pixel format list
00082 #ifndef _USE_GLD3_WGL
00083     glb.nZBufferPFCount     = 0;
00084     glb.lpZBufferPF         = NULL;
00085     glb.nDisplayModeCount   = 0;
00086     glb.lpDisplayModes      = NULL;
00087     glb.nTextureFormatCount = 0;
00088     glb.lpTextureFormat     = NULL;
00089 #endif // _USE_GLD3_WGL
00090 
00091     glb.wMaxSimultaneousTextures = 1;
00092 
00093     // Enable support for multitexture, if available.
00094     glb.bMultitexture       = TRUE;
00095 
00096     // Enable support for mipmapping
00097     glb.bUseMipmaps         = TRUE;
00098 
00099     // Alpha emulation via chroma key
00100     glb.bEmulateAlphaTest   = FALSE;
00101 
00102     // Use Mesa pipeline always (for compatibility)
00103     glb.bForceMesaPipeline  = FALSE;
00104 
00105     // Init support for multiple GLRCs
00106     glb.bDirectDraw         = FALSE;
00107     glb.bDirectDrawPrimary  = FALSE;
00108     glb.bDirect3D           = FALSE;
00109     glb.bDirect3DDevice     = FALSE;
00110     glb.bDirectDrawStereo   = FALSE;
00111     glb.iDirectDrawStereo   = 0;
00112     glb.hWndActive          = NULL;
00113     // Init DirectX COM interfaces for multiple GLRCs
00114 //  glb.lpDD4               = NULL;
00115 //  glb.lpPrimary4          = NULL;
00116 //  glb.lpBack4             = NULL;
00117 //  glb.lpDepth4            = NULL;
00118 //  glb.lpGlobalPalette     = NULL;
00119 
00120     // Init special support options
00121     glb.bMessageBoxWarnings = TRUE;
00122     glb.bDirectDrawPersistant = FALSE;
00123     glb.bPersistantBuffers  = FALSE;
00124 
00125     // Do not assume single-precision-only FPU (for compatibility)
00126     glb.bFastFPU            = FALSE;
00127 
00128     // Allow hot-key support
00129     glb.bHotKeySupport      = TRUE;
00130 
00131     // Default to single-threaded support (for simplicity)
00132     glb.bMultiThreaded      = FALSE;
00133 
00134     // Use application-specific customizations (for end-user convenience)
00135     glb.bAppCustomizations  = TRUE;
00136 
00137 #ifdef _USE_GLD3_WGL
00138     // Registry/ini-file settings for GLDirect 3.x
00139     glb.dwAdapter               = 0;    // Primary DX8 adapter
00140     glb.dwTnL                   = 1;    // MesaSW TnL
00141     glb.dwMultisample           = 0;    // Multisample Off
00142     glb.dwDriver                = 2;    // Direct3D HW
00143 
00144     // Signal a pixelformat list rebuild
00145     glb.bPixelformatsDirty      = TRUE;
00146 #endif
00147 }
00148 
00149 // ***********************************************************************

Generated on Sun May 27 2012 04:19:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.