RavEngine
Loading...
Searching...
No Matches
PxWindowsInclude.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef PX_WINDOWS_INCLUDE_H
30#define PX_WINDOWS_INCLUDE_H
31
32#ifndef _WIN32
33#error "This file should only be included by Windows builds!!"
34#endif
35
36#ifdef _WINDOWS_ // windows already included
37#error "Only include windows.h through this file!!"
38#endif
39
40// We only support >= Windows XP, and we need this for critical section and
41// Setting this hides some important APIs (e.g. LoadPackagedLibrary), so don't do it
42#define _WIN32_WINNT 0x0501
43
44// turn off as much as we can for windows. All we really need is the thread functions(critical sections/Interlocked*
45// etc)
46#define NOGDICAPMASKS
47#define NOVIRTUALKEYCODES
48#define NOWINMESSAGES
49#define NOWINSTYLES
50#define NOSYSMETRICS
51#define NOMENUS
52#define NOICONS
53#define NOKEYSTATES
54#define NOSYSCOMMANDS
55#define NORASTEROPS
56#define NOSHOWWINDOW
57#define NOATOM
58#define NOCLIPBOARD
59#define NOCOLOR
60#define NOCTLMGR
61#define NODRAWTEXT
62#define NOGDI
63#define NOMB
64#define NOMEMMGR
65#define NOMETAFILE
66#define NOMINMAX
67#define NOOPENFILE
68#define NOSCROLL
69#define NOSERVICE
70#define NOSOUND
71#define NOTEXTMETRIC
72#define NOWH
73#define NOWINOFFSETS
74#define NOCOMM
75#define NOKANJI
76#define NOHELP
77#define NOPROFILER
78#define NODEFERWINDOWPOS
79#define NOMCX
80#define WIN32_LEAN_AND_MEAN
81// We need a slightly wider API surface for e.g. MultiByteToWideChar
82#define NOUSER
83#define NONLS
84#define NOMSG
85
86#pragma warning(push)
87#pragma warning(disable : 4668) //'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives'
88#include <windows.h>
89#pragma warning(pop)
90
91#if PX_SSE2
92#include <xmmintrin.h>
93#endif
94
95#endif
96