ゲームグラフィックス特論
gg.h
[詳解]
1 #pragma once
2 
36 // macOS で "OpenGL deprecated の警告を出さない
37 #if defined(__APPLE__)
38 # define GL_SILENCE_DEPRECATION
39 #endif
40 
41 // フレームワークに GLFW 3 を使う
42 #define GLFW_INCLUDE_GLCOREARB
43 #include <GLFW/glfw3.h>
44 
45 // Windows (Visual Studio) 用の設定
46 #if defined(_MSC_VER)
47 # pragma warning(disable:4996)
48 # define _USE_MATH_DEFINES
49 # define NOMINMAX
50 # undef APIENTRY
51 # if defined(_DEBUG)
52 # define DEBUG
53 # endif
54 #endif
55 
56 // OpenGL 3.2 の API のエントリポイント
57 #if !defined(GL3_PROTOTYPES)
58 extern PFNGLACTIVEPROGRAMEXTPROC glActiveProgramEXT;
59 extern PFNGLACTIVESHADERPROGRAMPROC glActiveShaderProgram;
60 extern PFNGLACTIVETEXTUREPROC glActiveTexture;
61 extern PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC glApplyFramebufferAttachmentCMAAINTEL;
62 extern PFNGLATTACHSHADERPROC glAttachShader;
63 extern PFNGLBEGINCONDITIONALRENDERNVPROC glBeginConditionalRenderNV;
64 extern PFNGLBEGINCONDITIONALRENDERPROC glBeginConditionalRender;
65 extern PFNGLBEGINPERFMONITORAMDPROC glBeginPerfMonitorAMD;
66 extern PFNGLBEGINPERFQUERYINTELPROC glBeginPerfQueryINTEL;
67 extern PFNGLBEGINQUERYINDEXEDPROC glBeginQueryIndexed;
68 extern PFNGLBEGINQUERYPROC glBeginQuery;
69 extern PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback;
70 extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
71 extern PFNGLBINDBUFFERBASEPROC glBindBufferBase;
72 extern PFNGLBINDBUFFERPROC glBindBuffer;
73 extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
74 extern PFNGLBINDBUFFERSBASEPROC glBindBuffersBase;
75 extern PFNGLBINDBUFFERSRANGEPROC glBindBuffersRange;
76 extern PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed;
77 extern PFNGLBINDFRAGDATALOCATIONPROC glBindFragDataLocation;
78 extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
79 extern PFNGLBINDIMAGETEXTUREPROC glBindImageTexture;
80 extern PFNGLBINDIMAGETEXTURESPROC glBindImageTextures;
81 extern PFNGLBINDMULTITEXTUREEXTPROC glBindMultiTextureEXT;
82 extern PFNGLBINDPROGRAMPIPELINEPROC glBindProgramPipeline;
83 extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer;
84 extern PFNGLBINDSAMPLERPROC glBindSampler;
85 extern PFNGLBINDSAMPLERSPROC glBindSamplers;
86 extern PFNGLBINDTEXTUREPROC glBindTexture;
87 extern PFNGLBINDTEXTURESPROC glBindTextures;
88 extern PFNGLBINDTEXTUREUNITPROC glBindTextureUnit;
89 extern PFNGLBINDTRANSFORMFEEDBACKPROC glBindTransformFeedback;
90 extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
91 extern PFNGLBINDVERTEXBUFFERPROC glBindVertexBuffer;
92 extern PFNGLBINDVERTEXBUFFERSPROC glBindVertexBuffers;
93 extern PFNGLBLENDBARRIERKHRPROC glBlendBarrierKHR;
94 extern PFNGLBLENDBARRIERNVPROC glBlendBarrierNV;
95 extern PFNGLBLENDCOLORPROC glBlendColor;
96 extern PFNGLBLENDEQUATIONIARBPROC glBlendEquationiARB;
97 extern PFNGLBLENDEQUATIONIPROC glBlendEquationi;
98 extern PFNGLBLENDEQUATIONPROC glBlendEquation;
99 extern PFNGLBLENDEQUATIONSEPARATEIARBPROC glBlendEquationSeparateiARB;
100 extern PFNGLBLENDEQUATIONSEPARATEIPROC glBlendEquationSeparatei;
101 extern PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate;
102 extern PFNGLBLENDFUNCIARBPROC glBlendFunciARB;
103 extern PFNGLBLENDFUNCIPROC glBlendFunci;
104 extern PFNGLBLENDFUNCPROC glBlendFunc;
105 extern PFNGLBLENDFUNCSEPARATEIARBPROC glBlendFuncSeparateiARB;
106 extern PFNGLBLENDFUNCSEPARATEIPROC glBlendFuncSeparatei;
107 extern PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
108 extern PFNGLBLENDPARAMETERINVPROC glBlendParameteriNV;
109 extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
110 extern PFNGLBLITNAMEDFRAMEBUFFERPROC glBlitNamedFramebuffer;
111 extern PFNGLBUFFERADDRESSRANGENVPROC glBufferAddressRangeNV;
112 extern PFNGLBUFFERDATAPROC glBufferData;
113 extern PFNGLBUFFERPAGECOMMITMENTARBPROC glBufferPageCommitmentARB;
114 extern PFNGLBUFFERSTORAGEPROC glBufferStorage;
115 extern PFNGLBUFFERSUBDATAPROC glBufferSubData;
116 extern PFNGLCALLCOMMANDLISTNVPROC glCallCommandListNV;
117 extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
118 extern PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC glCheckNamedFramebufferStatusEXT;
119 extern PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC glCheckNamedFramebufferStatus;
120 extern PFNGLCLAMPCOLORPROC glClampColor;
121 extern PFNGLCLEARBUFFERDATAPROC glClearBufferData;
122 extern PFNGLCLEARBUFFERFIPROC glClearBufferfi;
123 extern PFNGLCLEARBUFFERFVPROC glClearBufferfv;
124 extern PFNGLCLEARBUFFERIVPROC glClearBufferiv;
125 extern PFNGLCLEARBUFFERSUBDATAPROC glClearBufferSubData;
126 extern PFNGLCLEARBUFFERUIVPROC glClearBufferuiv;
127 extern PFNGLCLEARCOLORPROC glClearColor;
128 extern PFNGLCLEARDEPTHFPROC glClearDepthf;
129 extern PFNGLCLEARDEPTHPROC glClearDepth;
130 extern PFNGLCLEARNAMEDBUFFERDATAEXTPROC glClearNamedBufferDataEXT;
131 extern PFNGLCLEARNAMEDBUFFERDATAPROC glClearNamedBufferData;
132 extern PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC glClearNamedBufferSubDataEXT;
133 extern PFNGLCLEARNAMEDBUFFERSUBDATAPROC glClearNamedBufferSubData;
134 extern PFNGLCLEARNAMEDFRAMEBUFFERFIPROC glClearNamedFramebufferfi;
135 extern PFNGLCLEARNAMEDFRAMEBUFFERFVPROC glClearNamedFramebufferfv;
136 extern PFNGLCLEARNAMEDFRAMEBUFFERIVPROC glClearNamedFramebufferiv;
137 extern PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC glClearNamedFramebufferuiv;
138 extern PFNGLCLEARPROC glClear;
139 extern PFNGLCLEARSTENCILPROC glClearStencil;
140 extern PFNGLCLEARTEXIMAGEPROC glClearTexImage;
141 extern PFNGLCLEARTEXSUBIMAGEPROC glClearTexSubImage;
142 extern PFNGLCLIENTATTRIBDEFAULTEXTPROC glClientAttribDefaultEXT;
143 extern PFNGLCLIENTWAITSYNCPROC glClientWaitSync;
144 extern PFNGLCLIPCONTROLPROC glClipControl;
145 extern PFNGLCOLORFORMATNVPROC glColorFormatNV;
146 extern PFNGLCOLORMASKIPROC glColorMaski;
147 extern PFNGLCOLORMASKPROC glColorMask;
148 extern PFNGLCOMMANDLISTSEGMENTSNVPROC glCommandListSegmentsNV;
149 extern PFNGLCOMPILECOMMANDLISTNVPROC glCompileCommandListNV;
150 extern PFNGLCOMPILESHADERINCLUDEARBPROC glCompileShaderIncludeARB;
151 extern PFNGLCOMPILESHADERPROC glCompileShader;
152 extern PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC glCompressedMultiTexImage1DEXT;
153 extern PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC glCompressedMultiTexImage2DEXT;
154 extern PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC glCompressedMultiTexImage3DEXT;
155 extern PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC glCompressedMultiTexSubImage1DEXT;
156 extern PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC glCompressedMultiTexSubImage2DEXT;
157 extern PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC glCompressedMultiTexSubImage3DEXT;
158 extern PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D;
159 extern PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D;
160 extern PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D;
161 extern PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D;
162 extern PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D;
163 extern PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D;
164 extern PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC glCompressedTextureImage1DEXT;
165 extern PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC glCompressedTextureImage2DEXT;
166 extern PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC glCompressedTextureImage3DEXT;
167 extern PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC glCompressedTextureSubImage1DEXT;
168 extern PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC glCompressedTextureSubImage1D;
169 extern PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC glCompressedTextureSubImage2DEXT;
170 extern PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC glCompressedTextureSubImage2D;
171 extern PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC glCompressedTextureSubImage3DEXT;
172 extern PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC glCompressedTextureSubImage3D;
173 extern PFNGLCONSERVATIVERASTERPARAMETERFNVPROC glConservativeRasterParameterfNV;
174 extern PFNGLCONSERVATIVERASTERPARAMETERINVPROC glConservativeRasterParameteriNV;
175 extern PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData;
176 extern PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData;
177 extern PFNGLCOPYMULTITEXIMAGE1DEXTPROC glCopyMultiTexImage1DEXT;
178 extern PFNGLCOPYMULTITEXIMAGE2DEXTPROC glCopyMultiTexImage2DEXT;
179 extern PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC glCopyMultiTexSubImage1DEXT;
180 extern PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC glCopyMultiTexSubImage2DEXT;
181 extern PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC glCopyMultiTexSubImage3DEXT;
182 extern PFNGLCOPYNAMEDBUFFERSUBDATAPROC glCopyNamedBufferSubData;
183 extern PFNGLCOPYPATHNVPROC glCopyPathNV;
184 extern PFNGLCOPYTEXIMAGE1DPROC glCopyTexImage1D;
185 extern PFNGLCOPYTEXIMAGE2DPROC glCopyTexImage2D;
186 extern PFNGLCOPYTEXSUBIMAGE1DPROC glCopyTexSubImage1D;
187 extern PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D;
188 extern PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D;
189 extern PFNGLCOPYTEXTUREIMAGE1DEXTPROC glCopyTextureImage1DEXT;
190 extern PFNGLCOPYTEXTUREIMAGE2DEXTPROC glCopyTextureImage2DEXT;
191 extern PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC glCopyTextureSubImage1DEXT;
192 extern PFNGLCOPYTEXTURESUBIMAGE1DPROC glCopyTextureSubImage1D;
193 extern PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC glCopyTextureSubImage2DEXT;
194 extern PFNGLCOPYTEXTURESUBIMAGE2DPROC glCopyTextureSubImage2D;
195 extern PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC glCopyTextureSubImage3DEXT;
196 extern PFNGLCOPYTEXTURESUBIMAGE3DPROC glCopyTextureSubImage3D;
197 extern PFNGLCOVERAGEMODULATIONNVPROC glCoverageModulationNV;
198 extern PFNGLCOVERAGEMODULATIONTABLENVPROC glCoverageModulationTableNV;
199 extern PFNGLCOVERFILLPATHINSTANCEDNVPROC glCoverFillPathInstancedNV;
200 extern PFNGLCOVERFILLPATHNVPROC glCoverFillPathNV;
201 extern PFNGLCOVERSTROKEPATHINSTANCEDNVPROC glCoverStrokePathInstancedNV;
202 extern PFNGLCOVERSTROKEPATHNVPROC glCoverStrokePathNV;
203 extern PFNGLCREATEBUFFERSPROC glCreateBuffers;
204 extern PFNGLCREATECOMMANDLISTSNVPROC glCreateCommandListsNV;
205 extern PFNGLCREATEFRAMEBUFFERSPROC glCreateFramebuffers;
206 extern PFNGLCREATEPERFQUERYINTELPROC glCreatePerfQueryINTEL;
207 extern PFNGLCREATEPROGRAMPIPELINESPROC glCreateProgramPipelines;
208 extern PFNGLCREATEPROGRAMPROC glCreateProgram;
209 extern PFNGLCREATEQUERIESPROC glCreateQueries;
210 extern PFNGLCREATERENDERBUFFERSPROC glCreateRenderbuffers;
211 extern PFNGLCREATESAMPLERSPROC glCreateSamplers;
212 extern PFNGLCREATESHADERPROC glCreateShader;
213 extern PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
214 extern PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv;
215 extern PFNGLCREATESTATESNVPROC glCreateStatesNV;
216 extern PFNGLCREATESYNCFROMCLEVENTARBPROC glCreateSyncFromCLeventARB;
217 extern PFNGLCREATETEXTURESPROC glCreateTextures;
218 extern PFNGLCREATETRANSFORMFEEDBACKSPROC glCreateTransformFeedbacks;
219 extern PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays;
220 extern PFNGLCULLFACEPROC glCullFace;
221 extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB;
222 extern PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback;
223 extern PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControlARB;
224 extern PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl;
225 extern PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsertARB;
226 extern PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert;
227 extern PFNGLDELETEBUFFERSPROC glDeleteBuffers;
228 extern PFNGLDELETECOMMANDLISTSNVPROC glDeleteCommandListsNV;
229 extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
230 extern PFNGLDELETENAMEDSTRINGARBPROC glDeleteNamedStringARB;
231 extern PFNGLDELETEPATHSNVPROC glDeletePathsNV;
232 extern PFNGLDELETEPERFMONITORSAMDPROC glDeletePerfMonitorsAMD;
233 extern PFNGLDELETEPERFQUERYINTELPROC glDeletePerfQueryINTEL;
234 extern PFNGLDELETEPROGRAMPIPELINESPROC glDeleteProgramPipelines;
235 extern PFNGLDELETEPROGRAMPROC glDeleteProgram;
236 extern PFNGLDELETEQUERIESPROC glDeleteQueries;
237 extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers;
238 extern PFNGLDELETESAMPLERSPROC glDeleteSamplers;
239 extern PFNGLDELETESHADERPROC glDeleteShader;
240 extern PFNGLDELETESTATESNVPROC glDeleteStatesNV;
241 extern PFNGLDELETESYNCPROC glDeleteSync;
242 extern PFNGLDELETETEXTURESPROC glDeleteTextures;
243 extern PFNGLDELETETRANSFORMFEEDBACKSPROC glDeleteTransformFeedbacks;
244 extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
245 extern PFNGLDEPTHFUNCPROC glDepthFunc;
246 extern PFNGLDEPTHMASKPROC glDepthMask;
247 extern PFNGLDEPTHRANGEARRAYVPROC glDepthRangeArrayv;
248 extern PFNGLDEPTHRANGEFPROC glDepthRangef;
249 extern PFNGLDEPTHRANGEINDEXEDPROC glDepthRangeIndexed;
250 extern PFNGLDEPTHRANGEPROC glDepthRange;
251 extern PFNGLDETACHSHADERPROC glDetachShader;
252 extern PFNGLDISABLECLIENTSTATEIEXTPROC glDisableClientStateiEXT;
253 extern PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC glDisableClientStateIndexedEXT;
254 extern PFNGLDISABLEINDEXEDEXTPROC glDisableIndexedEXT;
255 extern PFNGLDISABLEIPROC glDisablei;
256 extern PFNGLDISABLEPROC glDisable;
257 extern PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC glDisableVertexArrayAttribEXT;
258 extern PFNGLDISABLEVERTEXARRAYATTRIBPROC glDisableVertexArrayAttrib;
259 extern PFNGLDISABLEVERTEXARRAYEXTPROC glDisableVertexArrayEXT;
260 extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
261 extern PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC glDispatchComputeGroupSizeARB;
262 extern PFNGLDISPATCHCOMPUTEINDIRECTPROC glDispatchComputeIndirect;
263 extern PFNGLDISPATCHCOMPUTEPROC glDispatchCompute;
264 extern PFNGLDRAWARRAYSINDIRECTPROC glDrawArraysIndirect;
265 extern PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstancedARB;
266 extern PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC glDrawArraysInstancedBaseInstance;
267 extern PFNGLDRAWARRAYSINSTANCEDEXTPROC glDrawArraysInstancedEXT;
268 extern PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced;
269 extern PFNGLDRAWARRAYSPROC glDrawArrays;
270 extern PFNGLDRAWBUFFERPROC glDrawBuffer;
271 extern PFNGLDRAWBUFFERSPROC glDrawBuffers;
272 extern PFNGLDRAWCOMMANDSADDRESSNVPROC glDrawCommandsAddressNV;
273 extern PFNGLDRAWCOMMANDSNVPROC glDrawCommandsNV;
274 extern PFNGLDRAWCOMMANDSSTATESADDRESSNVPROC glDrawCommandsStatesAddressNV;
275 extern PFNGLDRAWCOMMANDSSTATESNVPROC glDrawCommandsStatesNV;
276 extern PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex;
277 extern PFNGLDRAWELEMENTSINDIRECTPROC glDrawElementsIndirect;
278 extern PFNGLDRAWELEMENTSINSTANCEDARBPROC glDrawElementsInstancedARB;
279 extern PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC glDrawElementsInstancedBaseInstance;
280 extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC glDrawElementsInstancedBaseVertexBaseInstance;
281 extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex;
282 extern PFNGLDRAWELEMENTSINSTANCEDEXTPROC glDrawElementsInstancedEXT;
283 extern PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced;
284 extern PFNGLDRAWELEMENTSPROC glDrawElements;
285 extern PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex;
286 extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements;
287 extern PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC glDrawTransformFeedbackInstanced;
288 extern PFNGLDRAWTRANSFORMFEEDBACKPROC glDrawTransformFeedback;
289 extern PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC glDrawTransformFeedbackStreamInstanced;
290 extern PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC glDrawTransformFeedbackStream;
291 extern PFNGLDRAWVKIMAGENVPROC glDrawVkImageNV;
292 extern PFNGLEDGEFLAGFORMATNVPROC glEdgeFlagFormatNV;
293 extern PFNGLENABLECLIENTSTATEIEXTPROC glEnableClientStateiEXT;
294 extern PFNGLENABLECLIENTSTATEINDEXEDEXTPROC glEnableClientStateIndexedEXT;
295 extern PFNGLENABLEINDEXEDEXTPROC glEnableIndexedEXT;
296 extern PFNGLENABLEIPROC glEnablei;
297 extern PFNGLENABLEPROC glEnable;
298 extern PFNGLENABLEVERTEXARRAYATTRIBEXTPROC glEnableVertexArrayAttribEXT;
299 extern PFNGLENABLEVERTEXARRAYATTRIBPROC glEnableVertexArrayAttrib;
300 extern PFNGLENABLEVERTEXARRAYEXTPROC glEnableVertexArrayEXT;
301 extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
302 extern PFNGLENDCONDITIONALRENDERNVPROC glEndConditionalRenderNV;
303 extern PFNGLENDCONDITIONALRENDERPROC glEndConditionalRender;
304 extern PFNGLENDPERFMONITORAMDPROC glEndPerfMonitorAMD;
305 extern PFNGLENDPERFQUERYINTELPROC glEndPerfQueryINTEL;
306 extern PFNGLENDQUERYINDEXEDPROC glEndQueryIndexed;
307 extern PFNGLENDQUERYPROC glEndQuery;
308 extern PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback;
309 extern PFNGLEVALUATEDEPTHVALUESARBPROC glEvaluateDepthValuesARB;
310 extern PFNGLFENCESYNCPROC glFenceSync;
311 extern PFNGLFINISHPROC glFinish;
312 extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange;
313 extern PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC glFlushMappedNamedBufferRangeEXT;
314 extern PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC glFlushMappedNamedBufferRange;
315 extern PFNGLFLUSHPROC glFlush;
316 extern PFNGLFOGCOORDFORMATNVPROC glFogCoordFormatNV;
317 extern PFNGLFRAGMENTCOVERAGECOLORNVPROC glFragmentCoverageColorNV;
318 extern PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC glFramebufferDrawBufferEXT;
319 extern PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC glFramebufferDrawBuffersEXT;
320 extern PFNGLFRAMEBUFFERPARAMETERIPROC glFramebufferParameteri;
321 extern PFNGLFRAMEBUFFERREADBUFFEREXTPROC glFramebufferReadBufferEXT;
322 extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer;
323 extern PFNGLFRAMEBUFFERSAMPLELOCATIONSFVARBPROC glFramebufferSampleLocationsfvARB;
324 extern PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC glFramebufferSampleLocationsfvNV;
325 extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D;
326 extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
327 extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D;
328 extern PFNGLFRAMEBUFFERTEXTUREARBPROC glFramebufferTextureARB;
329 extern PFNGLFRAMEBUFFERTEXTUREFACEARBPROC glFramebufferTextureFaceARB;
330 extern PFNGLFRAMEBUFFERTEXTURELAYERARBPROC glFramebufferTextureLayerARB;
331 extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer;
332 extern PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC glFramebufferTextureMultiviewOVR;
333 extern PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture;
334 extern PFNGLFRONTFACEPROC glFrontFace;
335 extern PFNGLGENBUFFERSPROC glGenBuffers;
336 extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
337 extern PFNGLGENERATEMULTITEXMIPMAPEXTPROC glGenerateMultiTexMipmapEXT;
338 extern PFNGLGENERATETEXTUREMIPMAPEXTPROC glGenerateTextureMipmapEXT;
339 extern PFNGLGENERATETEXTUREMIPMAPPROC glGenerateTextureMipmap;
340 extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
341 extern PFNGLGENPATHSNVPROC glGenPathsNV;
342 extern PFNGLGENPERFMONITORSAMDPROC glGenPerfMonitorsAMD;
343 extern PFNGLGENPROGRAMPIPELINESPROC glGenProgramPipelines;
344 extern PFNGLGENQUERIESPROC glGenQueries;
345 extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers;
346 extern PFNGLGENSAMPLERSPROC glGenSamplers;
347 extern PFNGLGENTEXTURESPROC glGenTextures;
348 extern PFNGLGENTRANSFORMFEEDBACKSPROC glGenTransformFeedbacks;
349 extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
350 extern PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC glGetActiveAtomicCounterBufferiv;
351 extern PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib;
352 extern PFNGLGETACTIVESUBROUTINENAMEPROC glGetActiveSubroutineName;
353 extern PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC glGetActiveSubroutineUniformiv;
354 extern PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC glGetActiveSubroutineUniformName;
355 extern PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv;
356 extern PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName;
357 extern PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName;
358 extern PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform;
359 extern PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv;
360 extern PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders;
361 extern PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;
362 extern PFNGLGETBOOLEANINDEXEDVEXTPROC glGetBooleanIndexedvEXT;
363 extern PFNGLGETBOOLEANI_VPROC glGetBooleani_v;
364 extern PFNGLGETBOOLEANVPROC glGetBooleanv;
365 extern PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v;
366 extern PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv;
367 extern PFNGLGETBUFFERPARAMETERUI64VNVPROC glGetBufferParameterui64vNV;
368 extern PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv;
369 extern PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData;
370 extern PFNGLGETCOMMANDHEADERNVPROC glGetCommandHeaderNV;
371 extern PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC glGetCompressedMultiTexImageEXT;
372 extern PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage;
373 extern PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC glGetCompressedTextureImageEXT;
374 extern PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC glGetCompressedTextureImage;
375 extern PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC glGetCompressedTextureSubImage;
376 extern PFNGLGETCOVERAGEMODULATIONTABLENVPROC glGetCoverageModulationTableNV;
377 extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
378 extern PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog;
379 extern PFNGLGETDOUBLEINDEXEDVEXTPROC glGetDoubleIndexedvEXT;
380 extern PFNGLGETDOUBLEI_VEXTPROC glGetDoublei_vEXT;
381 extern PFNGLGETDOUBLEI_VPROC glGetDoublei_v;
382 extern PFNGLGETDOUBLEVPROC glGetDoublev;
383 extern PFNGLGETERRORPROC glGetError;
384 extern PFNGLGETFIRSTPERFQUERYIDINTELPROC glGetFirstPerfQueryIdINTEL;
385 extern PFNGLGETFLOATINDEXEDVEXTPROC glGetFloatIndexedvEXT;
386 extern PFNGLGETFLOATI_VEXTPROC glGetFloati_vEXT;
387 extern PFNGLGETFLOATI_VPROC glGetFloati_v;
388 extern PFNGLGETFLOATVPROC glGetFloatv;
389 extern PFNGLGETFRAGDATAINDEXPROC glGetFragDataIndex;
390 extern PFNGLGETFRAGDATALOCATIONPROC glGetFragDataLocation;
391 extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv;
392 extern PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC glGetFramebufferParameterivEXT;
393 extern PFNGLGETFRAMEBUFFERPARAMETERIVPROC glGetFramebufferParameteriv;
394 extern PFNGLGETGRAPHICSRESETSTATUSARBPROC glGetGraphicsResetStatusARB;
395 extern PFNGLGETGRAPHICSRESETSTATUSPROC glGetGraphicsResetStatus;
396 extern PFNGLGETIMAGEHANDLEARBPROC glGetImageHandleARB;
397 extern PFNGLGETIMAGEHANDLENVPROC glGetImageHandleNV;
398 extern PFNGLGETINTEGER64I_VPROC glGetInteger64i_v;
399 extern PFNGLGETINTEGER64VPROC glGetInteger64v;
400 extern PFNGLGETINTEGERINDEXEDVEXTPROC glGetIntegerIndexedvEXT;
401 extern PFNGLGETINTEGERI_VPROC glGetIntegeri_v;
402 extern PFNGLGETINTEGERUI64I_VNVPROC glGetIntegerui64i_vNV;
403 extern PFNGLGETINTEGERUI64VNVPROC glGetIntegerui64vNV;
404 extern PFNGLGETINTEGERVPROC glGetIntegerv;
405 extern PFNGLGETINTERNALFORMATI64VPROC glGetInternalformati64v;
406 extern PFNGLGETINTERNALFORMATIVPROC glGetInternalformativ;
407 extern PFNGLGETINTERNALFORMATSAMPLEIVNVPROC glGetInternalformatSampleivNV;
408 extern PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
409 extern PFNGLGETMULTITEXENVFVEXTPROC glGetMultiTexEnvfvEXT;
410 extern PFNGLGETMULTITEXENVIVEXTPROC glGetMultiTexEnvivEXT;
411 extern PFNGLGETMULTITEXGENDVEXTPROC glGetMultiTexGendvEXT;
412 extern PFNGLGETMULTITEXGENFVEXTPROC glGetMultiTexGenfvEXT;
413 extern PFNGLGETMULTITEXGENIVEXTPROC glGetMultiTexGenivEXT;
414 extern PFNGLGETMULTITEXIMAGEEXTPROC glGetMultiTexImageEXT;
415 extern PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC glGetMultiTexLevelParameterfvEXT;
416 extern PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC glGetMultiTexLevelParameterivEXT;
417 extern PFNGLGETMULTITEXPARAMETERFVEXTPROC glGetMultiTexParameterfvEXT;
418 extern PFNGLGETMULTITEXPARAMETERIIVEXTPROC glGetMultiTexParameterIivEXT;
419 extern PFNGLGETMULTITEXPARAMETERIUIVEXTPROC glGetMultiTexParameterIuivEXT;
420 extern PFNGLGETMULTITEXPARAMETERIVEXTPROC glGetMultiTexParameterivEXT;
421 extern PFNGLGETNAMEDBUFFERPARAMETERI64VPROC glGetNamedBufferParameteri64v;
422 extern PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC glGetNamedBufferParameterivEXT;
423 extern PFNGLGETNAMEDBUFFERPARAMETERIVPROC glGetNamedBufferParameteriv;
424 extern PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC glGetNamedBufferParameterui64vNV;
425 extern PFNGLGETNAMEDBUFFERPOINTERVEXTPROC glGetNamedBufferPointervEXT;
426 extern PFNGLGETNAMEDBUFFERPOINTERVPROC glGetNamedBufferPointerv;
427 extern PFNGLGETNAMEDBUFFERSUBDATAEXTPROC glGetNamedBufferSubDataEXT;
428 extern PFNGLGETNAMEDBUFFERSUBDATAPROC glGetNamedBufferSubData;
429 extern PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetNamedFramebufferAttachmentParameterivEXT;
430 extern PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetNamedFramebufferAttachmentParameteriv;
431 extern PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC glGetNamedFramebufferParameterivEXT;
432 extern PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC glGetNamedFramebufferParameteriv;
433 extern PFNGLGETNAMEDPROGRAMIVEXTPROC glGetNamedProgramivEXT;
434 extern PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC glGetNamedProgramLocalParameterdvEXT;
435 extern PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC glGetNamedProgramLocalParameterfvEXT;
436 extern PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC glGetNamedProgramLocalParameterIivEXT;
437 extern PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC glGetNamedProgramLocalParameterIuivEXT;
438 extern PFNGLGETNAMEDPROGRAMSTRINGEXTPROC glGetNamedProgramStringEXT;
439 extern PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC glGetNamedRenderbufferParameterivEXT;
440 extern PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC glGetNamedRenderbufferParameteriv;
441 extern PFNGLGETNAMEDSTRINGARBPROC glGetNamedStringARB;
442 extern PFNGLGETNAMEDSTRINGIVARBPROC glGetNamedStringivARB;
443 extern PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC glGetnCompressedTexImageARB;
444 extern PFNGLGETNCOMPRESSEDTEXIMAGEPROC glGetnCompressedTexImage;
445 extern PFNGLGETNEXTPERFQUERYIDINTELPROC glGetNextPerfQueryIdINTEL;
446 extern PFNGLGETNTEXIMAGEARBPROC glGetnTexImageARB;
447 extern PFNGLGETNTEXIMAGEPROC glGetnTexImage;
448 extern PFNGLGETNUNIFORMDVARBPROC glGetnUniformdvARB;
449 extern PFNGLGETNUNIFORMDVPROC glGetnUniformdv;
450 extern PFNGLGETNUNIFORMFVARBPROC glGetnUniformfvARB;
451 extern PFNGLGETNUNIFORMFVPROC glGetnUniformfv;
452 extern PFNGLGETNUNIFORMI64VARBPROC glGetnUniformi64vARB;
453 extern PFNGLGETNUNIFORMIVARBPROC glGetnUniformivARB;
454 extern PFNGLGETNUNIFORMIVPROC glGetnUniformiv;
455 extern PFNGLGETNUNIFORMUI64VARBPROC glGetnUniformui64vARB;
456 extern PFNGLGETNUNIFORMUIVARBPROC glGetnUniformuivARB;
457 extern PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv;
458 extern PFNGLGETOBJECTLABELEXTPROC glGetObjectLabelEXT;
459 extern PFNGLGETOBJECTLABELPROC glGetObjectLabel;
460 extern PFNGLGETOBJECTPTRLABELPROC glGetObjectPtrLabel;
461 extern PFNGLGETPATHCOMMANDSNVPROC glGetPathCommandsNV;
462 extern PFNGLGETPATHCOORDSNVPROC glGetPathCoordsNV;
463 extern PFNGLGETPATHDASHARRAYNVPROC glGetPathDashArrayNV;
464 extern PFNGLGETPATHLENGTHNVPROC glGetPathLengthNV;
465 extern PFNGLGETPATHMETRICRANGENVPROC glGetPathMetricRangeNV;
466 extern PFNGLGETPATHMETRICSNVPROC glGetPathMetricsNV;
467 extern PFNGLGETPATHPARAMETERFVNVPROC glGetPathParameterfvNV;
468 extern PFNGLGETPATHPARAMETERIVNVPROC glGetPathParameterivNV;
469 extern PFNGLGETPATHSPACINGNVPROC glGetPathSpacingNV;
470 extern PFNGLGETPERFCOUNTERINFOINTELPROC glGetPerfCounterInfoINTEL;
471 extern PFNGLGETPERFMONITORCOUNTERDATAAMDPROC glGetPerfMonitorCounterDataAMD;
472 extern PFNGLGETPERFMONITORCOUNTERINFOAMDPROC glGetPerfMonitorCounterInfoAMD;
473 extern PFNGLGETPERFMONITORCOUNTERSAMDPROC glGetPerfMonitorCountersAMD;
474 extern PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC glGetPerfMonitorCounterStringAMD;
475 extern PFNGLGETPERFMONITORGROUPSAMDPROC glGetPerfMonitorGroupsAMD;
476 extern PFNGLGETPERFMONITORGROUPSTRINGAMDPROC glGetPerfMonitorGroupStringAMD;
477 extern PFNGLGETPERFQUERYDATAINTELPROC glGetPerfQueryDataINTEL;
478 extern PFNGLGETPERFQUERYIDBYNAMEINTELPROC glGetPerfQueryIdByNameINTEL;
479 extern PFNGLGETPERFQUERYINFOINTELPROC glGetPerfQueryInfoINTEL;
480 extern PFNGLGETPOINTERINDEXEDVEXTPROC glGetPointerIndexedvEXT;
481 extern PFNGLGETPOINTERI_VEXTPROC glGetPointeri_vEXT;
482 extern PFNGLGETPOINTERVPROC glGetPointerv;
483 extern PFNGLGETPROGRAMBINARYPROC glGetProgramBinary;
484 extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
485 extern PFNGLGETPROGRAMINTERFACEIVPROC glGetProgramInterfaceiv;
486 extern PFNGLGETPROGRAMIVPROC glGetProgramiv;
487 extern PFNGLGETPROGRAMPIPELINEINFOLOGPROC glGetProgramPipelineInfoLog;
488 extern PFNGLGETPROGRAMPIPELINEIVPROC glGetProgramPipelineiv;
489 extern PFNGLGETPROGRAMRESOURCEFVNVPROC glGetProgramResourcefvNV;
490 extern PFNGLGETPROGRAMRESOURCEINDEXPROC glGetProgramResourceIndex;
491 extern PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv;
492 extern PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC glGetProgramResourceLocationIndex;
493 extern PFNGLGETPROGRAMRESOURCELOCATIONPROC glGetProgramResourceLocation;
494 extern PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName;
495 extern PFNGLGETPROGRAMSTAGEIVPROC glGetProgramStageiv;
496 extern PFNGLGETQUERYBUFFEROBJECTI64VPROC glGetQueryBufferObjecti64v;
497 extern PFNGLGETQUERYBUFFEROBJECTIVPROC glGetQueryBufferObjectiv;
498 extern PFNGLGETQUERYBUFFEROBJECTUI64VPROC glGetQueryBufferObjectui64v;
499 extern PFNGLGETQUERYBUFFEROBJECTUIVPROC glGetQueryBufferObjectuiv;
500 extern PFNGLGETQUERYINDEXEDIVPROC glGetQueryIndexediv;
501 extern PFNGLGETQUERYIVPROC glGetQueryiv;
502 extern PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v;
503 extern PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv;
504 extern PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v;
505 extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
506 extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv;
507 extern PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv;
508 extern PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv;
509 extern PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv;
510 extern PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv;
511 extern PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
512 extern PFNGLGETSHADERIVPROC glGetShaderiv;
513 extern PFNGLGETSHADERPRECISIONFORMATPROC glGetShaderPrecisionFormat;
514 extern PFNGLGETSHADERSOURCEPROC glGetShaderSource;
515 extern PFNGLGETSTAGEINDEXNVPROC glGetStageIndexNV;
516 extern PFNGLGETSTRINGIPROC glGetStringi;
517 extern PFNGLGETSTRINGPROC glGetString;
518 extern PFNGLGETSUBROUTINEINDEXPROC glGetSubroutineIndex;
519 extern PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC glGetSubroutineUniformLocation;
520 extern PFNGLGETSYNCIVPROC glGetSynciv;
521 extern PFNGLGETTEXIMAGEPROC glGetTexImage;
522 extern PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv;
523 extern PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv;
524 extern PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv;
525 extern PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv;
526 extern PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv;
527 extern PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv;
528 extern PFNGLGETTEXTUREHANDLEARBPROC glGetTextureHandleARB;
529 extern PFNGLGETTEXTUREHANDLENVPROC glGetTextureHandleNV;
530 extern PFNGLGETTEXTUREIMAGEEXTPROC glGetTextureImageEXT;
531 extern PFNGLGETTEXTUREIMAGEPROC glGetTextureImage;
532 extern PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC glGetTextureLevelParameterfvEXT;
533 extern PFNGLGETTEXTURELEVELPARAMETERFVPROC glGetTextureLevelParameterfv;
534 extern PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC glGetTextureLevelParameterivEXT;
535 extern PFNGLGETTEXTURELEVELPARAMETERIVPROC glGetTextureLevelParameteriv;
536 extern PFNGLGETTEXTUREPARAMETERFVEXTPROC glGetTextureParameterfvEXT;
537 extern PFNGLGETTEXTUREPARAMETERFVPROC glGetTextureParameterfv;
538 extern PFNGLGETTEXTUREPARAMETERIIVEXTPROC glGetTextureParameterIivEXT;
539 extern PFNGLGETTEXTUREPARAMETERIIVPROC glGetTextureParameterIiv;
540 extern PFNGLGETTEXTUREPARAMETERIUIVEXTPROC glGetTextureParameterIuivEXT;
541 extern PFNGLGETTEXTUREPARAMETERIUIVPROC glGetTextureParameterIuiv;
542 extern PFNGLGETTEXTUREPARAMETERIVEXTPROC glGetTextureParameterivEXT;
543 extern PFNGLGETTEXTUREPARAMETERIVPROC glGetTextureParameteriv;
544 extern PFNGLGETTEXTURESAMPLERHANDLEARBPROC glGetTextureSamplerHandleARB;
545 extern PFNGLGETTEXTURESAMPLERHANDLENVPROC glGetTextureSamplerHandleNV;
546 extern PFNGLGETTEXTURESUBIMAGEPROC glGetTextureSubImage;
547 extern PFNGLGETTRANSFORMFEEDBACKI64_VPROC glGetTransformFeedbacki64_v;
548 extern PFNGLGETTRANSFORMFEEDBACKIVPROC glGetTransformFeedbackiv;
549 extern PFNGLGETTRANSFORMFEEDBACKI_VPROC glGetTransformFeedbacki_v;
550 extern PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying;
551 extern PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex;
552 extern PFNGLGETUNIFORMDVPROC glGetUniformdv;
553 extern PFNGLGETUNIFORMFVPROC glGetUniformfv;
554 extern PFNGLGETUNIFORMI64VARBPROC glGetUniformi64vARB;
555 extern PFNGLGETUNIFORMI64VNVPROC glGetUniformi64vNV;
556 extern PFNGLGETUNIFORMINDICESPROC glGetUniformIndices;
557 extern PFNGLGETUNIFORMIVPROC glGetUniformiv;
558 extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
559 extern PFNGLGETUNIFORMSUBROUTINEUIVPROC glGetUniformSubroutineuiv;
560 extern PFNGLGETUNIFORMUI64VARBPROC glGetUniformui64vARB;
561 extern PFNGLGETUNIFORMUI64VNVPROC glGetUniformui64vNV;
562 extern PFNGLGETUNIFORMUIVPROC glGetUniformuiv;
563 extern PFNGLGETVERTEXARRAYINDEXED64IVPROC glGetVertexArrayIndexed64iv;
564 extern PFNGLGETVERTEXARRAYINDEXEDIVPROC glGetVertexArrayIndexediv;
565 extern PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC glGetVertexArrayIntegeri_vEXT;
566 extern PFNGLGETVERTEXARRAYINTEGERVEXTPROC glGetVertexArrayIntegervEXT;
567 extern PFNGLGETVERTEXARRAYIVPROC glGetVertexArrayiv;
568 extern PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC glGetVertexArrayPointeri_vEXT;
569 extern PFNGLGETVERTEXARRAYPOINTERVEXTPROC glGetVertexArrayPointervEXT;
570 extern PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv;
571 extern PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv;
572 extern PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv;
573 extern PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv;
574 extern PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv;
575 extern PFNGLGETVERTEXATTRIBLDVPROC glGetVertexAttribLdv;
576 extern PFNGLGETVERTEXATTRIBLI64VNVPROC glGetVertexAttribLi64vNV;
577 extern PFNGLGETVERTEXATTRIBLUI64VARBPROC glGetVertexAttribLui64vARB;
578 extern PFNGLGETVERTEXATTRIBLUI64VNVPROC glGetVertexAttribLui64vNV;
579 extern PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv;
580 extern PFNGLGETVKPROCADDRNVPROC glGetVkProcAddrNV;
581 extern PFNGLHINTPROC glHint;
582 extern PFNGLINDEXFORMATNVPROC glIndexFormatNV;
583 extern PFNGLINSERTEVENTMARKEREXTPROC glInsertEventMarkerEXT;
584 extern PFNGLINTERPOLATEPATHSNVPROC glInterpolatePathsNV;
585 extern PFNGLINVALIDATEBUFFERDATAPROC glInvalidateBufferData;
586 extern PFNGLINVALIDATEBUFFERSUBDATAPROC glInvalidateBufferSubData;
587 extern PFNGLINVALIDATEFRAMEBUFFERPROC glInvalidateFramebuffer;
588 extern PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC glInvalidateNamedFramebufferData;
589 extern PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC glInvalidateNamedFramebufferSubData;
590 extern PFNGLINVALIDATESUBFRAMEBUFFERPROC glInvalidateSubFramebuffer;
591 extern PFNGLINVALIDATETEXIMAGEPROC glInvalidateTexImage;
592 extern PFNGLINVALIDATETEXSUBIMAGEPROC glInvalidateTexSubImage;
593 extern PFNGLISBUFFERPROC glIsBuffer;
594 extern PFNGLISBUFFERRESIDENTNVPROC glIsBufferResidentNV;
595 extern PFNGLISCOMMANDLISTNVPROC glIsCommandListNV;
596 extern PFNGLISENABLEDINDEXEDEXTPROC glIsEnabledIndexedEXT;
597 extern PFNGLISENABLEDIPROC glIsEnabledi;
598 extern PFNGLISENABLEDPROC glIsEnabled;
599 extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer;
600 extern PFNGLISIMAGEHANDLERESIDENTARBPROC glIsImageHandleResidentARB;
601 extern PFNGLISIMAGEHANDLERESIDENTNVPROC glIsImageHandleResidentNV;
602 extern PFNGLISNAMEDBUFFERRESIDENTNVPROC glIsNamedBufferResidentNV;
603 extern PFNGLISNAMEDSTRINGARBPROC glIsNamedStringARB;
604 extern PFNGLISPATHNVPROC glIsPathNV;
605 extern PFNGLISPOINTINFILLPATHNVPROC glIsPointInFillPathNV;
606 extern PFNGLISPOINTINSTROKEPATHNVPROC glIsPointInStrokePathNV;
607 extern PFNGLISPROGRAMPIPELINEPROC glIsProgramPipeline;
608 extern PFNGLISPROGRAMPROC glIsProgram;
609 extern PFNGLISQUERYPROC glIsQuery;
610 extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer;
611 extern PFNGLISSAMPLERPROC glIsSampler;
612 extern PFNGLISSHADERPROC glIsShader;
613 extern PFNGLISSTATENVPROC glIsStateNV;
614 extern PFNGLISSYNCPROC glIsSync;
615 extern PFNGLISTEXTUREHANDLERESIDENTARBPROC glIsTextureHandleResidentARB;
616 extern PFNGLISTEXTUREHANDLERESIDENTNVPROC glIsTextureHandleResidentNV;
617 extern PFNGLISTEXTUREPROC glIsTexture;
618 extern PFNGLISTRANSFORMFEEDBACKPROC glIsTransformFeedback;
619 extern PFNGLISVERTEXARRAYPROC glIsVertexArray;
620 extern PFNGLLABELOBJECTEXTPROC glLabelObjectEXT;
621 extern PFNGLLINEWIDTHPROC glLineWidth;
622 extern PFNGLLINKPROGRAMPROC glLinkProgram;
623 extern PFNGLLISTDRAWCOMMANDSSTATESCLIENTNVPROC glListDrawCommandsStatesClientNV;
624 extern PFNGLLOGICOPPROC glLogicOp;
625 extern PFNGLMAKEBUFFERNONRESIDENTNVPROC glMakeBufferNonResidentNV;
626 extern PFNGLMAKEBUFFERRESIDENTNVPROC glMakeBufferResidentNV;
627 extern PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC glMakeImageHandleNonResidentARB;
628 extern PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC glMakeImageHandleNonResidentNV;
629 extern PFNGLMAKEIMAGEHANDLERESIDENTARBPROC glMakeImageHandleResidentARB;
630 extern PFNGLMAKEIMAGEHANDLERESIDENTNVPROC glMakeImageHandleResidentNV;
631 extern PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC glMakeNamedBufferNonResidentNV;
632 extern PFNGLMAKENAMEDBUFFERRESIDENTNVPROC glMakeNamedBufferResidentNV;
633 extern PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC glMakeTextureHandleNonResidentARB;
634 extern PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC glMakeTextureHandleNonResidentNV;
635 extern PFNGLMAKETEXTUREHANDLERESIDENTARBPROC glMakeTextureHandleResidentARB;
636 extern PFNGLMAKETEXTUREHANDLERESIDENTNVPROC glMakeTextureHandleResidentNV;
637 extern PFNGLMAPBUFFERPROC glMapBuffer;
638 extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
639 extern PFNGLMAPNAMEDBUFFEREXTPROC glMapNamedBufferEXT;
640 extern PFNGLMAPNAMEDBUFFERPROC glMapNamedBuffer;
641 extern PFNGLMAPNAMEDBUFFERRANGEEXTPROC glMapNamedBufferRangeEXT;
642 extern PFNGLMAPNAMEDBUFFERRANGEPROC glMapNamedBufferRange;
643 extern PFNGLMATRIXFRUSTUMEXTPROC glMatrixFrustumEXT;
644 extern PFNGLMATRIXLOAD3X2FNVPROC glMatrixLoad3x2fNV;
645 extern PFNGLMATRIXLOAD3X3FNVPROC glMatrixLoad3x3fNV;
646 extern PFNGLMATRIXLOADDEXTPROC glMatrixLoaddEXT;
647 extern PFNGLMATRIXLOADFEXTPROC glMatrixLoadfEXT;
648 extern PFNGLMATRIXLOADIDENTITYEXTPROC glMatrixLoadIdentityEXT;
649 extern PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC glMatrixLoadTranspose3x3fNV;
650 extern PFNGLMATRIXLOADTRANSPOSEDEXTPROC glMatrixLoadTransposedEXT;
651 extern PFNGLMATRIXLOADTRANSPOSEFEXTPROC glMatrixLoadTransposefEXT;
652 extern PFNGLMATRIXMULT3X2FNVPROC glMatrixMult3x2fNV;
653 extern PFNGLMATRIXMULT3X3FNVPROC glMatrixMult3x3fNV;
654 extern PFNGLMATRIXMULTDEXTPROC glMatrixMultdEXT;
655 extern PFNGLMATRIXMULTFEXTPROC glMatrixMultfEXT;
656 extern PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC glMatrixMultTranspose3x3fNV;
657 extern PFNGLMATRIXMULTTRANSPOSEDEXTPROC glMatrixMultTransposedEXT;
658 extern PFNGLMATRIXMULTTRANSPOSEFEXTPROC glMatrixMultTransposefEXT;
659 extern PFNGLMATRIXORTHOEXTPROC glMatrixOrthoEXT;
660 extern PFNGLMATRIXPOPEXTPROC glMatrixPopEXT;
661 extern PFNGLMATRIXPUSHEXTPROC glMatrixPushEXT;
662 extern PFNGLMATRIXROTATEDEXTPROC glMatrixRotatedEXT;
663 extern PFNGLMATRIXROTATEFEXTPROC glMatrixRotatefEXT;
664 extern PFNGLMATRIXSCALEDEXTPROC glMatrixScaledEXT;
665 extern PFNGLMATRIXSCALEFEXTPROC glMatrixScalefEXT;
666 extern PFNGLMATRIXTRANSLATEDEXTPROC glMatrixTranslatedEXT;
667 extern PFNGLMATRIXTRANSLATEFEXTPROC glMatrixTranslatefEXT;
668 extern PFNGLMAXSHADERCOMPILERTHREADSARBPROC glMaxShaderCompilerThreadsARB;
669 extern PFNGLMEMORYBARRIERBYREGIONPROC glMemoryBarrierByRegion;
670 extern PFNGLMEMORYBARRIERPROC glMemoryBarrier;
671 extern PFNGLMINSAMPLESHADINGARBPROC glMinSampleShadingARB;
672 extern PFNGLMINSAMPLESHADINGPROC glMinSampleShading;
673 extern PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSCOUNTNVPROC glMultiDrawArraysIndirectBindlessCountNV;
674 extern PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC glMultiDrawArraysIndirectBindlessNV;
675 extern PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC glMultiDrawArraysIndirectCountARB;
676 extern PFNGLMULTIDRAWARRAYSINDIRECTPROC glMultiDrawArraysIndirect;
677 extern PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays;
678 extern PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glMultiDrawElementsBaseVertex;
679 extern PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSCOUNTNVPROC glMultiDrawElementsIndirectBindlessCountNV;
680 extern PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC glMultiDrawElementsIndirectBindlessNV;
681 extern PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC glMultiDrawElementsIndirectCountARB;
682 extern PFNGLMULTIDRAWELEMENTSINDIRECTPROC glMultiDrawElementsIndirect;
683 extern PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements;
684 extern PFNGLMULTITEXBUFFEREXTPROC glMultiTexBufferEXT;
685 extern PFNGLMULTITEXCOORDPOINTEREXTPROC glMultiTexCoordPointerEXT;
686 extern PFNGLMULTITEXENVFEXTPROC glMultiTexEnvfEXT;
687 extern PFNGLMULTITEXENVFVEXTPROC glMultiTexEnvfvEXT;
688 extern PFNGLMULTITEXENVIEXTPROC glMultiTexEnviEXT;
689 extern PFNGLMULTITEXENVIVEXTPROC glMultiTexEnvivEXT;
690 extern PFNGLMULTITEXGENDEXTPROC glMultiTexGendEXT;
691 extern PFNGLMULTITEXGENDVEXTPROC glMultiTexGendvEXT;
692 extern PFNGLMULTITEXGENFEXTPROC glMultiTexGenfEXT;
693 extern PFNGLMULTITEXGENFVEXTPROC glMultiTexGenfvEXT;
694 extern PFNGLMULTITEXGENIEXTPROC glMultiTexGeniEXT;
695 extern PFNGLMULTITEXGENIVEXTPROC glMultiTexGenivEXT;
696 extern PFNGLMULTITEXIMAGE1DEXTPROC glMultiTexImage1DEXT;
697 extern PFNGLMULTITEXIMAGE2DEXTPROC glMultiTexImage2DEXT;
698 extern PFNGLMULTITEXIMAGE3DEXTPROC glMultiTexImage3DEXT;
699 extern PFNGLMULTITEXPARAMETERFEXTPROC glMultiTexParameterfEXT;
700 extern PFNGLMULTITEXPARAMETERFVEXTPROC glMultiTexParameterfvEXT;
701 extern PFNGLMULTITEXPARAMETERIEXTPROC glMultiTexParameteriEXT;
702 extern PFNGLMULTITEXPARAMETERIIVEXTPROC glMultiTexParameterIivEXT;
703 extern PFNGLMULTITEXPARAMETERIUIVEXTPROC glMultiTexParameterIuivEXT;
704 extern PFNGLMULTITEXPARAMETERIVEXTPROC glMultiTexParameterivEXT;
705 extern PFNGLMULTITEXRENDERBUFFEREXTPROC glMultiTexRenderbufferEXT;
706 extern PFNGLMULTITEXSUBIMAGE1DEXTPROC glMultiTexSubImage1DEXT;
707 extern PFNGLMULTITEXSUBIMAGE2DEXTPROC glMultiTexSubImage2DEXT;
708 extern PFNGLMULTITEXSUBIMAGE3DEXTPROC glMultiTexSubImage3DEXT;
709 extern PFNGLNAMEDBUFFERDATAEXTPROC glNamedBufferDataEXT;
710 extern PFNGLNAMEDBUFFERDATAPROC glNamedBufferData;
711 extern PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC glNamedBufferPageCommitmentARB;
712 extern PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC glNamedBufferPageCommitmentEXT;
713 extern PFNGLNAMEDBUFFERSTORAGEEXTPROC glNamedBufferStorageEXT;
714 extern PFNGLNAMEDBUFFERSTORAGEPROC glNamedBufferStorage;
715 extern PFNGLNAMEDBUFFERSUBDATAEXTPROC glNamedBufferSubDataEXT;
716 extern PFNGLNAMEDBUFFERSUBDATAPROC glNamedBufferSubData;
717 extern PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC glNamedCopyBufferSubDataEXT;
718 extern PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC glNamedFramebufferDrawBuffer;
719 extern PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC glNamedFramebufferDrawBuffers;
720 extern PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC glNamedFramebufferParameteriEXT;
721 extern PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC glNamedFramebufferParameteri;
722 extern PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC glNamedFramebufferReadBuffer;
723 extern PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC glNamedFramebufferRenderbufferEXT;
724 extern PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC glNamedFramebufferRenderbuffer;
725 extern PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVARBPROC glNamedFramebufferSampleLocationsfvARB;
726 extern PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC glNamedFramebufferSampleLocationsfvNV;
727 extern PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC glNamedFramebufferTexture1DEXT;
728 extern PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC glNamedFramebufferTexture2DEXT;
729 extern PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC glNamedFramebufferTexture3DEXT;
730 extern PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC glNamedFramebufferTextureEXT;
731 extern PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC glNamedFramebufferTextureFaceEXT;
732 extern PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC glNamedFramebufferTextureLayerEXT;
733 extern PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC glNamedFramebufferTextureLayer;
734 extern PFNGLNAMEDFRAMEBUFFERTEXTUREPROC glNamedFramebufferTexture;
735 extern PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC glNamedProgramLocalParameter4dEXT;
736 extern PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC glNamedProgramLocalParameter4dvEXT;
737 extern PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC glNamedProgramLocalParameter4fEXT;
738 extern PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC glNamedProgramLocalParameter4fvEXT;
739 extern PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC glNamedProgramLocalParameterI4iEXT;
740 extern PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC glNamedProgramLocalParameterI4ivEXT;
741 extern PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC glNamedProgramLocalParameterI4uiEXT;
742 extern PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC glNamedProgramLocalParameterI4uivEXT;
743 extern PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC glNamedProgramLocalParameters4fvEXT;
744 extern PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC glNamedProgramLocalParametersI4ivEXT;
745 extern PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC glNamedProgramLocalParametersI4uivEXT;
746 extern PFNGLNAMEDPROGRAMSTRINGEXTPROC glNamedProgramStringEXT;
747 extern PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC glNamedRenderbufferStorageEXT;
748 extern PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC glNamedRenderbufferStorageMultisampleCoverageEXT;
749 extern PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glNamedRenderbufferStorageMultisampleEXT;
750 extern PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC glNamedRenderbufferStorageMultisample;
751 extern PFNGLNAMEDRENDERBUFFERSTORAGEPROC glNamedRenderbufferStorage;
752 extern PFNGLNAMEDSTRINGARBPROC glNamedStringARB;
753 extern PFNGLNORMALFORMATNVPROC glNormalFormatNV;
754 extern PFNGLOBJECTLABELPROC glObjectLabel;
755 extern PFNGLOBJECTPTRLABELPROC glObjectPtrLabel;
756 extern PFNGLPATCHPARAMETERFVPROC glPatchParameterfv;
757 extern PFNGLPATCHPARAMETERIPROC glPatchParameteri;
758 extern PFNGLPATHCOMMANDSNVPROC glPathCommandsNV;
759 extern PFNGLPATHCOORDSNVPROC glPathCoordsNV;
760 extern PFNGLPATHCOVERDEPTHFUNCNVPROC glPathCoverDepthFuncNV;
761 extern PFNGLPATHDASHARRAYNVPROC glPathDashArrayNV;
762 extern PFNGLPATHGLYPHINDEXARRAYNVPROC glPathGlyphIndexArrayNV;
763 extern PFNGLPATHGLYPHINDEXRANGENVPROC glPathGlyphIndexRangeNV;
764 extern PFNGLPATHGLYPHRANGENVPROC glPathGlyphRangeNV;
765 extern PFNGLPATHGLYPHSNVPROC glPathGlyphsNV;
766 extern PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC glPathMemoryGlyphIndexArrayNV;
767 extern PFNGLPATHPARAMETERFNVPROC glPathParameterfNV;
768 extern PFNGLPATHPARAMETERFVNVPROC glPathParameterfvNV;
769 extern PFNGLPATHPARAMETERINVPROC glPathParameteriNV;
770 extern PFNGLPATHPARAMETERIVNVPROC glPathParameterivNV;
771 extern PFNGLPATHSTENCILDEPTHOFFSETNVPROC glPathStencilDepthOffsetNV;
772 extern PFNGLPATHSTENCILFUNCNVPROC glPathStencilFuncNV;
773 extern PFNGLPATHSTRINGNVPROC glPathStringNV;
774 extern PFNGLPATHSUBCOMMANDSNVPROC glPathSubCommandsNV;
775 extern PFNGLPATHSUBCOORDSNVPROC glPathSubCoordsNV;
776 extern PFNGLPAUSETRANSFORMFEEDBACKPROC glPauseTransformFeedback;
777 extern PFNGLPIXELSTOREFPROC glPixelStoref;
778 extern PFNGLPIXELSTOREIPROC glPixelStorei;
779 extern PFNGLPOINTALONGPATHNVPROC glPointAlongPathNV;
780 extern PFNGLPOINTPARAMETERFPROC glPointParameterf;
781 extern PFNGLPOINTPARAMETERFVPROC glPointParameterfv;
782 extern PFNGLPOINTPARAMETERIPROC glPointParameteri;
783 extern PFNGLPOINTPARAMETERIVPROC glPointParameteriv;
784 extern PFNGLPOINTSIZEPROC glPointSize;
785 extern PFNGLPOLYGONMODEPROC glPolygonMode;
786 extern PFNGLPOLYGONOFFSETCLAMPEXTPROC glPolygonOffsetClampEXT;
787 extern PFNGLPOLYGONOFFSETPROC glPolygonOffset;
788 extern PFNGLPOPDEBUGGROUPPROC glPopDebugGroup;
789 extern PFNGLPOPGROUPMARKEREXTPROC glPopGroupMarkerEXT;
790 extern PFNGLPRIMITIVEBOUNDINGBOXARBPROC glPrimitiveBoundingBoxARB;
791 extern PFNGLPRIMITIVERESTARTINDEXPROC glPrimitiveRestartIndex;
792 extern PFNGLPROGRAMBINARYPROC glProgramBinary;
793 extern PFNGLPROGRAMPARAMETERIARBPROC glProgramParameteriARB;
794 extern PFNGLPROGRAMPARAMETERIPROC glProgramParameteri;
795 extern PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC glProgramPathFragmentInputGenNV;
796 extern PFNGLPROGRAMUNIFORM1DEXTPROC glProgramUniform1dEXT;
797 extern PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d;
798 extern PFNGLPROGRAMUNIFORM1DVEXTPROC glProgramUniform1dvEXT;
799 extern PFNGLPROGRAMUNIFORM1DVPROC glProgramUniform1dv;
800 extern PFNGLPROGRAMUNIFORM1FEXTPROC glProgramUniform1fEXT;
801 extern PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f;
802 extern PFNGLPROGRAMUNIFORM1FVEXTPROC glProgramUniform1fvEXT;
803 extern PFNGLPROGRAMUNIFORM1FVPROC glProgramUniform1fv;
804 extern PFNGLPROGRAMUNIFORM1I64ARBPROC glProgramUniform1i64ARB;
805 extern PFNGLPROGRAMUNIFORM1I64NVPROC glProgramUniform1i64NV;
806 extern PFNGLPROGRAMUNIFORM1I64VARBPROC glProgramUniform1i64vARB;
807 extern PFNGLPROGRAMUNIFORM1I64VNVPROC glProgramUniform1i64vNV;
808 extern PFNGLPROGRAMUNIFORM1IEXTPROC glProgramUniform1iEXT;
809 extern PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i;
810 extern PFNGLPROGRAMUNIFORM1IVEXTPROC glProgramUniform1ivEXT;
811 extern PFNGLPROGRAMUNIFORM1IVPROC glProgramUniform1iv;
812 extern PFNGLPROGRAMUNIFORM1UI64ARBPROC glProgramUniform1ui64ARB;
813 extern PFNGLPROGRAMUNIFORM1UI64NVPROC glProgramUniform1ui64NV;
814 extern PFNGLPROGRAMUNIFORM1UI64VARBPROC glProgramUniform1ui64vARB;
815 extern PFNGLPROGRAMUNIFORM1UI64VNVPROC glProgramUniform1ui64vNV;
816 extern PFNGLPROGRAMUNIFORM1UIEXTPROC glProgramUniform1uiEXT;
817 extern PFNGLPROGRAMUNIFORM1UIPROC glProgramUniform1ui;
818 extern PFNGLPROGRAMUNIFORM1UIVEXTPROC glProgramUniform1uivEXT;
819 extern PFNGLPROGRAMUNIFORM1UIVPROC glProgramUniform1uiv;
820 extern PFNGLPROGRAMUNIFORM2DEXTPROC glProgramUniform2dEXT;
821 extern PFNGLPROGRAMUNIFORM2DPROC glProgramUniform2d;
822 extern PFNGLPROGRAMUNIFORM2DVEXTPROC glProgramUniform2dvEXT;
823 extern PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv;
824 extern PFNGLPROGRAMUNIFORM2FEXTPROC glProgramUniform2fEXT;
825 extern PFNGLPROGRAMUNIFORM2FPROC glProgramUniform2f;
826 extern PFNGLPROGRAMUNIFORM2FVEXTPROC glProgramUniform2fvEXT;
827 extern PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv;
828 extern PFNGLPROGRAMUNIFORM2I64ARBPROC glProgramUniform2i64ARB;
829 extern PFNGLPROGRAMUNIFORM2I64NVPROC glProgramUniform2i64NV;
830 extern PFNGLPROGRAMUNIFORM2I64VARBPROC glProgramUniform2i64vARB;
831 extern PFNGLPROGRAMUNIFORM2I64VNVPROC glProgramUniform2i64vNV;
832 extern PFNGLPROGRAMUNIFORM2IEXTPROC glProgramUniform2iEXT;
833 extern PFNGLPROGRAMUNIFORM2IPROC glProgramUniform2i;
834 extern PFNGLPROGRAMUNIFORM2IVEXTPROC glProgramUniform2ivEXT;
835 extern PFNGLPROGRAMUNIFORM2IVPROC glProgramUniform2iv;
836 extern PFNGLPROGRAMUNIFORM2UI64ARBPROC glProgramUniform2ui64ARB;
837 extern PFNGLPROGRAMUNIFORM2UI64NVPROC glProgramUniform2ui64NV;
838 extern PFNGLPROGRAMUNIFORM2UI64VARBPROC glProgramUniform2ui64vARB;
839 extern PFNGLPROGRAMUNIFORM2UI64VNVPROC glProgramUniform2ui64vNV;
840 extern PFNGLPROGRAMUNIFORM2UIEXTPROC glProgramUniform2uiEXT;
841 extern PFNGLPROGRAMUNIFORM2UIPROC glProgramUniform2ui;
842 extern PFNGLPROGRAMUNIFORM2UIVEXTPROC glProgramUniform2uivEXT;
843 extern PFNGLPROGRAMUNIFORM2UIVPROC glProgramUniform2uiv;
844 extern PFNGLPROGRAMUNIFORM3DEXTPROC glProgramUniform3dEXT;
845 extern PFNGLPROGRAMUNIFORM3DPROC glProgramUniform3d;
846 extern PFNGLPROGRAMUNIFORM3DVEXTPROC glProgramUniform3dvEXT;
847 extern PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv;
848 extern PFNGLPROGRAMUNIFORM3FEXTPROC glProgramUniform3fEXT;
849 extern PFNGLPROGRAMUNIFORM3FPROC glProgramUniform3f;
850 extern PFNGLPROGRAMUNIFORM3FVEXTPROC glProgramUniform3fvEXT;
851 extern PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv;
852 extern PFNGLPROGRAMUNIFORM3I64ARBPROC glProgramUniform3i64ARB;
853 extern PFNGLPROGRAMUNIFORM3I64NVPROC glProgramUniform3i64NV;
854 extern PFNGLPROGRAMUNIFORM3I64VARBPROC glProgramUniform3i64vARB;
855 extern PFNGLPROGRAMUNIFORM3I64VNVPROC glProgramUniform3i64vNV;
856 extern PFNGLPROGRAMUNIFORM3IEXTPROC glProgramUniform3iEXT;
857 extern PFNGLPROGRAMUNIFORM3IPROC glProgramUniform3i;
858 extern PFNGLPROGRAMUNIFORM3IVEXTPROC glProgramUniform3ivEXT;
859 extern PFNGLPROGRAMUNIFORM3IVPROC glProgramUniform3iv;
860 extern PFNGLPROGRAMUNIFORM3UI64ARBPROC glProgramUniform3ui64ARB;
861 extern PFNGLPROGRAMUNIFORM3UI64NVPROC glProgramUniform3ui64NV;
862 extern PFNGLPROGRAMUNIFORM3UI64VARBPROC glProgramUniform3ui64vARB;
863 extern PFNGLPROGRAMUNIFORM3UI64VNVPROC glProgramUniform3ui64vNV;
864 extern PFNGLPROGRAMUNIFORM3UIEXTPROC glProgramUniform3uiEXT;
865 extern PFNGLPROGRAMUNIFORM3UIPROC glProgramUniform3ui;
866 extern PFNGLPROGRAMUNIFORM3UIVEXTPROC glProgramUniform3uivEXT;
867 extern PFNGLPROGRAMUNIFORM3UIVPROC glProgramUniform3uiv;
868 extern PFNGLPROGRAMUNIFORM4DEXTPROC glProgramUniform4dEXT;
869 extern PFNGLPROGRAMUNIFORM4DPROC glProgramUniform4d;
870 extern PFNGLPROGRAMUNIFORM4DVEXTPROC glProgramUniform4dvEXT;
871 extern PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv;
872 extern PFNGLPROGRAMUNIFORM4FEXTPROC glProgramUniform4fEXT;
873 extern PFNGLPROGRAMUNIFORM4FPROC glProgramUniform4f;
874 extern PFNGLPROGRAMUNIFORM4FVEXTPROC glProgramUniform4fvEXT;
875 extern PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv;
876 extern PFNGLPROGRAMUNIFORM4I64ARBPROC glProgramUniform4i64ARB;
877 extern PFNGLPROGRAMUNIFORM4I64NVPROC glProgramUniform4i64NV;
878 extern PFNGLPROGRAMUNIFORM4I64VARBPROC glProgramUniform4i64vARB;
879 extern PFNGLPROGRAMUNIFORM4I64VNVPROC glProgramUniform4i64vNV;
880 extern PFNGLPROGRAMUNIFORM4IEXTPROC glProgramUniform4iEXT;
881 extern PFNGLPROGRAMUNIFORM4IPROC glProgramUniform4i;
882 extern PFNGLPROGRAMUNIFORM4IVEXTPROC glProgramUniform4ivEXT;
883 extern PFNGLPROGRAMUNIFORM4IVPROC glProgramUniform4iv;
884 extern PFNGLPROGRAMUNIFORM4UI64ARBPROC glProgramUniform4ui64ARB;
885 extern PFNGLPROGRAMUNIFORM4UI64NVPROC glProgramUniform4ui64NV;
886 extern PFNGLPROGRAMUNIFORM4UI64VARBPROC glProgramUniform4ui64vARB;
887 extern PFNGLPROGRAMUNIFORM4UI64VNVPROC glProgramUniform4ui64vNV;
888 extern PFNGLPROGRAMUNIFORM4UIEXTPROC glProgramUniform4uiEXT;
889 extern PFNGLPROGRAMUNIFORM4UIPROC glProgramUniform4ui;
890 extern PFNGLPROGRAMUNIFORM4UIVEXTPROC glProgramUniform4uivEXT;
891 extern PFNGLPROGRAMUNIFORM4UIVPROC glProgramUniform4uiv;
892 extern PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC glProgramUniformHandleui64ARB;
893 extern PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC glProgramUniformHandleui64NV;
894 extern PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC glProgramUniformHandleui64vARB;
895 extern PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC glProgramUniformHandleui64vNV;
896 extern PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC glProgramUniformMatrix2dvEXT;
897 extern PFNGLPROGRAMUNIFORMMATRIX2DVPROC glProgramUniformMatrix2dv;
898 extern PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC glProgramUniformMatrix2fvEXT;
899 extern PFNGLPROGRAMUNIFORMMATRIX2FVPROC glProgramUniformMatrix2fv;
900 extern PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC glProgramUniformMatrix2x3dvEXT;
901 extern PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC glProgramUniformMatrix2x3dv;
902 extern PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC glProgramUniformMatrix2x3fvEXT;
903 extern PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glProgramUniformMatrix2x3fv;
904 extern PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC glProgramUniformMatrix2x4dvEXT;
905 extern PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC glProgramUniformMatrix2x4dv;
906 extern PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC glProgramUniformMatrix2x4fvEXT;
907 extern PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glProgramUniformMatrix2x4fv;
908 extern PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC glProgramUniformMatrix3dvEXT;
909 extern PFNGLPROGRAMUNIFORMMATRIX3DVPROC glProgramUniformMatrix3dv;
910 extern PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC glProgramUniformMatrix3fvEXT;
911 extern PFNGLPROGRAMUNIFORMMATRIX3FVPROC glProgramUniformMatrix3fv;
912 extern PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC glProgramUniformMatrix3x2dvEXT;
913 extern PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC glProgramUniformMatrix3x2dv;
914 extern PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC glProgramUniformMatrix3x2fvEXT;
915 extern PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glProgramUniformMatrix3x2fv;
916 extern PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC glProgramUniformMatrix3x4dvEXT;
917 extern PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC glProgramUniformMatrix3x4dv;
918 extern PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC glProgramUniformMatrix3x4fvEXT;
919 extern PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glProgramUniformMatrix3x4fv;
920 extern PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC glProgramUniformMatrix4dvEXT;
921 extern PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv;
922 extern PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC glProgramUniformMatrix4fvEXT;
923 extern PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv;
924 extern PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC glProgramUniformMatrix4x2dvEXT;
925 extern PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC glProgramUniformMatrix4x2dv;
926 extern PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC glProgramUniformMatrix4x2fvEXT;
927 extern PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glProgramUniformMatrix4x2fv;
928 extern PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC glProgramUniformMatrix4x3dvEXT;
929 extern PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC glProgramUniformMatrix4x3dv;
930 extern PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC glProgramUniformMatrix4x3fvEXT;
931 extern PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glProgramUniformMatrix4x3fv;
932 extern PFNGLPROGRAMUNIFORMUI64NVPROC glProgramUniformui64NV;
933 extern PFNGLPROGRAMUNIFORMUI64VNVPROC glProgramUniformui64vNV;
934 extern PFNGLPROVOKINGVERTEXPROC glProvokingVertex;
935 extern PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC glPushClientAttribDefaultEXT;
936 extern PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup;
937 extern PFNGLPUSHGROUPMARKEREXTPROC glPushGroupMarkerEXT;
938 extern PFNGLQUERYCOUNTERPROC glQueryCounter;
939 extern PFNGLRASTERSAMPLESEXTPROC glRasterSamplesEXT;
940 extern PFNGLREADBUFFERPROC glReadBuffer;
941 extern PFNGLREADNPIXELSARBPROC glReadnPixelsARB;
942 extern PFNGLREADNPIXELSPROC glReadnPixels;
943 extern PFNGLREADPIXELSPROC glReadPixels;
944 extern PFNGLRELEASESHADERCOMPILERPROC glReleaseShaderCompiler;
945 extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC glRenderbufferStorageMultisampleCoverageNV;
946 extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample;
947 extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage;
948 extern PFNGLRESOLVEDEPTHVALUESNVPROC glResolveDepthValuesNV;
949 extern PFNGLRESUMETRANSFORMFEEDBACKPROC glResumeTransformFeedback;
950 extern PFNGLSAMPLECOVERAGEPROC glSampleCoverage;
951 extern PFNGLSAMPLEMASKIPROC glSampleMaski;
952 extern PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf;
953 extern PFNGLSAMPLERPARAMETERFVPROC glSamplerParameterfv;
954 extern PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv;
955 extern PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri;
956 extern PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv;
957 extern PFNGLSAMPLERPARAMETERIVPROC glSamplerParameteriv;
958 extern PFNGLSCISSORARRAYVPROC glScissorArrayv;
959 extern PFNGLSCISSORINDEXEDPROC glScissorIndexed;
960 extern PFNGLSCISSORINDEXEDVPROC glScissorIndexedv;
961 extern PFNGLSCISSORPROC glScissor;
962 extern PFNGLSECONDARYCOLORFORMATNVPROC glSecondaryColorFormatNV;
963 extern PFNGLSELECTPERFMONITORCOUNTERSAMDPROC glSelectPerfMonitorCountersAMD;
964 extern PFNGLSHADERBINARYPROC glShaderBinary;
965 extern PFNGLSHADERSOURCEPROC glShaderSource;
966 extern PFNGLSHADERSTORAGEBLOCKBINDINGPROC glShaderStorageBlockBinding;
967 extern PFNGLSIGNALVKFENCENVPROC glSignalVkFenceNV;
968 extern PFNGLSIGNALVKSEMAPHORENVPROC glSignalVkSemaphoreNV;
969 extern PFNGLSPECIALIZESHADERARBPROC glSpecializeShaderARB;
970 extern PFNGLSTATECAPTURENVPROC glStateCaptureNV;
971 extern PFNGLSTENCILFILLPATHINSTANCEDNVPROC glStencilFillPathInstancedNV;
972 extern PFNGLSTENCILFILLPATHNVPROC glStencilFillPathNV;
973 extern PFNGLSTENCILFUNCPROC glStencilFunc;
974 extern PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate;
975 extern PFNGLSTENCILMASKPROC glStencilMask;
976 extern PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate;
977 extern PFNGLSTENCILOPPROC glStencilOp;
978 extern PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate;
979 extern PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC glStencilStrokePathInstancedNV;
980 extern PFNGLSTENCILSTROKEPATHNVPROC glStencilStrokePathNV;
981 extern PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC glStencilThenCoverFillPathInstancedNV;
982 extern PFNGLSTENCILTHENCOVERFILLPATHNVPROC glStencilThenCoverFillPathNV;
983 extern PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC glStencilThenCoverStrokePathInstancedNV;
984 extern PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC glStencilThenCoverStrokePathNV;
985 extern PFNGLSUBPIXELPRECISIONBIASNVPROC glSubpixelPrecisionBiasNV;
986 extern PFNGLTEXBUFFERARBPROC glTexBufferARB;
987 extern PFNGLTEXBUFFERPROC glTexBuffer;
988 extern PFNGLTEXBUFFERRANGEPROC glTexBufferRange;
989 extern PFNGLTEXCOORDFORMATNVPROC glTexCoordFormatNV;
990 extern PFNGLTEXIMAGE1DPROC glTexImage1D;
991 extern PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample;
992 extern PFNGLTEXIMAGE2DPROC glTexImage2D;
993 extern PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
994 extern PFNGLTEXIMAGE3DPROC glTexImage3D;
995 extern PFNGLTEXPAGECOMMITMENTARBPROC glTexPageCommitmentARB;
996 extern PFNGLTEXPARAMETERFPROC glTexParameterf;
997 extern PFNGLTEXPARAMETERFVPROC glTexParameterfv;
998 extern PFNGLTEXPARAMETERIIVPROC glTexParameterIiv;
999 extern PFNGLTEXPARAMETERIPROC glTexParameteri;
1000 extern PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv;
1001 extern PFNGLTEXPARAMETERIVPROC glTexParameteriv;
1002 extern PFNGLTEXSTORAGE1DPROC glTexStorage1D;
1003 extern PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample;
1004 extern PFNGLTEXSTORAGE2DPROC glTexStorage2D;
1005 extern PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample;
1006 extern PFNGLTEXSTORAGE3DPROC glTexStorage3D;
1007 extern PFNGLTEXSUBIMAGE1DPROC glTexSubImage1D;
1008 extern PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D;
1009 extern PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
1010 extern PFNGLTEXTUREBARRIERNVPROC glTextureBarrierNV;
1011 extern PFNGLTEXTUREBARRIERPROC glTextureBarrier;
1012 extern PFNGLTEXTUREBUFFEREXTPROC glTextureBufferEXT;
1013 extern PFNGLTEXTUREBUFFERPROC glTextureBuffer;
1014 extern PFNGLTEXTUREBUFFERRANGEEXTPROC glTextureBufferRangeEXT;
1015 extern PFNGLTEXTUREBUFFERRANGEPROC glTextureBufferRange;
1016 extern PFNGLTEXTUREIMAGE1DEXTPROC glTextureImage1DEXT;
1017 extern PFNGLTEXTUREIMAGE2DEXTPROC glTextureImage2DEXT;
1018 extern PFNGLTEXTUREIMAGE3DEXTPROC glTextureImage3DEXT;
1019 extern PFNGLTEXTUREPAGECOMMITMENTEXTPROC glTexturePageCommitmentEXT;
1020 extern PFNGLTEXTUREPARAMETERFEXTPROC glTextureParameterfEXT;
1021 extern PFNGLTEXTUREPARAMETERFPROC glTextureParameterf;
1022 extern PFNGLTEXTUREPARAMETERFVEXTPROC glTextureParameterfvEXT;
1023 extern PFNGLTEXTUREPARAMETERFVPROC glTextureParameterfv;
1024 extern PFNGLTEXTUREPARAMETERIEXTPROC glTextureParameteriEXT;
1025 extern PFNGLTEXTUREPARAMETERIIVEXTPROC glTextureParameterIivEXT;
1026 extern PFNGLTEXTUREPARAMETERIIVPROC glTextureParameterIiv;
1027 extern PFNGLTEXTUREPARAMETERIPROC glTextureParameteri;
1028 extern PFNGLTEXTUREPARAMETERIUIVEXTPROC glTextureParameterIuivEXT;
1029 extern PFNGLTEXTUREPARAMETERIUIVPROC glTextureParameterIuiv;
1030 extern PFNGLTEXTUREPARAMETERIVEXTPROC glTextureParameterivEXT;
1031 extern PFNGLTEXTUREPARAMETERIVPROC glTextureParameteriv;
1032 extern PFNGLTEXTURERENDERBUFFEREXTPROC glTextureRenderbufferEXT;
1033 extern PFNGLTEXTURESTORAGE1DEXTPROC glTextureStorage1DEXT;
1034 extern PFNGLTEXTURESTORAGE1DPROC glTextureStorage1D;
1035 extern PFNGLTEXTURESTORAGE2DEXTPROC glTextureStorage2DEXT;
1036 extern PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC glTextureStorage2DMultisampleEXT;
1037 extern PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC glTextureStorage2DMultisample;
1038 extern PFNGLTEXTURESTORAGE2DPROC glTextureStorage2D;
1039 extern PFNGLTEXTURESTORAGE3DEXTPROC glTextureStorage3DEXT;
1040 extern PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC glTextureStorage3DMultisampleEXT;
1041 extern PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC glTextureStorage3DMultisample;
1042 extern PFNGLTEXTURESTORAGE3DPROC glTextureStorage3D;
1043 extern PFNGLTEXTURESUBIMAGE1DEXTPROC glTextureSubImage1DEXT;
1044 extern PFNGLTEXTURESUBIMAGE1DPROC glTextureSubImage1D;
1045 extern PFNGLTEXTURESUBIMAGE2DEXTPROC glTextureSubImage2DEXT;
1046 extern PFNGLTEXTURESUBIMAGE2DPROC glTextureSubImage2D;
1047 extern PFNGLTEXTURESUBIMAGE3DEXTPROC glTextureSubImage3DEXT;
1048 extern PFNGLTEXTURESUBIMAGE3DPROC glTextureSubImage3D;
1049 extern PFNGLTEXTUREVIEWPROC glTextureView;
1050 extern PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC glTransformFeedbackBufferBase;
1051 extern PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC glTransformFeedbackBufferRange;
1052 extern PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings;
1053 extern PFNGLTRANSFORMPATHNVPROC glTransformPathNV;
1054 extern PFNGLUNIFORM1DPROC glUniform1d;
1055 extern PFNGLUNIFORM1DVPROC glUniform1dv;
1056 extern PFNGLUNIFORM1FPROC glUniform1f;
1057 extern PFNGLUNIFORM1FVPROC glUniform1fv;
1058 extern PFNGLUNIFORM1I64ARBPROC glUniform1i64ARB;
1059 extern PFNGLUNIFORM1I64NVPROC glUniform1i64NV;
1060 extern PFNGLUNIFORM1I64VARBPROC glUniform1i64vARB;
1061 extern PFNGLUNIFORM1I64VNVPROC glUniform1i64vNV;
1062 extern PFNGLUNIFORM1IPROC glUniform1i;
1063 extern PFNGLUNIFORM1IVPROC glUniform1iv;
1064 extern PFNGLUNIFORM1UI64ARBPROC glUniform1ui64ARB;
1065 extern PFNGLUNIFORM1UI64NVPROC glUniform1ui64NV;
1066 extern PFNGLUNIFORM1UI64VARBPROC glUniform1ui64vARB;
1067 extern PFNGLUNIFORM1UI64VNVPROC glUniform1ui64vNV;
1068 extern PFNGLUNIFORM1UIPROC glUniform1ui;
1069 extern PFNGLUNIFORM1UIVPROC glUniform1uiv;
1070 extern PFNGLUNIFORM2DPROC glUniform2d;
1071 extern PFNGLUNIFORM2DVPROC glUniform2dv;
1072 extern PFNGLUNIFORM2FPROC glUniform2f;
1073 extern PFNGLUNIFORM2FVPROC glUniform2fv;
1074 extern PFNGLUNIFORM2I64ARBPROC glUniform2i64ARB;
1075 extern PFNGLUNIFORM2I64NVPROC glUniform2i64NV;
1076 extern PFNGLUNIFORM2I64VARBPROC glUniform2i64vARB;
1077 extern PFNGLUNIFORM2I64VNVPROC glUniform2i64vNV;
1078 extern PFNGLUNIFORM2IPROC glUniform2i;
1079 extern PFNGLUNIFORM2IVPROC glUniform2iv;
1080 extern PFNGLUNIFORM2UI64ARBPROC glUniform2ui64ARB;
1081 extern PFNGLUNIFORM2UI64NVPROC glUniform2ui64NV;
1082 extern PFNGLUNIFORM2UI64VARBPROC glUniform2ui64vARB;
1083 extern PFNGLUNIFORM2UI64VNVPROC glUniform2ui64vNV;
1084 extern PFNGLUNIFORM2UIPROC glUniform2ui;
1085 extern PFNGLUNIFORM2UIVPROC glUniform2uiv;
1086 extern PFNGLUNIFORM3DPROC glUniform3d;
1087 extern PFNGLUNIFORM3DVPROC glUniform3dv;
1088 extern PFNGLUNIFORM3FPROC glUniform3f;
1089 extern PFNGLUNIFORM3FVPROC glUniform3fv;
1090 extern PFNGLUNIFORM3I64ARBPROC glUniform3i64ARB;
1091 extern PFNGLUNIFORM3I64NVPROC glUniform3i64NV;
1092 extern PFNGLUNIFORM3I64VARBPROC glUniform3i64vARB;
1093 extern PFNGLUNIFORM3I64VNVPROC glUniform3i64vNV;
1094 extern PFNGLUNIFORM3IPROC glUniform3i;
1095 extern PFNGLUNIFORM3IVPROC glUniform3iv;
1096 extern PFNGLUNIFORM3UI64ARBPROC glUniform3ui64ARB;
1097 extern PFNGLUNIFORM3UI64NVPROC glUniform3ui64NV;
1098 extern PFNGLUNIFORM3UI64VARBPROC glUniform3ui64vARB;
1099 extern PFNGLUNIFORM3UI64VNVPROC glUniform3ui64vNV;
1100 extern PFNGLUNIFORM3UIPROC glUniform3ui;
1101 extern PFNGLUNIFORM3UIVPROC glUniform3uiv;
1102 extern PFNGLUNIFORM4DPROC glUniform4d;
1103 extern PFNGLUNIFORM4DVPROC glUniform4dv;
1104 extern PFNGLUNIFORM4FPROC glUniform4f;
1105 extern PFNGLUNIFORM4FVPROC glUniform4fv;
1106 extern PFNGLUNIFORM4I64ARBPROC glUniform4i64ARB;
1107 extern PFNGLUNIFORM4I64NVPROC glUniform4i64NV;
1108 extern PFNGLUNIFORM4I64VARBPROC glUniform4i64vARB;
1109 extern PFNGLUNIFORM4I64VNVPROC glUniform4i64vNV;
1110 extern PFNGLUNIFORM4IPROC glUniform4i;
1111 extern PFNGLUNIFORM4IVPROC glUniform4iv;
1112 extern PFNGLUNIFORM4UI64ARBPROC glUniform4ui64ARB;
1113 extern PFNGLUNIFORM4UI64NVPROC glUniform4ui64NV;
1114 extern PFNGLUNIFORM4UI64VARBPROC glUniform4ui64vARB;
1115 extern PFNGLUNIFORM4UI64VNVPROC glUniform4ui64vNV;
1116 extern PFNGLUNIFORM4UIPROC glUniform4ui;
1117 extern PFNGLUNIFORM4UIVPROC glUniform4uiv;
1118 extern PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding;
1119 extern PFNGLUNIFORMHANDLEUI64ARBPROC glUniformHandleui64ARB;
1120 extern PFNGLUNIFORMHANDLEUI64NVPROC glUniformHandleui64NV;
1121 extern PFNGLUNIFORMHANDLEUI64VARBPROC glUniformHandleui64vARB;
1122 extern PFNGLUNIFORMHANDLEUI64VNVPROC glUniformHandleui64vNV;
1123 extern PFNGLUNIFORMMATRIX2DVPROC glUniformMatrix2dv;
1124 extern PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv;
1125 extern PFNGLUNIFORMMATRIX2X3DVPROC glUniformMatrix2x3dv;
1126 extern PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv;
1127 extern PFNGLUNIFORMMATRIX2X4DVPROC glUniformMatrix2x4dv;
1128 extern PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv;
1129 extern PFNGLUNIFORMMATRIX3DVPROC glUniformMatrix3dv;
1130 extern PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv;
1131 extern PFNGLUNIFORMMATRIX3X2DVPROC glUniformMatrix3x2dv;
1132 extern PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv;
1133 extern PFNGLUNIFORMMATRIX3X4DVPROC glUniformMatrix3x4dv;
1134 extern PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv;
1135 extern PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv;
1136 extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
1137 extern PFNGLUNIFORMMATRIX4X2DVPROC glUniformMatrix4x2dv;
1138 extern PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv;
1139 extern PFNGLUNIFORMMATRIX4X3DVPROC glUniformMatrix4x3dv;
1140 extern PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv;
1141 extern PFNGLUNIFORMSUBROUTINESUIVPROC glUniformSubroutinesuiv;
1142 extern PFNGLUNIFORMUI64NVPROC glUniformui64NV;
1143 extern PFNGLUNIFORMUI64VNVPROC glUniformui64vNV;
1144 extern PFNGLUNMAPBUFFERPROC glUnmapBuffer;
1145 extern PFNGLUNMAPNAMEDBUFFEREXTPROC glUnmapNamedBufferEXT;
1146 extern PFNGLUNMAPNAMEDBUFFERPROC glUnmapNamedBuffer;
1147 extern PFNGLUSEPROGRAMPROC glUseProgram;
1148 extern PFNGLUSEPROGRAMSTAGESPROC glUseProgramStages;
1149 extern PFNGLUSESHADERPROGRAMEXTPROC glUseShaderProgramEXT;
1150 extern PFNGLVALIDATEPROGRAMPIPELINEPROC glValidateProgramPipeline;
1151 extern PFNGLVALIDATEPROGRAMPROC glValidateProgram;
1152 extern PFNGLVERTEXARRAYATTRIBBINDINGPROC glVertexArrayAttribBinding;
1153 extern PFNGLVERTEXARRAYATTRIBFORMATPROC glVertexArrayAttribFormat;
1154 extern PFNGLVERTEXARRAYATTRIBIFORMATPROC glVertexArrayAttribIFormat;
1155 extern PFNGLVERTEXARRAYATTRIBLFORMATPROC glVertexArrayAttribLFormat;
1156 extern PFNGLVERTEXARRAYBINDINGDIVISORPROC glVertexArrayBindingDivisor;
1157 extern PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC glVertexArrayBindVertexBufferEXT;
1158 extern PFNGLVERTEXARRAYCOLOROFFSETEXTPROC glVertexArrayColorOffsetEXT;
1159 extern PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC glVertexArrayEdgeFlagOffsetEXT;
1160 extern PFNGLVERTEXARRAYELEMENTBUFFERPROC glVertexArrayElementBuffer;
1161 extern PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC glVertexArrayFogCoordOffsetEXT;
1162 extern PFNGLVERTEXARRAYINDEXOFFSETEXTPROC glVertexArrayIndexOffsetEXT;
1163 extern PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC glVertexArrayMultiTexCoordOffsetEXT;
1164 extern PFNGLVERTEXARRAYNORMALOFFSETEXTPROC glVertexArrayNormalOffsetEXT;
1165 extern PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC glVertexArraySecondaryColorOffsetEXT;
1166 extern PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC glVertexArrayTexCoordOffsetEXT;
1167 extern PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC glVertexArrayVertexAttribBindingEXT;
1168 extern PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC glVertexArrayVertexAttribDivisorEXT;
1169 extern PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC glVertexArrayVertexAttribFormatEXT;
1170 extern PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC glVertexArrayVertexAttribIFormatEXT;
1171 extern PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC glVertexArrayVertexAttribIOffsetEXT;
1172 extern PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC glVertexArrayVertexAttribLFormatEXT;
1173 extern PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC glVertexArrayVertexAttribLOffsetEXT;
1174 extern PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC glVertexArrayVertexAttribOffsetEXT;
1175 extern PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC glVertexArrayVertexBindingDivisorEXT;
1176 extern PFNGLVERTEXARRAYVERTEXBUFFERPROC glVertexArrayVertexBuffer;
1177 extern PFNGLVERTEXARRAYVERTEXBUFFERSPROC glVertexArrayVertexBuffers;
1178 extern PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC glVertexArrayVertexOffsetEXT;
1179 extern PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d;
1180 extern PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv;
1181 extern PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f;
1182 extern PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv;
1183 extern PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s;
1184 extern PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv;
1185 extern PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d;
1186 extern PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv;
1187 extern PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f;
1188 extern PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv;
1189 extern PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s;
1190 extern PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv;
1191 extern PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d;
1192 extern PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv;
1193 extern PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f;
1194 extern PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv;
1195 extern PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s;
1196 extern PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv;
1197 extern PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv;
1198 extern PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d;
1199 extern PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv;
1200 extern PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f;
1201 extern PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv;
1202 extern PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv;
1203 extern PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv;
1204 extern PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv;
1205 extern PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv;
1206 extern PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub;
1207 extern PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv;
1208 extern PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv;
1209 extern PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv;
1210 extern PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s;
1211 extern PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv;
1212 extern PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv;
1213 extern PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv;
1214 extern PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv;
1215 extern PFNGLVERTEXATTRIBBINDINGPROC glVertexAttribBinding;
1216 extern PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisorARB;
1217 extern PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor;
1218 extern PFNGLVERTEXATTRIBFORMATNVPROC glVertexAttribFormatNV;
1219 extern PFNGLVERTEXATTRIBFORMATPROC glVertexAttribFormat;
1220 extern PFNGLVERTEXATTRIBI1IPROC glVertexAttribI1i;
1221 extern PFNGLVERTEXATTRIBI1IVPROC glVertexAttribI1iv;
1222 extern PFNGLVERTEXATTRIBI1UIPROC glVertexAttribI1ui;
1223 extern PFNGLVERTEXATTRIBI1UIVPROC glVertexAttribI1uiv;
1224 extern PFNGLVERTEXATTRIBI2IPROC glVertexAttribI2i;
1225 extern PFNGLVERTEXATTRIBI2IVPROC glVertexAttribI2iv;
1226 extern PFNGLVERTEXATTRIBI2UIPROC glVertexAttribI2ui;
1227 extern PFNGLVERTEXATTRIBI2UIVPROC glVertexAttribI2uiv;
1228 extern PFNGLVERTEXATTRIBI3IPROC glVertexAttribI3i;
1229 extern PFNGLVERTEXATTRIBI3IVPROC glVertexAttribI3iv;
1230 extern PFNGLVERTEXATTRIBI3UIPROC glVertexAttribI3ui;
1231 extern PFNGLVERTEXATTRIBI3UIVPROC glVertexAttribI3uiv;
1232 extern PFNGLVERTEXATTRIBI4BVPROC glVertexAttribI4bv;
1233 extern PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i;
1234 extern PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv;
1235 extern PFNGLVERTEXATTRIBI4SVPROC glVertexAttribI4sv;
1236 extern PFNGLVERTEXATTRIBI4UBVPROC glVertexAttribI4ubv;
1237 extern PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui;
1238 extern PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv;
1239 extern PFNGLVERTEXATTRIBI4USVPROC glVertexAttribI4usv;
1240 extern PFNGLVERTEXATTRIBIFORMATNVPROC glVertexAttribIFormatNV;
1241 extern PFNGLVERTEXATTRIBIFORMATPROC glVertexAttribIFormat;
1242 extern PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer;
1243 extern PFNGLVERTEXATTRIBL1DPROC glVertexAttribL1d;
1244 extern PFNGLVERTEXATTRIBL1DVPROC glVertexAttribL1dv;
1245 extern PFNGLVERTEXATTRIBL1I64NVPROC glVertexAttribL1i64NV;
1246 extern PFNGLVERTEXATTRIBL1I64VNVPROC glVertexAttribL1i64vNV;
1247 extern PFNGLVERTEXATTRIBL1UI64ARBPROC glVertexAttribL1ui64ARB;
1248 extern PFNGLVERTEXATTRIBL1UI64NVPROC glVertexAttribL1ui64NV;
1249 extern PFNGLVERTEXATTRIBL1UI64VARBPROC glVertexAttribL1ui64vARB;
1250 extern PFNGLVERTEXATTRIBL1UI64VNVPROC glVertexAttribL1ui64vNV;
1251 extern PFNGLVERTEXATTRIBL2DPROC glVertexAttribL2d;
1252 extern PFNGLVERTEXATTRIBL2DVPROC glVertexAttribL2dv;
1253 extern PFNGLVERTEXATTRIBL2I64NVPROC glVertexAttribL2i64NV;
1254 extern PFNGLVERTEXATTRIBL2I64VNVPROC glVertexAttribL2i64vNV;
1255 extern PFNGLVERTEXATTRIBL2UI64NVPROC glVertexAttribL2ui64NV;
1256 extern PFNGLVERTEXATTRIBL2UI64VNVPROC glVertexAttribL2ui64vNV;
1257 extern PFNGLVERTEXATTRIBL3DPROC glVertexAttribL3d;
1258 extern PFNGLVERTEXATTRIBL3DVPROC glVertexAttribL3dv;
1259 extern PFNGLVERTEXATTRIBL3I64NVPROC glVertexAttribL3i64NV;
1260 extern PFNGLVERTEXATTRIBL3I64VNVPROC glVertexAttribL3i64vNV;
1261 extern PFNGLVERTEXATTRIBL3UI64NVPROC glVertexAttribL3ui64NV;
1262 extern PFNGLVERTEXATTRIBL3UI64VNVPROC glVertexAttribL3ui64vNV;
1263 extern PFNGLVERTEXATTRIBL4DPROC glVertexAttribL4d;
1264 extern PFNGLVERTEXATTRIBL4DVPROC glVertexAttribL4dv;
1265 extern PFNGLVERTEXATTRIBL4I64NVPROC glVertexAttribL4i64NV;
1266 extern PFNGLVERTEXATTRIBL4I64VNVPROC glVertexAttribL4i64vNV;
1267 extern PFNGLVERTEXATTRIBL4UI64NVPROC glVertexAttribL4ui64NV;
1268 extern PFNGLVERTEXATTRIBL4UI64VNVPROC glVertexAttribL4ui64vNV;
1269 extern PFNGLVERTEXATTRIBLFORMATNVPROC glVertexAttribLFormatNV;
1270 extern PFNGLVERTEXATTRIBLFORMATPROC glVertexAttribLFormat;
1271 extern PFNGLVERTEXATTRIBLPOINTERPROC glVertexAttribLPointer;
1272 extern PFNGLVERTEXATTRIBP1UIPROC glVertexAttribP1ui;
1273 extern PFNGLVERTEXATTRIBP1UIVPROC glVertexAttribP1uiv;
1274 extern PFNGLVERTEXATTRIBP2UIPROC glVertexAttribP2ui;
1275 extern PFNGLVERTEXATTRIBP2UIVPROC glVertexAttribP2uiv;
1276 extern PFNGLVERTEXATTRIBP3UIPROC glVertexAttribP3ui;
1277 extern PFNGLVERTEXATTRIBP3UIVPROC glVertexAttribP3uiv;
1278 extern PFNGLVERTEXATTRIBP4UIPROC glVertexAttribP4ui;
1279 extern PFNGLVERTEXATTRIBP4UIVPROC glVertexAttribP4uiv;
1280 extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
1281 extern PFNGLVERTEXBINDINGDIVISORPROC glVertexBindingDivisor;
1282 extern PFNGLVERTEXFORMATNVPROC glVertexFormatNV;
1283 extern PFNGLVIEWPORTARRAYVPROC glViewportArrayv;
1284 extern PFNGLVIEWPORTINDEXEDFPROC glViewportIndexedf;
1285 extern PFNGLVIEWPORTINDEXEDFVPROC glViewportIndexedfv;
1286 extern PFNGLVIEWPORTPOSITIONWSCALENVPROC glViewportPositionWScaleNV;
1287 extern PFNGLVIEWPORTPROC glViewport;
1288 extern PFNGLVIEWPORTSWIZZLENVPROC glViewportSwizzleNV;
1289 extern PFNGLWAITSYNCPROC glWaitSync;
1290 extern PFNGLWAITVKSEMAPHORENVPROC glWaitVkSemaphoreNV;
1291 extern PFNGLWEIGHTPATHSNVPROC glWeightPathsNV;
1292 extern PFNGLWINDOWRECTANGLESEXTPROC glWindowRectanglesEXT;
1293 #endif
1294 
1296 
1297 // 標準ライブラリ
1298 #include <array>
1299 #include <vector>
1300 #include <memory>
1301 #include <cstddef>
1302 
1306 namespace gg
1307 {
1312  {
1315  };
1316 
1320  extern GLint ggBufferAlignment;
1321 
1325  using GgVector = std::array<GLfloat, 4>;
1326 
1332  extern void ggInit();
1333 
1342  extern void _ggError(const char *name = nullptr, unsigned int line = 0);
1343 
1352 #if defined(DEBUG)
1353 # define ggError() gg::_ggError(__FILE__, __LINE__)
1354 #else
1355 # define ggError()
1356 #endif
1357 
1366  extern void _ggFBOError(const char *name = nullptr, unsigned int line = 0);
1367 
1376 #if defined(DEBUG)
1377 # define ggFBOError() gg::_ggFBOError(__FILE__, __LINE__)
1378 #else
1379 # define ggFBOError()
1380 #endif
1381 
1392  extern bool ggSaveTga(const char *name, const void *buffer,
1393  unsigned int width, unsigned int height, unsigned int depth);
1394 
1401  extern bool ggSaveColor(const char *name);
1402 
1409  extern bool ggSaveDepth(const char *name);
1410 
1421  extern bool ggReadImage(const char *name, std::vector<GLubyte> &image, GLsizei *pWidth, GLsizei *pHeight, GLenum *pFormat);
1422 
1435  extern GLuint ggLoadTexture(const GLvoid *image, GLsizei width, GLsizei height,
1436  GLenum format = GL_BGR, GLenum type = GL_UNSIGNED_BYTE,
1437  GLenum internal = GL_RGB, GLenum wrap = GL_CLAMP_TO_EDGE);
1438 
1449  extern GLuint ggLoadImage(const char *name, GLsizei *pWidth = nullptr, GLsizei *pHeight = nullptr,
1450  GLenum internal = 0, GLenum wrap = GL_CLAMP_TO_EDGE);
1451 
1463  extern void ggCreateNormalMap(const GLubyte *hmap, GLsizei width, GLsizei height, GLenum format, GLfloat nz,
1464  GLenum internal, std::vector<GgVector> &nmap);
1465 
1476  extern GLuint ggLoadHeight(const char *name, float nz, GLsizei *pWidth = nullptr, GLsizei *pHeight = nullptr,
1477  GLenum internal = GL_RGBA);
1478 
1492  extern GLuint ggCreateShader(const char *vsrc, const char *fsrc = nullptr, const char *gsrc = nullptr,
1493  GLint nvarying = 0, const char *const varyings[] = nullptr,
1494  const char *vtext = "vertex shader",
1495  const char *ftext = "fragment shader",
1496  const char *gtext = "geometry shader");
1497 
1508  extern GLuint ggLoadShader(const char *vert, const char *frag = nullptr, const char *geom = nullptr,
1509  GLint nvarying = 0, const char *const varyings[] = nullptr);
1510 
1511 #if !defined(__APPLE__)
1519  extern GLuint ggCreateComputeShader(const char *csrc, const char *ctext = "compute shader");
1520 
1527  extern GLuint ggLoadComputeShader(const char *comp);
1528 #endif
1529 
1535  extern GLfloat ggLength3(const GLfloat *a);
1536 
1542  inline void ggNormalize3(GLfloat *a)
1543  {
1544  const GLfloat l(ggLength3(a));
1545  if (l > 0.0f)
1546  {
1547  a[0] /= l;
1548  a[1] /= l;
1549  a[2] /= l;
1550  }
1551  }
1552 
1559  inline GLfloat ggDot3(const GLfloat *a, const GLfloat *b)
1560  {
1561  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
1562  }
1563 
1571  inline void ggCross(GLfloat *c, const GLfloat *a, const GLfloat *b)
1572  {
1573  c[0] = a[1] * b[2] - a[2] * b[1];
1574  c[1] = a[2] * b[0] - a[0] * b[2];
1575  c[2] = a[0] * b[1] - a[1] * b[0];
1576  }
1577 
1583  extern GLfloat ggLength4(const GLfloat *a);
1584 
1590  inline GLfloat ggLength4(const GgVector &a)
1591  {
1592  return ggLength4(a.data());
1593  }
1594 
1600  inline void ggNormalize4(GLfloat *a)
1601  {
1602  const GLfloat l(ggLength4(a));
1603  if (l > 0.0f)
1604  {
1605  a[0] /= l;
1606  a[1] /= l;
1607  a[2] /= l;
1608  a[3] /= l;
1609  }
1610  }
1611 
1617  inline void ggNormalize4(GgVector &a)
1618  {
1619  const GLfloat l(ggLength4(a));
1620  if (l > 0.0f)
1621  {
1622  a[0] /= l;
1623  a[1] /= l;
1624  a[2] /= l;
1625  a[3] /= l;
1626  }
1627  }
1628 
1635  inline GLfloat ggDot4(const GLfloat *a, const GLfloat *b)
1636  {
1637  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
1638  }
1639 
1646  inline GLfloat ggDot4(const GgVector &a, const GgVector &b)
1647  {
1648  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
1649  }
1650 
1654  class GgMatrix
1655  {
1656  // 変換行列の要素
1657  std::array<GLfloat, 16> array;
1658 
1659  // 行列 a とベクトル b の積をベクトル c に代入する
1660  void projection(GLfloat *c, const GLfloat *a, const GLfloat *b) const;
1661 
1662  // 行列 a と行列 b の積を行列 c に代入する
1663  void multiply(GLfloat *c, const GLfloat *a, const GLfloat *b) const;
1664 
1665  // 変換行列の要素に四元数から直接データを保存できるようにする
1666  friend class GgQuaternion;
1667 
1668  public:
1669 
1672 
1675  GgMatrix(const GLfloat *a)
1676  {
1677  load(a);
1678  }
1679 
1682  GgMatrix(const GgMatrix &m)
1683  {
1684  load(m);
1685  }
1686 
1689 
1693  GgMatrix &load(const GLfloat *a)
1694  {
1695  for (int i = 0; i < 16; ++i) array[i] = a[i];
1696  return *this;
1697  }
1698 
1703  {
1704  return load(m.array.data());
1705  }
1706 
1710  GgMatrix &loadAdd(const GLfloat *a)
1711  {
1712  for (int i = 0; i < 16; ++i) array[i] += a[i];
1713  return *this;
1714  }
1715 
1720  {
1721  return loadAdd(m.array.data());
1722  }
1723 
1727  GgMatrix &loadSubtract(const GLfloat *a)
1728  {
1729  for (int i = 0; i < 16; ++i) array[i] -= a[i];
1730  return *this;
1731  }
1732 
1737  {
1738  return loadSubtract(m.array.data());
1739  }
1740 
1744  GgMatrix &loadMultiply(const GLfloat *a)
1745  {
1746  return load(multiply(a));
1747  }
1748 
1753  {
1754  return loadMultiply(m.array.data());
1755  }
1756 
1760  GgMatrix &loadDivide(const GLfloat *a)
1761  {
1762  return load(divide(a));
1763  }
1764 
1769  {
1770  return loadDivide(m.array.data());
1771  }
1772 
1776  GgMatrix add(const GLfloat *a) const
1777  {
1778  GgMatrix t;
1779  return t.loadAdd(a);
1780  }
1781 
1785  GgMatrix add(const GgMatrix &m) const
1786  {
1787  return add(m.array.data());
1788  }
1789 
1793  GgMatrix subtract(const GLfloat *a) const
1794  {
1795  GgMatrix t;
1796  return t.loadSubtract(a);
1797  }
1798 
1802  GgMatrix subtract(const GgMatrix &m) const
1803  {
1804  return subtract(m.array.data());
1805  }
1806 
1810  GgMatrix multiply(const GLfloat *a) const
1811  {
1812  GgMatrix t;
1813  multiply(t.array.data(), array.data(), a);
1814  return t;
1815  }
1816 
1820  GgMatrix multiply(const GgMatrix &m) const
1821  {
1822  return multiply(m.array.data());
1823  }
1824 
1828  GgMatrix divide(const GLfloat *a) const
1829  {
1830  GgMatrix t, ia;
1831  ia.loadInvert(a);
1832  multiply(t.array.data(), array.data(), ia.array.data());
1833  return t;
1834  }
1835 
1839  GgMatrix divide(const GgMatrix &m) const
1840  {
1841  return divide(m.array.data());
1842  }
1843 
1844  // 演算子
1845  GgMatrix &operator=(const GLfloat *a)
1846  {
1847  return load(a);
1848  }
1850  {
1851  return operator=(m.array.data());
1852  }
1853  GgMatrix &operator+=(const GLfloat *a)
1854  {
1855  return loadAdd(a);
1856  }
1858  {
1859  return operator+=(m.array.data());
1860  }
1861  GgMatrix &operator-=(const GLfloat *a)
1862  {
1863  return loadSubtract(a);
1864  }
1866  {
1867  return operator-=(m.array.data());
1868  }
1869  GgMatrix &operator*=(const GLfloat *a)
1870  {
1871  return loadMultiply(a);
1872  }
1874  {
1875  return operator*=(m.array.data());
1876  }
1877  GgMatrix &operator/=(const GLfloat *a)
1878  {
1879  return loadDivide(a);
1880  }
1882  {
1883  return operator/=(m.array.data());
1884  }
1885  GgMatrix operator+(const GLfloat *a) const
1886  {
1887  return add(a);
1888  }
1889  GgMatrix operator+(const GgMatrix &m) const
1890  {
1891  return operator+(m.array.data());
1892  }
1893  GgMatrix operator-(const GLfloat *a) const
1894  {
1895  return subtract(a);
1896  }
1897  GgMatrix operator-(const GgMatrix &m) const
1898  {
1899  return operator-(m.array.data());
1900  }
1901  GgMatrix operator*(const GLfloat *a) const
1902  {
1903  return multiply(a);
1904  }
1905  GgMatrix operator*(const GgMatrix &m) const
1906  {
1907  return operator*(m.array.data());
1908  }
1909  GgMatrix operator/(const GLfloat *a) const
1910  {
1911  return divide(a);
1912  }
1913  GgMatrix operator/(const GgMatrix &m) const
1914  {
1915  return operator/(m.array.data());
1916  }
1917 
1920 
1927  GgMatrix &loadTranslate(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f);
1928 
1932  GgMatrix &loadTranslate(const GLfloat *t)
1933  {
1934  return loadTranslate(t[0], t[1], t[2]);
1935  }
1936 
1941  {
1942  return loadTranslate(t[0], t[1], t[2], t[3]);
1943  }
1944 
1951  GgMatrix &loadScale(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f);
1952 
1956  GgMatrix &loadScale(const GLfloat *s)
1957  {
1958  return loadScale(s[0], s[1], s[2]);
1959  }
1960 
1965  {
1966  return loadScale(s[0], s[1], s[2], s[3]);
1967  }
1968 
1972  GgMatrix &loadRotateX(GLfloat a);
1973 
1977  GgMatrix &loadRotateY(GLfloat a);
1978 
1982  GgMatrix &loadRotateZ(GLfloat a);
1983 
1990  GgMatrix &loadRotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a);
1991 
1996  GgMatrix &loadRotate(const GLfloat *r, GLfloat a)
1997  {
1998  return loadRotate(r[0], r[1], r[2], a);
1999  }
2000 
2005  GgMatrix &loadRotate(const GgVector &r, GLfloat a)
2006  {
2007  return loadRotate(r[0], r[1], r[2], a);
2008  }
2009 
2013  GgMatrix &loadRotate(const GLfloat *r)
2014  {
2015  return loadRotate(r[0], r[1], r[2], r[3]);
2016  }
2017 
2022  {
2023  return loadRotate(r[0], r[1], r[2], r[3]);
2024  }
2025 
2037  GgMatrix &loadLookat(GLfloat ex, GLfloat ey, GLfloat ez,
2038  GLfloat tx, GLfloat ty, GLfloat tz,
2039  GLfloat ux, GLfloat uy, GLfloat uz);
2040 
2046  GgMatrix &loadLookat(const GLfloat *e, const GLfloat *t, const GLfloat *u)
2047  {
2048  return loadLookat(e[0], e[1], e[2], t[0], t[1], t[2], u[0], u[1], u[2]);
2049  }
2050 
2056  GgMatrix &loadLookat(const GgVector &e, const GgVector &t, const GgVector &u)
2057  {
2058  return loadLookat(e[0], e[1], e[2], t[0], t[1], t[2], u[0], u[1], u[2]);
2059  }
2060 
2069  GgMatrix &loadOrthogonal(GLfloat left, GLfloat right,
2070  GLfloat bottom, GLfloat top,
2071  GLfloat zNear, GLfloat zFar);
2072 
2081  GgMatrix &loadFrustum(GLfloat left, GLfloat right,
2082  GLfloat bottom, GLfloat top,
2083  GLfloat zNear, GLfloat zFar);
2084 
2091  GgMatrix &loadPerspective(GLfloat fovy, GLfloat aspect,
2092  GLfloat zNear, GLfloat zFar);
2093 
2097  GgMatrix &loadTranspose(const GLfloat *a);
2098 
2103  {
2104  return loadTranspose(m.array.data());
2105  }
2106 
2110  GgMatrix &loadInvert(const GLfloat *a);
2111 
2116  {
2117  return loadInvert(m.array.data());
2118  }
2119 
2123  GgMatrix &loadNormal(const GLfloat *a);
2124 
2129  {
2130  return loadNormal(m.array.data());
2131  }
2132 
2139  GgMatrix translate(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f) const
2140  {
2141  GgMatrix m;
2142  return multiply(m.loadTranslate(x, y, z, w));
2143  }
2144 
2148  GgMatrix translate(const GLfloat *t) const
2149  {
2150  return translate(t[0], t[1], t[2]);
2151  }
2152 
2156  GgMatrix translate(const GgVector &t) const
2157  {
2158  return translate(t[0], t[1], t[2], t[3]);
2159  }
2160 
2167  GgMatrix scale(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f) const
2168  {
2169  GgMatrix m;
2170  return multiply(m.loadScale(x, y, z, w));
2171  }
2172 
2176  GgMatrix scale(const GLfloat *s) const
2177  {
2178  return scale(s[0], s[1], s[2]);
2179  }
2180 
2184  GgMatrix scale(const GgVector &s) const
2185  {
2186  return scale(s[0], s[1], s[2], s[3]);
2187  }
2188 
2192  GgMatrix rotateX(GLfloat a) const
2193  {
2194  GgMatrix m;
2195  return multiply(m.loadRotateX(a));
2196  }
2197 
2201  GgMatrix rotateY(GLfloat a) const
2202  {
2203  GgMatrix m;
2204  return multiply(m.loadRotateY(a));
2205  }
2206 
2210  GgMatrix rotateZ(GLfloat a) const
2211  {
2212  GgMatrix m;
2213  return multiply(m.loadRotateZ(a));
2214  }
2215 
2222  GgMatrix rotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a) const
2223  {
2224  GgMatrix m;
2225  return multiply(m.loadRotate(x, y, z, a));
2226  }
2227 
2232  GgMatrix rotate(const GLfloat *r, GLfloat a) const
2233  {
2234  return rotate(r[0], r[1], r[2], a);
2235  }
2236 
2241  GgMatrix rotate(const GgVector &r, GLfloat a) const
2242  {
2243  return rotate(r[0], r[1], r[2], a);
2244  }
2245 
2249  GgMatrix rotate(const GLfloat *r) const
2250  {
2251  return rotate(r[0], r[1], r[2], r[3]);
2252  }
2253 
2257  GgMatrix rotate(const GgVector &r) const
2258  {
2259  return rotate(r[0], r[1], r[2], r[3]);
2260  }
2261 
2273  GgMatrix lookat(GLfloat ex, GLfloat ey, GLfloat ez,
2274  GLfloat tx, GLfloat ty, GLfloat tz,
2275  GLfloat ux, GLfloat uy, GLfloat uz) const
2276  {
2277  GgMatrix m;
2278  return multiply(m.loadLookat(ex, ey, ez, tx, ty, tz, ux, uy, uz));
2279  }
2280 
2286  GgMatrix lookat(const GLfloat *e, const GLfloat *t, const GLfloat *u) const
2287  {
2288  return lookat(e[0], e[1], e[2], t[0], t[1], t[2], u[0], u[1], u[2]);
2289  }
2290 
2296  GgMatrix lookat(const GgVector &e, const GgVector &t, const GgVector &u) const
2297  {
2298  return lookat(e[0], e[1], e[2], t[0], t[1], t[2], u[0], u[1], u[2]);
2299  }
2300 
2309  GgMatrix orthogonal(GLfloat left, GLfloat right,
2310  GLfloat bottom, GLfloat top,
2311  GLfloat zNear, GLfloat zFar) const
2312  {
2313  GgMatrix m;
2314  return multiply(m.loadOrthogonal(left, right, bottom, top, zNear, zFar));
2315  }
2316 
2325  GgMatrix frustum(GLfloat left, GLfloat right,
2326  GLfloat bottom, GLfloat top,
2327  GLfloat zNear, GLfloat zFar) const
2328  {
2329  GgMatrix m;
2330  return multiply(m.loadFrustum(left, right, bottom, top, zNear, zFar));
2331  }
2332 
2339  GgMatrix perspective(GLfloat fovy, GLfloat aspect,
2340  GLfloat zNear, GLfloat zFar) const
2341  {
2342  GgMatrix m;
2343  return multiply(m.loadPerspective(fovy, aspect, zNear, zFar));
2344  }
2345 
2349  {
2350  GgMatrix t;
2351  return t.loadTranspose(*this);
2352  }
2353 
2357  {
2358  GgMatrix t;
2359  return t.loadInvert(*this);
2360  }
2361 
2365  {
2366  GgMatrix t;
2367  return t.loadNormal(*this);
2368  }
2369 
2373  void projection(GLfloat *c, const GLfloat *v) const
2374  {
2375  projection(c, array.data(), v);
2376  }
2377 
2381  void projection(GLfloat *c, const GgVector &v) const
2382  {
2383  projection(c, v.data());
2384  }
2385 
2389  void projection(GgVector &c, const GLfloat *v) const
2390  {
2391  projection(c.data(), v);
2392  }
2393 
2397  void projection(GgVector &c, const GgVector &v) const
2398  {
2399  projection(c.data(), v.data());
2400  }
2401 
2405  GgVector operator*(const GgVector &v) const
2406  {
2407  GgVector c;
2408  projection(c, v);
2409  return c;
2410  }
2411 
2414  const GLfloat *get() const
2415  {
2416  return array.data();
2417  }
2418 
2421  void get(GLfloat *a) const
2422  {
2423  for (int i = 0; i < 16; ++i) a[i] = array[i];
2424  }
2425 
2428  GLfloat get(int i) const
2429  {
2430  return array[i];
2431  }
2432 
2435  const GLfloat &operator[](std::size_t i) const
2436  {
2437  return array[i];
2438  }
2439 
2442  GLfloat &operator[](std::size_t i)
2443  {
2444  return array[i];
2445  }
2446  };
2447 
2451  {
2452  GgMatrix t;
2453  return t.loadIdentity();
2454  };
2455 
2462  inline GgMatrix ggTranslate(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f)
2463  {
2464  GgMatrix m;
2465  return m.loadTranslate(x, y, z, w);
2466  }
2467 
2471  inline GgMatrix ggTranslate(const GLfloat *t)
2472  {
2473  GgMatrix m;
2474  return m.loadTranslate(t[0], t[1], t[2]);
2475  }
2476 
2480  inline GgMatrix ggTranslate(const GgVector &t)
2481  {
2482  GgMatrix m;
2483  return m.loadTranslate(t[0], t[1], t[2], t[3]);
2484  }
2485 
2492  inline GgMatrix ggScale(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f)
2493  {
2494  GgMatrix m;
2495  return m.loadScale(x, y, z, w);
2496  }
2497 
2501  inline GgMatrix ggScale(const GLfloat *s)
2502  {
2503  GgMatrix m;
2504  return m.loadScale(s[0], s[1], s[2]);
2505  }
2506 
2510  inline GgMatrix ggScale(const GgVector &s)
2511  {
2512  GgMatrix m;
2513  return m.loadScale(s[0], s[1], s[2], s[3]);
2514  }
2515 
2519  inline GgMatrix ggRotateX(GLfloat a)
2520  {
2521  GgMatrix m;
2522  return m.loadRotateX(a);
2523  }
2524 
2528  inline GgMatrix ggRotateY(GLfloat a)
2529  {
2530  GgMatrix m;
2531  return m.loadRotateY(a);
2532  }
2533 
2537  inline GgMatrix ggRotateZ(GLfloat a)
2538  {
2539  GgMatrix m;
2540  return m.loadRotateZ(a);
2541  }
2542 
2549  inline GgMatrix ggRotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a)
2550  {
2551  GgMatrix m;
2552  return m.loadRotate(x, y, z, a);
2553  }
2554 
2559  inline GgMatrix ggRotate(const GLfloat *r, GLfloat a)
2560  {
2561  GgMatrix m;
2562  return m.loadRotate(r[0], r[1], r[2], a);
2563  }
2564 
2569  inline GgMatrix ggRotate(const GgVector &r, GLfloat a)
2570  {
2571  GgMatrix m;
2572  return m.loadRotate(r[0], r[1], r[2], a);
2573  }
2574 
2578  inline GgMatrix ggRotate(const GLfloat *r)
2579  {
2580  GgMatrix m;
2581  return m.loadRotate(r[0], r[1], r[2], r[3]);
2582  }
2583 
2587  inline GgMatrix ggRotate(const GgVector &r)
2588  {
2589  GgMatrix m;
2590  return m.loadRotate(r[0], r[1], r[2], r[3]);
2591  }
2592 
2605  GLfloat ex, GLfloat ey, GLfloat ez, // 視点の位置
2606  GLfloat tx, GLfloat ty, GLfloat tz, // 目標点の位置
2607  GLfloat ux, GLfloat uy, GLfloat uz // 上方向のベクトル
2608  )
2609  {
2610  GgMatrix m;
2611  return m.loadLookat(ex, ey, ez, tx, ty, tz, ux, uy, uz);
2612  }
2613 
2620  const GLfloat *e, // 視点の位置
2621  const GLfloat *t, // 目標点の位置
2622  const GLfloat *u // 上方向のベクトル
2623  )
2624  {
2625  GgMatrix m;
2626  return m.loadLookat(e[0], e[1], e[2], t[0], t[1], t[2], u[0], u[1], u[2]);
2627  }
2628 
2635  const GgVector &e, // 視点の位置
2636  const GgVector &t, // 目標点の位置
2637  const GgVector &u // 上方向のベクトル
2638  )
2639  {
2640  GgMatrix m;
2641  return m.loadLookat(e[0], e[1], e[2], t[0], t[1], t[2], u[0], u[1], u[2]);
2642  }
2643 
2652  inline GgMatrix ggOrthogonal(GLfloat left, GLfloat right,
2653  GLfloat bottom, GLfloat top,
2654  GLfloat zNear, GLfloat zFar)
2655  {
2656  GgMatrix m;
2657  return m.loadOrthogonal(left, right, bottom, top, zNear, zFar);
2658  }
2659 
2668  inline GgMatrix ggFrustum(GLfloat left, GLfloat right,
2669  GLfloat bottom, GLfloat top,
2670  GLfloat zNear, GLfloat zFar)
2671  {
2672  GgMatrix m;
2673  return m.loadFrustum(left, right, bottom, top, zNear, zFar);
2674  }
2675 
2682  inline GgMatrix ggPerspective(GLfloat fovy, GLfloat aspect,
2683  GLfloat zNear, GLfloat zFar)
2684  {
2685  GgMatrix m;
2686  return m.loadPerspective(fovy, aspect, zNear, zFar);
2687  }
2688 
2692  inline GgMatrix ggTranspose(const GgMatrix &m)
2693  {
2694  return m.transpose();
2695  }
2696 
2700  inline GgMatrix ggInvert(const GgMatrix &m)
2701  {
2702  return m.invert();
2703  }
2704 
2708  inline GgMatrix ggNormal(const GgMatrix &m)
2709  {
2710  return m.normal();
2711  }
2712 
2717  {
2718  // 四元数の要素
2719  GgVector quaternion;
2720 
2721  // GgQuaternion 型の四元数 p と四元数 q の積を四元数 r に求める
2722  void multiply(GLfloat *r, const GLfloat *p, const GLfloat *q) const;
2723 
2724  // GgQuaternion 型の四元数 q が表す回転の変換行列を m に求める
2725  void toMatrix(GLfloat *m, const GLfloat *q) const;
2726 
2727  // 回転の変換行列 m が表す四元数を q に求める
2728  void toQuaternion(GLfloat *q, const GLfloat *m) const;
2729 
2730  // 球面線形補間 q と r を t で補間した四元数を p に求める
2731  void slerp(GLfloat *p, const GLfloat *q, const GLfloat *r, GLfloat t) const;
2732 
2733  public:
2734 
2737 
2743  GgQuaternion(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2744  {
2745  load(x, y, z, w);
2746  }
2747 
2751  {
2752  load(v);
2753  }
2754 
2757  GgQuaternion(const GLfloat *a)
2758  {
2759  load(a);
2760  }
2761 
2765  {
2766  load(q);
2767  }
2768 
2771 
2774  GLfloat norm() const
2775  {
2776  return ggLength4(quaternion.data());
2777  }
2778 
2785  GgQuaternion &load(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2786  {
2787  quaternion[0] = x;
2788  quaternion[1] = y;
2789  quaternion[2] = z;
2790  quaternion[3] = w;
2791  return *this;
2792  }
2793 
2798  {
2799  quaternion = v;
2800  return *this;
2801  }
2802 
2806  GgQuaternion &load(const GLfloat *a)
2807  {
2808  return load(a[0], a[1], a[2], a[3]);
2809  }
2810 
2815  {
2816  return load(q.quaternion);
2817  }
2818 
2825  GgQuaternion &loadAdd(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2826  {
2827  quaternion[0] += x;
2828  quaternion[1] += y;
2829  quaternion[2] += z;
2830  quaternion[3] += w;
2831  return *this;
2832  }
2833 
2838  {
2839  return loadAdd(v[0], v[1], v[2], v[3]);
2840  }
2841 
2845  GgQuaternion &loadAdd(const GLfloat *a)
2846  {
2847  return loadAdd(a[0], a[1], a[2], a[3]);
2848  }
2849 
2854  {
2855  return loadAdd(q.quaternion);
2856  }
2857 
2864  GgQuaternion &loadSubtract(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2865  {
2866  quaternion[0] -= x;
2867  quaternion[1] -= y;
2868  quaternion[2] -= z;
2869  quaternion[3] -= w;
2870  return *this;
2871  }
2872 
2877  {
2878  return loadSubtract(v[0], v[1], v[2], v[3]);
2879  }
2880 
2884  GgQuaternion &loadSubtract(const GLfloat *a)
2885  {
2886  return loadSubtract(a[0], a[1], a[2], a[3]);
2887  }
2888 
2893  {
2894  return loadSubtract(q.quaternion);
2895  }
2896 
2903  GgQuaternion &loadMultiply(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2904  {
2905  const GLfloat a[]{ x, y, z, w };
2906  return loadMultiply(a);
2907  }
2908 
2913  {
2914  return loadMultiply(v.data());
2915  }
2916 
2920  GgQuaternion &loadMultiply(const GLfloat *a)
2921  {
2922  return load(multiply(a));
2923  }
2924 
2929  {
2930  return loadMultiply(q.quaternion);
2931  }
2932 
2939  GgQuaternion &loadDivide(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2940  {
2941  const GLfloat a[] { x, y, z, w };
2942  return loadDivide(a);
2943  }
2944 
2949  {
2950  return loadDivide(v.data());
2951  }
2952 
2956  GgQuaternion &loadDivide(const GLfloat *a)
2957  {
2958  return load(divide(a));
2959  }
2960 
2965  {
2966  return loadDivide(q.quaternion);
2967  }
2968 
2975  GgQuaternion add(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
2976  {
2977  GgQuaternion s;
2978  s.quaternion[0] = quaternion[0] + x;
2979  s.quaternion[1] = quaternion[1] + y;
2980  s.quaternion[2] = quaternion[2] + z;
2981  s.quaternion[3] = quaternion[3] + w;
2982  return s;
2983  }
2984 
2988  GgQuaternion add(const GgVector &v) const
2989  {
2990  return add(v[0], v[1], v[2], v[3]);
2991  }
2992 
2996  GgQuaternion add(const GLfloat *a) const
2997  {
2998  return add(a[0], a[1], a[2], a[3]);
2999  }
3000 
3005  {
3006  return add(q.quaternion);
3007  }
3008 
3015  GgQuaternion subtract(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
3016  {
3017  GgQuaternion s;
3018  s.quaternion[0] = quaternion[0] - x;
3019  s.quaternion[1] = quaternion[1] - y;
3020  s.quaternion[2] = quaternion[2] - z;
3021  s.quaternion[3] = quaternion[3] - w;
3022  return s;
3023  }
3024 
3029  {
3030  return subtract(v[0], v[1], v[2], v[3]);
3031  }
3032 
3036  GgQuaternion subtract(const GLfloat *a) const
3037  {
3038  return subtract(a[0], a[1], a[2], a[3]);
3039  }
3040 
3045  {
3046  return subtract(q.quaternion);
3047  }
3048 
3055  GgQuaternion multiply(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
3056  {
3057  const GLfloat a[]{ x, y, z, w };
3058  return multiply(a);
3059  }
3060 
3065  {
3066  return multiply(v.data());
3067  }
3068 
3072  GgQuaternion multiply(const GLfloat *a) const
3073  {
3074  GgQuaternion s;
3075  multiply(s.quaternion.data(), quaternion.data(), a);
3076  return s;
3077  }
3078 
3083  {
3084  return multiply(q.quaternion);
3085  }
3086 
3093  GgQuaternion divide(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
3094  {
3095  const GLfloat a[]{ x, y, z, w };
3096  return divide(a);
3097  }
3098 
3102  GgQuaternion divide(const GgVector &v) const
3103  {
3104  return divide(v.data());
3105  }
3106 
3110  GgQuaternion divide(const GLfloat *a) const
3111  {
3112  GgQuaternion s, ia;
3113  ia.loadInvert(a);
3114  multiply(s.quaternion.data(), quaternion.data(), ia.quaternion.data());
3115  return s;
3116  }
3117 
3122  {
3123  return divide(q.quaternion);
3124  }
3125 
3126  // 演算子
3127  GgQuaternion &operator=(const GLfloat *a)
3128  {
3129  return load(a);
3130  }
3132  {
3133  return operator=(q.quaternion.data());
3134  }
3135  GgQuaternion &operator+=(const GLfloat *a)
3136  {
3137  return loadAdd(a);
3138  }
3140  {
3141  return operator+=(q.quaternion.data());
3142  }
3143  GgQuaternion &operator-=(const GLfloat *a)
3144  {
3145  return loadSubtract(a);
3146  }
3148  {
3149  return operator-=(q.quaternion.data());
3150  }
3151  GgQuaternion &operator*=(const GLfloat *a)
3152  {
3153  return loadMultiply(a);
3154  }
3156  {
3157  return operator*=(q.quaternion.data());
3158  }
3159  GgQuaternion &operator/=(const GLfloat *a)
3160  {
3161  return loadDivide(a);
3162  }
3164  {
3165  return operator/=(q.quaternion.data());
3166  }
3167  GgQuaternion operator+(const GLfloat *a) const
3168  {
3169  return add(a);
3170  }
3172  {
3173  return operator+(q.quaternion.data());
3174  }
3175  GgQuaternion operator-(const GLfloat *a) const
3176  {
3177  return add(a);
3178  }
3180  {
3181  return operator-(q.quaternion.data());
3182  }
3183  GgQuaternion operator*(const GLfloat *a) const
3184  {
3185  return multiply(a);
3186  }
3188  {
3189  return operator*(q.quaternion.data());
3190  }
3191  GgQuaternion operator/(const GLfloat *a) const
3192  {
3193  return divide(a);
3194  }
3196  {
3197  return operator/(q.quaternion.data());
3198  }
3199 
3203  GgQuaternion &loadMatrix(const GLfloat *a)
3204  {
3205  toQuaternion(quaternion.data(), a);
3206  return *this;
3207  }
3208 
3213  {
3214  return loadMatrix(m.get());
3215  }
3216 
3220  {
3221  return load(0.0f, 0.0f, 0.0f, 1.0f);
3222  }
3223 
3230  GgQuaternion &loadRotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a);
3231 
3236  GgQuaternion &loadRotate(const GLfloat *v, GLfloat a)
3237  {
3238  return loadRotate(v[0], v[1], v[2], a);
3239  }
3240 
3244  GgQuaternion &loadRotate(const GLfloat *v)
3245  {
3246  return loadRotate(v[0], v[1], v[2], v[3]);
3247  }
3248 
3252  GgQuaternion &loadRotateX(GLfloat a);
3253 
3257  GgQuaternion &loadRotateY(GLfloat a);
3258 
3262  GgQuaternion &loadRotateZ(GLfloat a);
3263 
3270  GgQuaternion rotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a) const
3271  {
3272  GgQuaternion q;
3273  return multiply(q.loadRotate(x, y, z, a));
3274  }
3275 
3280  GgQuaternion rotate(const GLfloat *v, GLfloat a) const
3281  {
3282  return rotate(v[0], v[1], v[2], a);
3283  }
3284 
3288  GgQuaternion rotate(const GLfloat *v) const
3289  {
3290  return rotate(v[0], v[1], v[2], v[3]);
3291  }
3292 
3296  GgQuaternion rotateX(GLfloat a) const
3297  {
3298  return rotate(1.0f, 0.0f, 0.0f, a);
3299  }
3300 
3304  GgQuaternion rotateY(GLfloat a) const
3305  {
3306  return rotate(0.0f, 1.0f, 0.0f, a);
3307  }
3308 
3312  GgQuaternion rotateZ(GLfloat a) const
3313  {
3314  return rotate(0.0f, 0.0f, 1.0f, a);
3315  }
3316 
3322  GgQuaternion &loadEuler(GLfloat heading, GLfloat pitch, GLfloat roll);
3323 
3327  GgQuaternion &loadEuler(const GLfloat *e)
3328  {
3329  return loadEuler(e[0], e[1], e[2]);
3330  }
3331 
3337  GgQuaternion euler(GLfloat heading, GLfloat pitch, GLfloat roll) const
3338  {
3339  GgQuaternion r;
3340  return multiply(r.loadEuler(heading, pitch, roll));
3341  }
3342 
3346  GgQuaternion euler(const GLfloat *e) const
3347  {
3348  return euler(e[0], e[1], e[2]);
3349  }
3350 
3356  GgQuaternion &loadSlerp(const GLfloat *a, const GLfloat *b, GLfloat t)
3357  {
3358  slerp(quaternion.data(), a, b, t);
3359  return *this;
3360  }
3361 
3367  GgQuaternion &loadSlerp(const GgQuaternion &q, const GgQuaternion &r, GLfloat t)
3368  {
3369  return loadSlerp(q.quaternion.data(), r.quaternion.data(), t);
3370  }
3371 
3377  GgQuaternion &loadSlerp(const GgQuaternion &q, const GLfloat *a, GLfloat t)
3378  {
3379  return loadSlerp(q.quaternion.data(), a, t);
3380  }
3381 
3387  GgQuaternion &loadSlerp(const GLfloat *a, const GgQuaternion &q, GLfloat t)
3388  {
3389  return loadSlerp(a, q.quaternion.data(), t);
3390  }
3391 
3395  GgQuaternion &loadNormalize(const GLfloat *a);
3396 
3401  {
3402  return loadNormalize(q.quaternion.data());
3403  }
3404 
3408  GgQuaternion &loadConjugate(const GLfloat *a);
3409 
3414  {
3415  return loadConjugate(q.quaternion.data());
3416  }
3417 
3421  GgQuaternion &loadInvert(const GLfloat *a);
3422 
3427  {
3428  return loadInvert(q.quaternion.data());
3429  }
3430 
3435  GgQuaternion slerp(GLfloat *a, GLfloat t) const
3436  {
3437  GgQuaternion p;
3438  slerp(p.quaternion.data(), quaternion.data(), a, t);
3439  return p;
3440  }
3441 
3446  GgQuaternion slerp(const GgQuaternion &q, GLfloat t) const
3447  {
3448  GgQuaternion p;
3449  slerp(p.quaternion.data(), quaternion.data(), q.quaternion.data(), t);
3450  return p;
3451  }
3452 
3456  {
3457  GgQuaternion q;
3458  q.loadNormalize(quaternion.data());
3459  return q;
3460  }
3461 
3465  {
3466  GgQuaternion q;
3467  q.loadConjugate(quaternion.data());
3468  return q;
3469  }
3470 
3474  {
3475  GgQuaternion q;
3476  q.loadInvert(quaternion.data());
3477  return q;
3478  }
3479 
3482  const GLfloat *get() const
3483  {
3484  return quaternion.data();
3485  }
3486 
3489  void get(GLfloat *a) const
3490  {
3491  a[0] = quaternion[0];
3492  a[1] = quaternion[1];
3493  a[2] = quaternion[2];
3494  a[3] = quaternion[3];
3495  }
3496 
3499  void getMatrix(GLfloat *a) const
3500  {
3501  toMatrix(a, quaternion.data());
3502  }
3503 
3506  void getMatrix(GgMatrix &m) const
3507  {
3508  getMatrix(m.array.data());
3509  }
3510 
3514  {
3515  GgMatrix m;
3516  getMatrix(m);
3517  return m;
3518  }
3519 
3522  void getConjugateMatrix(GLfloat *a) const
3523  {
3524  GgQuaternion c;
3525  c.loadConjugate(quaternion.data());
3526  toMatrix(a, c.quaternion.data());
3527  }
3528 
3532  {
3533  getConjugateMatrix(m.array.data());
3534  }
3535 
3539  {
3540  GgMatrix m;
3541  getConjugateMatrix(m);
3542  return m;
3543  }
3544  };
3545 
3552  inline GgQuaternion ggQuaternion(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
3553  {
3554  GgQuaternion q;
3555  return q.load(x, y, z, w);
3556  }
3557 
3561  inline GgQuaternion ggQuaternion(const GLfloat *a)
3562  {
3563  return ggQuaternion(a[0], a[1], a[2], a[3]);
3564  }
3565 
3569  {
3570  GgQuaternion q;
3571  return q.loadIdentity();
3572  }
3573 
3577  inline GgQuaternion ggMatrixQuaternion(const GLfloat *a)
3578  {
3579  GgQuaternion q;
3580  return q.loadMatrix(a);
3581  }
3582 
3587  {
3588  return ggMatrixQuaternion(m.get());
3589  }
3590 
3595  {
3596  GLfloat m[16];
3597  q.getMatrix(m);
3598  GgMatrix t;
3599  return t.load(m);
3600  }
3601 
3606  {
3607  GLfloat m[16];
3608  q.getMatrix(m);
3609  GgMatrix t;
3610  return t.loadTranspose(m);
3611  }
3612 
3619  inline GgQuaternion ggRotateQuaternion(GLfloat x, GLfloat y, GLfloat z, GLfloat a)
3620  {
3621  GgQuaternion q;
3622  return q.loadRotate(x, y, z, a);
3623  }
3624 
3629  inline GgQuaternion ggRotateQuaternion(const GLfloat *v, GLfloat a)
3630  {
3631  return ggRotateQuaternion(v[0], v[1], v[2], a);
3632  }
3633 
3637  inline GgQuaternion ggRotateQuaternion(const GLfloat *v)
3638  {
3639  return ggRotateQuaternion(v[0], v[1], v[2], v[3]);
3640  }
3641 
3647  inline GgQuaternion ggEulerQuaternion(GLfloat heading, GLfloat pitch, GLfloat roll)
3648  {
3649  GgQuaternion q;
3650  return q.loadEuler(heading, pitch, roll);
3651  }
3652 
3656  inline GgQuaternion ggEulerQuaternion(const GLfloat *e)
3657  {
3658  return ggEulerQuaternion(e[0], e[1], e[2]);
3659  }
3660 
3666  inline GgQuaternion ggSlerp(const GLfloat *a, const GLfloat *b, GLfloat t)
3667  {
3668  GgQuaternion r;
3669  return r.loadSlerp(a, b, t);
3670  }
3671 
3677  inline GgQuaternion ggSlerp(const GgQuaternion &q, const GgQuaternion &r, GLfloat t)
3678  {
3679  return ggSlerp(q.get(), r.get(), t);
3680  }
3681 
3687  inline GgQuaternion ggSlerp(const GgQuaternion &q, const GLfloat *a, GLfloat t)
3688  {
3689  return ggSlerp(q.get(), a, t);
3690  }
3691 
3697  inline GgQuaternion ggSlerp(const GLfloat *a, const GgQuaternion &q, GLfloat t)
3698  {
3699  return ggSlerp(a, q.get(), t);
3700  }
3701 
3705  inline GLfloat ggNorm(const GgQuaternion &q)
3706  {
3707  return q.norm();
3708  }
3709 
3714  {
3715  return q.normalize();
3716  }
3717 
3722  {
3723  return q.conjugate();
3724  }
3725 
3730  {
3731  return q.invert();
3732  }
3733 
3738  {
3739  bool drag; // ドラッグ中か否か
3740  float start[2]; // ドラッグ開始位置
3741  float scale[2]; // マウスの絶対位置→ウィンドウ内での相対位置の換算係数
3742  GgQuaternion cq; // 回転の初期値 (四元数)
3743  GgQuaternion tq; // ドラッグ中の回転 (四元数)
3744  GgMatrix rt; // 回転の変換行列
3745 
3746  public:
3747 
3750  {
3751  reset();
3752  }
3753 
3755  virtual ~GgTrackball() {}
3756 
3761  void region(float w, float h);
3762 
3767  void region(int w, int h)
3768  {
3769  region(static_cast<float>(w), static_cast<float>(h));
3770  }
3771 
3776  void begin(float x, float y);
3777 
3782  void motion(float x, float y);
3783 
3786  void rotate(const GgQuaternion &q);
3787 
3792  void end(float x, float y);
3793 
3795  void reset();
3796 
3799  const GLfloat *getStart() const
3800  {
3801  return static_cast<const GLfloat *>(start);
3802  }
3803 
3806  GLfloat getStart(int direction) const
3807  {
3808  return static_cast<GLfloat>(start[direction]);
3809  }
3810 
3813  void getStart(GLfloat *position) const
3814  {
3815  position[0] = start[0];
3816  position[1] = start[1];
3817  }
3818 
3821  const GLfloat *getScale() const
3822  {
3823  return static_cast<const GLfloat *>(scale);
3824  }
3825 
3828  GLfloat getScale(int direction) const
3829  {
3830  return static_cast<GLfloat>(scale[direction]);
3831  }
3832 
3835  void getScale(GLfloat *factor) const
3836  {
3837  factor[0] = scale[0];
3838  factor[1] = scale[1];
3839  }
3840 
3844  {
3845  return tq;
3846  }
3847 
3850  const GgMatrix &getMatrix() const
3851  {
3852  return rt;
3853  }
3854 
3857  const GLfloat *get() const
3858  {
3859  return rt.get();
3860  }
3861  };
3862 
3869  {
3870  // テクスチャ名
3871  GLuint texture;
3872 
3873  // テクスチャの縦横の画素数
3874  GLsizei size[2];
3875 
3876  public:
3877 
3886  GgTexture(const GLvoid *image, GLsizei width, GLsizei height,
3887  GLenum format = GL_BGR, GLenum type = GL_UNSIGNED_BYTE,
3888  GLenum internal = GL_RGBA, GLenum wrap = GL_CLAMP_TO_EDGE)
3889  : texture(ggLoadTexture(image, width, height, format, type, internal, wrap))
3890  , size{ width, height }
3891  {}
3892 
3894  virtual ~GgTexture()
3895  {
3896  glBindTexture(GL_TEXTURE_2D, 0);
3897  glDeleteTextures(1, &texture);
3898  }
3899 
3901  GgTexture(const GgTexture &o) = delete;
3902 
3904  GgTexture &operator=(const GgTexture &o) = delete;
3905 
3907  void bind() const
3908  {
3909  glBindTexture(GL_TEXTURE_2D, texture);
3910  }
3911 
3913  void unbind() const
3914  {
3915  glBindTexture(GL_TEXTURE_2D, 0);
3916  }
3917 
3920  GLsizei getWidth() const
3921  {
3922  return size[0];
3923  }
3924 
3927  GLsizei getHeight() const
3928  {
3929  return size[1];
3930  }
3931 
3934  void getSize(GLsizei *size) const
3935  {
3936  size[0] = getWidth();
3937  size[1] = getHeight();
3938  }
3939 
3942  const GLsizei *getSize() const
3943  {
3944  return size;
3945  }
3946 
3949  GLuint getTexture() const
3950  {
3951  return texture;
3952  }
3953  };
3954 
3961  {
3962  // テクスチャ
3963  std::shared_ptr<GgTexture> texture;
3964 
3965  public:
3966 
3969 
3978  GgColorTexture(const GLvoid *image, GLsizei width, GLsizei height,
3979  GLenum format = GL_BGR, GLenum type = GL_UNSIGNED_BYTE,
3980  GLenum internal = GL_RGB, GLenum wrap = GL_CLAMP_TO_EDGE)
3981  {
3982  load(image, width, height, format, type, internal, wrap);
3983  }
3984 
3989  GgColorTexture(const char *name, GLenum internal = 0, GLenum wrap = GL_CLAMP_TO_EDGE)
3990  {
3991  load(name, internal, wrap);
3992  }
3993 
3995  virtual ~GgColorTexture() {}
3996 
4005  void load(const GLvoid *image, GLsizei width, GLsizei height,
4006  GLenum format = GL_BGR, GLenum type = GL_UNSIGNED_BYTE,
4007  GLenum internal = GL_RGB, GLenum wrap = GL_CLAMP_TO_EDGE)
4008  {
4009  // テクスチャを作成する
4010  texture.reset(new GgTexture(image, width, height, format, type, internal, wrap));
4011  }
4012 
4017  void load(const char *name, GLenum internal = 0, GLenum wrap = GL_CLAMP_TO_EDGE);
4018  };
4019 
4026  {
4027  // テクスチャ
4028  std::shared_ptr<GgTexture> texture;
4029 
4030  public:
4031 
4034 
4042  GgNormalTexture(const GLubyte *image, GLsizei width, GLsizei height, GLenum format = GL_RED, float nz = 1.0f,
4043  GLenum internal = GL_RGBA)
4044  {
4045  // 法線マップのテクスチャを作成する
4046  load(image, width, height, format, nz, internal);
4047  }
4048 
4053  GgNormalTexture(const char *name, float nz = 1.0f, GLenum internal = GL_RGBA)
4054  {
4055  // 法線マップのテクスチャを作成する
4056  load(name, nz, internal);
4057  }
4058 
4060  virtual ~GgNormalTexture() {}
4061 
4069  void load(const GLubyte *hmap, GLsizei width, GLsizei height, GLenum format = GL_RED, float nz = 1.0f,
4070  GLenum internal = GL_RGBA)
4071  {
4072  // 法線マップ
4073  std::vector<GgVector> nmap;
4074 
4075  // 法線マップを作成する
4076  ggCreateNormalMap(hmap, width, height, format, nz, internal, nmap);
4077 
4078  // テクスチャを作成する
4079  texture.reset(new GgTexture(nmap.data(), width, height, GL_RGBA, GL_FLOAT, internal, GL_REPEAT));
4080  }
4081 
4086  void load(const char *name, float nz = 1.0f, GLenum internal = GL_RGBA);
4087  };
4088 
4094  template <typename T>
4095  class GgBuffer
4096  {
4097  // ターゲット
4098  const GLenum target;
4099 
4100  // バッファオブジェクトのアライメントを考慮したデータの間隔
4101  const GLsizei stride;
4102 
4103  // データの数
4104  const GLsizei count;
4105 
4106  // バッファオブジェクト
4107  const GLuint buffer;
4108 
4109  public:
4110 
4117  GgBuffer<T>(GLenum target, const T *data, GLsizei stride, GLsizei count, GLenum usage)
4118  : target(target)
4119  , stride(stride)
4120  , count(count)
4121  , buffer([] { GLuint buffer; glGenBuffers(1, &buffer); return buffer; } ())
4122  {
4123  // バッファオブジェクトのメモリを確保してデータを転送する
4124  glBindBuffer(target, buffer);
4125  glBufferData(target, getStride() * count, data, usage);
4126  }
4127 
4129  virtual ~GgBuffer<T>()
4130  {
4131  // バッファオブジェクトを削除する
4132  glBindBuffer(target, 0);
4133  glDeleteBuffers(1, &buffer);
4134  }
4135 
4137  GgBuffer<T>(const GgBuffer<T> &o) = delete;
4138 
4140  GgBuffer<T> &operator=(const GgBuffer<T> &o) = delete;
4141 
4144  GLuint getTarget() const
4145  {
4146  return target;
4147  }
4148 
4151  GLsizeiptr getStride() const
4152  {
4153  return static_cast<GLsizeiptr>(stride);
4154  }
4155 
4158  GLsizei getCount() const
4159  {
4160  return count;
4161  }
4162 
4165  GLuint getBuffer() const
4166  {
4167  return buffer;
4168  }
4169 
4171  void bind() const
4172  {
4173  glBindBuffer(target, buffer);
4174  }
4175 
4177  void unbind() const
4178  {
4179  glBindBuffer(target, 0);
4180  }
4181 
4184  void *map() const
4185  {
4186  glBindBuffer(target, buffer);
4187  return glMapBuffer(target, GL_WRITE_ONLY);
4188  }
4189 
4194  void *map(GLint first, GLsizei count) const
4195  {
4196  // count が 0 なら全データをマップする
4197  if (count == 0) count = getCount();
4198  if (first + count > getCount()) count = getCount() - first;
4199 
4200  glBindBuffer(target, buffer);
4201  return glMapBufferRange(target, getStride() * first, getStride() * count, GL_MAP_WRITE_BIT);
4202  }
4203 
4205  void unmap() const
4206  {
4207  glUnmapBuffer(target);
4208  }
4209 
4214  void send(const T *data, GLint first, GLsizei count) const
4215  {
4216  // count が 0 なら全データを転送する
4217  if (count == 0) count = getCount();
4218  if (first + count > getCount()) count = getCount() - first;
4219 
4220  // データを既存のバッファオブジェクトに転送する
4221  glBindBuffer(target, buffer);
4222  glBufferSubData(target, getStride() * first, getStride() * count, data);
4223  }
4224 
4229  void read(T *data, GLint first, GLsizei count) const
4230  {
4231  // count が 0 なら全データを抽出する
4232  if (count == 0) count = getCount();
4233  if (first + count > getCount()) count = getCount() - first;
4234 
4235  // データをバッファオブジェクトから抽出する
4236  glBindBuffer(target, buffer);
4237  glGetBufferSubData(target, getStride() * first, getStride() * count, data);
4238  }
4239 
4245  void copy(GLuint src_buffer, GLint src_first = 0, GLint dst_first = 0, GLsizei count = 0) const
4246  {
4247  // count が 0 なら全データを複写する
4248  if (count == 0) count = getCount();
4249  if (src_first + count > getCount()) count = getCount() - src_first;
4250  if (dst_first + count > getCount()) count = getCount() - dst_first;
4251 
4252  // データの間隔
4253  const GLsizeiptr stride(getStride());
4254 
4255  glBindBuffer(GL_COPY_READ_BUFFER, src_buffer);
4256  glBindBuffer(GL_COPY_WRITE_BUFFER, buffer);
4257  glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER,
4258  stride * src_first, stride * dst_first, stride * count);
4259  glBindBuffer(GL_COPY_WRITE_BUFFER, 0);
4260  glBindBuffer(GL_COPY_READ_BUFFER, 0);
4261  }
4262  };
4263 
4269  template <typename T>
4271  {
4272  // ユニフォームバッファオブジェクト
4273  std::shared_ptr<GgBuffer<T>> uniform;
4274 
4275  public:
4276 
4278  GgUniformBuffer<T>() {}
4279 
4284  GgUniformBuffer<T>(const T *data, GLsizei count, GLenum usage = GL_STATIC_DRAW)
4285  {
4286  load(data, count, usage);
4287  }
4288 
4293  GgUniformBuffer<T>(const T &data, GLsizei count, GLenum usage = GL_STATIC_DRAW)
4294  {
4295  load(data, count, usage);
4296  }
4297 
4299  virtual ~GgUniformBuffer<T>() {}
4300 
4303  GLuint getTarget() const
4304  {
4305  return uniform->getTarget();
4306  }
4307 
4310  GLsizeiptr getStride() const
4311  {
4312  return uniform->getStride();
4313  }
4314 
4317  GLsizei getCount() const
4318  {
4319  return uniform->getCount();
4320  }
4321 
4324  GLuint getBuffer() const
4325  {
4326  return uniform->getBuffer();
4327  }
4328 
4330  void bind() const
4331  {
4332  uniform->bind();
4333  }
4334 
4336  void unbind() const
4337  {
4338  uniform->unbind();
4339  }
4340 
4343  void *map() const
4344  {
4345  return uniform->map();
4346  }
4347 
4352  void *map(GLint first, GLsizei count) const
4353  {
4354  return uniform->map(first, count);
4355  }
4356 
4358  void unmap() const
4359  {
4360  uniform->unmap();
4361  }
4362 
4367  void load(const T *data, GLsizei count, GLenum usage = GL_STATIC_DRAW)
4368  {
4369  // バッファオブジェクト上のデータの間隔
4370  const GLsizei stride((((sizeof (T) - 1) / ggBufferAlignment) + 1) * ggBufferAlignment);
4371 
4372  // ユニフォームバッファオブジェクトを確保する
4373  uniform.reset(new GgBuffer<T>(GL_UNIFORM_BUFFER, nullptr, stride, count, usage));
4374 
4375  // 確保したユニフォームバッファオブジェクトにデータを転送する
4376  if (data) send(data, 0, sizeof (T), 0, count);
4377  }
4378 
4383  void load(const T &data, GLsizei count, GLenum usage = GL_STATIC_DRAW)
4384  {
4385  // バッファオブジェクト上のデータの間隔
4386  const GLsizei stride((((sizeof (T) - 1) / ggBufferAlignment) + 1) * ggBufferAlignment);
4387 
4388  // ユニフォームバッファオブジェクトを確保する
4389  uniform.reset(new GgBuffer<T>(GL_UNIFORM_BUFFER, nullptr, stride, count, usage));
4390 
4391  // 確保したユニフォームバッファオブジェクトにデータを転送する
4392  fill(&data, 0, sizeof (T), 0, count);
4393  }
4394 
4401  void send(const GLvoid *data, GLint offset = 0, GLsizei size = sizeof (T), GLint first = 0, GLsizei count = 0) const
4402  {
4403  // count が 0 なら全データを転送する
4404  if (count == 0) count = getCount();
4405  if (first + count > getCount()) count = getCount() - first;
4406 
4407  // 転送元のデータの先頭
4408  const char *source(reinterpret_cast<const char *>(data));
4409 
4410  // ターゲット
4411  const GLuint target(getTarget());
4412 
4413  // データの間隔
4414  const GLsizeiptr stride(getStride());
4415 
4416  // first 番目のブロックから count 個の各ブロックの先頭から offset バイトの位置にデータを転送する
4417  bind();
4418  for (GLsizei i = 0; i < count; ++i)
4419  {
4420  glBufferSubData(target, stride * (first + i) + offset, size, source + size * i);
4421  }
4422  }
4423 
4430  void fill(const GLvoid *data, GLint offset = 0, GLsizei size = sizeof (T), GLint first = 0, GLsizei count = 0) const
4431  {
4432  // count が 0 なら全データを転送する
4433  if (count == 0) count = getCount();
4434  if (first + count > getCount()) count = getCount() - first;
4435 
4436  // ターゲット
4437  const GLuint target(getTarget());
4438 
4439  // データの間隔
4440  const GLsizeiptr stride(getStride());
4441 
4442  // first 番目のブロックから count 個の各ブロックの先頭から offset バイトの位置にデータを転送する
4443  bind();
4444  for (GLsizei i = 0; i < count; ++i)
4445  {
4446  glBufferSubData(target, stride * (first + i) + offset, size, data);
4447  }
4448  }
4449 
4456  void read(GLvoid *data, GLint offset = 0, GLsizei size = sizeof (T), GLint first = 0, GLsizei count = 0) const
4457  {
4458  // count が 0 なら全データを転送する
4459  if (count == 0) count = getCount();
4460  if (first + count > getCount()) count = getCount() - first;
4461 
4462  // 抽出先のデータの先頭
4463  char *const destination(reinterpret_cast<char *>(data));
4464 
4465  // ターゲット
4466  const GLuint target(getTarget());
4467 
4468  // データの間隔
4469  const GLsizeiptr stride(getStride());
4470 
4471  // データをユニフォームバッファオブジェクトから抽出する
4472  bind();
4473  for (GLsizei i = 0; i < count; ++i)
4474  {
4475  glGetBufferSubData(target, stride * (first + i) + offset, sizeof (T), destination + size * i);
4476  }
4477  }
4478 
4484  void copy(GLuint src_buffer, GLint src_first = 0, GLint dst_first = 0, GLsizei count = 0) const
4485  {
4486  // count が 0 なら全データを複写する
4487  if (count == 0) count = getCount();
4488  if (src_first + count > getCount()) count = getCount() - src_first;
4489  if (dst_first + count > getCount()) count = getCount() - dst_first;
4490 
4491  // データの間隔
4492  const GLsizeiptr stride(getStride());
4493 
4494  // ユニフォームバッファオブジェクトではブロックごとに転送する
4495  glBindBuffer(GL_COPY_READ_BUFFER, src_buffer);
4496  glBindBuffer(GL_COPY_WRITE_BUFFER, getBuffer());
4497  for (GLsizei i = 0; i < count; ++i)
4498  {
4499  glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER,
4500  stride * (src_first + i), stride * (dst_first + i), sizeof (T));
4501  }
4502  glBindBuffer(GL_COPY_WRITE_BUFFER, 0);
4503  glBindBuffer(GL_COPY_READ_BUFFER, 0);
4504  }
4505  };
4506 
4513  class GgShape
4514  {
4515  // 頂点配列オブジェクト
4516  const GLuint vao;
4517 
4518  // 基本図形の種類
4519  GLenum mode;
4520 
4521  public:
4522 
4525  GgShape(GLenum mode = 0)
4526  : vao([] { GLuint vao; glGenVertexArrays(1, &vao); return vao; } ())
4527  , mode(mode)
4528  {
4529  glBindVertexArray(vao);
4530  }
4531 
4533  virtual ~GgShape()
4534  {
4535  glBindVertexArray(0);
4536  glDeleteVertexArrays(1, &vao);
4537  }
4538 
4540  GgShape(const GgShape &o) = delete;
4541 
4543  GgShape &operator=(const GgShape &o) = delete;
4544 
4547  GLuint get() const
4548  {
4549  return vao;
4550  }
4551 
4554  void setMode(GLenum mode)
4555  {
4556  this->mode = mode;
4557  }
4558 
4561  GLenum getMode() const
4562  {
4563  return this->mode;
4564  }
4565 
4569  virtual void draw(GLint first = 0, GLsizei count = 0) const
4570  {
4571  glBindVertexArray(vao);
4572  }
4573  };
4574 
4578  class GgPoints
4579  : public GgShape
4580  {
4581  // 頂点バッファオブジェクト
4582  std::shared_ptr<GgBuffer<GgVector>> position;
4583 
4584  public:
4585 
4587  GgPoints(GLenum mode = GL_POINTS)
4588  : GgShape(mode)
4589  {}
4590 
4596  GgPoints(const GgVector *pos, GLsizei countv, GLenum mode = GL_POINTS, GLenum usage = GL_STATIC_DRAW)
4597  : GgShape(mode)
4598  {
4599  load(pos, countv, usage);
4600  }
4601 
4603  virtual ~GgPoints() {}
4604 
4607  GLsizei getCount() const
4608  {
4609  return position->getCount();
4610  }
4611 
4614  GLuint getBuffer() const
4615  {
4616  return position->getBuffer();
4617  }
4618 
4623  void send(const GgVector *pos, GLint first = 0, GLsizei count = 0) const
4624  {
4625  position->send(pos, first, count);
4626  }
4627 
4632  void load(const GgVector *pos, GLsizei count, GLenum usage = GL_STATIC_DRAW)
4633  {
4634  // 頂点バッファオブジェクトを作成する
4635  position.reset(new GgBuffer<GgVector>(GL_ARRAY_BUFFER, pos, sizeof (GgVector), count, usage));
4636 
4637  // このバッファオブジェクトは index == 0 の in 変数から入力する
4638  glVertexAttribPointer(0, static_cast<GLint>(pos->size()), GL_FLOAT, GL_FALSE, 0, 0);
4639  glEnableVertexAttribArray(0);
4640  }
4641 
4645  virtual void draw(GLint first = 0, GLsizei count = 0) const;
4646  };
4647 
4651  struct GgVertex
4652  {
4655 
4658 
4662  GgVertex(const GgVector &pos, const GgVector &norm)
4663  : position(pos), normal(norm)
4664  {}
4665 
4673  GgVertex(GLfloat px, GLfloat py, GLfloat pz, GLfloat nx, GLfloat ny, GLfloat nz)
4674  : position{ px, py, pz, 1.0f }
4675  , normal{ nx, ny, nz, 0.0f }
4676  {}
4677 
4681  GgVertex(const GLfloat *pos, const GLfloat *norm)
4682  : GgVertex(pos[0], pos[1], pos[2], norm[0], norm[1], norm[2])
4683  {}
4684  };
4685 
4690  : public GgShape
4691  {
4692  // 頂点属性
4693  std::unique_ptr<GgBuffer<GgVertex>> vertex;
4694 
4695  public:
4696 
4699  GgTriangles(GLenum mode = GL_TRIANGLES)
4700  : GgShape(mode)
4701  {}
4702 
4708  GgTriangles(const GgVertex *vert, GLsizei count,
4709  GLenum mode = GL_TRIANGLES, GLenum usage = GL_STATIC_DRAW)
4710  : GgShape(mode)
4711  {
4712  load(vert, count, usage);
4713  }
4714 
4716  virtual ~GgTriangles() {}
4717 
4720  GLsizei getCount() const
4721  {
4722  return vertex->getCount();
4723  }
4724 
4727  GLuint getBuffer() const
4728  {
4729  return vertex->getBuffer();
4730  }
4731 
4736  void send(const GgVertex *vert, GLint first = 0, GLsizei count = 0) const
4737  {
4738  vertex->send(vert, first, count);
4739  }
4740 
4745  void load(const GgVertex *vert, GLsizei count, GLenum usage = GL_STATIC_DRAW)
4746  {
4747  // 頂点バッファオブジェクトを作成する
4748  vertex.reset(new GgBuffer<GgVertex>(GL_ARRAY_BUFFER, vert, sizeof (GgVertex), count, usage));
4749 
4750  // 頂点の位置は index == 0 の in 変数から入力する
4751  glVertexAttribPointer(0, static_cast<GLint>(vert->position.size()), GL_FLOAT, GL_FALSE,
4752  sizeof (GgVertex), static_cast<const char *>(0) + offsetof(GgVertex, position));
4753  glEnableVertexAttribArray(0);
4754 
4755  // 頂点の法線は index == 1 の in 変数から入力する
4756  glVertexAttribPointer(1, static_cast<GLint>(vert->normal.size()), GL_FLOAT, GL_FALSE,
4757  sizeof (GgVertex), static_cast<const char *>(0) + offsetof(GgVertex, normal));
4758  glEnableVertexAttribArray(1);
4759  }
4760 
4764  virtual void draw(GLint first = 0, GLsizei count = 0) const;
4765  };
4766 
4771  : public GgTriangles
4772  {
4773  // インデックスを格納する頂点バッファオブジェクト
4774  std::unique_ptr<GgBuffer<GLuint>> index;
4775 
4776  public:
4777 
4780  GgElements(GLenum mode = GL_TRIANGLES)
4781  : GgTriangles(mode)
4782  {}
4783 
4791  GgElements(const GgVertex *vert, GLsizei countv, const GLuint *face, GLsizei countf,
4792  GLenum mode = GL_TRIANGLES, GLenum usage = GL_STATIC_DRAW)
4793  : GgTriangles(mode)
4794  {
4795  load(vert, countv, face, countf, usage);
4796  }
4797 
4799  virtual ~GgElements() {}
4800 
4803  GLsizei getIndexCount() const
4804  {
4805  return index->getCount();
4806  }
4807 
4810  GLuint getIndexBuffer() const
4811  {
4812  return index->getBuffer();
4813  }
4814 
4822  void send(const GgVertex *vert, GLuint firstv, GLsizei countv,
4823  const GLuint *face = nullptr, GLuint firstf = 0, GLsizei countf = 0) const
4824  {
4825  GgTriangles::send(vert, firstv, countv);
4826  if (face != nullptr && countf > 0) index->send(face, firstf, countf);
4827  }
4828 
4835  void load(const GgVertex *vert, GLsizei countv, const GLuint *face, GLsizei countf,
4836  GLenum usage = GL_STATIC_DRAW)
4837  {
4838  // 頂点バッファオブジェクトを作成する
4839  GgTriangles::load(vert, countv, usage);
4840 
4841  // インデックスの頂点バッファオブジェクトを作成する
4842  index.reset(new GgBuffer<GLuint>(GL_ELEMENT_ARRAY_BUFFER, face, sizeof (GLuint), countf, usage));
4843  }
4844 
4848  virtual void draw(GLint first = 0, GLsizei count = 0) const;
4849  };
4850 
4860  extern GgPoints *ggPointsCube(GLsizei countv, GLfloat length = 1.0f,
4861  GLfloat cx = 0.0f, GLfloat cy = 0.0f, GLfloat cz = 0.0f);
4862 
4872  extern GgPoints *ggPointsSphere(GLsizei countv, GLfloat radius = 0.5f,
4873  GLfloat cx = 0.0f, GLfloat cy = 0.0f, GLfloat cz = 0.0f);
4874 
4881  extern GgTriangles *ggRectangle(GLfloat width = 1.0f, GLfloat height = 1.0f);
4882 
4890  extern GgTriangles *ggEllipse(GLfloat width = 1.0f, GLfloat height = 1.0f,
4891  GLuint slices = 16);
4892 
4902  extern GgTriangles *ggArraysObj(const char *name, bool normalize = false);
4903 
4913  extern GgElements *ggElementsObj(const char *name, bool normalize = false);
4914 
4925  extern GgElements *ggElementsMesh(GLuint slices, GLuint stacks,
4926  const GLfloat (*pos)[3], const GLfloat (*norm)[3] = nullptr);
4927 
4937  extern GgElements *ggElementsSphere(GLfloat radius = 1.0f, int slices = 16, int stacks = 8);
4938 
4944  class GgShader
4945  {
4946  // プログラム名
4947  const GLuint program;
4948 
4949  public:
4950 
4957  GgShader(const char *vert, const char *frag = 0, const char *geom = 0,
4958  int nvarying = 0, const char **varyings = 0)
4959  : program(ggLoadShader(vert, frag, geom, nvarying, varyings))
4960  {}
4961 
4963  virtual ~GgShader()
4964  {
4965  // 参照しているオブジェクトが一つだけならシェーダを削除する
4966  glUseProgram(0);
4967  glDeleteProgram(program);
4968  }
4969 
4971  GgShader(const GgShader &o) = delete;
4972 
4974  GgShader &operator=(const GgShader &o) = delete;
4975 
4977  void use() const
4978  {
4979  glUseProgram(program);
4980  }
4981 
4983  void unuse() const
4984  {
4985  glUseProgram(0);
4986  }
4987 
4990  GLuint get() const
4991  {
4992  return program;
4993  }
4994  };
4995 
5000  {
5001  // シェーダー
5002  std::shared_ptr<GgShader> shader;
5003 
5004  // 投影変換行列の uniform 変数の場所
5005  GLint mpLoc;
5006 
5007  // モデルビュー変換行列の uniform 変数の場所
5008  GLint mvLoc;
5009 
5010  public:
5011 
5014  : mpLoc(-1)
5015  , mvLoc(-1)
5016  {}
5017 
5024  GgPointShader(const char *vert, const char *frag = 0,
5025  const char *geom = 0, GLint nvarying = 0, const char **varyings = 0)
5026  : GgPointShader()
5027  {
5028  load(vert, frag, geom, nvarying, varyings);
5029  }
5030 
5032  virtual ~GgPointShader() {}
5033 
5040  void load(const char* vert, const char* frag = 0,
5041  const char* geom = 0, GLint nvarying = 0, const char** varyings = 0)
5042  {
5043  // シェーダを作成する
5044  shader.reset(new GgShader(vert, frag, geom, nvarying, varyings));
5045 
5046  // プログラム名を取り出す
5047  const GLuint program(shader->get());
5048 
5049  // 変換行列の uniform 変数の場所
5050  mpLoc = glGetUniformLocation(program, "mp");
5051  mvLoc = glGetUniformLocation(program, "mv");
5052  }
5053 
5056  virtual void loadProjectionMatrix(const GLfloat *mp) const
5057  {
5058  glUniformMatrix4fv(mpLoc, 1, GL_FALSE, mp);
5059  }
5060 
5063  virtual void loadProjectionMatrix(const GgMatrix &mp) const
5064  {
5065  loadProjectionMatrix(mp.get());
5066  }
5067 
5070  virtual void loadModelviewMatrix(const GLfloat *mv) const
5071  {
5072  glUniformMatrix4fv(mvLoc, 1, GL_FALSE, mv);
5073  }
5074 
5077  virtual void loadModelviewMatrix(const GgMatrix &mv) const
5078  {
5079  loadModelviewMatrix(mv.get());
5080  }
5081 
5085  virtual void loadMatrix(const GLfloat *mp, const GLfloat *mv) const
5086  {
5088  loadModelviewMatrix(mv);
5089  }
5090 
5094  virtual void loadMatrix(const GgMatrix &mp, const GgMatrix &mv) const
5095  {
5096  loadMatrix(mp.get(), mv.get());
5097  }
5098 
5100  virtual void use() const
5101  {
5102  shader->use();
5103  }
5104 
5107  void use(const GLfloat *mp) const
5108  {
5109  use();
5111  }
5112 
5115  void use(const GgMatrix &mp) const
5116  {
5117  use(mp.get());
5118  }
5119 
5123  void use(const GLfloat *mp, const GLfloat *mv) const
5124  {
5125  use(mp);
5126  loadModelviewMatrix(mv);
5127  }
5128 
5132  void use(const GgMatrix &mp, const GgMatrix &mv) const
5133  {
5134  use(mp.get(), mv.get());
5135  }
5136 
5138  void unuse() const
5139  {
5140  shader->unuse();
5141  }
5142 
5145  GLuint get() const
5146  {
5147  return shader->get();
5148  }
5149  };
5150 
5155  : public GgPointShader
5156  {
5157  // 材質データの uniform block のインデックス
5158  GLint materialIndex;
5159 
5160  // 光源データの uniform block のインデックス
5161  GLint lightIndex;
5162 
5163  // モデルビュー変換の法線変換行列の uniform 変数の場所
5164  GLint mnLoc;
5165 
5166  public:
5167 
5170  : GgPointShader()
5171  , materialIndex(-1)
5172  , lightIndex(-1)
5173  , mnLoc(-1)
5174  {}
5175 
5182  GgSimpleShader(const char* vert, const char* frag = 0,
5183  const char* geom = 0, GLint nvarying = 0, const char** varyings = 0)
5184  {
5185  load(vert, frag, geom, nvarying, varyings);
5186  }
5187 
5190  : GgPointShader(o)
5191  , materialIndex(o.materialIndex)
5192  , lightIndex(o.lightIndex)
5193  , mnLoc(o.mnLoc) {}
5194 
5196  virtual ~GgSimpleShader() {}
5197 
5200  {
5201  if (&o != this)
5202  {
5203  GgPointShader::operator=(o);
5204  materialIndex = o.materialIndex;
5205  lightIndex = o.lightIndex;
5206  mnLoc = o.mnLoc;
5207  }
5208 
5209  return *this;
5210  }
5211 
5213  void load(const char* vert, const char* frag = 0,
5214  const char* geom = 0, GLint nvarying = 0, const char** varyings = 0);
5215 
5219  virtual void loadModelviewMatrix(const GLfloat *mv, const GLfloat *mn) const
5220  {
5222  glUniformMatrix4fv(mnLoc, 1, GL_FALSE, mn);
5223  }
5224 
5228  virtual void loadModelviewMatrix(const GgMatrix &mv, const GgMatrix &mn) const
5229  {
5230  loadModelviewMatrix(mv.get(), mn.get());
5231  }
5232 
5235  virtual void loadModelviewMatrix(const GLfloat *mv) const
5236  {
5237  loadModelviewMatrix(mv, GgMatrix(mv).normal().get());
5238  }
5239 
5242  virtual void loadModelviewMatrix(const GgMatrix &mv) const
5243  {
5244  loadModelviewMatrix(mv.get());
5245  }
5246 
5251  virtual void loadMatrix(const GLfloat *mp, const GLfloat *mv, const GLfloat *mn) const
5252  {
5253  GgPointShader::loadMatrix(mp, mv);
5254  glUniformMatrix4fv(mnLoc, 1, GL_FALSE, mn);
5255  }
5256 
5261  virtual void loadMatrix(const GgMatrix &mp, const GgMatrix &mv, const GgMatrix &mn) const
5262  {
5263  loadMatrix(mp.get(), mv.get(), mn.get());
5264  }
5265 
5269  virtual void loadMatrix(const GLfloat *mp, const GLfloat *mv) const
5270  {
5271  loadMatrix(mp, mv, GgMatrix(mv).normal());
5272  }
5273 
5277  virtual void loadMatrix(const GgMatrix &mp, const GgMatrix &mv) const
5278  {
5279  loadMatrix(mp, mv, mv.normal());
5280  }
5281 
5285  struct Light
5286  {
5291  };
5292 
5297  : public GgUniformBuffer<Light>
5298  {
5299  public:
5300 
5305  LightBuffer(const Light *light = nullptr, GLsizei count = 1, GLenum usage = GL_STATIC_DRAW)
5306  : GgUniformBuffer<Light>(light, count, usage) {}
5307 
5312  LightBuffer(const Light &light, GLsizei count = 1, GLenum usage = GL_STATIC_DRAW)
5313  : GgUniformBuffer<Light>(light, count, usage) {}
5314 
5316  virtual ~LightBuffer() {}
5317 
5325  void loadAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5326 
5331  void loadAmbient(const GLfloat *ambient, GLint first = 0, GLsizei count = 1) const
5332  {
5333  // first 番目のブロックから count 個の ambient 要素に値を設定する
5334  send(ambient, offsetof(Light, ambient), sizeof (Light::ambient), first, count);
5335  }
5336 
5344  void loadDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5345 
5350  void loadDiffuse(const GLfloat *diffuse, GLint first = 0, GLsizei count = 1) const
5351  {
5352  // first 番目のブロックから count 個の diffuse 要素に値を設定する
5353  send(diffuse, offsetof(Light, diffuse), sizeof (Light::diffuse), first, count);
5354  }
5355 
5363  void loadSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5364 
5369  void loadSpecular(const GLfloat *specular, GLint first = 0, GLsizei count = 1) const
5370  {
5371  // first 番目のブロックから count 個の specular 要素に値を設定する
5372  send(specular, offsetof(Light, specular), sizeof (Light::specular), first, count);
5373  }
5374 
5379  void loadColor(const Light &color, GLint first = 0, GLsizei count = 1) const;
5380 
5388  void loadPosition(GLfloat x, GLfloat y, GLfloat z, GLfloat w = 1.0f, GLint first = 0, GLsizei count = 1) const;
5389 
5394  void loadPosition(const GgVector &position, GLint first = 0, GLsizei count = 1) const;
5395 
5400  void loadPosition(const GLfloat *position, GLint first = 0, GLsizei count = 1) const
5401  {
5402  // first 番目のブロックから count 個の position 要素に値を設定する
5403  send(position, offsetof(Light, position), sizeof (Light::position), first, count);
5404  }
5405 
5410  void loadPosition(const GgVector *position, GLint first = 0, GLsizei count = 1) const
5411  {
5412  loadPosition(position->data(), first, count);
5413  }
5414 
5419  void load(const Light *light, GLint first = 0, GLsizei count = 1) const
5420  {
5421  send(light, 0, sizeof (Light), first, count);
5422  }
5423 
5428  void load(const Light &light, GLint first = 0, GLsizei count = 1) const
5429  {
5430  load(&light, first, count);
5431  }
5432 
5435  void select(GLint i = 0) const
5436  {
5437  // バッファオブジェクトの i 番目のブロックの位置
5438  const GLintptr offset(static_cast<GLintptr>(getStride()) * i);
5439  glBindBufferRange(getTarget(), LightBindingPoint, getBuffer(), offset, sizeof (Light));
5440  }
5441  };
5442 
5446  struct Material
5447  {
5451  GLfloat shininess;
5452  };
5453 
5458  : public GgUniformBuffer<Material>
5459  {
5460  public:
5461 
5466  MaterialBuffer(const Material *material = nullptr, GLsizei count = 1, GLenum usage = GL_STATIC_DRAW)
5467  : GgUniformBuffer<Material>(material, count, usage) {}
5468 
5473  MaterialBuffer(const Material &material, GLsizei count = 1, GLenum usage = GL_STATIC_DRAW)
5474  : GgUniformBuffer<Material>(material, count, usage) {}
5475 
5477  virtual ~MaterialBuffer() {}
5478 
5486  void loadAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5487 
5492  void loadAmbient(const GLfloat *ambient, GLint first = 0, GLsizei count = 1) const
5493  {
5494  // first 番目のブロックから count 個のブロックの ambient 要素に値を設定する
5495  send(ambient, offsetof(Material, ambient), sizeof (Material::ambient), first, count);
5496  }
5497 
5505  void loadDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5506 
5511  void loadDiffuse(const GLfloat *diffuse, GLint first = 0, GLsizei count = 1) const
5512  {
5513  // first 番目のブロックから count 個の diffuse 要素に値を設定する
5514  send(diffuse, offsetof(Material, diffuse), sizeof (Material::diffuse), first, count);
5515  }
5516 
5524  void loadAmbientAndDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5525 
5530  void loadAmbientAndDiffuse(const GLfloat *color, GLint first = 0, GLsizei count = 1) const;
5531 
5539  void loadSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a = 1.0f, GLint first = 0, GLsizei count = 1) const;
5540 
5545  void loadSpecular(const GLfloat *specular, GLint first = 0, GLsizei count = 1) const
5546  {
5547  // first 番目のブロックから count 個の specular 要素に値を設定する
5548  send(specular, offsetof(Material, specular), sizeof (Material::specular), first, count);
5549  }
5550 
5555  void loadShininess(GLfloat shininess, GLint first = 0, GLsizei count = 1) const;
5556 
5561  void loadShininess(const GLfloat *shininess, GLint first = 0, GLsizei count = 1) const;
5562 
5567  void load(const Material *material, GLint first = 0, GLsizei count = 1) const
5568  {
5569  send(material, 0, sizeof (Material), first, count);
5570  }
5571 
5576  void load(const Material &material, GLint first = 0, GLsizei count = 1) const
5577  {
5578  load(&material, first, count);
5579  }
5580 
5583  void select(GLint i = 0) const
5584  {
5585  // バッファオブジェクトの i 番目のブロックの位置
5586  const GLintptr offset(static_cast<GLintptr>(getStride()) * i);
5587  glBindBufferRange(getTarget(), MaterialBindingPoint, getBuffer(), offset, sizeof (Material));
5588  }
5589  };
5590 
5592  void use() const
5593  {
5594  // プログラムオブジェクトは基底クラスで指定する
5596  }
5597 
5602  void use(const GLfloat *mp, const GLfloat *mv, const GLfloat *mn) const
5603  {
5604  // プログラムオブジェクトを指定する
5605  use();
5606 
5607  // 変換行列を設定する
5608  loadMatrix(mp, mv, mn);
5609  }
5610 
5615  void use(const GgMatrix &mp, const GgMatrix &mv, const GgMatrix &mn) const
5616  {
5617  use(mp.get(), mv.get(), mn.get());
5618  }
5619 
5623  void use(const GLfloat *mp, const GLfloat *mv) const
5624  {
5625  use(mp, mv, GgMatrix(mv).normal().get());
5626  }
5627 
5631  void use(const GgMatrix &mp, const GgMatrix &mv) const
5632  {
5633  use(mp, mv, mv.normal());
5634  }
5635 
5639  void use(const LightBuffer *light, GLint i = 0) const
5640  {
5641  // プログラムオブジェクトを指定する
5642  use();
5643 
5644  // 光源を設定する
5645  light->select(i);
5646  }
5647 
5651  void use(const LightBuffer &light, GLint i = 0) const
5652  {
5653  use(&light, i);
5654  }
5655 
5662  void use(const GLfloat *mp, const GLfloat *mv, const GLfloat *mn, const LightBuffer *light, GLint i = 0) const
5663  {
5664  // 光源を指定してプログラムオブジェクトを指定する
5665  use(light, i);
5666 
5667  // 変換行列を設定する
5668  loadMatrix(mp, mv, mn);
5669  }
5670 
5677  void use(const GgMatrix &mp, const GgMatrix &mv, const GgMatrix &mn, const LightBuffer &light, GLint i = 0) const
5678  {
5679  use(mp.get(), mv.get(), mn.get(), &light, i);
5680  }
5681 
5687  void use(const GLfloat *mp, const GLfloat *mv, const LightBuffer *light, GLint i = 0) const
5688  {
5689  use(mp, mv, GgMatrix(mv).normal().get(), light, i);
5690  }
5691 
5697  void use(const GgMatrix &mp, const GgMatrix &mv, const LightBuffer &light, GLint i = 0) const
5698  {
5699  use(mp, mv, mv.normal(), light, i);
5700  }
5701 
5706  void use(const GLfloat *mp, const LightBuffer *light, GLint i = 0) const
5707  {
5708  // 光源を指定してプログラムオブジェクトを指定する
5709  use(light, i);
5710 
5711  // 投影変換行列を設定する
5713  }
5714 
5719  void use(const GgMatrix &mp, const LightBuffer &light, GLint i = 0) const
5720  {
5721  // 光源を指定してプログラムオブジェクトを指定する
5722  use(mp.get(), &light, i);
5723  }
5724  };
5725 
5736  extern bool ggLoadSimpleObj(const char *name,
5737  std::vector<std::array<GLuint, 3>> &group,
5738  std::vector<GgSimpleShader::Material> &material,
5739  std::vector<GgVertex> &vert,
5740  bool normalize = false);
5741 
5753  extern bool ggLoadSimpleObj(const char *name,
5754  std::vector<std::array<GLuint, 3>> &group,
5755  std::vector<GgSimpleShader::Material> &material,
5756  std::vector<GgVertex> &vert,
5757  std::vector<GLuint> &face,
5758  bool normalize = false);
5759 
5764  {
5765  // 同じ材質を割り当てるポリゴングループごとの三角形数
5766  std::vector<std::array<GLuint, 3>> group;
5767 
5768  // ポリゴングループごとの材質のユニフォームバッファ
5769  std::shared_ptr<GgSimpleShader::MaterialBuffer> material;
5770 
5771  // この図形の形状データ
5772  std::shared_ptr<GgElements> data;
5773 
5774  public:
5775 
5779  GgSimpleObj(const char *name, bool normalize = false);
5780 
5782  virtual ~GgSimpleObj() {}
5783 
5786  const GgTriangles *get() const
5787  {
5788  return data.get();
5789  }
5790 
5794  virtual void draw(GLint first = 0, GLsizei count = 0) const;
5795  };
5796 }
バッファオブジェクト.
Definition: gg.h:4096
void unmap() const
バッファオブジェクトをアンマップする.
Definition: gg.h:4205
GgBuffer< T > & operator=(const GgBuffer< T > &o)=delete
代入演算子は使用禁止.
void copy(GLuint src_buffer, GLint src_first=0, GLint dst_first=0, GLsizei count=0) const
別のバッファオブジェクトからデータを複写する.
Definition: gg.h:4245
void read(T *data, GLint first, GLsizei count) const
バッファオブジェクトのデータから抽出する.
Definition: gg.h:4229
void send(const T *data, GLint first, GLsizei count) const
すでに確保したバッファオブジェクトにデータを転送する.
Definition: gg.h:4214
void bind() const
バッファオブジェクトを結合する.
Definition: gg.h:4171
GLsizei getCount() const
バッファオブジェクトが保持するデータの数を取り出す.
Definition: gg.h:4158
void * map() const
バッファオブジェクトをマップする.
Definition: gg.h:4184
void unbind() const
バッファオブジェクトを解放する.
Definition: gg.h:4177
GLuint getBuffer() const
バッファオブジェクト名を取り出す.
Definition: gg.h:4165
void * map(GLint first, GLsizei count) const
バッファオブジェクトの指定した範囲をマップする.
Definition: gg.h:4194
GLuint getTarget() const
バッファオブジェクトのターゲットを取り出す.
Definition: gg.h:4144
GLsizeiptr getStride() const
バッファオブジェクトのアライメントを考慮したデータの間隔を取り出す.
Definition: gg.h:4151
カラーマップ.
Definition: gg.h:3961
GgColorTexture()
コンストラクタ.
Definition: gg.h:3968
void load(const GLvoid *image, GLsizei width, GLsizei height, GLenum format=GL_BGR, GLenum type=GL_UNSIGNED_BYTE, GLenum internal=GL_RGB, GLenum wrap=GL_CLAMP_TO_EDGE)
テクスチャを作成してメモリ上のデータを読み込む.
Definition: gg.h:4005
virtual ~GgColorTexture()
デストラクタ.
Definition: gg.h:3995
GgColorTexture(const GLvoid *image, GLsizei width, GLsizei height, GLenum format=GL_BGR, GLenum type=GL_UNSIGNED_BYTE, GLenum internal=GL_RGB, GLenum wrap=GL_CLAMP_TO_EDGE)
メモリ上のデータからテクスチャを作成するコンストラクタ.
Definition: gg.h:3978
GgColorTexture(const char *name, GLenum internal=0, GLenum wrap=GL_CLAMP_TO_EDGE)
ファイルからデータを読み込んでテクスチャを作成するコンストラクタ.
Definition: gg.h:3989
三角形で表した形状データ (Elements 形式).
Definition: gg.h:4772
GgElements(const GgVertex *vert, GLsizei countv, const GLuint *face, GLsizei countf, GLenum mode=GL_TRIANGLES, GLenum usage=GL_STATIC_DRAW)
コンストラクタ.
Definition: gg.h:4791
virtual void draw(GLint first=0, GLsizei count=0) const
インデックスを使った三角形の描画.
Definition: gg.cpp:5002
GLuint getIndexBuffer() const
三角形の頂点インデックスデータを格納した頂点バッファオブジェクト名を取り出す.
Definition: gg.h:4810
void send(const GgVertex *vert, GLuint firstv, GLsizei countv, const GLuint *face=nullptr, GLuint firstf=0, GLsizei countf=0) const
既存のバッファオブジェクトに頂点属性と三角形の頂点インデックスデータを転送する.
Definition: gg.h:4822
GgElements(GLenum mode=GL_TRIANGLES)
コンストラクタ.
Definition: gg.h:4780
virtual ~GgElements()
デストラクタ.
Definition: gg.h:4799
void load(const GgVertex *vert, GLsizei countv, const GLuint *face, GLsizei countf, GLenum usage=GL_STATIC_DRAW)
バッファオブジェクトを確保して頂点属性と三角形の頂点インデックスデータを格納する.
Definition: gg.h:4835
GLsizei getIndexCount() const
データの数を取り出す.
Definition: gg.h:4803
変換行列.
Definition: gg.h:1655
GgMatrix translate(const GLfloat *t) const
平行移動変換を乗じた結果を返す.
Definition: gg.h:2148
GLfloat & operator[](std::size_t i)
変換行列の要素にアクセスする.
Definition: gg.h:2442
GgMatrix & loadTranslate(const GLfloat *t)
平行移動の変換行列を格納する.
Definition: gg.h:1932
GgMatrix scale(const GLfloat *s) const
拡大縮小変換を乗じた結果を返す.
Definition: gg.h:2176
GgMatrix & operator=(const GLfloat *a)
Definition: gg.h:1845
GgMatrix add(const GLfloat *a) const
変換行列に配列に格納した変換行列を加算した値を返す.
Definition: gg.h:1776
GgMatrix subtract(const GLfloat *a) const
変換行列から配列に格納した変換行列を減算した値を返す.
Definition: gg.h:1793
GgVector operator*(const GgVector &v) const
ベクトルに対して投影変換を行う.
Definition: gg.h:2405
GgMatrix & loadIdentity()
単位行列を格納する.
Definition: gg.cpp:4253
GgMatrix & loadNormal(const GgMatrix &m)
法線変換行列を格納する.
Definition: gg.h:2128
GgMatrix & loadFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
透視透視投影変換行列を格納する.
Definition: gg.cpp:4595
GgMatrix & loadTranslate(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f)
平行移動の変換行列を格納する.
Definition: gg.cpp:4266
GgMatrix operator+(const GLfloat *a) const
Definition: gg.h:1885
GgMatrix & loadSubtract(const GLfloat *a)
変換行列から配列に格納した変換行列を減算した結果を格納する.
Definition: gg.h:1727
GgMatrix rotate(const GLfloat *r, GLfloat a) const
r 方向のベクトルを軸とする回転変換を乗じた結果を返す.
Definition: gg.h:2232
void projection(GLfloat *c, const GLfloat *v) const
ベクトルに対して投影変換を行う.
Definition: gg.h:2373
GgMatrix & loadPerspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar)
画角を指定して透視投影変換行列を格納する.
Definition: gg.cpp:4622
GgMatrix & operator*=(const GLfloat *a)
Definition: gg.h:1869
GgMatrix operator/(const GLfloat *a) const
Definition: gg.h:1909
GgMatrix & loadScale(const GLfloat *s)
拡大縮小の変換行列を格納する.
Definition: gg.h:1956
GgMatrix multiply(const GgMatrix &m) const
変換行列に別の変換行列を乗算した値を返す.
Definition: gg.h:1820
GgMatrix & operator+=(const GLfloat *a)
Definition: gg.h:1853
GgMatrix rotate(const GgVector &r, GLfloat a) const
r 方向のベクトルを軸とする回転変換を乗じた結果を返す.
Definition: gg.h:2241
GgMatrix & loadSubtract(const GgMatrix &m)
変換行列から別の変換行列を減算した結果を格納する.
Definition: gg.h:1736
GgMatrix operator-(const GLfloat *a) const
Definition: gg.h:1893
void projection(GgVector &c, const GLfloat *v) const
ベクトルに対して投影変換を行う.
Definition: gg.h:2389
GgMatrix & loadRotate(const GgVector &r, GLfloat a)
r 方向のベクトルを軸とする回転の変換行列を格納する.
Definition: gg.h:2005
GgMatrix lookat(const GgVector &e, const GgVector &t, const GgVector &u) const
ビュー変換を乗じた結果を返す.
Definition: gg.h:2296
GgMatrix lookat(GLfloat ex, GLfloat ey, GLfloat ez, GLfloat tx, GLfloat ty, GLfloat tz, GLfloat ux, GLfloat uy, GLfloat uz) const
ビュー変換を乗じた結果を返す.
Definition: gg.h:2273
GgMatrix & operator-=(const GLfloat *a)
Definition: gg.h:1861
GgMatrix & loadRotate(const GLfloat *r, GLfloat a)
r 方向のベクトルを軸とする回転の変換行列を格納する.
Definition: gg.h:1996
GgMatrix & operator/=(const GLfloat *a)
Definition: gg.h:1877
GgMatrix & loadInvert(const GLfloat *a)
逆行列を格納する.
Definition: gg.cpp:4410
GgMatrix & loadMultiply(const GLfloat *a)
変換行列に配列に格納した変換行列を乗算した結果を格納する.
Definition: gg.h:1744
GgMatrix & loadLookat(const GLfloat *e, const GLfloat *t, const GLfloat *u)
ビュー変換行列を格納する.
Definition: gg.h:2046
GgMatrix rotateZ(GLfloat a) const
z 軸中心の回転変換を乗じた結果を返す.
Definition: gg.h:2210
GgMatrix scale(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f) const
拡大縮小変換を乗じた結果を返す.
Definition: gg.h:2167
GgMatrix rotateX(GLfloat a) const
x 軸中心の回転変換を乗じた結果を返す.
Definition: gg.h:2192
GgMatrix translate(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f) const
平行移動変換を乗じた結果を返す.
Definition: gg.h:2139
GgMatrix normal() const
法線変換行列を返す.
Definition: gg.h:2364
GgMatrix & operator-=(const GgMatrix &m)
Definition: gg.h:1865
GgMatrix rotate(const GLfloat *r) const
r 方向のベクトルを軸とする回転の変換行列を乗じた結果を返す.
Definition: gg.h:2249
GgMatrix & loadLookat(GLfloat ex, GLfloat ey, GLfloat ez, GLfloat tx, GLfloat ty, GLfloat tz, GLfloat ux, GLfloat uy, GLfloat uz)
ビュー変換行列を格納する.
Definition: gg.cpp:4512
const GLfloat & operator[](std::size_t i) const
変換行列の要素にアクセスする.
Definition: gg.h:2435
GgMatrix(const GgMatrix &m)
コピーコンストラクタ.
Definition: gg.h:1682
GgMatrix & loadDivide(const GgMatrix &m)
変換行列を別の変換行列で除算した結果を格納する.
Definition: gg.h:1768
GgMatrix rotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a) const
(x, y, z) 方向のベクトルを軸とする回転変換を乗じた結果を返す.
Definition: gg.h:2222
GgMatrix & operator/=(const GgMatrix &m)
Definition: gg.h:1881
GgMatrix & loadRotate(const GLfloat *r)
r 方向のベクトルを軸とする回転の変換行列を格納する.
Definition: gg.h:2013
GgMatrix invert() const
逆行列を返す.
Definition: gg.h:2356
GgMatrix subtract(const GgMatrix &m) const
変換行列から別の変換行列を減算した値を返す.
Definition: gg.h:1802
GgMatrix & load(const GgMatrix &m)
別の変換行列の値を格納する.
Definition: gg.h:1702
GgMatrix operator+(const GgMatrix &m) const
Definition: gg.h:1889
GgMatrix(const GLfloat *a)
コンストラクタ.
Definition: gg.h:1675
GgMatrix & loadLookat(const GgVector &e, const GgVector &t, const GgVector &u)
ビュー変換行列を格納する.
Definition: gg.h:2056
GgMatrix frustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) const
透視投影変換を乗じた結果を返す.
Definition: gg.h:2325
GgMatrix rotate(const GgVector &r) const
r 方向のベクトルを軸とする回転の変換行列を乗じた結果を返す.
Definition: gg.h:2257
GgMatrix rotateY(GLfloat a) const
y 軸中心の回転変換を乗じた結果を返す.
Definition: gg.h:2201
GgMatrix divide(const GLfloat *a) const
変換行列を配列に格納した変換行列で除算した値を返す.
Definition: gg.h:1828
GgMatrix operator/(const GgMatrix &m) const
Definition: gg.h:1913
const GLfloat * get() const
変換行列を取り出す.
Definition: gg.h:2414
GgMatrix & loadDivide(const GLfloat *a)
変換行列を配列に格納した変換行列で除算した結果を格納する.
Definition: gg.h:1760
GgMatrix & loadTranslate(const GgVector &t)
平行移動の変換行列を格納する.
Definition: gg.h:1940
GgMatrix operator*(const GgMatrix &m) const
Definition: gg.h:1905
GgMatrix lookat(const GLfloat *e, const GLfloat *t, const GLfloat *u) const
ビュー変換を乗じた結果を返す.
Definition: gg.h:2286
GgMatrix & loadTranspose(const GgMatrix &m)
転置行列を格納する.
Definition: gg.h:2102
GgMatrix operator-(const GgMatrix &m) const
Definition: gg.h:1897
GgMatrix & load(const GLfloat *a)
配列変数の値を格納する.
Definition: gg.h:1693
GLfloat get(int i) const
変換行列の要素を取り出す.
Definition: gg.h:2428
GgMatrix()
コンストラクタ.
Definition: gg.h:1671
GgMatrix divide(const GgMatrix &m) const
変換行列を配列に格納した変換行列で除算した値を返す.
Definition: gg.h:1839
GgMatrix operator*(const GLfloat *a) const
Definition: gg.h:1901
void projection(GLfloat *c, const GgVector &v) const
ベクトルに対して投影変換を行う.
Definition: gg.h:2381
GgMatrix orthogonal(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) const
直交投影変換を乗じた結果を返す.
Definition: gg.h:2309
GgMatrix & loadScale(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f)
拡大縮小の変換行列を格納する.
Definition: gg.cpp:4282
GgMatrix & operator*=(const GgMatrix &m)
Definition: gg.h:1873
GgMatrix multiply(const GLfloat *a) const
変換行列に配列に格納した変換行列を乗算した値を返す.
Definition: gg.h:1810
GgMatrix & loadRotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a)
(x, y, z) 方向のベクトルを軸とする回転の変換行列を格納する.
Definition: gg.cpp:4346
GgMatrix & operator=(const GgMatrix &m)
Definition: gg.h:1849
GgMatrix & loadRotateX(GLfloat a)
x 軸中心の回転の変換行列を格納する.
Definition: gg.cpp:4298
GgMatrix & loadMultiply(const GgMatrix &m)
変換行列に別の変換行列を乗算した結果を格納する.
Definition: gg.h:1752
~GgMatrix()
デストラクタ.
Definition: gg.h:1688
GgMatrix & loadAdd(const GLfloat *a)
変換行列に配列に格納した変換行列を加算した結果を格納する.
Definition: gg.h:1710
GgMatrix & loadInvert(const GgMatrix &m)
逆行列を格納する.
Definition: gg.h:2115
GgMatrix & loadRotate(const GgVector &r)
r 方向のベクトルを軸とする回転の変換行列を格納する.
Definition: gg.h:2021
GgMatrix & loadRotateY(GLfloat a)
y 軸中心の回転の変換行列を格納する.
Definition: gg.cpp:4314
GgMatrix & operator+=(const GgMatrix &m)
Definition: gg.h:1857
GgMatrix transpose() const
転置行列を返す.
Definition: gg.h:2348
GgMatrix & loadOrthogonal(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
直交投影変換行列を格納する.
Definition: gg.cpp:4568
GgMatrix & loadRotateZ(GLfloat a)
z 軸中心の回転の変換行列を格納する.
Definition: gg.cpp:4330
GgMatrix scale(const GgVector &s) const
拡大縮小変換を乗じた結果を返す.
Definition: gg.h:2184
GgMatrix & loadScale(const GgVector &s)
拡大縮小の変換行列を格納する.
Definition: gg.h:1964
void get(GLfloat *a) const
変換行列を取り出す.
Definition: gg.h:2421
GgMatrix & loadTranspose(const GLfloat *a)
転置行列を格納する.
Definition: gg.cpp:4385
GgMatrix translate(const GgVector &t) const
平行移動変換を乗じた結果を返す.
Definition: gg.h:2156
void projection(GgVector &c, const GgVector &v) const
ベクトルに対して投影変換を行う.
Definition: gg.h:2397
GgMatrix add(const GgMatrix &m) const
変換行列に別の変換行列を加算した値を返す.
Definition: gg.h:1785
GgMatrix & loadAdd(const GgMatrix &m)
変換行列に別の変換行列を加算した結果を格納する.
Definition: gg.h:1719
GgMatrix perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar) const
画角を指定して透視投影変換を乗じた結果を返す.
Definition: gg.h:2339
GgMatrix & loadNormal(const GLfloat *a)
法線変換行列を格納する.
Definition: gg.cpp:4492
法線マップ.
Definition: gg.h:4026
GgNormalTexture(const char *name, float nz=1.0f, GLenum internal=GL_RGBA)
ファイルからデータを読み込んで法線マップのテクスチャを作成するコンストラクタ.
Definition: gg.h:4053
GgNormalTexture()
コンストラクタ.
Definition: gg.h:4033
void load(const GLubyte *hmap, GLsizei width, GLsizei height, GLenum format=GL_RED, float nz=1.0f, GLenum internal=GL_RGBA)
メモリ上のデータから法線マップのテクスチャを作成する.
Definition: gg.h:4069
virtual ~GgNormalTexture()
デストラクタ.
Definition: gg.h:4060
GgNormalTexture(const GLubyte *image, GLsizei width, GLsizei height, GLenum format=GL_RED, float nz=1.0f, GLenum internal=GL_RGBA)
メモリ上のデータから法線マップのテクスチャを作成するコンストラクタ.
Definition: gg.h:4042
点のシェーダ.
Definition: gg.h:5000
GgPointShader()
コンストラクタ.
Definition: gg.h:5013
void use(const GLfloat *mp) const
投影変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5107
void load(const char *vert, const char *frag=0, const char *geom=0, GLint nvarying=0, const char **varyings=0)
シェーダのソースファイルを読み込む.
Definition: gg.h:5040
virtual void loadProjectionMatrix(const GLfloat *mp) const
投影変換行列を設定する.
Definition: gg.h:5056
GLuint get() const
シェーダのプログラム名を得る.
Definition: gg.h:5145
virtual void loadMatrix(const GgMatrix &mp, const GgMatrix &mv) const
投影変換行列とモデルビュー変換行列を設定する.
Definition: gg.h:5094
virtual void loadProjectionMatrix(const GgMatrix &mp) const
投影変換行列を設定する.
Definition: gg.h:5063
virtual void use() const
シェーダプログラムの使用を開始する.
Definition: gg.h:5100
void use(const GgMatrix &mp, const GgMatrix &mv) const
投影変換行列とモデルビューを設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5132
void unuse() const
シェーダプログラムの使用を終了する.
Definition: gg.h:5138
virtual ~GgPointShader()
デストラクタ.
Definition: gg.h:5032
void use(const GgMatrix &mp) const
投影変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5115
virtual void loadMatrix(const GLfloat *mp, const GLfloat *mv) const
投影変換行列とモデルビュー変換行列を設定する.
Definition: gg.h:5085
void use(const GLfloat *mp, const GLfloat *mv) const
投影変換行列とモデルビューを設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5123
virtual void loadModelviewMatrix(const GLfloat *mv) const
モデルビュー変換行列を設定する.
Definition: gg.h:5070
virtual void loadModelviewMatrix(const GgMatrix &mv) const
モデルビュー変換行列を設定する.
Definition: gg.h:5077
GgPointShader(const char *vert, const char *frag=0, const char *geom=0, GLint nvarying=0, const char **varyings=0)
コンストラクタ
Definition: gg.h:5024
点.
Definition: gg.h:4580
void send(const GgVector *pos, GLint first=0, GLsizei count=0) const
既存のバッファオブジェクトに頂点の位置データを転送する.
Definition: gg.h:4623
GLuint getBuffer() const
頂点の位置データを格納した頂点バッファオブジェクト名を取り出す.
Definition: gg.h:4614
virtual void draw(GLint first=0, GLsizei count=0) const
点の描画.
Definition: gg.cpp:4978
GLsizei getCount() const
データの数を取り出す.
Definition: gg.h:4607
void load(const GgVector *pos, GLsizei count, GLenum usage=GL_STATIC_DRAW)
バッファオブジェクトを確保して頂点の位置データを格納する.
Definition: gg.h:4632
GgPoints(const GgVector *pos, GLsizei countv, GLenum mode=GL_POINTS, GLenum usage=GL_STATIC_DRAW)
コンストラクタ.
Definition: gg.h:4596
GgPoints(GLenum mode=GL_POINTS)
コンストラクタ.
Definition: gg.h:4587
virtual ~GgPoints()
デストラクタ.
Definition: gg.h:4603
四元数.
Definition: gg.h:2717
GgQuaternion multiply(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
四元数に別の四元数を乗算した結果を返す.
Definition: gg.h:3055
GgQuaternion & loadAdd(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
四元数に別の四元数を加算した結果を格納する.
Definition: gg.h:2825
GgQuaternion rotateY(GLfloat a) const
四元数を y 軸中心に角度 a 回転した四元数を返す.
Definition: gg.h:3304
GgQuaternion & operator+=(const GLfloat *a)
Definition: gg.h:3135
GgQuaternion & operator-=(const GgQuaternion &q)
Definition: gg.h:3147
GgQuaternion multiply(const GgVector &v) const
四元数に別の四元数を乗算した結果を返す.
Definition: gg.h:3064
GgQuaternion & load(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
四元数を格納する.
Definition: gg.h:2785
GgQuaternion divide(const GLfloat *a) const
四元数を別の四元数で除算した結果を返す.
Definition: gg.h:3110
GgQuaternion divide(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
四元数を別の四元数で除算した結果を返す.
Definition: gg.h:3093
GgQuaternion & loadMatrix(const GgMatrix &m)
回転の変換行列 m を表す四元数を格納する.
Definition: gg.h:3212
void getConjugateMatrix(GLfloat *a) const
四元数の共役が表す回転の変換行列を a に求める.
Definition: gg.h:3522
GgQuaternion & loadSubtract(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
四元数から別の四元数を減算した結果を格納する.
Definition: gg.h:2864
GgQuaternion & operator=(const GgQuaternion &q)
Definition: gg.h:3131
GgQuaternion multiply(const GgQuaternion &q) const
四元数に別の四元数を乗算した結果を返す.
Definition: gg.h:3082
GgQuaternion operator*(const GgQuaternion &q) const
Definition: gg.h:3187
GgQuaternion & operator/=(const GgQuaternion &q)
Definition: gg.h:3163
GgQuaternion add(const GLfloat *a) const
四元数に別の四元数を加算した結果を返す.
Definition: gg.h:2996
GgQuaternion & loadNormalize(const GgQuaternion &q)
引数に指定した四元数を正規化して格納する.
Definition: gg.h:3400
GgQuaternion & loadRotateY(GLfloat a)
y 軸中心に角度 a 回転する四元数を格納する.
Definition: gg.cpp:4771
GgQuaternion & loadRotateZ(GLfloat a)
z 軸中心に角度 a 回転する四元数を格納する.
Definition: gg.cpp:4785
GgQuaternion & load(const GgVector &v)
四元数を格納する.
Definition: gg.h:2797
GgQuaternion & loadRotate(const GLfloat *v, GLfloat a)
(v[0], v[1], v[2]) を軸として角度 a 回転する四元数を格納する.
Definition: gg.h:3236
GgQuaternion & operator*=(const GLfloat *a)
Definition: gg.h:3151
GgQuaternion & loadEuler(GLfloat heading, GLfloat pitch, GLfloat roll)
オイラー角 (heading, pitch, roll) で与えられた回転を表す四元数を格納する.
Definition: gg.cpp:4799
GgQuaternion divide(const GgQuaternion &q) const
四元数を別の四元数で除算した結果を返す.
Definition: gg.h:3121
GgQuaternion()
コンストラクタ.
Definition: gg.h:2736
GgQuaternion subtract(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
四元数から別の四元数を減算した結果を返す.
Definition: gg.h:3015
GgQuaternion & loadSubtract(const GgQuaternion &q)
四元数から別の四元数を減算した結果を格納する.
Definition: gg.h:2892
const GLfloat * get() const
四元数を取り出す.
Definition: gg.h:3482
GgQuaternion & loadDivide(const GLfloat *a)
四元を別の四元数で除算した結果を格納する.
Definition: gg.h:2956
GgQuaternion & loadSubtract(const GgVector &v)
四元数から別の四元数を減算した結果を格納する.
Definition: gg.h:2876
GgQuaternion & loadInvert(const GLfloat *a)
引数に指定した四元数の逆元を格納する.
Definition: gg.cpp:4844
GgQuaternion(const GgVector &v)
コンストラクタ.
Definition: gg.h:2750
GgQuaternion divide(const GgVector &v) const
四元数を別の四元数で除算した結果を返す.
Definition: gg.h:3102
GgQuaternion operator+(const GLfloat *a) const
Definition: gg.h:3167
GgQuaternion subtract(const GLfloat *a) const
四元数から別の四元数を減算した結果を返す.
Definition: gg.h:3036
GgQuaternion rotateZ(GLfloat a) const
四元数を z 軸中心に角度 a 回転した四元数を返す.
Definition: gg.h:3312
GgQuaternion & loadSlerp(const GLfloat *a, const GLfloat *b, GLfloat t)
球面線形補間の結果を格納する.
Definition: gg.h:3356
GgQuaternion subtract(const GgQuaternion &q) const
四元数から別の四元数を減算した結果を返す.
Definition: gg.h:3044
GgQuaternion add(GLfloat x, GLfloat y, GLfloat z, GLfloat w) const
四元数に別の四元数を加算した結果を返す.
Definition: gg.h:2975
GgQuaternion & loadMatrix(const GLfloat *a)
回転の変換行列を表す四元数を格納する.
Definition: gg.h:3203
GgQuaternion & operator*=(const GgQuaternion &q)
Definition: gg.h:3155
GgQuaternion & loadMultiply(const GgVector &v)
四元数に別の四元数を乗算した結果を格納する.
Definition: gg.h:2912
void getMatrix(GLfloat *a) const
四元数が表す回転の変換行列を a に求める.
Definition: gg.h:3499
GgQuaternion & loadMultiply(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
四元数に別の四元数を乗算した結果を格納する.
Definition: gg.h:2903
GgQuaternion & load(const GgQuaternion &q)
四元数を格納する.
Definition: gg.h:2814
GgQuaternion & operator+=(const GgQuaternion &q)
Definition: gg.h:3139
GgQuaternion euler(const GLfloat *e) const
四元数をオイラー角 (e[0], e[1], e[2]) で回転した四元数を返す.
Definition: gg.h:3346
GgQuaternion(const GgQuaternion &q)
コピーコンストラクタ.
Definition: gg.h:2764
void get(GLfloat *a) const
四元数を取り出す.
Definition: gg.h:3489
GgMatrix getMatrix() const
四元数が表す回転の変換行列を取り出す.
Definition: gg.h:3513
GgQuaternion operator-(const GgQuaternion &q) const
Definition: gg.h:3179
GgQuaternion & loadRotateX(GLfloat a)
x 軸中心に角度 a 回転する四元数を格納する.
Definition: gg.cpp:4757
GgQuaternion & loadDivide(const GgVector &v)
四元を別の四元数で除算した結果を格納する.
Definition: gg.h:2948
GgQuaternion rotate(const GLfloat *v, GLfloat a) const
四元数を (v[0], v[1], v[2]) を軸として角度 a 回転した四元数を返す.
Definition: gg.h:3280
GLfloat norm() const
四元数のノルムを求める.
Definition: gg.h:2774
void getMatrix(GgMatrix &m) const
四元数が表す回転の変換行列を m に求める.
Definition: gg.h:3506
GgQuaternion & loadEuler(const GLfloat *e)
オイラー角 (e[0], e[1], e[2]) で与えられた回転を表す四元数を格納する.
Definition: gg.h:3327
GgQuaternion operator/(const GgQuaternion &q) const
Definition: gg.h:3195
GgQuaternion & loadRotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a)
(x, y, z) を軸として角度 a 回転する四元数を格納する.
Definition: gg.cpp:4733
GgQuaternion normalize() const
正規化する.
Definition: gg.h:3455
GgQuaternion & load(const GLfloat *a)
四元数を格納する.
Definition: gg.h:2806
GgQuaternion & loadDivide(const GgQuaternion &q)
四元を別の四元数で除算した結果を格納する.
Definition: gg.h:2964
GgQuaternion & loadDivide(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
四元を別の四元数で除算した結果を格納する.
Definition: gg.h:2939
GgQuaternion & loadMultiply(const GLfloat *a)
四元数に別の四元数を乗算した結果を格納する.
Definition: gg.h:2920
GgQuaternion & loadInvert(const GgQuaternion &q)
引数に指定した四元数の逆元を格納する.
Definition: gg.h:3426
GgQuaternion rotate(const GLfloat *v) const
四元数を (v[0], v[1], v[2]) を軸として角度 v[3] 回転した四元数を返す.
Definition: gg.h:3288
GgQuaternion & loadSlerp(const GgQuaternion &q, const GgQuaternion &r, GLfloat t)
球面線形補間の結果を格納する.
Definition: gg.h:3367
GgQuaternion operator/(const GLfloat *a) const
Definition: gg.h:3191
void getConjugateMatrix(GgMatrix &m) const
四元数の共役が表す回転の変換行列を m に求める.
Definition: gg.h:3531
GgQuaternion & loadSlerp(const GgQuaternion &q, const GLfloat *a, GLfloat t)
球面線形補間の結果を格納する.
Definition: gg.h:3377
GgQuaternion & loadRotate(const GLfloat *v)
(v[0], v[1], v[2]) を軸として角度 v[3] 回転する四元数を格納する.
Definition: gg.h:3244
GgQuaternion add(const GgQuaternion &q) const
四元数に別の四元数を加算した結果を返す.
Definition: gg.h:3004
GgQuaternion & loadSubtract(const GLfloat *a)
四元数から別の四元数を減算した結果を格納する.
Definition: gg.h:2884
GgQuaternion & loadAdd(const GLfloat *a)
四元数に別の四元数を加算した結果を格納する.
Definition: gg.h:2845
GgQuaternion conjugate() const
共役四元数に変換する.
Definition: gg.h:3464
GgQuaternion & loadConjugate(const GgQuaternion &q)
引数に指定した四元数の共役四元数を格納する.
Definition: gg.h:3413
GgQuaternion rotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a) const
四元数を (x, y, z) を軸として角度 a 回転した四元数を返す.
Definition: gg.h:3270
GgQuaternion operator-(const GLfloat *a) const
Definition: gg.h:3175
GgQuaternion & operator-=(const GLfloat *a)
Definition: gg.h:3143
GgQuaternion rotateX(GLfloat a) const
四元数を x 軸中心に角度 a 回転した四元数を返す.
Definition: gg.h:3296
GgQuaternion euler(GLfloat heading, GLfloat pitch, GLfloat roll) const
四元数をオイラー角 (heading, pitch, roll) で回転した四元数を返す.
Definition: gg.h:3337
GgQuaternion & operator=(const GLfloat *a)
Definition: gg.h:3127
GgQuaternion & operator/=(const GLfloat *a)
Definition: gg.h:3159
GgQuaternion & loadMultiply(const GgQuaternion &q)
四元数に別の四元数を乗算した結果を格納する.
Definition: gg.h:2928
GgQuaternion add(const GgVector &v) const
四元数に別の四元数を加算した結果を返す.
Definition: gg.h:2988
GgQuaternion operator+(const GgQuaternion &q) const
Definition: gg.h:3171
GgQuaternion(const GLfloat *a)
コンストラクタ.
Definition: gg.h:2757
GgMatrix getConjugateMatrix() const
四元数の共役が表す回転の変換行列を取り出す.
Definition: gg.h:3538
~GgQuaternion()
デストラクタ.
Definition: gg.h:2770
GgQuaternion subtract(const GgVector &v) const
四元数から別の四元数を減算した結果を返す.
Definition: gg.h:3028
GgQuaternion & loadIdentity()
単位元を格納する.
Definition: gg.h:3219
GgQuaternion & loadSlerp(const GLfloat *a, const GgQuaternion &q, GLfloat t)
球面線形補間の結果を格納する.
Definition: gg.h:3387
GgQuaternion & loadAdd(const GgQuaternion &q)
四元数に別の四元数を加算した結果を格納する.
Definition: gg.h:2853
GgQuaternion invert() const
逆元に変換する.
Definition: gg.h:3473
GgQuaternion slerp(GLfloat *a, GLfloat t) const
球面線形補間の結果を返す.
Definition: gg.h:3435
GgQuaternion & loadNormalize(const GLfloat *a)
引数に指定した四元数を正規化して格納する.
Definition: gg.cpp:4815
GgQuaternion slerp(const GgQuaternion &q, GLfloat t) const
球面線形補間の結果を返す.
Definition: gg.h:3446
GgQuaternion(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
コンストラクタ.
Definition: gg.h:2743
GgQuaternion & loadConjugate(const GLfloat *a)
引数に指定した四元数の共役四元数を格納する.
Definition: gg.cpp:4830
GgQuaternion operator*(const GLfloat *a) const
Definition: gg.h:3183
GgQuaternion multiply(const GLfloat *a) const
四元数に別の四元数を乗算した結果を返す.
Definition: gg.h:3072
GgQuaternion & loadAdd(const GgVector &v)
四元数に別の四元数を加算した結果を格納する.
Definition: gg.h:2837
シェーダの基底クラス.
Definition: gg.h:4945
void unuse() const
シェーダプログラムの使用を終了する.
Definition: gg.h:4983
void use() const
シェーダプログラムの使用を開始する.
Definition: gg.h:4977
GgShader & operator=(const GgShader &o)=delete
代入演算子は使用禁止.
GgShader(const char *vert, const char *frag=0, const char *geom=0, int nvarying=0, const char **varyings=0)
コンストラクタ.
Definition: gg.h:4957
GgShader(const GgShader &o)=delete
コピーコンストラクタは使用禁止.
virtual ~GgShader()
デストラクタ.
Definition: gg.h:4963
GLuint get() const
シェーダのプログラム名を得る.
Definition: gg.h:4990
形状データの基底クラス.
Definition: gg.h:4514
void setMode(GLenum mode)
基本図形の設定.
Definition: gg.h:4554
GLuint get() const
頂点配列オブジェクト名を取り出す.
Definition: gg.h:4547
GgShape(GLenum mode=0)
コンストラクタ.
Definition: gg.h:4525
virtual ~GgShape()
デストラクタ.
Definition: gg.h:4533
GLenum getMode() const
基本図形の検査.
Definition: gg.h:4561
virtual void draw(GLint first=0, GLsizei count=0) const
図形の描画, 派生クラスでこの手続きをオーバーライドする.
Definition: gg.h:4569
GgShape(const GgShape &o)=delete
コピーコンストラクタは使用禁止.
GgShape & operator=(const GgShape &o)=delete
代入演算子は使用禁止.
Wavefront OBJ 形式のファイル (Arrays 形式).
Definition: gg.h:5764
virtual void draw(GLint first=0, GLsizei count=0) const
Wavefront OBJ 形式のデータを描画する手続き.
Definition: gg.cpp:5692
virtual ~GgSimpleObj()
デストラクタ.
Definition: gg.h:5782
const GgTriangles * get() const
形状データの取り出し.
Definition: gg.h:5786
GgSimpleObj(const char *name, bool normalize=false)
コンストラクタ.
Definition: gg.cpp:5670
三角形に単純な陰影付けを行うシェーダが参照する光源データのユニフォームバッファオブジェクト.
Definition: gg.h:5298
void loadPosition(const GgVector *position, GLint first=0, GLsizei count=1) const
光源の位置を設定する.
Definition: gg.h:5410
void loadAmbient(const GLfloat *ambient, GLint first=0, GLsizei count=1) const
光源の強度の環境光成分を設定する.
Definition: gg.h:5331
void select(GLint i=0) const
光源を選択する.
Definition: gg.h:5435
void loadSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
光源の強度の鏡面反射光成分を設定する.
Definition: gg.cpp:5359
void loadDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
光源の強度の拡散反射光成分を設定する.
Definition: gg.cpp:5330
LightBuffer(const Light &light, GLsizei count=1, GLenum usage=GL_STATIC_DRAW)
同じデータで埋めるコンストラクタ.
Definition: gg.h:5312
void loadSpecular(const GLfloat *specular, GLint first=0, GLsizei count=1) const
光源の強度の鏡面反射光成分を設定する.
Definition: gg.h:5369
void load(const Light &light, GLint first=0, GLsizei count=1) const
光源の色と位置を設定する.
Definition: gg.h:5428
void loadPosition(const GLfloat *position, GLint first=0, GLsizei count=1) const
光源の位置を設定する.
Definition: gg.h:5400
void loadPosition(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f, GLint first=0, GLsizei count=1) const
光源の位置を設定する.
Definition: gg.cpp:5413
void loadDiffuse(const GLfloat *diffuse, GLint first=0, GLsizei count=1) const
光源の強度の拡散反射光成分を設定する.
Definition: gg.h:5350
LightBuffer(const Light *light=nullptr, GLsizei count=1, GLenum usage=GL_STATIC_DRAW)
デフォルトコンストラクタ.
Definition: gg.h:5305
void loadAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
光源の強度の環境光成分を設定する.
Definition: gg.cpp:5301
void loadColor(const Light &color, GLint first=0, GLsizei count=1) const
光源の色を設定するが位置は変更しない.
Definition: gg.cpp:5385
void load(const Light *light, GLint first=0, GLsizei count=1) const
光源の色と位置を設定する.
Definition: gg.h:5419
virtual ~LightBuffer()
デストラクタ.
Definition: gg.h:5316
三角形に単純な陰影付けを行うシェーダが参照する材質データのユニフォームバッファオブジェクト.
Definition: gg.h:5459
void loadShininess(GLfloat shininess, GLint first=0, GLsizei count=1) const
輝き係数を設定する.
Definition: gg.cpp:5618
void loadAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
環境光に対する反射係数を設定する.
Definition: gg.cpp:5465
MaterialBuffer(const Material &material, GLsizei count=1, GLenum usage=GL_STATIC_DRAW)
同じデータで埋めるコンストラクタ.
Definition: gg.h:5473
void loadSpecular(const GLfloat *specular, GLint first=0, GLsizei count=1) const
鏡面反射係数を設定する.
Definition: gg.h:5545
void loadSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
鏡面反射係数を設定する.
Definition: gg.cpp:5592
void select(GLint i=0) const
材質を選択する.
Definition: gg.h:5583
void loadAmbient(const GLfloat *ambient, GLint first=0, GLsizei count=1) const
環境光に対する反射係数を設定する.
Definition: gg.h:5492
void load(const Material &material, GLint first=0, GLsizei count=1) const
材質を設定する.
Definition: gg.h:5576
virtual ~MaterialBuffer()
デストラクタ
Definition: gg.h:5477
void loadDiffuse(const GLfloat *diffuse, GLint first=0, GLsizei count=1) const
拡散反射係数を設定する.
Definition: gg.h:5511
MaterialBuffer(const Material *material=nullptr, GLsizei count=1, GLenum usage=GL_STATIC_DRAW)
デフォルトコンストラクタ.
Definition: gg.h:5466
void load(const Material *material, GLint first=0, GLsizei count=1) const
材質を設定する.
Definition: gg.h:5567
void loadAmbientAndDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
環境光に対する反射係数と拡散反射係数を設定する.
Definition: gg.cpp:5523
void loadDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a=1.0f, GLint first=0, GLsizei count=1) const
拡散反射係数を設定する.
Definition: gg.cpp:5494
三角形に単純な陰影付けを行うシェーダ.
Definition: gg.h:5156
GgSimpleShader(const char *vert, const char *frag=0, const char *geom=0, GLint nvarying=0, const char **varyings=0)
コンストラクタ.
Definition: gg.h:5182
virtual void loadModelviewMatrix(const GgMatrix &mv, const GgMatrix &mn) const
モデルビュー変換行列と法線変換行列を設定する.
Definition: gg.h:5228
void use(const GgMatrix &mp, const GgMatrix &mv, const GgMatrix &mn, const LightBuffer &light, GLint i=0) const
光源を指定し投影変換行列とモデルビュー変換行列と法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5677
virtual void loadMatrix(const GLfloat *mp, const GLfloat *mv, const GLfloat *mn) const
投影変換行列とモデルビュー変換行列と法線変換行列を設定する.
Definition: gg.h:5251
virtual void loadModelviewMatrix(const GLfloat *mv) const
モデルビュー変換行列とそれから求めた法線変換行列を設定する.
Definition: gg.h:5235
GgSimpleShader()
コンストラクタ.
Definition: gg.h:5169
void use(const GLfloat *mp, const GLfloat *mv, const GLfloat *mn) const
投影変換行列とモデルビュー変換行列と法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5602
void use(const GLfloat *mp, const GLfloat *mv, const GLfloat *mn, const LightBuffer *light, GLint i=0) const
光源を指定し投影変換行列とモデルビュー変換行列と法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5662
virtual void loadModelviewMatrix(const GLfloat *mv, const GLfloat *mn) const
モデルビュー変換行列と法線変換行列を設定する.
Definition: gg.h:5219
virtual void loadModelviewMatrix(const GgMatrix &mv) const
モデルビュー変換行列とそれから求めた法線変換行列を設定する.
Definition: gg.h:5242
void use(const GLfloat *mp, const LightBuffer *light, GLint i=0) const
光源を指定し投影変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5706
void use(const GgMatrix &mp, const GgMatrix &mv, const LightBuffer &light, GLint i=0) const
光源を指定し投影変換行列とモデルビュー変換行列を設定しモデルビュー変換行列から求めた法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5697
virtual void loadMatrix(const GgMatrix &mp, const GgMatrix &mv, const GgMatrix &mn) const
投影変換行列とモデルビュー変換行列と法線変換行列を設定する.
Definition: gg.h:5261
GgSimpleShader(const GgSimpleShader &o)
コピーコンストラクタ.
Definition: gg.h:5189
virtual void loadMatrix(const GgMatrix &mp, const GgMatrix &mv) const
投影変換行列とモデルビュー変換行列を設定しモデルビュー変換行列から求めた法線変換行列を設定する.
Definition: gg.h:5277
void use() const
シェーダプログラムの使用を開始する.
Definition: gg.h:5592
void use(const GgMatrix &mp, const GgMatrix &mv) const
投影変換行列とモデルビュー変換行列を設定しモデルビュー変換行列から求めた法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5631
void use(const GgMatrix &mp, const GgMatrix &mv, const GgMatrix &mn) const
投影変換行列とモデルビュー変換行列と法線変換行列を指定してシェーダプログラムの使用を開始する.
Definition: gg.h:5615
void use(const LightBuffer *light, GLint i=0) const
光源を指定してシェーダプログラムの使用を開始する.
Definition: gg.h:5639
virtual void loadMatrix(const GLfloat *mp, const GLfloat *mv) const
投影変換行列とモデルビュー変換行列を設定しモデルビュー変換行列から求めた法線変換行列を設定する.
Definition: gg.h:5269
void load(const char *vert, const char *frag=0, const char *geom=0, GLint nvarying=0, const char **varyings=0)
シェーダのソースファイルの読み込み
Definition: gg.cpp:5656
GgSimpleShader & operator=(const GgSimpleShader &o)
代入演算子
Definition: gg.h:5199
void use(const GLfloat *mp, const GLfloat *mv, const LightBuffer *light, GLint i=0) const
光源を指定し投影変換行列とモデルビュー変換行列を設定しモデルビュー変換行列から求めた法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5687
virtual ~GgSimpleShader()
デストラクタ.
Definition: gg.h:5196
void use(const LightBuffer &light, GLint i=0) const
光源を指定してシェーダプログラムの使用を開始する.
Definition: gg.h:5651
void use(const GLfloat *mp, const GLfloat *mv) const
投影変換行列とモデルビュー変換行列を設定しモデルビュー変換行列から求めた法線変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5623
void use(const GgMatrix &mp, const LightBuffer &light, GLint i=0) const
光源を指定し投影変換行列を設定してシェーダプログラムの使用を開始する.
Definition: gg.h:5719
テクスチャ.
Definition: gg.h:3869
void unbind() const
テクスチャの使用終了 (このテクスチャを使用しなくなったら呼び出す).
Definition: gg.h:3913
GgTexture(const GgTexture &o)=delete
コピーコンストラクタは使用禁止.
GgTexture & operator=(const GgTexture &o)=delete
代入演算子は使用禁止.
GgTexture(const GLvoid *image, GLsizei width, GLsizei height, GLenum format=GL_BGR, GLenum type=GL_UNSIGNED_BYTE, GLenum internal=GL_RGBA, GLenum wrap=GL_CLAMP_TO_EDGE)
メモリ上のデータからテクスチャを作成するコンストラクタ.
Definition: gg.h:3886
GLsizei getHeight() const
使用しているテクスチャの縦の画素数を取り出す.
Definition: gg.h:3927
const GLsizei * getSize() const
使用しているテクスチャのサイズを取り出す.
Definition: gg.h:3942
GLsizei getWidth() const
使用しているテクスチャの横の画素数を取り出す.
Definition: gg.h:3920
virtual ~GgTexture()
デストラクタ.
Definition: gg.h:3894
GLuint getTexture() const
使用しているテクスチャのテクスチャ名を得る.
Definition: gg.h:3949
void getSize(GLsizei *size) const
使用しているテクスチャのサイズを取り出す.
Definition: gg.h:3934
void bind() const
テクスチャの使用開始 (このテクスチャを使用する際に呼び出す).
Definition: gg.h:3907
簡易トラックボール処理.
Definition: gg.h:3738
void begin(float x, float y)
トラックボール処理を開始する.
Definition: gg.cpp:4899
void end(float x, float y)
トラックボール処理を停止する.
Definition: gg.cpp:4963
void motion(float x, float y)
回転の変換行列を計算する.
Definition: gg.cpp:4915
const GgMatrix & getMatrix() const
現在の回転の変換行列を取り出す.
Definition: gg.h:3850
void region(float w, float h)
トラックボール処理するマウスの移動範囲を指定する.
Definition: gg.cpp:4886
virtual ~GgTrackball()
デストラクタ.
Definition: gg.h:3755
const GLfloat * getScale() const
トラックボール処理の換算係数を取り出す.
Definition: gg.h:3821
const GLfloat * get() const
現在の回転の変換行列を取り出す.
Definition: gg.h:3857
const GLfloat * getStart() const
トラックボール処理の開始位置を取り出す.
Definition: gg.h:3799
void getScale(GLfloat *factor) const
トラックボール処理の換算係数を取り出す.
Definition: gg.h:3835
void reset()
トラックボールをリセットする
Definition: gg.cpp:4868
GLfloat getStart(int direction) const
トラックボール処理の開始位置を取り出す.
Definition: gg.h:3806
const GgQuaternion & getQuaternion() const
現在の回転の四元数を取り出す.
Definition: gg.h:3843
GgTrackball()
コンストラクタ.
Definition: gg.h:3749
void rotate(const GgQuaternion &q)
トラックボールの回転角を修正する.
Definition: gg.cpp:4942
void getStart(GLfloat *position) const
トラックボール処理の開始位置を取り出す.
Definition: gg.h:3813
GLfloat getScale(int direction) const
トラックボール処理の換算係数を取り出す.
Definition: gg.h:3828
void region(int w, int h)
トラックボール処理するマウスの移動範囲を指定する.
Definition: gg.h:3767
三角形で表した形状データ (Arrays 形式).
Definition: gg.h:4691
void load(const GgVertex *vert, GLsizei count, GLenum usage=GL_STATIC_DRAW)
バッファオブジェクトを確保して頂点属性を格納する.
Definition: gg.h:4745
virtual ~GgTriangles()
デストラクタ.
Definition: gg.h:4716
GgTriangles(GLenum mode=GL_TRIANGLES)
コンストラクタ.
Definition: gg.h:4699
GLuint getBuffer() const
頂点属性を格納した頂点バッファオブジェクト名を取り出す.
Definition: gg.h:4727
virtual void draw(GLint first=0, GLsizei count=0) const
三角形の描画.
Definition: gg.cpp:4990
GLsizei getCount() const
データの数を取り出す.
Definition: gg.h:4720
void send(const GgVertex *vert, GLint first=0, GLsizei count=0) const
既存のバッファオブジェクトに頂点属性を転送する.
Definition: gg.h:4736
GgTriangles(const GgVertex *vert, GLsizei count, GLenum mode=GL_TRIANGLES, GLenum usage=GL_STATIC_DRAW)
コンストラクタ.
Definition: gg.h:4708
ユニフォームバッファオブジェクト.
Definition: gg.h:4271
GLsizei getCount() const
データの数を取り出す.
Definition: gg.h:4317
void copy(GLuint src_buffer, GLint src_first=0, GLint dst_first=0, GLsizei count=0) const
別のバッファオブジェクトからデータを複写する.
Definition: gg.h:4484
void load(const T *data, GLsizei count, GLenum usage=GL_STATIC_DRAW)
ユニフォームバッファオブジェクトを確保してブロックごとにデータを転送する.
Definition: gg.h:4367
void unbind() const
ユニフォームバッファオブジェクトを解放する.
Definition: gg.h:4336
GLuint getTarget() const
ユニフォームバッファオブジェクトのターゲットを取り出す.
Definition: gg.h:4303
void * map(GLint first, GLsizei count) const
ユニフォームバッファオブジェクトの指定した範囲をマップする.
Definition: gg.h:4352
void fill(const GLvoid *data, GLint offset=0, GLsizei size=sizeof(T), GLint first=0, GLsizei count=0) const
ユニフォームバッファオブジェクトの全ブロックのメンバーを同じデータを格納する.
Definition: gg.h:4430
void * map() const
ユニフォームバッファオブジェクトをマップする.
Definition: gg.h:4343
void load(const T &data, GLsizei count, GLenum usage=GL_STATIC_DRAW)
ユニフォームバッファオブジェクトを確保して全てのブロックに同じデータを格納する.
Definition: gg.h:4383
void bind() const
ユニフォームバッファオブジェクトを結合する.
Definition: gg.h:4330
void unmap() const
バッファオブジェクトをアンマップする.
Definition: gg.h:4358
GLuint getBuffer() const
ユニフォームバッファオブジェクト名を取り出す.
Definition: gg.h:4324
GLsizeiptr getStride() const
ユニフォームバッファオブジェクトのアライメントを考慮したデータの間隔を取り出す.
Definition: gg.h:4310
void read(GLvoid *data, GLint offset=0, GLsizei size=sizeof(T), GLint first=0, GLsizei count=0) const
ユニフォームバッファオブジェクトからデータを抽出する.
Definition: gg.h:4456
void send(const GLvoid *data, GLint offset=0, GLsizei size=sizeof(T), GLint first=0, GLsizei count=0) const
ユニフォームバッファオブジェクトを確保してユニフォームバッファオブジェクトのブロックごとのメンバを同じデータで埋める.
Definition: gg.h:4401
GgSimpleShader::Light light
Definition: ggsample01.cpp:8
ゲームグラフィックス特論の宿題用補助プログラムの名前空間
Definition: gg.h:1307
GgMatrix ggQuaternionTransposeMatrix(const GgQuaternion &q)
四元数 q の回転の転置した変換行列を返す.
Definition: gg.h:3605
GgMatrix ggScale(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f)
拡大縮小の変換行列を返す.
Definition: gg.h:2492
GgTriangles * ggArraysObj(const char *name, bool normalize=false)
Wavefront OBJ ファイルを読み込む (Arrays 形式)
Definition: gg.cpp:5124
GgElements * ggElementsMesh(GLuint slices, GLuint stacks, const GLfloat(*pos)[3], const GLfloat(*norm)[3]=nullptr)
メッシュ形状を作成する (Elements 形式).
Definition: gg.cpp:5158
GgTriangles * ggRectangle(GLfloat width=1.0f, GLfloat height=1.0f)
矩形状に 2 枚の三角形を生成する.
Definition: gg.cpp:5077
GgMatrix ggRotateZ(GLfloat a)
z 軸中心の回転の変換行列を返す.
Definition: gg.h:2537
GgQuaternion ggSlerp(const GLfloat *a, const GLfloat *b, GLfloat t)
二つの四元数の球面線形補間の結果を返す.
Definition: gg.h:3666
GgMatrix ggTranslate(GLfloat x, GLfloat y, GLfloat z, GLfloat w=1.0f)
平行移動の変換行列を返す.
Definition: gg.h:2462
void _ggFBOError(const char *name=nullptr, unsigned int line=0)
FBO のエラーをチェックする.
Definition: gg.cpp:2618
GgMatrix ggLookat(GLfloat ex, GLfloat ey, GLfloat ez, GLfloat tx, GLfloat ty, GLfloat tz, GLfloat ux, GLfloat uy, GLfloat uz)
ビュー変換行列を返す.
Definition: gg.h:2604
void ggCreateNormalMap(const GLubyte *hmap, GLsizei width, GLsizei height, GLenum format, GLfloat nz, GLenum internal, std::vector< GgVector > &nmap)
グレースケール画像 (8bit) から法線マップのデータを作成する.
Definition: gg.cpp:3005
GLfloat ggLength4(const GLfloat *a)
4 要素の長さ.
Definition: gg.cpp:4221
GLfloat ggDot4(const GLfloat *a, const GLfloat *b)
4 要素の内積
Definition: gg.h:1635
GgMatrix ggNormal(const GgMatrix &m)
法線変換行列を返す.
Definition: gg.h:2708
GgMatrix ggRotate(GLfloat x, GLfloat y, GLfloat z, GLfloat a)
(x, y, z) 方向のベクトルを軸とする回転の変換行列を乗じた結果を返す.
Definition: gg.h:2549
GLint ggBufferAlignment
使用している GPU のバッファオブジェクトのアライメント, 初期化に取得される.
void ggCross(GLfloat *c, const GLfloat *a, const GLfloat *b)
3 要素の外積.
Definition: gg.h:1571
GgElements * ggElementsObj(const char *name, bool normalize=false)
Wavefront OBJ ファイル を読み込む (Elements 形式).
Definition: gg.cpp:5140
GLuint ggLoadShader(const char *vert, const char *frag=nullptr, const char *geom=nullptr, GLint nvarying=0, const char *const varyings[]=nullptr)
シェーダのソースファイルを読み込んでプログラムオブジェクトを作成する.
Definition: gg.cpp:4128
GLfloat ggDot3(const GLfloat *a, const GLfloat *b)
3 要素の内積.
Definition: gg.h:1559
GgMatrix ggFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
透視透視投影変換行列を返す.
Definition: gg.h:2668
GgQuaternion ggRotateQuaternion(GLfloat x, GLfloat y, GLfloat z, GLfloat a)
(x, y, z) を軸として角度 a 回転する四元数を返す.
Definition: gg.h:3619
std::array< GLfloat, 4 > GgVector
4 要素の単精度実数の配列.
Definition: gg.h:1325
GgQuaternion ggQuaternion(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
四元数を返す
Definition: gg.h:3552
GgQuaternion ggConjugate(const GgQuaternion &q)
共役四元数を返す.
Definition: gg.h:3721
void _ggError(const char *name=nullptr, unsigned int line=0)
OpenGL のエラーをチェックする.
Definition: gg.cpp:2574
GgMatrix ggPerspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar)
画角を指定して透視投影変換行列を返す.
Definition: gg.h:2682
GLfloat ggLength3(const GLfloat *a)
3 要素の長さ.
Definition: gg.cpp:4211
GgMatrix ggTranspose(const GgMatrix &m)
転置行列を返す.
Definition: gg.h:2692
GLuint ggCreateShader(const char *vsrc, const char *fsrc=nullptr, const char *gsrc=nullptr, GLint nvarying=0, const char *const varyings[]=nullptr, const char *vtext="vertex shader", const char *ftext="fragment shader", const char *gtext="geometry shader")
シェーダのソースプログラムの文字列を読み込んでプログラムオブジェクトを作成する.
Definition: gg.cpp:3993
GgTriangles * ggEllipse(GLfloat width=1.0f, GLfloat height=1.0f, GLuint slices=16)
楕円状に三角形を生成する.
Definition: gg.cpp:5098
GLuint ggLoadTexture(const GLvoid *image, GLsizei width, GLsizei height, GLenum format=GL_BGR, GLenum type=GL_UNSIGNED_BYTE, GLenum internal=GL_RGB, GLenum wrap=GL_CLAMP_TO_EDGE)
テクスチャメモリを確保して画像データをテクスチャとして読み込む.
Definition: gg.cpp:2916
GgPoints * ggPointsCube(GLsizei countv, GLfloat length=1.0f, GLfloat cx=0.0f, GLfloat cy=0.0f, GLfloat cz=0.0f)
点群を立方体状に生成する.
Definition: gg.cpp:5015
GLuint ggLoadImage(const char *name, GLsizei *pWidth=nullptr, GLsizei *pHeight=nullptr, GLenum internal=0, GLenum wrap=GL_CLAMP_TO_EDGE)
テクスチャメモリを確保して TGA 画像ファイルを読み込む.
Definition: gg.cpp:2949
GLuint ggLoadHeight(const char *name, float nz, GLsizei *pWidth=nullptr, GLsizei *pHeight=nullptr, GLenum internal=GL_RGBA)
テクスチャメモリを確保して TGA 画像ファイルを読み込み法線マップを作成する.
Definition: gg.cpp:3085
GgQuaternion ggNormalize(const GgQuaternion &q)
正規化した四元数を返す.
Definition: gg.h:3713
GgQuaternion ggEulerQuaternion(GLfloat heading, GLfloat pitch, GLfloat roll)
オイラー角 (heading, pitch, roll) で与えられた回転を表す四元数を返す.
Definition: gg.h:3647
GgMatrix ggQuaternionMatrix(const GgQuaternion &q)
四元数 q の回転の変換行列を返す.
Definition: gg.h:3594
GgMatrix ggOrthogonal(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
直交投影変換行列を返す.
Definition: gg.h:2652
GgPoints * ggPointsSphere(GLsizei countv, GLfloat radius=0.5f, GLfloat cx=0.0f, GLfloat cy=0.0f, GLfloat cz=0.0f)
点群を球状に生成する.
Definition: gg.cpp:5045
void ggNormalize4(GLfloat *a)
4 要素の正規化.
Definition: gg.h:1600
bool ggSaveTga(const char *name, const void *buffer, unsigned int width, unsigned int height, unsigned int depth)
配列の内容を TGA ファイルに保存する.
Definition: gg.cpp:2665
GgQuaternion ggMatrixQuaternion(const GLfloat *a)
回転の変換行列 m を表す四元数を返す.
Definition: gg.h:3577
GLfloat ggNorm(const GgQuaternion &q)
四元数のノルムを返す.
Definition: gg.h:3705
GgMatrix ggRotateY(GLfloat a)
y 軸中心の回転の変換行列を返す.
Definition: gg.h:2528
GgMatrix ggRotateX(GLfloat a)
x 軸中心の回転の変換行列を返す.
Definition: gg.h:2519
bool ggLoadSimpleObj(const char *name, std::vector< std::array< GLuint, 3 >> &group, std::vector< GgSimpleShader::Material > &material, std::vector< GgVertex > &vert, bool normalize=false)
三角形分割された OBJ ファイルと MTL ファイルを読み込む (Arrays 形式)
Definition: gg.cpp:3738
GgElements * ggElementsSphere(GLfloat radius=1.0f, int slices=16, int stacks=8)
Definition: gg.cpp:5254
GLuint ggLoadComputeShader(const char *comp)
コンピュートシェーダのソースファイルを読み込んでプログラムオブジェクトを作成する.
Definition: gg.cpp:4191
BindingPoints
光源と材質の uniform buffer object の結合ポイント.
Definition: gg.h:1312
@ MaterialBindingPoint
材質の uniform buffer object の結合ポイント
Definition: gg.h:1314
@ LightBindingPoint
光源の uniform buffer object の結合ポイント
Definition: gg.h:1313
bool ggSaveColor(const char *name)
カラーバッファの内容を TGA ファイルに保存する.
Definition: gg.cpp:2748
GgMatrix ggInvert(const GgMatrix &m)
逆行列を返す.
Definition: gg.h:2700
void ggNormalize3(GLfloat *a)
3 要素の正規化.
Definition: gg.h:1542
void ggInit()
ゲームグラフィックス特論の都合にもとづく初期化を行う.
Definition: gg.cpp:1319
GgQuaternion ggIdentityQuaternion()
単位四元数を返す
Definition: gg.h:3568
bool ggSaveDepth(const char *name)
デプスバッファの内容を TGA ファイルに保存する.
Definition: gg.cpp:2774
GgMatrix ggIdentity()
単位行列を返す.
Definition: gg.h:2450
bool ggReadImage(const char *name, std::vector< GLubyte > &image, GLsizei *pWidth, GLsizei *pHeight, GLenum *pFormat)
TGA ファイル (8/16/24/32bit) をメモリに読み込む.
Definition: gg.cpp:2804
GLuint ggCreateComputeShader(const char *csrc, const char *ctext="compute shader")
コンピュートシェーダのソースプログラムの文字列を読み込んでプログラムオブジェクトを作成する.
Definition: gg.cpp:4150
三角形に単純な陰影付けを行うシェーダが参照する光源データ.
Definition: gg.h:5286
GgVector position
光源の位置.
Definition: gg.h:5290
GgVector ambient
光源強度の環境光成分.
Definition: gg.h:5287
GgVector diffuse
光源強度の拡散反射光成分.
Definition: gg.h:5288
GgVector specular
光源強度の鏡面反射光成分.
Definition: gg.h:5289
三角形に単純な陰影付けを行うシェーダが参照する材質データ.
Definition: gg.h:5447
GgVector specular
鏡面反射係数.
Definition: gg.h:5450
GLfloat shininess
輝き係数.
Definition: gg.h:5451
GgVector ambient
環境光に対する反射係数.
Definition: gg.h:5448
GgVector diffuse
拡散反射係数.
Definition: gg.h:5449
三角形の頂点データ.
Definition: gg.h:4652
GgVector normal
位置.
Definition: gg.h:4654
GgVertex()
法線.
Definition: gg.h:4657
GgVector position
Definition: gg.h:4653
GgVertex(GLfloat px, GLfloat py, GLfloat pz, GLfloat nx, GLfloat ny, GLfloat nz)
コンストラクタ.
Definition: gg.h:4673
GgVertex(const GgVector &pos, const GgVector &norm)
コンストラクタ.
Definition: gg.h:4662
GgVertex(const GLfloat *pos, const GLfloat *norm)
コンストラクタ.
Definition: gg.h:4681