1 #ifdef NXNA_GL_LOAD_PROC
3 #undef NXNA_DECLARE_GL_EXTENSION_20
4 #undef NXNA_DECLARE_GL_EXTENSION_30
5 #undef NXNA_DECLARE_GL_EXTENSION_31
6 #undef NXNA_DECLARE_GL_EXTENSION_32
7 #undef NXNA_DECLARE_GL_EXTENSION_40
8 #undef NXNA_DECLARE_GL_EXTENSION_41
9 #undef NXNA_DECLARE_GL_EXTENSION_42
10 #undef NXNA_DECLARE_GL_EXTENSION_45
11 #undef NXNA_DECLARE_GL_EXTENSION
12 #define NXNA_DECLARE_GL_EXTENSION(vmajor, vminor, p, n) GL_LOAD_PROC(p, n);
14 #if defined NXNA_DECLARE_EXTENSIONS_45
15 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
16 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
17 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
18 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
19 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
20 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
21 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
22 #define NXNA_DECLARE_GL_EXTENSION_45(p, n) NXNA_DECLARE_GL_EXTENSION(4, 5, p, n)
23 #elif defined NXNA_DECLARE_EXTENSIONS_42
24 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
25 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
26 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
27 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
28 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
29 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
30 #define NXNA_DECLARE_GL_EXTENSION_42(p, n) NXNA_DECLARE_GL_EXTENSION(4, 2, p, n)
31 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
32 #elif defined NXNA_DECLARE_EXTENSIONS_41
33 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
34 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
35 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
36 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
37 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
38 #define NXNA_DECLARE_GL_EXTENSION_41(p, n) NXNA_DECLARE_GL_EXTENSION(4, 1, p, n)
39 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
40 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
41 #elif defined NXNA_DECLARE_EXTENSIONS_40
42 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
43 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
44 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
45 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
46 #define NXNA_DECLARE_GL_EXTENSION_40(p, n) NXNA_DECLARE_GL_EXTENSION(4, 0, p, n)
47 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
48 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
49 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
50 #elif defined NXNA_DECLARE_EXTENSIONS_32
51 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
52 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
53 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
54 #define NXNA_DECLARE_GL_EXTENSION_32(p, n) NXNA_DECLARE_GL_EXTENSION(3, 2, p, n)
55 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
56 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
57 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
58 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
59 #elif defined NXNA_DECLARE_EXTENSIONS_31
60 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
61 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
62 #define NXNA_DECLARE_GL_EXTENSION_31(p, n) NXNA_DECLARE_GL_EXTENSION(3, 1, p, n)
63 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
64 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
65 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
66 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
67 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
68 #elif defined NXNA_DECLARE_EXTENSIONS_30
69 #define NXNA_DECLARE_GL_EXTENSION_20(p, n)
70 #define NXNA_DECLARE_GL_EXTENSION_30(p, n) NXNA_DECLARE_GL_EXTENSION(3, 0, p, n)
71 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
72 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
73 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
74 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
75 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
76 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
77 #elif defined NXNA_DECLARE_EXTENSIONS_20
78 #define NXNA_DECLARE_GL_EXTENSION_20(p, n) NXNA_DECLARE_GL_EXTENSION(2, 0, p, n)
79 #define NXNA_DECLARE_GL_EXTENSION_30(p, n)
80 #define NXNA_DECLARE_GL_EXTENSION_31(p, n)
81 #define NXNA_DECLARE_GL_EXTENSION_32(p, n)
82 #define NXNA_DECLARE_GL_EXTENSION_40(p, n)
83 #define NXNA_DECLARE_GL_EXTENSION_41(p, n)
84 #define NXNA_DECLARE_GL_EXTENSION_42(p, n)
85 #define NXNA_DECLARE_GL_EXTENSION_45(p, n)
88 #define NXNA_DECLARE_GL_EXTENSION_20(p, n) NXNA_DECLARE_GL_EXTENSION(2, 0, p, n)
89 #define NXNA_DECLARE_GL_EXTENSION_30(p, n) NXNA_DECLARE_GL_EXTENSION(3, 0, p, n)
90 #define NXNA_DECLARE_GL_EXTENSION_31(p, n) NXNA_DECLARE_GL_EXTENSION(3, 1, p, n)
91 #define NXNA_DECLARE_GL_EXTENSION_32(p, n) NXNA_DECLARE_GL_EXTENSION(3, 2, p, n)
92 #define NXNA_DECLARE_GL_EXTENSION_40(p, n) NXNA_DECLARE_GL_EXTENSION(4, 0, p, n)
93 #define NXNA_DECLARE_GL_EXTENSION_41(p, n) NXNA_DECLARE_GL_EXTENSION(4, 1, p, n)
94 #define NXNA_DECLARE_GL_EXTENSION_42(p, n) NXNA_DECLARE_GL_EXTENSION(4, 2, p, n)
95 #define NXNA_DECLARE_GL_EXTENSION_45(p, n) NXNA_DECLARE_GL_EXTENSION(4, 5, p, n)
99 NXNA_DECLARE_GL_EXTENSION_20(PFNGLACTIVETEXTUREPROC, glActiveTexture)
100 NXNA_DECLARE_GL_EXTENSION_20(PFNGLATTACHSHADERPROC, glAttachShader)
101 NXNA_DECLARE_GL_EXTENSION_20(PFNGLBINDBUFFERPROC, glBindBuffer)
102 NXNA_DECLARE_GL_EXTENSION_20(PFNGLBLENDEQUATIONSEPARATEPROC, glBlendEquationSeparate)
103 NXNA_DECLARE_GL_EXTENSION_20(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate)
104 NXNA_DECLARE_GL_EXTENSION_20(PFNGLBUFFERDATAPROC, glBufferData)
105 NXNA_DECLARE_GL_EXTENSION_20(PFNGLBUFFERSUBDATAPROC, glBufferSubData)
106 NXNA_DECLARE_GL_EXTENSION_20(PFNGLCOMPILESHADERPROC, glCompileShader)
107 NXNA_DECLARE_GL_EXTENSION_20(PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2D)
108 NXNA_DECLARE_GL_EXTENSION_20(PFNGLCREATEPROGRAMPROC, glCreateProgram)
109 NXNA_DECLARE_GL_EXTENSION_20(PFNGLCREATESHADERPROC, glCreateShader)
110 NXNA_DECLARE_GL_EXTENSION_20(PFNGLDELETEBUFFERSPROC, glDeleteBuffers)
111 NXNA_DECLARE_GL_EXTENSION_20(PFNGLDELETEPROGRAMPROC, glDeleteProgram)
112 NXNA_DECLARE_GL_EXTENSION_20(PFNGLENABLEVERTEXATTRIBARRAYPROC, glEnableVertexAttribArray)
113 NXNA_DECLARE_GL_EXTENSION_20(PFNGLGENBUFFERSPROC, glGenBuffers)
114 NXNA_DECLARE_GL_EXTENSION_20(PFNGLGETPROGRAMIVPROC, glGetProgramiv)
115 NXNA_DECLARE_GL_EXTENSION_20(PFNGLGETPROGRAMINFOLOGPROC, glGetProgramInfoLog)
116 NXNA_DECLARE_GL_EXTENSION_20(PFNGLGETSHADERIVPROC, glGetShaderiv)
117 NXNA_DECLARE_GL_EXTENSION_20(PFNGLGETSHADERINFOLOGPROC, glGetShaderInfoLog)
118 NXNA_DECLARE_GL_EXTENSION_20(PFNGLLINKPROGRAMPROC, glLinkProgram)
119 NXNA_DECLARE_GL_EXTENSION_20(PFNGLSHADERSOURCEPROC, glShaderSource)
120 NXNA_DECLARE_GL_EXTENSION_20(PFNGLUSEPROGRAMPROC, glUseProgram)
121 NXNA_DECLARE_GL_EXTENSION_20(PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer)
124 NXNA_DECLARE_GL_EXTENSION_30(PFNGLBINDBUFFERRANGEPROC, glBindBufferRange)
125 NXNA_DECLARE_GL_EXTENSION_30(PFNGLBINDVERTEXARRAYPROC, glBindVertexArray)
126 NXNA_DECLARE_GL_EXTENSION_30(PFNGLCLEARBUFFERFIPROC, glClearBufferfi)
127 NXNA_DECLARE_GL_EXTENSION_30(PFNGLCLEARBUFFERFVPROC, glClearBufferfv)
128 NXNA_DECLARE_GL_EXTENSION_30(PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays)
129 NXNA_DECLARE_GL_EXTENSION_30(PFNGLDISABLEIPROC, glDisablei)
130 NXNA_DECLARE_GL_EXTENSION_30(PFNGLENABLEIPROC, glEnablei)
131 NXNA_DECLARE_GL_EXTENSION_30(PFNGLGENVERTEXARRAYSPROC, glGenVertexArrays)
132 NXNA_DECLARE_GL_EXTENSION_30(PFNGLGETSTRINGIPROC, glGetStringi)
133 NXNA_DECLARE_GL_EXTENSION_30(PFNGLMAPBUFFERRANGEPROC, glMapBufferRange)
134 NXNA_DECLARE_GL_EXTENSION_30(PFNGLUNMAPBUFFERPROC, glUnmapBuffer)
137 NXNA_DECLARE_GL_EXTENSION_31(PFNGLGETUNIFORMBLOCKINDEXPROC, glGetUniformBlockIndex)
138 NXNA_DECLARE_GL_EXTENSION_31(PFNGLUNIFORMBLOCKBINDINGPROC, glUniformBlockBinding)
141 NXNA_DECLARE_GL_EXTENSION_32(PFNGLDRAWELEMENTSBASEVERTEXPROC, glDrawElementsBaseVertex)
144 NXNA_DECLARE_GL_EXTENSION_40(PFNGLBLENDEQUATIONSEPARATEIPROC, glBlendEquationSeparatei)
145 NXNA_DECLARE_GL_EXTENSION_40(PFNGLBLENDFUNCSEPARATEIPROC, glBlendFuncSeparatei)
148 NXNA_DECLARE_GL_EXTENSION_41(PFNGLBINDPROGRAMPIPELINEPROC, glBindProgramPipeline)
149 NXNA_DECLARE_GL_EXTENSION_41(PFNGLCREATESHADERPROGRAMVPROC, glCreateShaderProgramv)
150 NXNA_DECLARE_GL_EXTENSION_41(PFNGLDELETEPROGRAMPIPELINESPROC, glDeleteProgramPipelines)
151 NXNA_DECLARE_GL_EXTENSION_41(PFNGLGENPROGRAMPIPELINESPROC, glGenProgramPipelines)
152 NXNA_DECLARE_GL_EXTENSION_41(PFNGLUSEPROGRAMSTAGESPROC, glUseProgramStages)
155 NXNA_DECLARE_GL_EXTENSION_42(PFNGLTEXSTORAGE2DPROC, glTexStorage2D)
158 NXNA_DECLARE_GL_EXTENSION_45(PFNGLBINDTEXTUREUNITPROC, glBindTextureUnit);
159 NXNA_DECLARE_GL_EXTENSION_45(PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC, glCompressedTextureSubImage2D);
160 NXNA_DECLARE_GL_EXTENSION_45(PFNGLCREATEBUFFERSPROC, glCreateBuffers);
161 NXNA_DECLARE_GL_EXTENSION_45(PFNGLCREATETEXTURESPROC, glCreateTextures);
162 NXNA_DECLARE_GL_EXTENSION_45(PFNGLCREATEVERTEXARRAYSPROC, glCreateVertexArrays);
163 NXNA_DECLARE_GL_EXTENSION_45(PFNGLENABLEVERTEXARRAYATTRIBPROC, glEnableVertexArrayAttrib);
164 NXNA_DECLARE_GL_EXTENSION_45(PFNGLMAPNAMEDBUFFERPROC, glMapNamedBuffer);
165 NXNA_DECLARE_GL_EXTENSION_45(PFNGLMAPNAMEDBUFFERRANGEPROC, glMapNamedBufferRange);
166 NXNA_DECLARE_GL_EXTENSION_45(PFNGLNAMEDBUFFERDATAPROC, glNamedBufferStorage);
167 NXNA_DECLARE_GL_EXTENSION_45(PFNGLTEXTURESTORAGE2DPROC, glTextureStorage2D);
168 NXNA_DECLARE_GL_EXTENSION_45(PFNGLTEXTURESUBIMAGE2DPROC, glTextureSubImage2D);
169 NXNA_DECLARE_GL_EXTENSION_45(PFNGLUNMAPNAMEDBUFFERPROC, glUnmapNamedBuffer);
170 NXNA_DECLARE_GL_EXTENSION_45(PFNGLVERTEXARRAYATTRIBBINDINGPROC, glVertexArrayAttribBinding);
171 NXNA_DECLARE_GL_EXTENSION_45(PFNGLVERTEXARRAYATTRIBFORMATPROC, glVertexArrayAttribFormat);
172 NXNA_DECLARE_GL_EXTENSION_45(PFNGLVERTEXARRAYVERTEXBUFFERPROC, glVertexArrayVertexBuffer);