Browse Source

egl: assorted fixes for Windows

Note that int32_t is typedef'd both in p_compiler.h and eglplatform.h
tags/mesa_20090313
Jonathan White 17 years ago
parent
commit
fe1a2d1fff
4 changed files with 21 additions and 4 deletions
  1. 1
    0
      SConstruct
  2. 18
    2
      include/EGL/eglplatform.h
  3. 0
    2
      include/GLES/glplatform.h
  4. 2
    0
      src/gallium/include/pipe/p_compiler.h

+ 1
- 0
SConstruct 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))

+ 18
- 2
include/EGL/eglplatform.h 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;

+ 0
- 2
include/GLES/glplatform.h 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

+ 2
- 0
src/gallium/include/pipe/p_compiler.h 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;

Loading…
Cancel
Save