1 
2 //          Copyright 2018 - 2021 Michael D. Parker
3 // Distributed under the Boost Software License, Version 1.0.
4 //    (See accompanying file LICENSE_1_0.txt or copy at
5 //          http://www.boost.org/LICENSE_1_0.txt)
6 
7 module bindbc.opengl.bind.dep.dep14;
8 
9 import bindbc.loader;
10 import bindbc.opengl.context;
11 import bindbc.opengl.bind.types;
12 
13 version(GL_AllowDeprecated) {
14     enum : uint  {
15         GL_POINT_SIZE_MIN                 = 0x8126,
16         GL_POINT_SIZE_MAX                 = 0x8127,
17         GL_POINT_DISTANCE_ATTENUATION     = 0x8129,
18         GL_GENERATE_MIPMAP                = 0x8191,
19         GL_GENERATE_MIPMAP_HINT           = 0x8192,
20         GL_FOG_COORDINATE_SOURCE          = 0x8450,
21         GL_FOG_COORDINATE                 = 0x8451,
22         GL_FRAGMENT_DEPTH                 = 0x8452,
23         GL_CURRENT_FOG_COORDINATE         = 0x8453,
24         GL_FOG_COORDINATE_ARRAY_TYPE      = 0x8454,
25         GL_FOG_COORDINATE_ARRAY_STRIDE    = 0x8455,
26         GL_FOG_COORDINATE_ARRAY_POINTER   = 0x8456,
27         GL_FOG_COORDINATE_ARRAY           = 0x8457,
28         GL_COLOR_SUM                      = 0x8458,
29         GL_CURRENT_SECONDARY_COLOR        = 0x8459,
30         GL_SECONDARY_COLOR_ARRAY_SIZE     = 0x845A,
31         GL_SECONDARY_COLOR_ARRAY_TYPE     = 0x845B,
32         GL_SECONDARY_COLOR_ARRAY_STRIDE   = 0x845C,
33         GL_SECONDARY_COLOR_ARRAY_POINTER  = 0x845D,
34         GL_SECONDARY_COLOR_ARRAY          = 0x845E,
35         GL_TEXTURE_FILTER_CONTROL         = 0x8500,
36         GL_DEPTH_TEXTURE_MODE             = 0x884B,
37         GL_COMPARE_R_TO_TEXTURE           = 0x884E,
38     }
39 
40     extern(System) @nogc nothrow {
41         alias pglFogCoordf = void function(GLfloat);
42         alias pglFogCoordfv = void function(const(GLfloat)*);
43         alias pglFogCoordd = void function(GLdouble);
44         alias pglFogCoorddv = void function(const(GLdouble)*);
45         alias pglFogCoordPointer = void function(GLenum, GLsizei,const(void)*);
46         alias pglSecondaryColor3b = void function(GLbyte, GLbyte, GLbyte);
47         alias pglSecondaryColor3bv = void function(const(GLbyte)*);
48         alias pglSecondaryColor3d = void function(GLdouble, GLdouble, GLdouble);
49         alias pglSecondaryColor3dv = void function(const(GLdouble)*);
50         alias pglSecondaryColor3f = void function(GLfloat, GLfloat, GLfloat);
51         alias pglSecondaryColor3fv = void function(const(GLfloat)*);
52         alias pglSecondaryColor3i = void function(GLint, GLint, GLint);
53         alias pglSecondaryColor3iv = void function(const(GLint)*);
54         alias pglSecondaryColor3s = void function(GLshort, GLshort, GLshort);
55         alias pglSecondaryColor3sv = void function(const(GLshort)*);
56         alias pglSecondaryColor3ub = void function(GLubyte, GLubyte, GLubyte);
57         alias pglSecondaryColor3ubv = void function(const(GLubyte)*);
58         alias pglSecondaryColor3ui = void function(GLuint, GLuint, GLuint);
59         alias pglSecondaryColor3uiv = void function(const(GLuint)*);
60         alias pglSecondaryColor3us = void function(GLushort, GLushort, GLushort);
61         alias pglSecondaryColor3usv = void function(const(GLushort)*);
62         alias pglSecondaryColorPointer = void function(GLint, GLenum, GLsizei, void*);
63         alias pglWindowPos2d = void function(GLdouble, GLdouble);
64         alias pglWindowPos2dv = void function(const(GLdouble)*);
65         alias pglWindowPos2f = void function(GLfloat, GLfloat);
66         alias pglWindowPos2fv = void function(const(GLfloat)*);
67         alias pglWindowPos2i = void function(GLint, GLint);
68         alias pglWindowPos2iv = void function(const(GLint)*);
69         alias pglWindowPos2s = void function(GLshort, GLshort);
70         alias pglWindowPos2sv = void function(const(GLshort)*);
71         alias pglWindowPos3d = void function(GLdouble, GLdouble, GLdouble);
72         alias pglWindowPos3dv = void function(const(GLdouble)*);
73         alias pglWindowPos3f = void function(GLfloat, GLfloat, GLfloat);
74         alias pglWindowPos3fv = void function(const(GLfloat)*);
75         alias pglWindowPos3i = void function(GLint, GLint, GLint);
76         alias pglWindowPos3iv = void function(const(GLint)*);
77         alias pglWindowPos3s = void function(GLshort, GLshort, GLshort);
78         alias pglWindowPos3sv = void function(const(GLshort)*);
79     }
80 
81     __gshared {
82         pglFogCoordf glFogCoordf;
83         pglFogCoordfv glFogCoordfv;
84         pglFogCoordd glFogCoordd;
85         pglFogCoorddv glFogCoorddv;
86         pglFogCoordPointer glFogCoordPointer;
87         pglSecondaryColor3b glSecondaryColor3b;
88         pglSecondaryColor3bv glSecondaryColor3bv;
89         pglSecondaryColor3d glSecondaryColor3d;
90         pglSecondaryColor3dv glSecondaryColor3dv;
91         pglSecondaryColor3f glSecondaryColor3f;
92         pglSecondaryColor3fv glSecondaryColor3fv;
93         pglSecondaryColor3i glSecondaryColor3i;
94         pglSecondaryColor3iv glSecondaryColor3iv;
95         pglSecondaryColor3s glSecondaryColor3s;
96         pglSecondaryColor3sv glSecondaryColor3sv;
97         pglSecondaryColor3ub glSecondaryColor3ub;
98         pglSecondaryColor3ubv glSecondaryColor3ubv;
99         pglSecondaryColor3ui glSecondaryColor3ui;
100         pglSecondaryColor3uiv glSecondaryColor3uiv;
101         pglSecondaryColor3us glSecondaryColor3us;
102         pglSecondaryColor3usv glSecondaryColor3usv;
103         pglSecondaryColorPointer glSecondaryColorPointer;
104         pglWindowPos2d glWindowPos2d;
105         pglWindowPos2dv glWindowPos2dv;
106         pglWindowPos2f glWindowPos2f;
107         pglWindowPos2fv glWindowPos2fv;
108         pglWindowPos2i glWindowPos2i;
109         pglWindowPos2iv glWindowPos2iv;
110         pglWindowPos2s glWindowPos2s;
111         pglWindowPos2sv glWindowPos2sv;
112         pglWindowPos3d glWindowPos3d;
113         pglWindowPos3dv glWindowPos3dv;
114         pglWindowPos3f glWindowPos3f;
115         pglWindowPos3fv glWindowPos3fv;
116         pglWindowPos3i glWindowPos3i;
117         pglWindowPos3iv glWindowPos3iv;
118         pglWindowPos3s glWindowPos3s;
119         pglWindowPos3sv glWindowPos3sv;
120     }
121 
122     package(bindbc.opengl.bind) @nogc nothrow
123     bool loadDeprecatedGL14(SharedLib lib)
124     {
125         lib.bindGLSymbol(cast(void**)&glFogCoordf, "glFogCoordf");
126         lib.bindGLSymbol(cast(void**)&glFogCoordfv, "glFogCoordfv");
127         lib.bindGLSymbol(cast(void**)&glFogCoordd, "glFogCoordd");
128         lib.bindGLSymbol(cast(void**)&glFogCoorddv, "glFogCoorddv");
129         lib.bindGLSymbol(cast(void**)&glFogCoordPointer, "glFogCoordPointer");
130         lib.bindGLSymbol(cast(void**)&glSecondaryColor3b, "glSecondaryColor3b");
131         lib.bindGLSymbol(cast(void**)&glSecondaryColor3bv, "glSecondaryColor3bv");
132         lib.bindGLSymbol(cast(void**)&glSecondaryColor3d, "glSecondaryColor3d");
133         lib.bindGLSymbol(cast(void**)&glSecondaryColor3dv, "glSecondaryColor3dv");
134         lib.bindGLSymbol(cast(void**)&glSecondaryColor3f, "glSecondaryColor3f");
135         lib.bindGLSymbol(cast(void**)&glSecondaryColor3fv, "glSecondaryColor3fv");
136         lib.bindGLSymbol(cast(void**)&glSecondaryColor3i, "glSecondaryColor3i");
137         lib.bindGLSymbol(cast(void**)&glSecondaryColor3iv, "glSecondaryColor3iv");
138         lib.bindGLSymbol(cast(void**)&glSecondaryColor3s, "glSecondaryColor3s");
139         lib.bindGLSymbol(cast(void**)&glSecondaryColor3sv, "glSecondaryColor3sv");
140         lib.bindGLSymbol(cast(void**)&glSecondaryColor3ub, "glSecondaryColor3ub");
141         lib.bindGLSymbol(cast(void**)&glSecondaryColor3ubv, "glSecondaryColor3ubv");
142         lib.bindGLSymbol(cast(void**)&glSecondaryColor3ui, "glSecondaryColor3ui");
143         lib.bindGLSymbol(cast(void**)&glSecondaryColor3uiv, "glSecondaryColor3uiv");
144         lib.bindGLSymbol(cast(void**)&glSecondaryColor3us, "glSecondaryColor3us");
145         lib.bindGLSymbol(cast(void**)&glSecondaryColor3usv, "glSecondaryColor3usv");
146         lib.bindGLSymbol(cast(void**)&glSecondaryColorPointer, "glSecondaryColorPointer");
147         lib.bindGLSymbol(cast(void**)&glWindowPos2d, "glWindowPos2d");
148         lib.bindGLSymbol(cast(void**)&glWindowPos2dv, "glWindowPos2dv");
149         lib.bindGLSymbol(cast(void**)&glWindowPos2f, "glWindowPos2f");
150         lib.bindGLSymbol(cast(void**)&glWindowPos2fv, "glWindowPos2fv");
151         lib.bindGLSymbol(cast(void**)&glWindowPos2i, "glWindowPos2i");
152         lib.bindGLSymbol(cast(void**)&glWindowPos2iv, "glWindowPos2iv");
153         lib.bindGLSymbol(cast(void**)&glWindowPos2s, "glWindowPos2s");
154         lib.bindGLSymbol(cast(void**)&glWindowPos2sv, "glWindowPos2sv");
155         lib.bindGLSymbol(cast(void**)&glWindowPos3d, "glWindowPos3d");
156         lib.bindGLSymbol(cast(void**)&glWindowPos3dv, "glWindowPos3dv");
157         lib.bindGLSymbol(cast(void**)&glWindowPos3f, "glWindowPos3f");
158         lib.bindGLSymbol(cast(void**)&glWindowPos3fv, "glWindowPos3fv");
159         lib.bindGLSymbol(cast(void**)&glWindowPos3i, "glWindowPos3i");
160         lib.bindGLSymbol(cast(void**)&glWindowPos3iv, "glWindowPos3iv");
161         lib.bindGLSymbol(cast(void**)&glWindowPos3s, "glWindowPos3s");
162         lib.bindGLSymbol(cast(void**)&glWindowPos3sv, "glWindowPos3sv");
163 
164         return errorCountGL() == 0;
165     }
166 }