Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:34

0001 // Copyright (c) 2021 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef OpenGl_GlTypes_HeaderFile
0015 #define OpenGl_GlTypes_HeaderFile
0016 
0017 // required for correct APIENTRY definition
0018 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
0019   #define WIN32_LEAN_AND_MEAN
0020   #include <windows.h>
0021 #endif
0022 
0023 #if defined(__APPLE__)
0024   #import <TargetConditionals.h>
0025 #endif
0026 
0027 #ifndef APIENTRY
0028   #define APIENTRY
0029 #endif
0030 #ifndef APIENTRYP
0031   #define APIENTRYP APIENTRY *
0032 #endif
0033 #ifndef GLAPI
0034   #define GLAPI extern
0035 #endif
0036 
0037 #ifndef GL_APICALL
0038   #define GL_APICALL GLAPI
0039 #endif
0040 
0041 // exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion
0042 #ifndef GL_GLEXT_LEGACY
0043   #define GL_GLEXT_LEGACY
0044 #endif
0045 #ifndef GLX_GLXEXT_LEGACY
0046   #define GLX_GLXEXT_LEGACY
0047 #endif
0048 
0049 #include <OpenGl_khrplatform.h>
0050 
0051 typedef khronos_int8_t   GLbyte;
0052 typedef khronos_float_t  GLclampf;
0053 typedef khronos_int32_t  GLfixed;
0054 typedef short            GLshort;
0055 typedef unsigned short   GLushort;
0056 typedef void GLvoid;
0057 typedef struct __GLsync *GLsync;
0058 typedef khronos_int64_t  GLint64;
0059 typedef khronos_uint64_t GLuint64;
0060 typedef unsigned int     GLenum;
0061 typedef unsigned int     GLuint;
0062 typedef char             GLchar;
0063 typedef khronos_float_t  GLfloat;
0064 typedef khronos_ssize_t  GLsizeiptr;
0065 typedef khronos_intptr_t GLintptr;
0066 typedef unsigned int     GLbitfield;
0067 typedef int              GLint;
0068 typedef unsigned char    GLboolean;
0069 typedef int              GLsizei;
0070 typedef khronos_uint8_t  GLubyte;
0071 
0072 typedef double           GLdouble;
0073 typedef double           GLclampd;
0074 
0075 #define GL_NONE                           0
0076 
0077 #define GL_DEPTH_BUFFER_BIT               0x00000100
0078 #define GL_STENCIL_BUFFER_BIT             0x00000400
0079 #define GL_COLOR_BUFFER_BIT               0x00004000
0080 #define GL_FALSE                          0
0081 #define GL_TRUE                           1
0082 #define GL_POINTS                         0x0000
0083 #define GL_LINES                          0x0001
0084 #define GL_LINE_LOOP                      0x0002
0085 #define GL_LINE_STRIP                     0x0003
0086 #define GL_TRIANGLES                      0x0004
0087 #define GL_TRIANGLE_STRIP                 0x0005
0088 #define GL_TRIANGLE_FAN                   0x0006
0089 #define GL_ZERO                           0
0090 #define GL_ONE                            1
0091 #define GL_SRC_COLOR                      0x0300
0092 #define GL_ONE_MINUS_SRC_COLOR            0x0301
0093 #define GL_SRC_ALPHA                      0x0302
0094 #define GL_ONE_MINUS_SRC_ALPHA            0x0303
0095 #define GL_DST_ALPHA                      0x0304
0096 #define GL_ONE_MINUS_DST_ALPHA            0x0305
0097 #define GL_DST_COLOR                      0x0306
0098 #define GL_ONE_MINUS_DST_COLOR            0x0307
0099 #define GL_SRC_ALPHA_SATURATE             0x0308
0100 #define GL_FUNC_ADD                       0x8006
0101 #define GL_BLEND_EQUATION                 0x8009
0102 #define GL_BLEND_EQUATION_RGB             0x8009
0103 #define GL_BLEND_EQUATION_ALPHA           0x883D
0104 #define GL_FUNC_SUBTRACT                  0x800A
0105 #define GL_FUNC_REVERSE_SUBTRACT          0x800B
0106 #define GL_BLEND_DST_RGB                  0x80C8
0107 #define GL_BLEND_SRC_RGB                  0x80C9
0108 #define GL_BLEND_DST_ALPHA                0x80CA
0109 #define GL_BLEND_SRC_ALPHA                0x80CB
0110 #define GL_CONSTANT_COLOR                 0x8001
0111 #define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
0112 #define GL_CONSTANT_ALPHA                 0x8003
0113 #define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
0114 #define GL_BLEND_COLOR                    0x8005
0115 #define GL_ARRAY_BUFFER                   0x8892
0116 #define GL_ELEMENT_ARRAY_BUFFER           0x8893
0117 #define GL_ARRAY_BUFFER_BINDING           0x8894
0118 #define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
0119 #define GL_STREAM_DRAW                    0x88E0
0120 #define GL_STATIC_DRAW                    0x88E4
0121 #define GL_DYNAMIC_DRAW                   0x88E8
0122 #define GL_BUFFER_SIZE                    0x8764
0123 #define GL_BUFFER_USAGE                   0x8765
0124 #define GL_CURRENT_VERTEX_ATTRIB          0x8626
0125 
0126 #define GL_FRONT_LEFT                     0x0400
0127 #define GL_FRONT_RIGHT                    0x0401
0128 #define GL_BACK_LEFT                      0x0402
0129 #define GL_BACK_RIGHT                     0x0403
0130 #define GL_FRONT                          0x0404
0131 #define GL_BACK                           0x0405
0132 #define GL_LEFT                           0x0406
0133 #define GL_RIGHT                          0x0407
0134 #define GL_FRONT_AND_BACK                 0x0408
0135 
0136 #define GL_TEXTURE_2D                     0x0DE1
0137 #define GL_CULL_FACE                      0x0B44
0138 #define GL_BLEND                          0x0BE2
0139 #define GL_DITHER                         0x0BD0
0140 #define GL_STENCIL_TEST                   0x0B90
0141 #define GL_DEPTH_TEST                     0x0B71
0142 #define GL_SCISSOR_TEST                   0x0C11
0143 
0144 #define GL_POLYGON_OFFSET_FACTOR          0x8038
0145 #define GL_POLYGON_OFFSET_UNITS           0x2A00
0146 #define GL_POLYGON_OFFSET_POINT           0x2A01
0147 #define GL_POLYGON_OFFSET_LINE            0x2A02
0148 #define GL_POLYGON_OFFSET_FILL            0x8037
0149 
0150 #define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
0151 #define GL_SAMPLE_COVERAGE                0x80A0
0152 #define GL_NO_ERROR                       0
0153 #define GL_INVALID_ENUM                   0x0500
0154 #define GL_INVALID_VALUE                  0x0501
0155 #define GL_INVALID_OPERATION              0x0502
0156 #define GL_OUT_OF_MEMORY                  0x0505
0157 #define GL_CW                             0x0900
0158 #define GL_CCW                            0x0901
0159 #define GL_LINE_WIDTH                     0x0B21
0160 #define GL_ALIASED_POINT_SIZE_RANGE       0x846D
0161 #define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
0162 #define GL_CULL_FACE_MODE                 0x0B45
0163 #define GL_FRONT_FACE                     0x0B46
0164 #define GL_DEPTH_RANGE                    0x0B70
0165 #define GL_DEPTH_WRITEMASK                0x0B72
0166 #define GL_DEPTH_CLEAR_VALUE              0x0B73
0167 #define GL_DEPTH_FUNC                     0x0B74
0168 #define GL_STENCIL_CLEAR_VALUE            0x0B91
0169 #define GL_STENCIL_FUNC                   0x0B92
0170 #define GL_STENCIL_FAIL                   0x0B94
0171 #define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
0172 #define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
0173 #define GL_STENCIL_REF                    0x0B97
0174 #define GL_STENCIL_VALUE_MASK             0x0B93
0175 #define GL_STENCIL_WRITEMASK              0x0B98
0176 #define GL_STENCIL_BACK_FUNC              0x8800
0177 #define GL_STENCIL_BACK_FAIL              0x8801
0178 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
0179 #define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
0180 #define GL_STENCIL_BACK_REF               0x8CA3
0181 #define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
0182 #define GL_STENCIL_BACK_WRITEMASK         0x8CA5
0183 
0184 #define GL_VIEWPORT                       0x0BA2
0185 #define GL_SCISSOR_BOX                    0x0C10
0186 #define GL_COLOR_CLEAR_VALUE              0x0C22
0187 #define GL_COLOR_WRITEMASK                0x0C23
0188 
0189 #define GL_UNPACK_LSB_FIRST               0x0CF1 // only desktop
0190 #define GL_UNPACK_ROW_LENGTH              0x0CF2
0191 #define GL_UNPACK_SKIP_ROWS               0x0CF3
0192 #define GL_UNPACK_SKIP_PIXELS             0x0CF4
0193 #define GL_UNPACK_ALIGNMENT               0x0CF5
0194 #define GL_PACK_LSB_FIRST                 0x0D01 // only desktop
0195 #define GL_PACK_ROW_LENGTH                0x0D02
0196 #define GL_PACK_SKIP_ROWS                 0x0D03
0197 #define GL_PACK_SKIP_PIXELS               0x0D04
0198 #define GL_PACK_ALIGNMENT                 0x0D05
0199 
0200 #define GL_MAX_TEXTURE_SIZE               0x0D33
0201 #define GL_MAX_VIEWPORT_DIMS              0x0D3A
0202 #define GL_SUBPIXEL_BITS                  0x0D50
0203 #define GL_RED_BITS                       0x0D52
0204 #define GL_GREEN_BITS                     0x0D53
0205 #define GL_BLUE_BITS                      0x0D54
0206 #define GL_ALPHA_BITS                     0x0D55
0207 #define GL_DEPTH_BITS                     0x0D56
0208 #define GL_STENCIL_BITS                   0x0D57
0209 #define GL_POLYGON_OFFSET_UNITS           0x2A00
0210 #define GL_POLYGON_OFFSET_FACTOR          0x8038
0211 #define GL_TEXTURE_BINDING_2D             0x8069
0212 #define GL_SAMPLE_BUFFERS                 0x80A8
0213 #define GL_SAMPLES                        0x80A9
0214 #define GL_SAMPLE_COVERAGE_VALUE          0x80AA
0215 #define GL_SAMPLE_COVERAGE_INVERT         0x80AB
0216 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
0217 #define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
0218 #define GL_DONT_CARE                      0x1100
0219 #define GL_FASTEST                        0x1101
0220 #define GL_NICEST                         0x1102
0221 #define GL_GENERATE_MIPMAP_HINT           0x8192
0222 #define GL_BYTE                           0x1400
0223 #define GL_UNSIGNED_BYTE                  0x1401
0224 #define GL_SHORT                          0x1402
0225 #define GL_UNSIGNED_SHORT                 0x1403
0226 #define GL_INT                            0x1404
0227 #define GL_UNSIGNED_INT                   0x1405
0228 #define GL_FLOAT                          0x1406
0229 #define GL_FIXED                          0x140C
0230 #define GL_DEPTH_COMPONENT                0x1902
0231 #define GL_ALPHA                          0x1906
0232 #define GL_RGB                            0x1907
0233 #define GL_RGBA                           0x1908
0234 #define GL_LUMINANCE                      0x1909
0235 #define GL_LUMINANCE_ALPHA                0x190A
0236 
0237 #define GL_NEVER                          0x0200
0238 #define GL_LESS                           0x0201
0239 #define GL_EQUAL                          0x0202
0240 #define GL_LEQUAL                         0x0203
0241 #define GL_GREATER                        0x0204
0242 #define GL_NOTEQUAL                       0x0205
0243 #define GL_GEQUAL                         0x0206
0244 #define GL_ALWAYS                         0x0207
0245 #define GL_KEEP                           0x1E00
0246 #define GL_REPLACE                        0x1E01
0247 #define GL_INCR                           0x1E02
0248 #define GL_DECR                           0x1E03
0249 #define GL_INVERT                         0x150A
0250 #define GL_INCR_WRAP                      0x8507
0251 #define GL_DECR_WRAP                      0x8508
0252 #define GL_VENDOR                         0x1F00
0253 #define GL_RENDERER                       0x1F01
0254 #define GL_VERSION                        0x1F02
0255 #define GL_EXTENSIONS                     0x1F03
0256 #define GL_NEAREST                        0x2600
0257 #define GL_LINEAR                         0x2601
0258 #define GL_NEAREST_MIPMAP_NEAREST         0x2700
0259 #define GL_LINEAR_MIPMAP_NEAREST          0x2701
0260 #define GL_NEAREST_MIPMAP_LINEAR          0x2702
0261 #define GL_LINEAR_MIPMAP_LINEAR           0x2703
0262 #define GL_TEXTURE_MAG_FILTER             0x2800
0263 #define GL_TEXTURE_MIN_FILTER             0x2801
0264 #define GL_TEXTURE_WRAP_S                 0x2802
0265 #define GL_TEXTURE_WRAP_T                 0x2803
0266 #define GL_TEXTURE                        0x1702
0267 #define GL_TEXTURE_CUBE_MAP               0x8513
0268 #define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
0269 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
0270 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
0271 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
0272 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
0273 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
0274 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
0275 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
0276 #define GL_TEXTURE0                       0x84C0
0277 #define GL_TEXTURE1                       0x84C1
0278 #define GL_TEXTURE2                       0x84C2
0279 #define GL_TEXTURE3                       0x84C3
0280 #define GL_TEXTURE4                       0x84C4
0281 #define GL_TEXTURE5                       0x84C5
0282 #define GL_TEXTURE6                       0x84C6
0283 #define GL_TEXTURE7                       0x84C7
0284 #define GL_TEXTURE8                       0x84C8
0285 #define GL_TEXTURE9                       0x84C9
0286 #define GL_TEXTURE10                      0x84CA
0287 #define GL_TEXTURE11                      0x84CB
0288 #define GL_TEXTURE12                      0x84CC
0289 #define GL_TEXTURE13                      0x84CD
0290 #define GL_TEXTURE14                      0x84CE
0291 #define GL_TEXTURE15                      0x84CF
0292 #define GL_TEXTURE16                      0x84D0
0293 #define GL_TEXTURE17                      0x84D1
0294 #define GL_TEXTURE18                      0x84D2
0295 #define GL_TEXTURE19                      0x84D3
0296 #define GL_TEXTURE20                      0x84D4
0297 #define GL_TEXTURE21                      0x84D5
0298 #define GL_TEXTURE22                      0x84D6
0299 #define GL_TEXTURE23                      0x84D7
0300 #define GL_TEXTURE24                      0x84D8
0301 #define GL_TEXTURE25                      0x84D9
0302 #define GL_TEXTURE26                      0x84DA
0303 #define GL_TEXTURE27                      0x84DB
0304 #define GL_TEXTURE28                      0x84DC
0305 #define GL_TEXTURE29                      0x84DD
0306 #define GL_TEXTURE30                      0x84DE
0307 #define GL_TEXTURE31                      0x84DF
0308 #define GL_ACTIVE_TEXTURE                 0x84E0
0309 #define GL_CLAMP                          0x2900
0310 #define GL_REPEAT                         0x2901
0311 #define GL_CLAMP_TO_EDGE                  0x812F
0312 #define GL_MIRRORED_REPEAT                0x8370
0313 #define GL_FLOAT_VEC2                     0x8B50
0314 #define GL_FLOAT_VEC3                     0x8B51
0315 #define GL_FLOAT_VEC4                     0x8B52
0316 #define GL_INT_VEC2                       0x8B53
0317 #define GL_INT_VEC3                       0x8B54
0318 #define GL_INT_VEC4                       0x8B55
0319 #define GL_BOOL                           0x8B56
0320 #define GL_BOOL_VEC2                      0x8B57
0321 #define GL_BOOL_VEC3                      0x8B58
0322 #define GL_BOOL_VEC4                      0x8B59
0323 #define GL_FLOAT_MAT2                     0x8B5A
0324 #define GL_FLOAT_MAT3                     0x8B5B
0325 #define GL_FLOAT_MAT4                     0x8B5C
0326 #define GL_SAMPLER_2D                     0x8B5E
0327 #define GL_SAMPLER_CUBE                   0x8B60
0328 
0329 #define GL_COLOR                          0x1800
0330 #define GL_DEPTH                          0x1801
0331 #define GL_STENCIL                        0x1802
0332 #define GL_RED                            0x1903
0333 #define GL_RGB8                           0x8051
0334 #define GL_RGBA8                          0x8058
0335 
0336 // only in desktop OpenGL
0337 #define GL_LUMINANCE16  0x8042
0338 
0339 // in core since OpenGL ES 3.0, extension GL_OES_rgb8_rgba8
0340 #define GL_LUMINANCE8   0x8040
0341 // GL_EXT_texture_format_BGRA8888
0342 #define GL_BGRA_EXT     0x80E1 // same as GL_BGRA on desktop
0343 
0344 #define GL_R16          0x822A
0345 #define GL_RGB4         0x804F
0346 #define GL_RGB5         0x8050
0347 #define GL_RGB10        0x8052
0348 #define GL_RGB12        0x8053
0349 #define GL_RGB16        0x8054
0350 #define GL_RGB10_A2     0x8059
0351 #define GL_RGBA12       0x805A
0352 #define GL_RGBA16       0x805B
0353 #define GL_ALPHA8       0x803C
0354 #define GL_ALPHA16      0x803E
0355 #define GL_RG16         0x822C
0356 
0357 #define GL_R16_SNORM    0x8F98
0358 #define GL_RG16_SNORM   0x8F99
0359 #define GL_RGB16_SNORM  0x8F9A
0360 #define GL_RGBA16_SNORM 0x8F9B
0361 
0362 #define GL_RED_SNORM    0x8F90
0363 #define GL_RG_SNORM     0x8F91
0364 #define GL_RGB_SNORM    0x8F92
0365 #define GL_RGBA_SNORM   0x8F93
0366 
0367 #define GL_DRAW_BUFFER                    0x0C01
0368 #define GL_READ_BUFFER                    0x0C02
0369 #define GL_DOUBLEBUFFER                   0x0C32
0370 #define GL_STEREO                         0x0C33
0371 
0372 #define GL_PROXY_TEXTURE_2D               0x8064
0373 #define GL_TEXTURE_WIDTH                  0x1000
0374 #define GL_TEXTURE_HEIGHT                 0x1001
0375 #define GL_TEXTURE_INTERNAL_FORMAT        0x1003
0376 
0377 // OpenGL ES 3.0+ or OES_texture_half_float
0378 #define GL_HALF_FLOAT_OES             0x8D61
0379 
0380 #endif // OpenGl_GlTypes_HeaderFile