Subversion Repositories shark

Rev

Rev 55 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
55 pj 1
/* $Id: gluP.h,v 1.1 2003-02-28 11:42:07 pj Exp $ */
2
 
3
/*
4
 * Mesa 3-D graphics library
5
 * Version:  3.3
6
 * Copyright (C) 1995-2000  Brian Paul
7
 *
8
 * This library is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU Library General Public
10
 * License as published by the Free Software Foundation; either
11
 * version 2 of the License, or (at your option) any later version.
12
 *
13
 * This library is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 * Library General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Library General Public
19
 * License along with this library; if not, write to the Free
20
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
 */
22
 
23
 
24
/*
25
 * This file allows the GLU code to be compiled either with the Mesa
26
 * headers or with the real OpenGL headers.
27
 */
28
 
29
 
30
#ifndef GLUP_H
31
#define GLUP_H
32
 
33
 
34
#include <GL/gl.h>
35
#include <GL/glu.h>
36
#include <string.h>
37
#include <kernel/mem.h> //SHARK
38
#include <stdlib.h>
39
 
40
#if defined(_WIN32) && !defined(__WIN32__)
41
#       define __WIN32__
42
#endif
43
 
44
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
45
#  pragma warning( disable : 4068 ) /* unknown pragma */
46
#  pragma warning( disable : 4710 ) /* function 'foo' not inlined */
47
#  pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
48
#  pragma warning( disable : 4127 ) /* conditional expression is constant */
49
#  if defined(MESA_MINWARN)
50
#    pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
51
#    pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
52
#    pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
53
#    pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
54
#    pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
55
#  endif
56
#  if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
57
#    define GLAPI __declspec(dllexport)
58
#    define WGLAPI __declspec(dllexport)
59
#  elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
60
#    define GLAPI __declspec(dllimport)
61
#    define WGLAPI __declspec(dllimport)
62
#  else /* for use with static link lib build of Win32 edition only */
63
#    define GLAPI extern
64
#    define WGLAPI __declspec(dllimport)
65
#  endif /* _STATIC_MESA support */
66
#  define GLAPIENTRY __stdcall
67
#  define GLAPIENTRYP __stdcall *
68
#  define GLCALLBACK __stdcall
69
#  define GLCALLBACKP __stdcall *
70
#  if defined(__CYGWIN__)
71
#    define GLCALLBACKPCAST *
72
#  else
73
#    define GLCALLBACKPCAST __stdcall *
74
#  endif
75
#  define GLWINAPI __stdcall
76
#  define GLWINAPIV __cdecl
77
#else
78
/* non-Windows compilation */
79
#  define GLAPI extern
80
#  define GLAPIENTRY
81
#  define GLAPIENTRYP *
82
#  define GLCALLBACK
83
#  define GLCALLBACKP *
84
#  define GLCALLBACKPCAST *
85
#  define GLWINAPI
86
#  define GLWINAPIV
87
#endif /* WIN32 / CYGWIN bracket */
88
 
89
/* compatability guard so we don't need to change client code */
90
 
91
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
92
#       define CALLBACK GLCALLBACK
93
typedef int (GLAPIENTRY *PROC)();
94
typedef void *HGLRC;
95
typedef void *HDC;
96
typedef unsigned long COLORREF;
97
#endif
98
 
99
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
100
#       define WGL_FONT_LINES      0
101
#       define WGL_FONT_POLYGONS   1
102
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
103
#       ifdef UNICODE
104
#               define wglUseFontBitmaps  wglUseFontBitmapsW
105
#               define wglUseFontOutlines  wglUseFontOutlinesW
106
#       else
107
#               define wglUseFontBitmaps  wglUseFontBitmapsA
108
#               define wglUseFontOutlines  wglUseFontOutlinesA
109
#       endif /* !UNICODE */
110
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
111
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
112
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
113
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
114
#include <gl/mesa_wgl.h>
115
#endif
116
 
117
 
118
 
119
#ifndef GLU_TESS_ERROR9
120
   /* If we're using the real OpenGL header files... */
121
#  define GLU_TESS_ERROR9       100159
122
#endif
123
 
124
 
125
#define GLU_NO_ERROR            GL_NO_ERROR
126
 
127
 
128
/* for Sun: */
129
#ifdef SUNOS4
130
#define MEMCPY( DST, SRC, BYTES) \
131
        memcpy( (char *) (DST), (char *) (SRC), (int) (BYTES) )
132
#else
133
#define MEMCPY( DST, SRC, BYTES) \
134
        memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) )
135
#endif
136
 
137
 
138
#ifndef NULL
139
#  define NULL 0
140
#endif
141
 
142
 
143
#endif