egl: assorted fixes for Windows

Note that int32_t is typedef'd both in p_compiler.h and eglplatform.h
This commit is contained in:
Jonathan White 2008-06-05 15:07:03 -06:00 committed by Brian Paul
parent b11aad2abe
commit fe1a2d1fff
4 changed files with 21 additions and 4 deletions

View File

@ -52,6 +52,7 @@ opts.Add(ListOption('winsys', 'winsys drivers to build', default_winsys,
['xlib', 'intel', 'gdi']))
env = Environment(
MSVS_VERSION = '7.1',
options = opts,
ENV = os.environ)
Help(opts.GenerateHelpText(env))

View File

@ -6,8 +6,10 @@
#define __eglplatform_h_
/* Windows calling convention boilerplate */
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
#define WIN32_LEAN_AND_MEAN 1
#if (defined(WIN32) || defined(_WIN32_WCE))
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#endif
#include <windows.h>
#endif
@ -47,6 +49,18 @@
etc.
*/
#if (defined(WIN32) || defined(_WIN32_WCE))
/** BEGIN Added for Windows **/
typedef long int32_t;
typedef HDC NativeDisplayType;
typedef HWND NativeWindowType;
typedef HBITMAP NativePixmapType;
/** END Added for Windows **/
#elif defined(__gnu_linux__)
/** BEGIN Added for X (Mesa) **/
#include <X11/Xlib.h>
typedef Display *NativeDisplayType;
@ -54,6 +68,8 @@ typedef Window NativeWindowType;
typedef Pixmap NativePixmapType;
/** END Added for X (Mesa) **/
#endif
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
typedef NativeDisplayType EGLNativeDisplayType;
typedef NativePixmapType EGLNativePixmapType;

View File

@ -45,9 +45,7 @@ extern "C" {
* Definition of GL_API and GL_APIENTRY
*-----------------------------------------------------------------------*/
#if defined(AEE_SIMULATOR)
#define __GL_EXPORTS
#endif
#ifdef _WIN32
# ifdef __GL_EXPORTS

View File

@ -58,7 +58,9 @@ typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
#ifndef __eglplatform_h_
typedef __int32 int32_t;
#endif
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;