@@ -63,37 +63,37 @@ import Data.Int
63
63
import Data.Word
64
64
import Foreign.C.Types
65
65
import Foreign.Ptr
66
+ import Numeric.Fixed
66
67
import Numeric.Half
67
68
68
69
--------------------------------------------------------------------------------
69
70
70
71
-- | 8bit boolean.
71
- type GLboolean = CUChar
72
+ type GLboolean = Word8
72
73
73
74
-- | 8bit signed two\'s complement binary integer.
74
- type GLbyte = CSChar
75
+ type GLbyte = Int8
75
76
76
77
-- | 8bit unsigned binary integer.
77
- type GLubyte = CUChar
78
+ type GLubyte = Word8
78
79
79
80
-- | 8bit characters making up strings.
80
81
type GLchar = CChar
81
82
82
83
-- | 16bit signed two\'s complement binary integer.
83
- type GLshort = CShort
84
+ type GLshort = Int16
84
85
85
86
-- | 16bit unsigned binary integer.
86
- type GLushort = CUShort
87
+ type GLushort = Word16
87
88
88
89
-- | 32bit signed two\'s complement binary integer.
89
- type GLint = CInt
90
+ type GLint = Int32
90
91
91
92
-- | 32bit unsigned binary integer.
92
- type GLuint = CUInt
93
+ type GLuint = Word32
93
94
94
95
-- | 32bit signed two\'s complement 16.16 scaled integer.
95
- type GLfixed = CInt
96
- -- NOTE: OpenGL ES uses khronos_int32_t for this.
96
+ type GLfixed = Fixed
97
97
98
98
-- | 64bit signed two\'s complement binary integer.
99
99
type GLint64 = Int64
@@ -102,10 +102,10 @@ type GLint64 = Int64
102
102
type GLuint64 = Word64
103
103
104
104
-- | 32bit non-negative binary integer size.
105
- type GLsizei = CInt
105
+ type GLsizei = Int32
106
106
107
107
-- | 32bit enumerated binary integer value.
108
- type GLenum = CUInt
108
+ type GLenum = Word32
109
109
110
110
-- | Pointer-sized signed two\'s complement binary integer.
111
111
type GLintptr = CPtrdiff
@@ -119,22 +119,22 @@ type GLsizeiptr = CPtrdiff
119
119
type GLsync = Ptr ()
120
120
121
121
-- | 32bit bit field.
122
- type GLbitfield = CUInt
122
+ type GLbitfield = Word32
123
123
124
124
-- | 16bit half-precision floating-point value encoded in an unsigned scalar.
125
125
type GLhalf = Half
126
126
127
127
-- | 32bit floating-point value.
128
- type GLfloat = CFloat
128
+ type GLfloat = Float
129
129
130
130
-- | 32bit floating-point value clamped to [0, 1].
131
- type GLclampf = CFloat
131
+ type GLclampf = Float
132
132
133
133
-- | 64bit floating-point value.
134
- type GLdouble = CDouble
134
+ type GLdouble = Double
135
135
136
136
-- | 64bit floating-point value clamped to [0, 1].
137
- type GLclampd = CDouble
137
+ type GLclampd = Double
138
138
139
139
-- | A pointer to a debug callback.
140
140
type GLDEBUGPROC = FunPtr GLDEBUGPROCFunc
@@ -203,13 +203,12 @@ type GLDEBUGPROCKHRFunc = GLDEBUGPROCFunc
203
203
makeGLDEBUGPROCKHR :: GLDEBUGPROCKHRFunc -> IO (FunPtr GLDEBUGPROCKHRFunc )
204
204
makeGLDEBUGPROCKHR = makeGLDEBUGPROC
205
205
206
- type GLclampx = CInt
207
- -- NOTE: OpenGL ES uses khronos_int32_t for this.
206
+ type GLclampx = Fixed
208
207
209
208
#if HANDLE_IS_POINTER
210
209
type GLhandleARB = Ptr ()
211
210
#else
212
- type GLhandleARB = CUInt
211
+ type GLhandleARB = Word32
213
212
#endif
214
213
215
214
type GLvdpauSurfaceNV = GLintptr
0 commit comments