• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // frame_capture_utils_autogen.h:
9 //   ANGLE Frame capture types and helper functions.
10 
11 #ifndef LIBANGLE_FRAME_CAPTURE_UTILS_AUTOGEN_H_
12 #define LIBANGLE_FRAME_CAPTURE_UTILS_AUTOGEN_H_
13 
14 #include "common/PackedEnums.h"
15 
16 namespace angle
17 {
18 enum class ParamType
19 {
20     TAlphaTestFunc,
21     TBufferBinding,
22     TBufferID,
23     TBufferIDConstPointer,
24     TBufferIDPointer,
25     TBufferUsage,
26     TClientVertexArrayType,
27     TCullFaceMode,
28     TDrawElementsType,
29     TFenceNVID,
30     TFenceNVIDConstPointer,
31     TFenceNVIDPointer,
32     TFramebufferID,
33     TFramebufferIDConstPointer,
34     TFramebufferIDPointer,
35     TGLDEBUGPROC,
36     TGLDEBUGPROCKHR,
37     TGLbitfield,
38     TGLboolean,
39     TGLbooleanConstPointer,
40     TGLbooleanPointer,
41     TGLbyte,
42     TGLbyteConstPointer,
43     TGLcharConstPointer,
44     TGLcharConstPointerPointer,
45     TGLcharPointer,
46     TGLclampx,
47     TGLdouble,
48     TGLdoubleConstPointer,
49     TGLdoublePointer,
50     TGLeglImageOES,
51     TGLenum,
52     TGLenumConstPointer,
53     TGLenumPointer,
54     TGLfixed,
55     TGLfixedConstPointer,
56     TGLfixedPointer,
57     TGLfloat,
58     TGLfloatConstPointer,
59     TGLfloatPointer,
60     TGLint,
61     TGLint64Pointer,
62     TGLintConstPointer,
63     TGLintPointer,
64     TGLintptr,
65     TGLintptrConstPointer,
66     TGLshort,
67     TGLshortConstPointer,
68     TGLsizei,
69     TGLsizeiConstPointer,
70     TGLsizeiPointer,
71     TGLsizeiptr,
72     TGLsizeiptrConstPointer,
73     TGLsync,
74     TGLubyte,
75     TGLubyteConstPointer,
76     TGLubytePointer,
77     TGLuint,
78     TGLuint64,
79     TGLuint64ConstPointer,
80     TGLuint64Pointer,
81     TGLuintConstPointer,
82     TGLuintPointer,
83     TGLushort,
84     TGLushortConstPointer,
85     TGLushortPointer,
86     TGLvoidConstPointer,
87     TGLvoidConstPointerPointer,
88     TGraphicsResetStatus,
89     THandleType,
90     TLightParameter,
91     TLogicalOperation,
92     TMaterialParameter,
93     TMatrixType,
94     TMemoryObjectID,
95     TMemoryObjectIDConstPointer,
96     TMemoryObjectIDPointer,
97     TPointParameter,
98     TPrimitiveMode,
99     TProgramPipelineID,
100     TProgramPipelineIDConstPointer,
101     TProgramPipelineIDPointer,
102     TProvokingVertexConvention,
103     TQueryID,
104     TQueryIDConstPointer,
105     TQueryIDPointer,
106     TQueryType,
107     TRenderbufferID,
108     TRenderbufferIDConstPointer,
109     TRenderbufferIDPointer,
110     TSamplerID,
111     TSamplerIDConstPointer,
112     TSamplerIDPointer,
113     TSemaphoreID,
114     TSemaphoreIDConstPointer,
115     TSemaphoreIDPointer,
116     TShaderProgramID,
117     TShaderProgramIDConstPointer,
118     TShaderProgramIDPointer,
119     TShaderType,
120     TShadingModel,
121     TTextureEnvParameter,
122     TTextureEnvTarget,
123     TTextureID,
124     TTextureIDConstPointer,
125     TTextureIDPointer,
126     TTextureTarget,
127     TTextureType,
128     TTransformFeedbackID,
129     TTransformFeedbackIDConstPointer,
130     TTransformFeedbackIDPointer,
131     TUniformLocation,
132     TVertexArrayID,
133     TVertexArrayIDConstPointer,
134     TVertexArrayIDPointer,
135     TVertexAttribType,
136     TvoidConstPointer,
137     TvoidConstPointerPointer,
138     TvoidPointer,
139     TvoidPointerPointer,
140 };
141 
142 constexpr uint32_t kParamTypeCount = 120;
143 
144 union ParamValue
145 {
146     gl::AlphaTestFunc AlphaTestFuncVal;
147     gl::BufferBinding BufferBindingVal;
148     gl::BufferID BufferIDVal;
149     const gl::BufferID *BufferIDConstPointerVal;
150     gl::BufferID *BufferIDPointerVal;
151     gl::BufferUsage BufferUsageVal;
152     gl::ClientVertexArrayType ClientVertexArrayTypeVal;
153     gl::CullFaceMode CullFaceModeVal;
154     gl::DrawElementsType DrawElementsTypeVal;
155     gl::FenceNVID FenceNVIDVal;
156     const gl::FenceNVID *FenceNVIDConstPointerVal;
157     gl::FenceNVID *FenceNVIDPointerVal;
158     gl::FramebufferID FramebufferIDVal;
159     const gl::FramebufferID *FramebufferIDConstPointerVal;
160     gl::FramebufferID *FramebufferIDPointerVal;
161     GLDEBUGPROC GLDEBUGPROCVal;
162     GLDEBUGPROCKHR GLDEBUGPROCKHRVal;
163     GLbitfield GLbitfieldVal;
164     GLboolean GLbooleanVal;
165     const GLboolean *GLbooleanConstPointerVal;
166     GLboolean *GLbooleanPointerVal;
167     GLbyte GLbyteVal;
168     const GLbyte *GLbyteConstPointerVal;
169     const GLchar *GLcharConstPointerVal;
170     const GLchar *const *GLcharConstPointerPointerVal;
171     GLchar *GLcharPointerVal;
172     GLclampx GLclampxVal;
173     GLdouble GLdoubleVal;
174     const GLdouble *GLdoubleConstPointerVal;
175     GLdouble *GLdoublePointerVal;
176     GLeglImageOES GLeglImageOESVal;
177     GLenum GLenumVal;
178     const GLenum *GLenumConstPointerVal;
179     GLenum *GLenumPointerVal;
180     GLfixed GLfixedVal;
181     const GLfixed *GLfixedConstPointerVal;
182     GLfixed *GLfixedPointerVal;
183     GLfloat GLfloatVal;
184     const GLfloat *GLfloatConstPointerVal;
185     GLfloat *GLfloatPointerVal;
186     GLint GLintVal;
187     GLint64 *GLint64PointerVal;
188     const GLint *GLintConstPointerVal;
189     GLint *GLintPointerVal;
190     GLintptr GLintptrVal;
191     const GLintptr *GLintptrConstPointerVal;
192     GLshort GLshortVal;
193     const GLshort *GLshortConstPointerVal;
194     GLsizei GLsizeiVal;
195     const GLsizei *GLsizeiConstPointerVal;
196     GLsizei *GLsizeiPointerVal;
197     GLsizeiptr GLsizeiptrVal;
198     const GLsizeiptr *GLsizeiptrConstPointerVal;
199     GLsync GLsyncVal;
200     GLubyte GLubyteVal;
201     const GLubyte *GLubyteConstPointerVal;
202     GLubyte *GLubytePointerVal;
203     GLuint GLuintVal;
204     GLuint64 GLuint64Val;
205     const GLuint64 *GLuint64ConstPointerVal;
206     GLuint64 *GLuint64PointerVal;
207     const GLuint *GLuintConstPointerVal;
208     GLuint *GLuintPointerVal;
209     GLushort GLushortVal;
210     const GLushort *GLushortConstPointerVal;
211     GLushort *GLushortPointerVal;
212     const GLvoid *GLvoidConstPointerVal;
213     const GLvoid *const *GLvoidConstPointerPointerVal;
214     gl::GraphicsResetStatus GraphicsResetStatusVal;
215     gl::HandleType HandleTypeVal;
216     gl::LightParameter LightParameterVal;
217     gl::LogicalOperation LogicalOperationVal;
218     gl::MaterialParameter MaterialParameterVal;
219     gl::MatrixType MatrixTypeVal;
220     gl::MemoryObjectID MemoryObjectIDVal;
221     const gl::MemoryObjectID *MemoryObjectIDConstPointerVal;
222     gl::MemoryObjectID *MemoryObjectIDPointerVal;
223     gl::PointParameter PointParameterVal;
224     gl::PrimitiveMode PrimitiveModeVal;
225     gl::ProgramPipelineID ProgramPipelineIDVal;
226     const gl::ProgramPipelineID *ProgramPipelineIDConstPointerVal;
227     gl::ProgramPipelineID *ProgramPipelineIDPointerVal;
228     gl::ProvokingVertexConvention ProvokingVertexConventionVal;
229     gl::QueryID QueryIDVal;
230     const gl::QueryID *QueryIDConstPointerVal;
231     gl::QueryID *QueryIDPointerVal;
232     gl::QueryType QueryTypeVal;
233     gl::RenderbufferID RenderbufferIDVal;
234     const gl::RenderbufferID *RenderbufferIDConstPointerVal;
235     gl::RenderbufferID *RenderbufferIDPointerVal;
236     gl::SamplerID SamplerIDVal;
237     const gl::SamplerID *SamplerIDConstPointerVal;
238     gl::SamplerID *SamplerIDPointerVal;
239     gl::SemaphoreID SemaphoreIDVal;
240     const gl::SemaphoreID *SemaphoreIDConstPointerVal;
241     gl::SemaphoreID *SemaphoreIDPointerVal;
242     gl::ShaderProgramID ShaderProgramIDVal;
243     const gl::ShaderProgramID *ShaderProgramIDConstPointerVal;
244     gl::ShaderProgramID *ShaderProgramIDPointerVal;
245     gl::ShaderType ShaderTypeVal;
246     gl::ShadingModel ShadingModelVal;
247     gl::TextureEnvParameter TextureEnvParameterVal;
248     gl::TextureEnvTarget TextureEnvTargetVal;
249     gl::TextureID TextureIDVal;
250     const gl::TextureID *TextureIDConstPointerVal;
251     gl::TextureID *TextureIDPointerVal;
252     gl::TextureTarget TextureTargetVal;
253     gl::TextureType TextureTypeVal;
254     gl::TransformFeedbackID TransformFeedbackIDVal;
255     const gl::TransformFeedbackID *TransformFeedbackIDConstPointerVal;
256     gl::TransformFeedbackID *TransformFeedbackIDPointerVal;
257     gl::UniformLocation UniformLocationVal;
258     gl::VertexArrayID VertexArrayIDVal;
259     const gl::VertexArrayID *VertexArrayIDConstPointerVal;
260     gl::VertexArrayID *VertexArrayIDPointerVal;
261     gl::VertexAttribType VertexAttribTypeVal;
262     const void *voidConstPointerVal;
263     const void *const *voidConstPointerPointerVal;
264     void *voidPointerVal;
265     void **voidPointerPointerVal;
266 };
267 
268 template <ParamType PType, typename T>
269 T GetParamVal(const ParamValue &value);
270 
271 template <>
272 inline gl::AlphaTestFunc GetParamVal<ParamType::TAlphaTestFunc, gl::AlphaTestFunc>(
273     const ParamValue &value)
274 {
275     return value.AlphaTestFuncVal;
276 }
277 
278 template <>
279 inline gl::BufferBinding GetParamVal<ParamType::TBufferBinding, gl::BufferBinding>(
280     const ParamValue &value)
281 {
282     return value.BufferBindingVal;
283 }
284 
285 template <>
286 inline gl::BufferID GetParamVal<ParamType::TBufferID, gl::BufferID>(const ParamValue &value)
287 {
288     return value.BufferIDVal;
289 }
290 
291 template <>
292 inline const gl::BufferID *GetParamVal<ParamType::TBufferIDConstPointer, const gl::BufferID *>(
293     const ParamValue &value)
294 {
295     return value.BufferIDConstPointerVal;
296 }
297 
298 template <>
299 inline gl::BufferID *GetParamVal<ParamType::TBufferIDPointer, gl::BufferID *>(
300     const ParamValue &value)
301 {
302     return value.BufferIDPointerVal;
303 }
304 
305 template <>
306 inline gl::BufferUsage GetParamVal<ParamType::TBufferUsage, gl::BufferUsage>(
307     const ParamValue &value)
308 {
309     return value.BufferUsageVal;
310 }
311 
312 template <>
313 inline gl::ClientVertexArrayType
314 GetParamVal<ParamType::TClientVertexArrayType, gl::ClientVertexArrayType>(const ParamValue &value)
315 {
316     return value.ClientVertexArrayTypeVal;
317 }
318 
319 template <>
320 inline gl::CullFaceMode GetParamVal<ParamType::TCullFaceMode, gl::CullFaceMode>(
321     const ParamValue &value)
322 {
323     return value.CullFaceModeVal;
324 }
325 
326 template <>
327 inline gl::DrawElementsType GetParamVal<ParamType::TDrawElementsType, gl::DrawElementsType>(
328     const ParamValue &value)
329 {
330     return value.DrawElementsTypeVal;
331 }
332 
333 template <>
334 inline gl::FenceNVID GetParamVal<ParamType::TFenceNVID, gl::FenceNVID>(const ParamValue &value)
335 {
336     return value.FenceNVIDVal;
337 }
338 
339 template <>
340 inline const gl::FenceNVID *GetParamVal<ParamType::TFenceNVIDConstPointer, const gl::FenceNVID *>(
341     const ParamValue &value)
342 {
343     return value.FenceNVIDConstPointerVal;
344 }
345 
346 template <>
347 inline gl::FenceNVID *GetParamVal<ParamType::TFenceNVIDPointer, gl::FenceNVID *>(
348     const ParamValue &value)
349 {
350     return value.FenceNVIDPointerVal;
351 }
352 
353 template <>
354 inline gl::FramebufferID GetParamVal<ParamType::TFramebufferID, gl::FramebufferID>(
355     const ParamValue &value)
356 {
357     return value.FramebufferIDVal;
358 }
359 
360 template <>
361 inline const gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDConstPointer,
362                                             const gl::FramebufferID *>(const ParamValue &value)
363 {
364     return value.FramebufferIDConstPointerVal;
365 }
366 
367 template <>
368 inline gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDPointer, gl::FramebufferID *>(
369     const ParamValue &value)
370 {
371     return value.FramebufferIDPointerVal;
372 }
373 
374 template <>
375 inline GLDEBUGPROC GetParamVal<ParamType::TGLDEBUGPROC, GLDEBUGPROC>(const ParamValue &value)
376 {
377     return value.GLDEBUGPROCVal;
378 }
379 
380 template <>
381 inline GLDEBUGPROCKHR GetParamVal<ParamType::TGLDEBUGPROCKHR, GLDEBUGPROCKHR>(
382     const ParamValue &value)
383 {
384     return value.GLDEBUGPROCKHRVal;
385 }
386 
387 template <>
388 inline GLbitfield GetParamVal<ParamType::TGLbitfield, GLbitfield>(const ParamValue &value)
389 {
390     return value.GLbitfieldVal;
391 }
392 
393 template <>
394 inline GLboolean GetParamVal<ParamType::TGLboolean, GLboolean>(const ParamValue &value)
395 {
396     return value.GLbooleanVal;
397 }
398 
399 template <>
400 inline const GLboolean *GetParamVal<ParamType::TGLbooleanConstPointer, const GLboolean *>(
401     const ParamValue &value)
402 {
403     return value.GLbooleanConstPointerVal;
404 }
405 
406 template <>
407 inline GLboolean *GetParamVal<ParamType::TGLbooleanPointer, GLboolean *>(const ParamValue &value)
408 {
409     return value.GLbooleanPointerVal;
410 }
411 
412 template <>
413 inline GLbyte GetParamVal<ParamType::TGLbyte, GLbyte>(const ParamValue &value)
414 {
415     return value.GLbyteVal;
416 }
417 
418 template <>
419 inline const GLbyte *GetParamVal<ParamType::TGLbyteConstPointer, const GLbyte *>(
420     const ParamValue &value)
421 {
422     return value.GLbyteConstPointerVal;
423 }
424 
425 template <>
426 inline const GLchar *GetParamVal<ParamType::TGLcharConstPointer, const GLchar *>(
427     const ParamValue &value)
428 {
429     return value.GLcharConstPointerVal;
430 }
431 
432 template <>
433 inline const GLchar *const *
434 GetParamVal<ParamType::TGLcharConstPointerPointer, const GLchar *const *>(const ParamValue &value)
435 {
436     return value.GLcharConstPointerPointerVal;
437 }
438 
439 template <>
440 inline GLchar *GetParamVal<ParamType::TGLcharPointer, GLchar *>(const ParamValue &value)
441 {
442     return value.GLcharPointerVal;
443 }
444 
445 template <>
446 inline GLclampx GetParamVal<ParamType::TGLclampx, GLclampx>(const ParamValue &value)
447 {
448     return value.GLclampxVal;
449 }
450 
451 template <>
452 inline GLdouble GetParamVal<ParamType::TGLdouble, GLdouble>(const ParamValue &value)
453 {
454     return value.GLdoubleVal;
455 }
456 
457 template <>
458 inline const GLdouble *GetParamVal<ParamType::TGLdoubleConstPointer, const GLdouble *>(
459     const ParamValue &value)
460 {
461     return value.GLdoubleConstPointerVal;
462 }
463 
464 template <>
465 inline GLdouble *GetParamVal<ParamType::TGLdoublePointer, GLdouble *>(const ParamValue &value)
466 {
467     return value.GLdoublePointerVal;
468 }
469 
470 template <>
471 inline GLeglImageOES GetParamVal<ParamType::TGLeglImageOES, GLeglImageOES>(const ParamValue &value)
472 {
473     return value.GLeglImageOESVal;
474 }
475 
476 template <>
477 inline GLenum GetParamVal<ParamType::TGLenum, GLenum>(const ParamValue &value)
478 {
479     return value.GLenumVal;
480 }
481 
482 template <>
483 inline const GLenum *GetParamVal<ParamType::TGLenumConstPointer, const GLenum *>(
484     const ParamValue &value)
485 {
486     return value.GLenumConstPointerVal;
487 }
488 
489 template <>
490 inline GLenum *GetParamVal<ParamType::TGLenumPointer, GLenum *>(const ParamValue &value)
491 {
492     return value.GLenumPointerVal;
493 }
494 
495 template <>
496 inline GLfixed GetParamVal<ParamType::TGLfixed, GLfixed>(const ParamValue &value)
497 {
498     return value.GLfixedVal;
499 }
500 
501 template <>
502 inline const GLfixed *GetParamVal<ParamType::TGLfixedConstPointer, const GLfixed *>(
503     const ParamValue &value)
504 {
505     return value.GLfixedConstPointerVal;
506 }
507 
508 template <>
509 inline GLfixed *GetParamVal<ParamType::TGLfixedPointer, GLfixed *>(const ParamValue &value)
510 {
511     return value.GLfixedPointerVal;
512 }
513 
514 template <>
515 inline GLfloat GetParamVal<ParamType::TGLfloat, GLfloat>(const ParamValue &value)
516 {
517     return value.GLfloatVal;
518 }
519 
520 template <>
521 inline const GLfloat *GetParamVal<ParamType::TGLfloatConstPointer, const GLfloat *>(
522     const ParamValue &value)
523 {
524     return value.GLfloatConstPointerVal;
525 }
526 
527 template <>
528 inline GLfloat *GetParamVal<ParamType::TGLfloatPointer, GLfloat *>(const ParamValue &value)
529 {
530     return value.GLfloatPointerVal;
531 }
532 
533 template <>
534 inline GLint GetParamVal<ParamType::TGLint, GLint>(const ParamValue &value)
535 {
536     return value.GLintVal;
537 }
538 
539 template <>
540 inline GLint64 *GetParamVal<ParamType::TGLint64Pointer, GLint64 *>(const ParamValue &value)
541 {
542     return value.GLint64PointerVal;
543 }
544 
545 template <>
546 inline const GLint *GetParamVal<ParamType::TGLintConstPointer, const GLint *>(
547     const ParamValue &value)
548 {
549     return value.GLintConstPointerVal;
550 }
551 
552 template <>
553 inline GLint *GetParamVal<ParamType::TGLintPointer, GLint *>(const ParamValue &value)
554 {
555     return value.GLintPointerVal;
556 }
557 
558 template <>
559 inline GLintptr GetParamVal<ParamType::TGLintptr, GLintptr>(const ParamValue &value)
560 {
561     return value.GLintptrVal;
562 }
563 
564 template <>
565 inline const GLintptr *GetParamVal<ParamType::TGLintptrConstPointer, const GLintptr *>(
566     const ParamValue &value)
567 {
568     return value.GLintptrConstPointerVal;
569 }
570 
571 template <>
572 inline GLshort GetParamVal<ParamType::TGLshort, GLshort>(const ParamValue &value)
573 {
574     return value.GLshortVal;
575 }
576 
577 template <>
578 inline const GLshort *GetParamVal<ParamType::TGLshortConstPointer, const GLshort *>(
579     const ParamValue &value)
580 {
581     return value.GLshortConstPointerVal;
582 }
583 
584 template <>
585 inline GLsizei GetParamVal<ParamType::TGLsizei, GLsizei>(const ParamValue &value)
586 {
587     return value.GLsizeiVal;
588 }
589 
590 template <>
591 inline const GLsizei *GetParamVal<ParamType::TGLsizeiConstPointer, const GLsizei *>(
592     const ParamValue &value)
593 {
594     return value.GLsizeiConstPointerVal;
595 }
596 
597 template <>
598 inline GLsizei *GetParamVal<ParamType::TGLsizeiPointer, GLsizei *>(const ParamValue &value)
599 {
600     return value.GLsizeiPointerVal;
601 }
602 
603 template <>
604 inline GLsizeiptr GetParamVal<ParamType::TGLsizeiptr, GLsizeiptr>(const ParamValue &value)
605 {
606     return value.GLsizeiptrVal;
607 }
608 
609 template <>
610 inline const GLsizeiptr *GetParamVal<ParamType::TGLsizeiptrConstPointer, const GLsizeiptr *>(
611     const ParamValue &value)
612 {
613     return value.GLsizeiptrConstPointerVal;
614 }
615 
616 template <>
617 inline GLsync GetParamVal<ParamType::TGLsync, GLsync>(const ParamValue &value)
618 {
619     return value.GLsyncVal;
620 }
621 
622 template <>
623 inline GLubyte GetParamVal<ParamType::TGLubyte, GLubyte>(const ParamValue &value)
624 {
625     return value.GLubyteVal;
626 }
627 
628 template <>
629 inline const GLubyte *GetParamVal<ParamType::TGLubyteConstPointer, const GLubyte *>(
630     const ParamValue &value)
631 {
632     return value.GLubyteConstPointerVal;
633 }
634 
635 template <>
636 inline GLubyte *GetParamVal<ParamType::TGLubytePointer, GLubyte *>(const ParamValue &value)
637 {
638     return value.GLubytePointerVal;
639 }
640 
641 template <>
642 inline GLuint GetParamVal<ParamType::TGLuint, GLuint>(const ParamValue &value)
643 {
644     return value.GLuintVal;
645 }
646 
647 template <>
648 inline GLuint64 GetParamVal<ParamType::TGLuint64, GLuint64>(const ParamValue &value)
649 {
650     return value.GLuint64Val;
651 }
652 
653 template <>
654 inline const GLuint64 *GetParamVal<ParamType::TGLuint64ConstPointer, const GLuint64 *>(
655     const ParamValue &value)
656 {
657     return value.GLuint64ConstPointerVal;
658 }
659 
660 template <>
661 inline GLuint64 *GetParamVal<ParamType::TGLuint64Pointer, GLuint64 *>(const ParamValue &value)
662 {
663     return value.GLuint64PointerVal;
664 }
665 
666 template <>
667 inline const GLuint *GetParamVal<ParamType::TGLuintConstPointer, const GLuint *>(
668     const ParamValue &value)
669 {
670     return value.GLuintConstPointerVal;
671 }
672 
673 template <>
674 inline GLuint *GetParamVal<ParamType::TGLuintPointer, GLuint *>(const ParamValue &value)
675 {
676     return value.GLuintPointerVal;
677 }
678 
679 template <>
680 inline GLushort GetParamVal<ParamType::TGLushort, GLushort>(const ParamValue &value)
681 {
682     return value.GLushortVal;
683 }
684 
685 template <>
686 inline const GLushort *GetParamVal<ParamType::TGLushortConstPointer, const GLushort *>(
687     const ParamValue &value)
688 {
689     return value.GLushortConstPointerVal;
690 }
691 
692 template <>
693 inline GLushort *GetParamVal<ParamType::TGLushortPointer, GLushort *>(const ParamValue &value)
694 {
695     return value.GLushortPointerVal;
696 }
697 
698 template <>
699 inline const GLvoid *GetParamVal<ParamType::TGLvoidConstPointer, const GLvoid *>(
700     const ParamValue &value)
701 {
702     return value.GLvoidConstPointerVal;
703 }
704 
705 template <>
706 inline const GLvoid *const *
707 GetParamVal<ParamType::TGLvoidConstPointerPointer, const GLvoid *const *>(const ParamValue &value)
708 {
709     return value.GLvoidConstPointerPointerVal;
710 }
711 
712 template <>
713 inline gl::GraphicsResetStatus
714 GetParamVal<ParamType::TGraphicsResetStatus, gl::GraphicsResetStatus>(const ParamValue &value)
715 {
716     return value.GraphicsResetStatusVal;
717 }
718 
719 template <>
720 inline gl::HandleType GetParamVal<ParamType::THandleType, gl::HandleType>(const ParamValue &value)
721 {
722     return value.HandleTypeVal;
723 }
724 
725 template <>
726 inline gl::LightParameter GetParamVal<ParamType::TLightParameter, gl::LightParameter>(
727     const ParamValue &value)
728 {
729     return value.LightParameterVal;
730 }
731 
732 template <>
733 inline gl::LogicalOperation GetParamVal<ParamType::TLogicalOperation, gl::LogicalOperation>(
734     const ParamValue &value)
735 {
736     return value.LogicalOperationVal;
737 }
738 
739 template <>
740 inline gl::MaterialParameter GetParamVal<ParamType::TMaterialParameter, gl::MaterialParameter>(
741     const ParamValue &value)
742 {
743     return value.MaterialParameterVal;
744 }
745 
746 template <>
747 inline gl::MatrixType GetParamVal<ParamType::TMatrixType, gl::MatrixType>(const ParamValue &value)
748 {
749     return value.MatrixTypeVal;
750 }
751 
752 template <>
753 inline gl::MemoryObjectID GetParamVal<ParamType::TMemoryObjectID, gl::MemoryObjectID>(
754     const ParamValue &value)
755 {
756     return value.MemoryObjectIDVal;
757 }
758 
759 template <>
760 inline const gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDConstPointer,
761                                              const gl::MemoryObjectID *>(const ParamValue &value)
762 {
763     return value.MemoryObjectIDConstPointerVal;
764 }
765 
766 template <>
767 inline gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDPointer, gl::MemoryObjectID *>(
768     const ParamValue &value)
769 {
770     return value.MemoryObjectIDPointerVal;
771 }
772 
773 template <>
774 inline gl::PointParameter GetParamVal<ParamType::TPointParameter, gl::PointParameter>(
775     const ParamValue &value)
776 {
777     return value.PointParameterVal;
778 }
779 
780 template <>
781 inline gl::PrimitiveMode GetParamVal<ParamType::TPrimitiveMode, gl::PrimitiveMode>(
782     const ParamValue &value)
783 {
784     return value.PrimitiveModeVal;
785 }
786 
787 template <>
788 inline gl::ProgramPipelineID GetParamVal<ParamType::TProgramPipelineID, gl::ProgramPipelineID>(
789     const ParamValue &value)
790 {
791     return value.ProgramPipelineIDVal;
792 }
793 
794 template <>
795 inline const gl::ProgramPipelineID *
796 GetParamVal<ParamType::TProgramPipelineIDConstPointer, const gl::ProgramPipelineID *>(
797     const ParamValue &value)
798 {
799     return value.ProgramPipelineIDConstPointerVal;
800 }
801 
802 template <>
803 inline gl::ProgramPipelineID *
804 GetParamVal<ParamType::TProgramPipelineIDPointer, gl::ProgramPipelineID *>(const ParamValue &value)
805 {
806     return value.ProgramPipelineIDPointerVal;
807 }
808 
809 template <>
810 inline gl::ProvokingVertexConvention
811 GetParamVal<ParamType::TProvokingVertexConvention, gl::ProvokingVertexConvention>(
812     const ParamValue &value)
813 {
814     return value.ProvokingVertexConventionVal;
815 }
816 
817 template <>
818 inline gl::QueryID GetParamVal<ParamType::TQueryID, gl::QueryID>(const ParamValue &value)
819 {
820     return value.QueryIDVal;
821 }
822 
823 template <>
824 inline const gl::QueryID *GetParamVal<ParamType::TQueryIDConstPointer, const gl::QueryID *>(
825     const ParamValue &value)
826 {
827     return value.QueryIDConstPointerVal;
828 }
829 
830 template <>
831 inline gl::QueryID *GetParamVal<ParamType::TQueryIDPointer, gl::QueryID *>(const ParamValue &value)
832 {
833     return value.QueryIDPointerVal;
834 }
835 
836 template <>
837 inline gl::QueryType GetParamVal<ParamType::TQueryType, gl::QueryType>(const ParamValue &value)
838 {
839     return value.QueryTypeVal;
840 }
841 
842 template <>
843 inline gl::RenderbufferID GetParamVal<ParamType::TRenderbufferID, gl::RenderbufferID>(
844     const ParamValue &value)
845 {
846     return value.RenderbufferIDVal;
847 }
848 
849 template <>
850 inline const gl::RenderbufferID *GetParamVal<ParamType::TRenderbufferIDConstPointer,
851                                              const gl::RenderbufferID *>(const ParamValue &value)
852 {
853     return value.RenderbufferIDConstPointerVal;
854 }
855 
856 template <>
857 inline gl::RenderbufferID *GetParamVal<ParamType::TRenderbufferIDPointer, gl::RenderbufferID *>(
858     const ParamValue &value)
859 {
860     return value.RenderbufferIDPointerVal;
861 }
862 
863 template <>
864 inline gl::SamplerID GetParamVal<ParamType::TSamplerID, gl::SamplerID>(const ParamValue &value)
865 {
866     return value.SamplerIDVal;
867 }
868 
869 template <>
870 inline const gl::SamplerID *GetParamVal<ParamType::TSamplerIDConstPointer, const gl::SamplerID *>(
871     const ParamValue &value)
872 {
873     return value.SamplerIDConstPointerVal;
874 }
875 
876 template <>
877 inline gl::SamplerID *GetParamVal<ParamType::TSamplerIDPointer, gl::SamplerID *>(
878     const ParamValue &value)
879 {
880     return value.SamplerIDPointerVal;
881 }
882 
883 template <>
884 inline gl::SemaphoreID GetParamVal<ParamType::TSemaphoreID, gl::SemaphoreID>(
885     const ParamValue &value)
886 {
887     return value.SemaphoreIDVal;
888 }
889 
890 template <>
891 inline const gl::SemaphoreID *
892 GetParamVal<ParamType::TSemaphoreIDConstPointer, const gl::SemaphoreID *>(const ParamValue &value)
893 {
894     return value.SemaphoreIDConstPointerVal;
895 }
896 
897 template <>
898 inline gl::SemaphoreID *GetParamVal<ParamType::TSemaphoreIDPointer, gl::SemaphoreID *>(
899     const ParamValue &value)
900 {
901     return value.SemaphoreIDPointerVal;
902 }
903 
904 template <>
905 inline gl::ShaderProgramID GetParamVal<ParamType::TShaderProgramID, gl::ShaderProgramID>(
906     const ParamValue &value)
907 {
908     return value.ShaderProgramIDVal;
909 }
910 
911 template <>
912 inline const gl::ShaderProgramID *GetParamVal<ParamType::TShaderProgramIDConstPointer,
913                                               const gl::ShaderProgramID *>(const ParamValue &value)
914 {
915     return value.ShaderProgramIDConstPointerVal;
916 }
917 
918 template <>
919 inline gl::ShaderProgramID *GetParamVal<ParamType::TShaderProgramIDPointer, gl::ShaderProgramID *>(
920     const ParamValue &value)
921 {
922     return value.ShaderProgramIDPointerVal;
923 }
924 
925 template <>
926 inline gl::ShaderType GetParamVal<ParamType::TShaderType, gl::ShaderType>(const ParamValue &value)
927 {
928     return value.ShaderTypeVal;
929 }
930 
931 template <>
932 inline gl::ShadingModel GetParamVal<ParamType::TShadingModel, gl::ShadingModel>(
933     const ParamValue &value)
934 {
935     return value.ShadingModelVal;
936 }
937 
938 template <>
939 inline gl::TextureEnvParameter
940 GetParamVal<ParamType::TTextureEnvParameter, gl::TextureEnvParameter>(const ParamValue &value)
941 {
942     return value.TextureEnvParameterVal;
943 }
944 
945 template <>
946 inline gl::TextureEnvTarget GetParamVal<ParamType::TTextureEnvTarget, gl::TextureEnvTarget>(
947     const ParamValue &value)
948 {
949     return value.TextureEnvTargetVal;
950 }
951 
952 template <>
953 inline gl::TextureID GetParamVal<ParamType::TTextureID, gl::TextureID>(const ParamValue &value)
954 {
955     return value.TextureIDVal;
956 }
957 
958 template <>
959 inline const gl::TextureID *GetParamVal<ParamType::TTextureIDConstPointer, const gl::TextureID *>(
960     const ParamValue &value)
961 {
962     return value.TextureIDConstPointerVal;
963 }
964 
965 template <>
966 inline gl::TextureID *GetParamVal<ParamType::TTextureIDPointer, gl::TextureID *>(
967     const ParamValue &value)
968 {
969     return value.TextureIDPointerVal;
970 }
971 
972 template <>
973 inline gl::TextureTarget GetParamVal<ParamType::TTextureTarget, gl::TextureTarget>(
974     const ParamValue &value)
975 {
976     return value.TextureTargetVal;
977 }
978 
979 template <>
980 inline gl::TextureType GetParamVal<ParamType::TTextureType, gl::TextureType>(
981     const ParamValue &value)
982 {
983     return value.TextureTypeVal;
984 }
985 
986 template <>
987 inline gl::TransformFeedbackID
988 GetParamVal<ParamType::TTransformFeedbackID, gl::TransformFeedbackID>(const ParamValue &value)
989 {
990     return value.TransformFeedbackIDVal;
991 }
992 
993 template <>
994 inline const gl::TransformFeedbackID *
995 GetParamVal<ParamType::TTransformFeedbackIDConstPointer, const gl::TransformFeedbackID *>(
996     const ParamValue &value)
997 {
998     return value.TransformFeedbackIDConstPointerVal;
999 }
1000 
1001 template <>
1002 inline gl::TransformFeedbackID *GetParamVal<ParamType::TTransformFeedbackIDPointer,
1003                                             gl::TransformFeedbackID *>(const ParamValue &value)
1004 {
1005     return value.TransformFeedbackIDPointerVal;
1006 }
1007 
1008 template <>
1009 inline gl::UniformLocation GetParamVal<ParamType::TUniformLocation, gl::UniformLocation>(
1010     const ParamValue &value)
1011 {
1012     return value.UniformLocationVal;
1013 }
1014 
1015 template <>
1016 inline gl::VertexArrayID GetParamVal<ParamType::TVertexArrayID, gl::VertexArrayID>(
1017     const ParamValue &value)
1018 {
1019     return value.VertexArrayIDVal;
1020 }
1021 
1022 template <>
1023 inline const gl::VertexArrayID *GetParamVal<ParamType::TVertexArrayIDConstPointer,
1024                                             const gl::VertexArrayID *>(const ParamValue &value)
1025 {
1026     return value.VertexArrayIDConstPointerVal;
1027 }
1028 
1029 template <>
1030 inline gl::VertexArrayID *GetParamVal<ParamType::TVertexArrayIDPointer, gl::VertexArrayID *>(
1031     const ParamValue &value)
1032 {
1033     return value.VertexArrayIDPointerVal;
1034 }
1035 
1036 template <>
1037 inline gl::VertexAttribType GetParamVal<ParamType::TVertexAttribType, gl::VertexAttribType>(
1038     const ParamValue &value)
1039 {
1040     return value.VertexAttribTypeVal;
1041 }
1042 
1043 template <>
1044 inline const void *GetParamVal<ParamType::TvoidConstPointer, const void *>(const ParamValue &value)
1045 {
1046     return value.voidConstPointerVal;
1047 }
1048 
1049 template <>
1050 inline const void *const *GetParamVal<ParamType::TvoidConstPointerPointer, const void *const *>(
1051     const ParamValue &value)
1052 {
1053     return value.voidConstPointerPointerVal;
1054 }
1055 
1056 template <>
1057 inline void *GetParamVal<ParamType::TvoidPointer, void *>(const ParamValue &value)
1058 {
1059     return value.voidPointerVal;
1060 }
1061 
1062 template <>
1063 inline void **GetParamVal<ParamType::TvoidPointerPointer, void **>(const ParamValue &value)
1064 {
1065     return value.voidPointerPointerVal;
1066 }
1067 
1068 template <ParamType PType, typename T>
GetParamVal(const ParamValue & value)1069 T GetParamVal(const ParamValue &value)
1070 {
1071     UNREACHABLE();
1072     return T();
1073 }
1074 
1075 template <typename T>
AccessParamValue(ParamType paramType,const ParamValue & value)1076 T AccessParamValue(ParamType paramType, const ParamValue &value)
1077 {
1078     switch (paramType)
1079     {
1080         case ParamType::TAlphaTestFunc:
1081             return GetParamVal<ParamType::TAlphaTestFunc, T>(value);
1082         case ParamType::TBufferBinding:
1083             return GetParamVal<ParamType::TBufferBinding, T>(value);
1084         case ParamType::TBufferID:
1085             return GetParamVal<ParamType::TBufferID, T>(value);
1086         case ParamType::TBufferIDConstPointer:
1087             return GetParamVal<ParamType::TBufferIDConstPointer, T>(value);
1088         case ParamType::TBufferIDPointer:
1089             return GetParamVal<ParamType::TBufferIDPointer, T>(value);
1090         case ParamType::TBufferUsage:
1091             return GetParamVal<ParamType::TBufferUsage, T>(value);
1092         case ParamType::TClientVertexArrayType:
1093             return GetParamVal<ParamType::TClientVertexArrayType, T>(value);
1094         case ParamType::TCullFaceMode:
1095             return GetParamVal<ParamType::TCullFaceMode, T>(value);
1096         case ParamType::TDrawElementsType:
1097             return GetParamVal<ParamType::TDrawElementsType, T>(value);
1098         case ParamType::TFenceNVID:
1099             return GetParamVal<ParamType::TFenceNVID, T>(value);
1100         case ParamType::TFenceNVIDConstPointer:
1101             return GetParamVal<ParamType::TFenceNVIDConstPointer, T>(value);
1102         case ParamType::TFenceNVIDPointer:
1103             return GetParamVal<ParamType::TFenceNVIDPointer, T>(value);
1104         case ParamType::TFramebufferID:
1105             return GetParamVal<ParamType::TFramebufferID, T>(value);
1106         case ParamType::TFramebufferIDConstPointer:
1107             return GetParamVal<ParamType::TFramebufferIDConstPointer, T>(value);
1108         case ParamType::TFramebufferIDPointer:
1109             return GetParamVal<ParamType::TFramebufferIDPointer, T>(value);
1110         case ParamType::TGLDEBUGPROC:
1111             return GetParamVal<ParamType::TGLDEBUGPROC, T>(value);
1112         case ParamType::TGLDEBUGPROCKHR:
1113             return GetParamVal<ParamType::TGLDEBUGPROCKHR, T>(value);
1114         case ParamType::TGLbitfield:
1115             return GetParamVal<ParamType::TGLbitfield, T>(value);
1116         case ParamType::TGLboolean:
1117             return GetParamVal<ParamType::TGLboolean, T>(value);
1118         case ParamType::TGLbooleanConstPointer:
1119             return GetParamVal<ParamType::TGLbooleanConstPointer, T>(value);
1120         case ParamType::TGLbooleanPointer:
1121             return GetParamVal<ParamType::TGLbooleanPointer, T>(value);
1122         case ParamType::TGLbyte:
1123             return GetParamVal<ParamType::TGLbyte, T>(value);
1124         case ParamType::TGLbyteConstPointer:
1125             return GetParamVal<ParamType::TGLbyteConstPointer, T>(value);
1126         case ParamType::TGLcharConstPointer:
1127             return GetParamVal<ParamType::TGLcharConstPointer, T>(value);
1128         case ParamType::TGLcharConstPointerPointer:
1129             return GetParamVal<ParamType::TGLcharConstPointerPointer, T>(value);
1130         case ParamType::TGLcharPointer:
1131             return GetParamVal<ParamType::TGLcharPointer, T>(value);
1132         case ParamType::TGLclampx:
1133             return GetParamVal<ParamType::TGLclampx, T>(value);
1134         case ParamType::TGLdouble:
1135             return GetParamVal<ParamType::TGLdouble, T>(value);
1136         case ParamType::TGLdoubleConstPointer:
1137             return GetParamVal<ParamType::TGLdoubleConstPointer, T>(value);
1138         case ParamType::TGLdoublePointer:
1139             return GetParamVal<ParamType::TGLdoublePointer, T>(value);
1140         case ParamType::TGLeglImageOES:
1141             return GetParamVal<ParamType::TGLeglImageOES, T>(value);
1142         case ParamType::TGLenum:
1143             return GetParamVal<ParamType::TGLenum, T>(value);
1144         case ParamType::TGLenumConstPointer:
1145             return GetParamVal<ParamType::TGLenumConstPointer, T>(value);
1146         case ParamType::TGLenumPointer:
1147             return GetParamVal<ParamType::TGLenumPointer, T>(value);
1148         case ParamType::TGLfixed:
1149             return GetParamVal<ParamType::TGLfixed, T>(value);
1150         case ParamType::TGLfixedConstPointer:
1151             return GetParamVal<ParamType::TGLfixedConstPointer, T>(value);
1152         case ParamType::TGLfixedPointer:
1153             return GetParamVal<ParamType::TGLfixedPointer, T>(value);
1154         case ParamType::TGLfloat:
1155             return GetParamVal<ParamType::TGLfloat, T>(value);
1156         case ParamType::TGLfloatConstPointer:
1157             return GetParamVal<ParamType::TGLfloatConstPointer, T>(value);
1158         case ParamType::TGLfloatPointer:
1159             return GetParamVal<ParamType::TGLfloatPointer, T>(value);
1160         case ParamType::TGLint:
1161             return GetParamVal<ParamType::TGLint, T>(value);
1162         case ParamType::TGLint64Pointer:
1163             return GetParamVal<ParamType::TGLint64Pointer, T>(value);
1164         case ParamType::TGLintConstPointer:
1165             return GetParamVal<ParamType::TGLintConstPointer, T>(value);
1166         case ParamType::TGLintPointer:
1167             return GetParamVal<ParamType::TGLintPointer, T>(value);
1168         case ParamType::TGLintptr:
1169             return GetParamVal<ParamType::TGLintptr, T>(value);
1170         case ParamType::TGLintptrConstPointer:
1171             return GetParamVal<ParamType::TGLintptrConstPointer, T>(value);
1172         case ParamType::TGLshort:
1173             return GetParamVal<ParamType::TGLshort, T>(value);
1174         case ParamType::TGLshortConstPointer:
1175             return GetParamVal<ParamType::TGLshortConstPointer, T>(value);
1176         case ParamType::TGLsizei:
1177             return GetParamVal<ParamType::TGLsizei, T>(value);
1178         case ParamType::TGLsizeiConstPointer:
1179             return GetParamVal<ParamType::TGLsizeiConstPointer, T>(value);
1180         case ParamType::TGLsizeiPointer:
1181             return GetParamVal<ParamType::TGLsizeiPointer, T>(value);
1182         case ParamType::TGLsizeiptr:
1183             return GetParamVal<ParamType::TGLsizeiptr, T>(value);
1184         case ParamType::TGLsizeiptrConstPointer:
1185             return GetParamVal<ParamType::TGLsizeiptrConstPointer, T>(value);
1186         case ParamType::TGLsync:
1187             return GetParamVal<ParamType::TGLsync, T>(value);
1188         case ParamType::TGLubyte:
1189             return GetParamVal<ParamType::TGLubyte, T>(value);
1190         case ParamType::TGLubyteConstPointer:
1191             return GetParamVal<ParamType::TGLubyteConstPointer, T>(value);
1192         case ParamType::TGLubytePointer:
1193             return GetParamVal<ParamType::TGLubytePointer, T>(value);
1194         case ParamType::TGLuint:
1195             return GetParamVal<ParamType::TGLuint, T>(value);
1196         case ParamType::TGLuint64:
1197             return GetParamVal<ParamType::TGLuint64, T>(value);
1198         case ParamType::TGLuint64ConstPointer:
1199             return GetParamVal<ParamType::TGLuint64ConstPointer, T>(value);
1200         case ParamType::TGLuint64Pointer:
1201             return GetParamVal<ParamType::TGLuint64Pointer, T>(value);
1202         case ParamType::TGLuintConstPointer:
1203             return GetParamVal<ParamType::TGLuintConstPointer, T>(value);
1204         case ParamType::TGLuintPointer:
1205             return GetParamVal<ParamType::TGLuintPointer, T>(value);
1206         case ParamType::TGLushort:
1207             return GetParamVal<ParamType::TGLushort, T>(value);
1208         case ParamType::TGLushortConstPointer:
1209             return GetParamVal<ParamType::TGLushortConstPointer, T>(value);
1210         case ParamType::TGLushortPointer:
1211             return GetParamVal<ParamType::TGLushortPointer, T>(value);
1212         case ParamType::TGLvoidConstPointer:
1213             return GetParamVal<ParamType::TGLvoidConstPointer, T>(value);
1214         case ParamType::TGLvoidConstPointerPointer:
1215             return GetParamVal<ParamType::TGLvoidConstPointerPointer, T>(value);
1216         case ParamType::TGraphicsResetStatus:
1217             return GetParamVal<ParamType::TGraphicsResetStatus, T>(value);
1218         case ParamType::THandleType:
1219             return GetParamVal<ParamType::THandleType, T>(value);
1220         case ParamType::TLightParameter:
1221             return GetParamVal<ParamType::TLightParameter, T>(value);
1222         case ParamType::TLogicalOperation:
1223             return GetParamVal<ParamType::TLogicalOperation, T>(value);
1224         case ParamType::TMaterialParameter:
1225             return GetParamVal<ParamType::TMaterialParameter, T>(value);
1226         case ParamType::TMatrixType:
1227             return GetParamVal<ParamType::TMatrixType, T>(value);
1228         case ParamType::TMemoryObjectID:
1229             return GetParamVal<ParamType::TMemoryObjectID, T>(value);
1230         case ParamType::TMemoryObjectIDConstPointer:
1231             return GetParamVal<ParamType::TMemoryObjectIDConstPointer, T>(value);
1232         case ParamType::TMemoryObjectIDPointer:
1233             return GetParamVal<ParamType::TMemoryObjectIDPointer, T>(value);
1234         case ParamType::TPointParameter:
1235             return GetParamVal<ParamType::TPointParameter, T>(value);
1236         case ParamType::TPrimitiveMode:
1237             return GetParamVal<ParamType::TPrimitiveMode, T>(value);
1238         case ParamType::TProgramPipelineID:
1239             return GetParamVal<ParamType::TProgramPipelineID, T>(value);
1240         case ParamType::TProgramPipelineIDConstPointer:
1241             return GetParamVal<ParamType::TProgramPipelineIDConstPointer, T>(value);
1242         case ParamType::TProgramPipelineIDPointer:
1243             return GetParamVal<ParamType::TProgramPipelineIDPointer, T>(value);
1244         case ParamType::TProvokingVertexConvention:
1245             return GetParamVal<ParamType::TProvokingVertexConvention, T>(value);
1246         case ParamType::TQueryID:
1247             return GetParamVal<ParamType::TQueryID, T>(value);
1248         case ParamType::TQueryIDConstPointer:
1249             return GetParamVal<ParamType::TQueryIDConstPointer, T>(value);
1250         case ParamType::TQueryIDPointer:
1251             return GetParamVal<ParamType::TQueryIDPointer, T>(value);
1252         case ParamType::TQueryType:
1253             return GetParamVal<ParamType::TQueryType, T>(value);
1254         case ParamType::TRenderbufferID:
1255             return GetParamVal<ParamType::TRenderbufferID, T>(value);
1256         case ParamType::TRenderbufferIDConstPointer:
1257             return GetParamVal<ParamType::TRenderbufferIDConstPointer, T>(value);
1258         case ParamType::TRenderbufferIDPointer:
1259             return GetParamVal<ParamType::TRenderbufferIDPointer, T>(value);
1260         case ParamType::TSamplerID:
1261             return GetParamVal<ParamType::TSamplerID, T>(value);
1262         case ParamType::TSamplerIDConstPointer:
1263             return GetParamVal<ParamType::TSamplerIDConstPointer, T>(value);
1264         case ParamType::TSamplerIDPointer:
1265             return GetParamVal<ParamType::TSamplerIDPointer, T>(value);
1266         case ParamType::TSemaphoreID:
1267             return GetParamVal<ParamType::TSemaphoreID, T>(value);
1268         case ParamType::TSemaphoreIDConstPointer:
1269             return GetParamVal<ParamType::TSemaphoreIDConstPointer, T>(value);
1270         case ParamType::TSemaphoreIDPointer:
1271             return GetParamVal<ParamType::TSemaphoreIDPointer, T>(value);
1272         case ParamType::TShaderProgramID:
1273             return GetParamVal<ParamType::TShaderProgramID, T>(value);
1274         case ParamType::TShaderProgramIDConstPointer:
1275             return GetParamVal<ParamType::TShaderProgramIDConstPointer, T>(value);
1276         case ParamType::TShaderProgramIDPointer:
1277             return GetParamVal<ParamType::TShaderProgramIDPointer, T>(value);
1278         case ParamType::TShaderType:
1279             return GetParamVal<ParamType::TShaderType, T>(value);
1280         case ParamType::TShadingModel:
1281             return GetParamVal<ParamType::TShadingModel, T>(value);
1282         case ParamType::TTextureEnvParameter:
1283             return GetParamVal<ParamType::TTextureEnvParameter, T>(value);
1284         case ParamType::TTextureEnvTarget:
1285             return GetParamVal<ParamType::TTextureEnvTarget, T>(value);
1286         case ParamType::TTextureID:
1287             return GetParamVal<ParamType::TTextureID, T>(value);
1288         case ParamType::TTextureIDConstPointer:
1289             return GetParamVal<ParamType::TTextureIDConstPointer, T>(value);
1290         case ParamType::TTextureIDPointer:
1291             return GetParamVal<ParamType::TTextureIDPointer, T>(value);
1292         case ParamType::TTextureTarget:
1293             return GetParamVal<ParamType::TTextureTarget, T>(value);
1294         case ParamType::TTextureType:
1295             return GetParamVal<ParamType::TTextureType, T>(value);
1296         case ParamType::TTransformFeedbackID:
1297             return GetParamVal<ParamType::TTransformFeedbackID, T>(value);
1298         case ParamType::TTransformFeedbackIDConstPointer:
1299             return GetParamVal<ParamType::TTransformFeedbackIDConstPointer, T>(value);
1300         case ParamType::TTransformFeedbackIDPointer:
1301             return GetParamVal<ParamType::TTransformFeedbackIDPointer, T>(value);
1302         case ParamType::TUniformLocation:
1303             return GetParamVal<ParamType::TUniformLocation, T>(value);
1304         case ParamType::TVertexArrayID:
1305             return GetParamVal<ParamType::TVertexArrayID, T>(value);
1306         case ParamType::TVertexArrayIDConstPointer:
1307             return GetParamVal<ParamType::TVertexArrayIDConstPointer, T>(value);
1308         case ParamType::TVertexArrayIDPointer:
1309             return GetParamVal<ParamType::TVertexArrayIDPointer, T>(value);
1310         case ParamType::TVertexAttribType:
1311             return GetParamVal<ParamType::TVertexAttribType, T>(value);
1312         case ParamType::TvoidConstPointer:
1313             return GetParamVal<ParamType::TvoidConstPointer, T>(value);
1314         case ParamType::TvoidConstPointerPointer:
1315             return GetParamVal<ParamType::TvoidConstPointerPointer, T>(value);
1316         case ParamType::TvoidPointer:
1317             return GetParamVal<ParamType::TvoidPointer, T>(value);
1318         case ParamType::TvoidPointerPointer:
1319             return GetParamVal<ParamType::TvoidPointerPointer, T>(value);
1320     }
1321 }
1322 
1323 template <ParamType PType, typename T>
1324 void SetParamVal(T valueIn, ParamValue *valueOut);
1325 
1326 template <>
1327 inline void SetParamVal<ParamType::TAlphaTestFunc>(gl::AlphaTestFunc valueIn, ParamValue *valueOut)
1328 {
1329     valueOut->AlphaTestFuncVal = valueIn;
1330 }
1331 
1332 template <>
1333 inline void SetParamVal<ParamType::TBufferBinding>(gl::BufferBinding valueIn, ParamValue *valueOut)
1334 {
1335     valueOut->BufferBindingVal = valueIn;
1336 }
1337 
1338 template <>
1339 inline void SetParamVal<ParamType::TBufferID>(gl::BufferID valueIn, ParamValue *valueOut)
1340 {
1341     valueOut->BufferIDVal = valueIn;
1342 }
1343 
1344 template <>
1345 inline void SetParamVal<ParamType::TBufferIDConstPointer>(const gl::BufferID *valueIn,
1346                                                           ParamValue *valueOut)
1347 {
1348     valueOut->BufferIDConstPointerVal = valueIn;
1349 }
1350 
1351 template <>
1352 inline void SetParamVal<ParamType::TBufferIDPointer>(gl::BufferID *valueIn, ParamValue *valueOut)
1353 {
1354     valueOut->BufferIDPointerVal = valueIn;
1355 }
1356 
1357 template <>
1358 inline void SetParamVal<ParamType::TBufferUsage>(gl::BufferUsage valueIn, ParamValue *valueOut)
1359 {
1360     valueOut->BufferUsageVal = valueIn;
1361 }
1362 
1363 template <>
1364 inline void SetParamVal<ParamType::TClientVertexArrayType>(gl::ClientVertexArrayType valueIn,
1365                                                            ParamValue *valueOut)
1366 {
1367     valueOut->ClientVertexArrayTypeVal = valueIn;
1368 }
1369 
1370 template <>
1371 inline void SetParamVal<ParamType::TCullFaceMode>(gl::CullFaceMode valueIn, ParamValue *valueOut)
1372 {
1373     valueOut->CullFaceModeVal = valueIn;
1374 }
1375 
1376 template <>
1377 inline void SetParamVal<ParamType::TDrawElementsType>(gl::DrawElementsType valueIn,
1378                                                       ParamValue *valueOut)
1379 {
1380     valueOut->DrawElementsTypeVal = valueIn;
1381 }
1382 
1383 template <>
1384 inline void SetParamVal<ParamType::TFenceNVID>(gl::FenceNVID valueIn, ParamValue *valueOut)
1385 {
1386     valueOut->FenceNVIDVal = valueIn;
1387 }
1388 
1389 template <>
1390 inline void SetParamVal<ParamType::TFenceNVIDConstPointer>(const gl::FenceNVID *valueIn,
1391                                                            ParamValue *valueOut)
1392 {
1393     valueOut->FenceNVIDConstPointerVal = valueIn;
1394 }
1395 
1396 template <>
1397 inline void SetParamVal<ParamType::TFenceNVIDPointer>(gl::FenceNVID *valueIn, ParamValue *valueOut)
1398 {
1399     valueOut->FenceNVIDPointerVal = valueIn;
1400 }
1401 
1402 template <>
1403 inline void SetParamVal<ParamType::TFramebufferID>(gl::FramebufferID valueIn, ParamValue *valueOut)
1404 {
1405     valueOut->FramebufferIDVal = valueIn;
1406 }
1407 
1408 template <>
1409 inline void SetParamVal<ParamType::TFramebufferIDConstPointer>(const gl::FramebufferID *valueIn,
1410                                                                ParamValue *valueOut)
1411 {
1412     valueOut->FramebufferIDConstPointerVal = valueIn;
1413 }
1414 
1415 template <>
1416 inline void SetParamVal<ParamType::TFramebufferIDPointer>(gl::FramebufferID *valueIn,
1417                                                           ParamValue *valueOut)
1418 {
1419     valueOut->FramebufferIDPointerVal = valueIn;
1420 }
1421 
1422 template <>
1423 inline void SetParamVal<ParamType::TGLDEBUGPROC>(GLDEBUGPROC valueIn, ParamValue *valueOut)
1424 {
1425     valueOut->GLDEBUGPROCVal = valueIn;
1426 }
1427 
1428 template <>
1429 inline void SetParamVal<ParamType::TGLDEBUGPROCKHR>(GLDEBUGPROCKHR valueIn, ParamValue *valueOut)
1430 {
1431     valueOut->GLDEBUGPROCKHRVal = valueIn;
1432 }
1433 
1434 template <>
1435 inline void SetParamVal<ParamType::TGLbitfield>(GLbitfield valueIn, ParamValue *valueOut)
1436 {
1437     valueOut->GLbitfieldVal = valueIn;
1438 }
1439 
1440 template <>
1441 inline void SetParamVal<ParamType::TGLboolean>(GLboolean valueIn, ParamValue *valueOut)
1442 {
1443     valueOut->GLbooleanVal = valueIn;
1444 }
1445 
1446 template <>
1447 inline void SetParamVal<ParamType::TGLbooleanConstPointer>(const GLboolean *valueIn,
1448                                                            ParamValue *valueOut)
1449 {
1450     valueOut->GLbooleanConstPointerVal = valueIn;
1451 }
1452 
1453 template <>
1454 inline void SetParamVal<ParamType::TGLbooleanPointer>(GLboolean *valueIn, ParamValue *valueOut)
1455 {
1456     valueOut->GLbooleanPointerVal = valueIn;
1457 }
1458 
1459 template <>
1460 inline void SetParamVal<ParamType::TGLbyte>(GLbyte valueIn, ParamValue *valueOut)
1461 {
1462     valueOut->GLbyteVal = valueIn;
1463 }
1464 
1465 template <>
1466 inline void SetParamVal<ParamType::TGLbyteConstPointer>(const GLbyte *valueIn, ParamValue *valueOut)
1467 {
1468     valueOut->GLbyteConstPointerVal = valueIn;
1469 }
1470 
1471 template <>
1472 inline void SetParamVal<ParamType::TGLcharConstPointer>(const GLchar *valueIn, ParamValue *valueOut)
1473 {
1474     valueOut->GLcharConstPointerVal = valueIn;
1475 }
1476 
1477 template <>
1478 inline void SetParamVal<ParamType::TGLcharConstPointerPointer>(const GLchar *const *valueIn,
1479                                                                ParamValue *valueOut)
1480 {
1481     valueOut->GLcharConstPointerPointerVal = valueIn;
1482 }
1483 
1484 template <>
1485 inline void SetParamVal<ParamType::TGLcharPointer>(GLchar *valueIn, ParamValue *valueOut)
1486 {
1487     valueOut->GLcharPointerVal = valueIn;
1488 }
1489 
1490 template <>
1491 inline void SetParamVal<ParamType::TGLclampx>(GLclampx valueIn, ParamValue *valueOut)
1492 {
1493     valueOut->GLclampxVal = valueIn;
1494 }
1495 
1496 template <>
1497 inline void SetParamVal<ParamType::TGLdouble>(GLdouble valueIn, ParamValue *valueOut)
1498 {
1499     valueOut->GLdoubleVal = valueIn;
1500 }
1501 
1502 template <>
1503 inline void SetParamVal<ParamType::TGLdoubleConstPointer>(const GLdouble *valueIn,
1504                                                           ParamValue *valueOut)
1505 {
1506     valueOut->GLdoubleConstPointerVal = valueIn;
1507 }
1508 
1509 template <>
1510 inline void SetParamVal<ParamType::TGLdoublePointer>(GLdouble *valueIn, ParamValue *valueOut)
1511 {
1512     valueOut->GLdoublePointerVal = valueIn;
1513 }
1514 
1515 template <>
1516 inline void SetParamVal<ParamType::TGLeglImageOES>(GLeglImageOES valueIn, ParamValue *valueOut)
1517 {
1518     valueOut->GLeglImageOESVal = valueIn;
1519 }
1520 
1521 template <>
1522 inline void SetParamVal<ParamType::TGLenum>(GLenum valueIn, ParamValue *valueOut)
1523 {
1524     valueOut->GLenumVal = valueIn;
1525 }
1526 
1527 template <>
1528 inline void SetParamVal<ParamType::TGLenumConstPointer>(const GLenum *valueIn, ParamValue *valueOut)
1529 {
1530     valueOut->GLenumConstPointerVal = valueIn;
1531 }
1532 
1533 template <>
1534 inline void SetParamVal<ParamType::TGLenumPointer>(GLenum *valueIn, ParamValue *valueOut)
1535 {
1536     valueOut->GLenumPointerVal = valueIn;
1537 }
1538 
1539 template <>
1540 inline void SetParamVal<ParamType::TGLfixed>(GLfixed valueIn, ParamValue *valueOut)
1541 {
1542     valueOut->GLfixedVal = valueIn;
1543 }
1544 
1545 template <>
1546 inline void SetParamVal<ParamType::TGLfixedConstPointer>(const GLfixed *valueIn,
1547                                                          ParamValue *valueOut)
1548 {
1549     valueOut->GLfixedConstPointerVal = valueIn;
1550 }
1551 
1552 template <>
1553 inline void SetParamVal<ParamType::TGLfixedPointer>(GLfixed *valueIn, ParamValue *valueOut)
1554 {
1555     valueOut->GLfixedPointerVal = valueIn;
1556 }
1557 
1558 template <>
1559 inline void SetParamVal<ParamType::TGLfloat>(GLfloat valueIn, ParamValue *valueOut)
1560 {
1561     valueOut->GLfloatVal = valueIn;
1562 }
1563 
1564 template <>
1565 inline void SetParamVal<ParamType::TGLfloatConstPointer>(const GLfloat *valueIn,
1566                                                          ParamValue *valueOut)
1567 {
1568     valueOut->GLfloatConstPointerVal = valueIn;
1569 }
1570 
1571 template <>
1572 inline void SetParamVal<ParamType::TGLfloatPointer>(GLfloat *valueIn, ParamValue *valueOut)
1573 {
1574     valueOut->GLfloatPointerVal = valueIn;
1575 }
1576 
1577 template <>
1578 inline void SetParamVal<ParamType::TGLint>(GLint valueIn, ParamValue *valueOut)
1579 {
1580     valueOut->GLintVal = valueIn;
1581 }
1582 
1583 template <>
1584 inline void SetParamVal<ParamType::TGLint64Pointer>(GLint64 *valueIn, ParamValue *valueOut)
1585 {
1586     valueOut->GLint64PointerVal = valueIn;
1587 }
1588 
1589 template <>
1590 inline void SetParamVal<ParamType::TGLintConstPointer>(const GLint *valueIn, ParamValue *valueOut)
1591 {
1592     valueOut->GLintConstPointerVal = valueIn;
1593 }
1594 
1595 template <>
1596 inline void SetParamVal<ParamType::TGLintPointer>(GLint *valueIn, ParamValue *valueOut)
1597 {
1598     valueOut->GLintPointerVal = valueIn;
1599 }
1600 
1601 template <>
1602 inline void SetParamVal<ParamType::TGLintptr>(GLintptr valueIn, ParamValue *valueOut)
1603 {
1604     valueOut->GLintptrVal = valueIn;
1605 }
1606 
1607 template <>
1608 inline void SetParamVal<ParamType::TGLintptrConstPointer>(const GLintptr *valueIn,
1609                                                           ParamValue *valueOut)
1610 {
1611     valueOut->GLintptrConstPointerVal = valueIn;
1612 }
1613 
1614 template <>
1615 inline void SetParamVal<ParamType::TGLshort>(GLshort valueIn, ParamValue *valueOut)
1616 {
1617     valueOut->GLshortVal = valueIn;
1618 }
1619 
1620 template <>
1621 inline void SetParamVal<ParamType::TGLshortConstPointer>(const GLshort *valueIn,
1622                                                          ParamValue *valueOut)
1623 {
1624     valueOut->GLshortConstPointerVal = valueIn;
1625 }
1626 
1627 template <>
1628 inline void SetParamVal<ParamType::TGLsizei>(GLsizei valueIn, ParamValue *valueOut)
1629 {
1630     valueOut->GLsizeiVal = valueIn;
1631 }
1632 
1633 template <>
1634 inline void SetParamVal<ParamType::TGLsizeiConstPointer>(const GLsizei *valueIn,
1635                                                          ParamValue *valueOut)
1636 {
1637     valueOut->GLsizeiConstPointerVal = valueIn;
1638 }
1639 
1640 template <>
1641 inline void SetParamVal<ParamType::TGLsizeiPointer>(GLsizei *valueIn, ParamValue *valueOut)
1642 {
1643     valueOut->GLsizeiPointerVal = valueIn;
1644 }
1645 
1646 template <>
1647 inline void SetParamVal<ParamType::TGLsizeiptr>(GLsizeiptr valueIn, ParamValue *valueOut)
1648 {
1649     valueOut->GLsizeiptrVal = valueIn;
1650 }
1651 
1652 template <>
1653 inline void SetParamVal<ParamType::TGLsizeiptrConstPointer>(const GLsizeiptr *valueIn,
1654                                                             ParamValue *valueOut)
1655 {
1656     valueOut->GLsizeiptrConstPointerVal = valueIn;
1657 }
1658 
1659 template <>
1660 inline void SetParamVal<ParamType::TGLsync>(GLsync valueIn, ParamValue *valueOut)
1661 {
1662     valueOut->GLsyncVal = valueIn;
1663 }
1664 
1665 template <>
1666 inline void SetParamVal<ParamType::TGLubyte>(GLubyte valueIn, ParamValue *valueOut)
1667 {
1668     valueOut->GLubyteVal = valueIn;
1669 }
1670 
1671 template <>
1672 inline void SetParamVal<ParamType::TGLubyteConstPointer>(const GLubyte *valueIn,
1673                                                          ParamValue *valueOut)
1674 {
1675     valueOut->GLubyteConstPointerVal = valueIn;
1676 }
1677 
1678 template <>
1679 inline void SetParamVal<ParamType::TGLubytePointer>(GLubyte *valueIn, ParamValue *valueOut)
1680 {
1681     valueOut->GLubytePointerVal = valueIn;
1682 }
1683 
1684 template <>
1685 inline void SetParamVal<ParamType::TGLuint>(GLuint valueIn, ParamValue *valueOut)
1686 {
1687     valueOut->GLuintVal = valueIn;
1688 }
1689 
1690 template <>
1691 inline void SetParamVal<ParamType::TGLuint64>(GLuint64 valueIn, ParamValue *valueOut)
1692 {
1693     valueOut->GLuint64Val = valueIn;
1694 }
1695 
1696 template <>
1697 inline void SetParamVal<ParamType::TGLuint64ConstPointer>(const GLuint64 *valueIn,
1698                                                           ParamValue *valueOut)
1699 {
1700     valueOut->GLuint64ConstPointerVal = valueIn;
1701 }
1702 
1703 template <>
1704 inline void SetParamVal<ParamType::TGLuint64Pointer>(GLuint64 *valueIn, ParamValue *valueOut)
1705 {
1706     valueOut->GLuint64PointerVal = valueIn;
1707 }
1708 
1709 template <>
1710 inline void SetParamVal<ParamType::TGLuintConstPointer>(const GLuint *valueIn, ParamValue *valueOut)
1711 {
1712     valueOut->GLuintConstPointerVal = valueIn;
1713 }
1714 
1715 template <>
1716 inline void SetParamVal<ParamType::TGLuintPointer>(GLuint *valueIn, ParamValue *valueOut)
1717 {
1718     valueOut->GLuintPointerVal = valueIn;
1719 }
1720 
1721 template <>
1722 inline void SetParamVal<ParamType::TGLushort>(GLushort valueIn, ParamValue *valueOut)
1723 {
1724     valueOut->GLushortVal = valueIn;
1725 }
1726 
1727 template <>
1728 inline void SetParamVal<ParamType::TGLushortConstPointer>(const GLushort *valueIn,
1729                                                           ParamValue *valueOut)
1730 {
1731     valueOut->GLushortConstPointerVal = valueIn;
1732 }
1733 
1734 template <>
1735 inline void SetParamVal<ParamType::TGLushortPointer>(GLushort *valueIn, ParamValue *valueOut)
1736 {
1737     valueOut->GLushortPointerVal = valueIn;
1738 }
1739 
1740 template <>
1741 inline void SetParamVal<ParamType::TGLvoidConstPointer>(const GLvoid *valueIn, ParamValue *valueOut)
1742 {
1743     valueOut->GLvoidConstPointerVal = valueIn;
1744 }
1745 
1746 template <>
1747 inline void SetParamVal<ParamType::TGLvoidConstPointerPointer>(const GLvoid *const *valueIn,
1748                                                                ParamValue *valueOut)
1749 {
1750     valueOut->GLvoidConstPointerPointerVal = valueIn;
1751 }
1752 
1753 template <>
1754 inline void SetParamVal<ParamType::TGraphicsResetStatus>(gl::GraphicsResetStatus valueIn,
1755                                                          ParamValue *valueOut)
1756 {
1757     valueOut->GraphicsResetStatusVal = valueIn;
1758 }
1759 
1760 template <>
1761 inline void SetParamVal<ParamType::THandleType>(gl::HandleType valueIn, ParamValue *valueOut)
1762 {
1763     valueOut->HandleTypeVal = valueIn;
1764 }
1765 
1766 template <>
1767 inline void SetParamVal<ParamType::TLightParameter>(gl::LightParameter valueIn,
1768                                                     ParamValue *valueOut)
1769 {
1770     valueOut->LightParameterVal = valueIn;
1771 }
1772 
1773 template <>
1774 inline void SetParamVal<ParamType::TLogicalOperation>(gl::LogicalOperation valueIn,
1775                                                       ParamValue *valueOut)
1776 {
1777     valueOut->LogicalOperationVal = valueIn;
1778 }
1779 
1780 template <>
1781 inline void SetParamVal<ParamType::TMaterialParameter>(gl::MaterialParameter valueIn,
1782                                                        ParamValue *valueOut)
1783 {
1784     valueOut->MaterialParameterVal = valueIn;
1785 }
1786 
1787 template <>
1788 inline void SetParamVal<ParamType::TMatrixType>(gl::MatrixType valueIn, ParamValue *valueOut)
1789 {
1790     valueOut->MatrixTypeVal = valueIn;
1791 }
1792 
1793 template <>
1794 inline void SetParamVal<ParamType::TMemoryObjectID>(gl::MemoryObjectID valueIn,
1795                                                     ParamValue *valueOut)
1796 {
1797     valueOut->MemoryObjectIDVal = valueIn;
1798 }
1799 
1800 template <>
1801 inline void SetParamVal<ParamType::TMemoryObjectIDConstPointer>(const gl::MemoryObjectID *valueIn,
1802                                                                 ParamValue *valueOut)
1803 {
1804     valueOut->MemoryObjectIDConstPointerVal = valueIn;
1805 }
1806 
1807 template <>
1808 inline void SetParamVal<ParamType::TMemoryObjectIDPointer>(gl::MemoryObjectID *valueIn,
1809                                                            ParamValue *valueOut)
1810 {
1811     valueOut->MemoryObjectIDPointerVal = valueIn;
1812 }
1813 
1814 template <>
1815 inline void SetParamVal<ParamType::TPointParameter>(gl::PointParameter valueIn,
1816                                                     ParamValue *valueOut)
1817 {
1818     valueOut->PointParameterVal = valueIn;
1819 }
1820 
1821 template <>
1822 inline void SetParamVal<ParamType::TPrimitiveMode>(gl::PrimitiveMode valueIn, ParamValue *valueOut)
1823 {
1824     valueOut->PrimitiveModeVal = valueIn;
1825 }
1826 
1827 template <>
1828 inline void SetParamVal<ParamType::TProgramPipelineID>(gl::ProgramPipelineID valueIn,
1829                                                        ParamValue *valueOut)
1830 {
1831     valueOut->ProgramPipelineIDVal = valueIn;
1832 }
1833 
1834 template <>
1835 inline void SetParamVal<ParamType::TProgramPipelineIDConstPointer>(
1836     const gl::ProgramPipelineID *valueIn,
1837     ParamValue *valueOut)
1838 {
1839     valueOut->ProgramPipelineIDConstPointerVal = valueIn;
1840 }
1841 
1842 template <>
1843 inline void SetParamVal<ParamType::TProgramPipelineIDPointer>(gl::ProgramPipelineID *valueIn,
1844                                                               ParamValue *valueOut)
1845 {
1846     valueOut->ProgramPipelineIDPointerVal = valueIn;
1847 }
1848 
1849 template <>
1850 inline void SetParamVal<ParamType::TProvokingVertexConvention>(
1851     gl::ProvokingVertexConvention valueIn,
1852     ParamValue *valueOut)
1853 {
1854     valueOut->ProvokingVertexConventionVal = valueIn;
1855 }
1856 
1857 template <>
1858 inline void SetParamVal<ParamType::TQueryID>(gl::QueryID valueIn, ParamValue *valueOut)
1859 {
1860     valueOut->QueryIDVal = valueIn;
1861 }
1862 
1863 template <>
1864 inline void SetParamVal<ParamType::TQueryIDConstPointer>(const gl::QueryID *valueIn,
1865                                                          ParamValue *valueOut)
1866 {
1867     valueOut->QueryIDConstPointerVal = valueIn;
1868 }
1869 
1870 template <>
1871 inline void SetParamVal<ParamType::TQueryIDPointer>(gl::QueryID *valueIn, ParamValue *valueOut)
1872 {
1873     valueOut->QueryIDPointerVal = valueIn;
1874 }
1875 
1876 template <>
1877 inline void SetParamVal<ParamType::TQueryType>(gl::QueryType valueIn, ParamValue *valueOut)
1878 {
1879     valueOut->QueryTypeVal = valueIn;
1880 }
1881 
1882 template <>
1883 inline void SetParamVal<ParamType::TRenderbufferID>(gl::RenderbufferID valueIn,
1884                                                     ParamValue *valueOut)
1885 {
1886     valueOut->RenderbufferIDVal = valueIn;
1887 }
1888 
1889 template <>
1890 inline void SetParamVal<ParamType::TRenderbufferIDConstPointer>(const gl::RenderbufferID *valueIn,
1891                                                                 ParamValue *valueOut)
1892 {
1893     valueOut->RenderbufferIDConstPointerVal = valueIn;
1894 }
1895 
1896 template <>
1897 inline void SetParamVal<ParamType::TRenderbufferIDPointer>(gl::RenderbufferID *valueIn,
1898                                                            ParamValue *valueOut)
1899 {
1900     valueOut->RenderbufferIDPointerVal = valueIn;
1901 }
1902 
1903 template <>
1904 inline void SetParamVal<ParamType::TSamplerID>(gl::SamplerID valueIn, ParamValue *valueOut)
1905 {
1906     valueOut->SamplerIDVal = valueIn;
1907 }
1908 
1909 template <>
1910 inline void SetParamVal<ParamType::TSamplerIDConstPointer>(const gl::SamplerID *valueIn,
1911                                                            ParamValue *valueOut)
1912 {
1913     valueOut->SamplerIDConstPointerVal = valueIn;
1914 }
1915 
1916 template <>
1917 inline void SetParamVal<ParamType::TSamplerIDPointer>(gl::SamplerID *valueIn, ParamValue *valueOut)
1918 {
1919     valueOut->SamplerIDPointerVal = valueIn;
1920 }
1921 
1922 template <>
1923 inline void SetParamVal<ParamType::TSemaphoreID>(gl::SemaphoreID valueIn, ParamValue *valueOut)
1924 {
1925     valueOut->SemaphoreIDVal = valueIn;
1926 }
1927 
1928 template <>
1929 inline void SetParamVal<ParamType::TSemaphoreIDConstPointer>(const gl::SemaphoreID *valueIn,
1930                                                              ParamValue *valueOut)
1931 {
1932     valueOut->SemaphoreIDConstPointerVal = valueIn;
1933 }
1934 
1935 template <>
1936 inline void SetParamVal<ParamType::TSemaphoreIDPointer>(gl::SemaphoreID *valueIn,
1937                                                         ParamValue *valueOut)
1938 {
1939     valueOut->SemaphoreIDPointerVal = valueIn;
1940 }
1941 
1942 template <>
1943 inline void SetParamVal<ParamType::TShaderProgramID>(gl::ShaderProgramID valueIn,
1944                                                      ParamValue *valueOut)
1945 {
1946     valueOut->ShaderProgramIDVal = valueIn;
1947 }
1948 
1949 template <>
1950 inline void SetParamVal<ParamType::TShaderProgramIDConstPointer>(const gl::ShaderProgramID *valueIn,
1951                                                                  ParamValue *valueOut)
1952 {
1953     valueOut->ShaderProgramIDConstPointerVal = valueIn;
1954 }
1955 
1956 template <>
1957 inline void SetParamVal<ParamType::TShaderProgramIDPointer>(gl::ShaderProgramID *valueIn,
1958                                                             ParamValue *valueOut)
1959 {
1960     valueOut->ShaderProgramIDPointerVal = valueIn;
1961 }
1962 
1963 template <>
1964 inline void SetParamVal<ParamType::TShaderType>(gl::ShaderType valueIn, ParamValue *valueOut)
1965 {
1966     valueOut->ShaderTypeVal = valueIn;
1967 }
1968 
1969 template <>
1970 inline void SetParamVal<ParamType::TShadingModel>(gl::ShadingModel valueIn, ParamValue *valueOut)
1971 {
1972     valueOut->ShadingModelVal = valueIn;
1973 }
1974 
1975 template <>
1976 inline void SetParamVal<ParamType::TTextureEnvParameter>(gl::TextureEnvParameter valueIn,
1977                                                          ParamValue *valueOut)
1978 {
1979     valueOut->TextureEnvParameterVal = valueIn;
1980 }
1981 
1982 template <>
1983 inline void SetParamVal<ParamType::TTextureEnvTarget>(gl::TextureEnvTarget valueIn,
1984                                                       ParamValue *valueOut)
1985 {
1986     valueOut->TextureEnvTargetVal = valueIn;
1987 }
1988 
1989 template <>
1990 inline void SetParamVal<ParamType::TTextureID>(gl::TextureID valueIn, ParamValue *valueOut)
1991 {
1992     valueOut->TextureIDVal = valueIn;
1993 }
1994 
1995 template <>
1996 inline void SetParamVal<ParamType::TTextureIDConstPointer>(const gl::TextureID *valueIn,
1997                                                            ParamValue *valueOut)
1998 {
1999     valueOut->TextureIDConstPointerVal = valueIn;
2000 }
2001 
2002 template <>
2003 inline void SetParamVal<ParamType::TTextureIDPointer>(gl::TextureID *valueIn, ParamValue *valueOut)
2004 {
2005     valueOut->TextureIDPointerVal = valueIn;
2006 }
2007 
2008 template <>
2009 inline void SetParamVal<ParamType::TTextureTarget>(gl::TextureTarget valueIn, ParamValue *valueOut)
2010 {
2011     valueOut->TextureTargetVal = valueIn;
2012 }
2013 
2014 template <>
2015 inline void SetParamVal<ParamType::TTextureType>(gl::TextureType valueIn, ParamValue *valueOut)
2016 {
2017     valueOut->TextureTypeVal = valueIn;
2018 }
2019 
2020 template <>
2021 inline void SetParamVal<ParamType::TTransformFeedbackID>(gl::TransformFeedbackID valueIn,
2022                                                          ParamValue *valueOut)
2023 {
2024     valueOut->TransformFeedbackIDVal = valueIn;
2025 }
2026 
2027 template <>
2028 inline void SetParamVal<ParamType::TTransformFeedbackIDConstPointer>(
2029     const gl::TransformFeedbackID *valueIn,
2030     ParamValue *valueOut)
2031 {
2032     valueOut->TransformFeedbackIDConstPointerVal = valueIn;
2033 }
2034 
2035 template <>
2036 inline void SetParamVal<ParamType::TTransformFeedbackIDPointer>(gl::TransformFeedbackID *valueIn,
2037                                                                 ParamValue *valueOut)
2038 {
2039     valueOut->TransformFeedbackIDPointerVal = valueIn;
2040 }
2041 
2042 template <>
2043 inline void SetParamVal<ParamType::TUniformLocation>(gl::UniformLocation valueIn,
2044                                                      ParamValue *valueOut)
2045 {
2046     valueOut->UniformLocationVal = valueIn;
2047 }
2048 
2049 template <>
2050 inline void SetParamVal<ParamType::TVertexArrayID>(gl::VertexArrayID valueIn, ParamValue *valueOut)
2051 {
2052     valueOut->VertexArrayIDVal = valueIn;
2053 }
2054 
2055 template <>
2056 inline void SetParamVal<ParamType::TVertexArrayIDConstPointer>(const gl::VertexArrayID *valueIn,
2057                                                                ParamValue *valueOut)
2058 {
2059     valueOut->VertexArrayIDConstPointerVal = valueIn;
2060 }
2061 
2062 template <>
2063 inline void SetParamVal<ParamType::TVertexArrayIDPointer>(gl::VertexArrayID *valueIn,
2064                                                           ParamValue *valueOut)
2065 {
2066     valueOut->VertexArrayIDPointerVal = valueIn;
2067 }
2068 
2069 template <>
2070 inline void SetParamVal<ParamType::TVertexAttribType>(gl::VertexAttribType valueIn,
2071                                                       ParamValue *valueOut)
2072 {
2073     valueOut->VertexAttribTypeVal = valueIn;
2074 }
2075 
2076 template <>
2077 inline void SetParamVal<ParamType::TvoidConstPointer>(const void *valueIn, ParamValue *valueOut)
2078 {
2079     valueOut->voidConstPointerVal = valueIn;
2080 }
2081 
2082 template <>
2083 inline void SetParamVal<ParamType::TvoidConstPointerPointer>(const void *const *valueIn,
2084                                                              ParamValue *valueOut)
2085 {
2086     valueOut->voidConstPointerPointerVal = valueIn;
2087 }
2088 
2089 template <>
2090 inline void SetParamVal<ParamType::TvoidPointer>(void *valueIn, ParamValue *valueOut)
2091 {
2092     valueOut->voidPointerVal = valueIn;
2093 }
2094 
2095 template <>
2096 inline void SetParamVal<ParamType::TvoidPointerPointer>(void **valueIn, ParamValue *valueOut)
2097 {
2098     valueOut->voidPointerPointerVal = valueIn;
2099 }
2100 
2101 template <ParamType PType, typename T>
SetParamVal(T valueIn,ParamValue * valueOut)2102 void SetParamVal(T valueIn, ParamValue *valueOut)
2103 {
2104     UNREACHABLE();
2105 }
2106 
2107 template <typename T>
InitParamValue(ParamType paramType,T valueIn,ParamValue * valueOut)2108 void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
2109 {
2110     switch (paramType)
2111     {
2112         case ParamType::TAlphaTestFunc:
2113             SetParamVal<ParamType::TAlphaTestFunc>(valueIn, valueOut);
2114             break;
2115         case ParamType::TBufferBinding:
2116             SetParamVal<ParamType::TBufferBinding>(valueIn, valueOut);
2117             break;
2118         case ParamType::TBufferID:
2119             SetParamVal<ParamType::TBufferID>(valueIn, valueOut);
2120             break;
2121         case ParamType::TBufferIDConstPointer:
2122             SetParamVal<ParamType::TBufferIDConstPointer>(valueIn, valueOut);
2123             break;
2124         case ParamType::TBufferIDPointer:
2125             SetParamVal<ParamType::TBufferIDPointer>(valueIn, valueOut);
2126             break;
2127         case ParamType::TBufferUsage:
2128             SetParamVal<ParamType::TBufferUsage>(valueIn, valueOut);
2129             break;
2130         case ParamType::TClientVertexArrayType:
2131             SetParamVal<ParamType::TClientVertexArrayType>(valueIn, valueOut);
2132             break;
2133         case ParamType::TCullFaceMode:
2134             SetParamVal<ParamType::TCullFaceMode>(valueIn, valueOut);
2135             break;
2136         case ParamType::TDrawElementsType:
2137             SetParamVal<ParamType::TDrawElementsType>(valueIn, valueOut);
2138             break;
2139         case ParamType::TFenceNVID:
2140             SetParamVal<ParamType::TFenceNVID>(valueIn, valueOut);
2141             break;
2142         case ParamType::TFenceNVIDConstPointer:
2143             SetParamVal<ParamType::TFenceNVIDConstPointer>(valueIn, valueOut);
2144             break;
2145         case ParamType::TFenceNVIDPointer:
2146             SetParamVal<ParamType::TFenceNVIDPointer>(valueIn, valueOut);
2147             break;
2148         case ParamType::TFramebufferID:
2149             SetParamVal<ParamType::TFramebufferID>(valueIn, valueOut);
2150             break;
2151         case ParamType::TFramebufferIDConstPointer:
2152             SetParamVal<ParamType::TFramebufferIDConstPointer>(valueIn, valueOut);
2153             break;
2154         case ParamType::TFramebufferIDPointer:
2155             SetParamVal<ParamType::TFramebufferIDPointer>(valueIn, valueOut);
2156             break;
2157         case ParamType::TGLDEBUGPROC:
2158             SetParamVal<ParamType::TGLDEBUGPROC>(valueIn, valueOut);
2159             break;
2160         case ParamType::TGLDEBUGPROCKHR:
2161             SetParamVal<ParamType::TGLDEBUGPROCKHR>(valueIn, valueOut);
2162             break;
2163         case ParamType::TGLbitfield:
2164             SetParamVal<ParamType::TGLbitfield>(valueIn, valueOut);
2165             break;
2166         case ParamType::TGLboolean:
2167             SetParamVal<ParamType::TGLboolean>(valueIn, valueOut);
2168             break;
2169         case ParamType::TGLbooleanConstPointer:
2170             SetParamVal<ParamType::TGLbooleanConstPointer>(valueIn, valueOut);
2171             break;
2172         case ParamType::TGLbooleanPointer:
2173             SetParamVal<ParamType::TGLbooleanPointer>(valueIn, valueOut);
2174             break;
2175         case ParamType::TGLbyte:
2176             SetParamVal<ParamType::TGLbyte>(valueIn, valueOut);
2177             break;
2178         case ParamType::TGLbyteConstPointer:
2179             SetParamVal<ParamType::TGLbyteConstPointer>(valueIn, valueOut);
2180             break;
2181         case ParamType::TGLcharConstPointer:
2182             SetParamVal<ParamType::TGLcharConstPointer>(valueIn, valueOut);
2183             break;
2184         case ParamType::TGLcharConstPointerPointer:
2185             SetParamVal<ParamType::TGLcharConstPointerPointer>(valueIn, valueOut);
2186             break;
2187         case ParamType::TGLcharPointer:
2188             SetParamVal<ParamType::TGLcharPointer>(valueIn, valueOut);
2189             break;
2190         case ParamType::TGLclampx:
2191             SetParamVal<ParamType::TGLclampx>(valueIn, valueOut);
2192             break;
2193         case ParamType::TGLdouble:
2194             SetParamVal<ParamType::TGLdouble>(valueIn, valueOut);
2195             break;
2196         case ParamType::TGLdoubleConstPointer:
2197             SetParamVal<ParamType::TGLdoubleConstPointer>(valueIn, valueOut);
2198             break;
2199         case ParamType::TGLdoublePointer:
2200             SetParamVal<ParamType::TGLdoublePointer>(valueIn, valueOut);
2201             break;
2202         case ParamType::TGLeglImageOES:
2203             SetParamVal<ParamType::TGLeglImageOES>(valueIn, valueOut);
2204             break;
2205         case ParamType::TGLenum:
2206             SetParamVal<ParamType::TGLenum>(valueIn, valueOut);
2207             break;
2208         case ParamType::TGLenumConstPointer:
2209             SetParamVal<ParamType::TGLenumConstPointer>(valueIn, valueOut);
2210             break;
2211         case ParamType::TGLenumPointer:
2212             SetParamVal<ParamType::TGLenumPointer>(valueIn, valueOut);
2213             break;
2214         case ParamType::TGLfixed:
2215             SetParamVal<ParamType::TGLfixed>(valueIn, valueOut);
2216             break;
2217         case ParamType::TGLfixedConstPointer:
2218             SetParamVal<ParamType::TGLfixedConstPointer>(valueIn, valueOut);
2219             break;
2220         case ParamType::TGLfixedPointer:
2221             SetParamVal<ParamType::TGLfixedPointer>(valueIn, valueOut);
2222             break;
2223         case ParamType::TGLfloat:
2224             SetParamVal<ParamType::TGLfloat>(valueIn, valueOut);
2225             break;
2226         case ParamType::TGLfloatConstPointer:
2227             SetParamVal<ParamType::TGLfloatConstPointer>(valueIn, valueOut);
2228             break;
2229         case ParamType::TGLfloatPointer:
2230             SetParamVal<ParamType::TGLfloatPointer>(valueIn, valueOut);
2231             break;
2232         case ParamType::TGLint:
2233             SetParamVal<ParamType::TGLint>(valueIn, valueOut);
2234             break;
2235         case ParamType::TGLint64Pointer:
2236             SetParamVal<ParamType::TGLint64Pointer>(valueIn, valueOut);
2237             break;
2238         case ParamType::TGLintConstPointer:
2239             SetParamVal<ParamType::TGLintConstPointer>(valueIn, valueOut);
2240             break;
2241         case ParamType::TGLintPointer:
2242             SetParamVal<ParamType::TGLintPointer>(valueIn, valueOut);
2243             break;
2244         case ParamType::TGLintptr:
2245             SetParamVal<ParamType::TGLintptr>(valueIn, valueOut);
2246             break;
2247         case ParamType::TGLintptrConstPointer:
2248             SetParamVal<ParamType::TGLintptrConstPointer>(valueIn, valueOut);
2249             break;
2250         case ParamType::TGLshort:
2251             SetParamVal<ParamType::TGLshort>(valueIn, valueOut);
2252             break;
2253         case ParamType::TGLshortConstPointer:
2254             SetParamVal<ParamType::TGLshortConstPointer>(valueIn, valueOut);
2255             break;
2256         case ParamType::TGLsizei:
2257             SetParamVal<ParamType::TGLsizei>(valueIn, valueOut);
2258             break;
2259         case ParamType::TGLsizeiConstPointer:
2260             SetParamVal<ParamType::TGLsizeiConstPointer>(valueIn, valueOut);
2261             break;
2262         case ParamType::TGLsizeiPointer:
2263             SetParamVal<ParamType::TGLsizeiPointer>(valueIn, valueOut);
2264             break;
2265         case ParamType::TGLsizeiptr:
2266             SetParamVal<ParamType::TGLsizeiptr>(valueIn, valueOut);
2267             break;
2268         case ParamType::TGLsizeiptrConstPointer:
2269             SetParamVal<ParamType::TGLsizeiptrConstPointer>(valueIn, valueOut);
2270             break;
2271         case ParamType::TGLsync:
2272             SetParamVal<ParamType::TGLsync>(valueIn, valueOut);
2273             break;
2274         case ParamType::TGLubyte:
2275             SetParamVal<ParamType::TGLubyte>(valueIn, valueOut);
2276             break;
2277         case ParamType::TGLubyteConstPointer:
2278             SetParamVal<ParamType::TGLubyteConstPointer>(valueIn, valueOut);
2279             break;
2280         case ParamType::TGLubytePointer:
2281             SetParamVal<ParamType::TGLubytePointer>(valueIn, valueOut);
2282             break;
2283         case ParamType::TGLuint:
2284             SetParamVal<ParamType::TGLuint>(valueIn, valueOut);
2285             break;
2286         case ParamType::TGLuint64:
2287             SetParamVal<ParamType::TGLuint64>(valueIn, valueOut);
2288             break;
2289         case ParamType::TGLuint64ConstPointer:
2290             SetParamVal<ParamType::TGLuint64ConstPointer>(valueIn, valueOut);
2291             break;
2292         case ParamType::TGLuint64Pointer:
2293             SetParamVal<ParamType::TGLuint64Pointer>(valueIn, valueOut);
2294             break;
2295         case ParamType::TGLuintConstPointer:
2296             SetParamVal<ParamType::TGLuintConstPointer>(valueIn, valueOut);
2297             break;
2298         case ParamType::TGLuintPointer:
2299             SetParamVal<ParamType::TGLuintPointer>(valueIn, valueOut);
2300             break;
2301         case ParamType::TGLushort:
2302             SetParamVal<ParamType::TGLushort>(valueIn, valueOut);
2303             break;
2304         case ParamType::TGLushortConstPointer:
2305             SetParamVal<ParamType::TGLushortConstPointer>(valueIn, valueOut);
2306             break;
2307         case ParamType::TGLushortPointer:
2308             SetParamVal<ParamType::TGLushortPointer>(valueIn, valueOut);
2309             break;
2310         case ParamType::TGLvoidConstPointer:
2311             SetParamVal<ParamType::TGLvoidConstPointer>(valueIn, valueOut);
2312             break;
2313         case ParamType::TGLvoidConstPointerPointer:
2314             SetParamVal<ParamType::TGLvoidConstPointerPointer>(valueIn, valueOut);
2315             break;
2316         case ParamType::TGraphicsResetStatus:
2317             SetParamVal<ParamType::TGraphicsResetStatus>(valueIn, valueOut);
2318             break;
2319         case ParamType::THandleType:
2320             SetParamVal<ParamType::THandleType>(valueIn, valueOut);
2321             break;
2322         case ParamType::TLightParameter:
2323             SetParamVal<ParamType::TLightParameter>(valueIn, valueOut);
2324             break;
2325         case ParamType::TLogicalOperation:
2326             SetParamVal<ParamType::TLogicalOperation>(valueIn, valueOut);
2327             break;
2328         case ParamType::TMaterialParameter:
2329             SetParamVal<ParamType::TMaterialParameter>(valueIn, valueOut);
2330             break;
2331         case ParamType::TMatrixType:
2332             SetParamVal<ParamType::TMatrixType>(valueIn, valueOut);
2333             break;
2334         case ParamType::TMemoryObjectID:
2335             SetParamVal<ParamType::TMemoryObjectID>(valueIn, valueOut);
2336             break;
2337         case ParamType::TMemoryObjectIDConstPointer:
2338             SetParamVal<ParamType::TMemoryObjectIDConstPointer>(valueIn, valueOut);
2339             break;
2340         case ParamType::TMemoryObjectIDPointer:
2341             SetParamVal<ParamType::TMemoryObjectIDPointer>(valueIn, valueOut);
2342             break;
2343         case ParamType::TPointParameter:
2344             SetParamVal<ParamType::TPointParameter>(valueIn, valueOut);
2345             break;
2346         case ParamType::TPrimitiveMode:
2347             SetParamVal<ParamType::TPrimitiveMode>(valueIn, valueOut);
2348             break;
2349         case ParamType::TProgramPipelineID:
2350             SetParamVal<ParamType::TProgramPipelineID>(valueIn, valueOut);
2351             break;
2352         case ParamType::TProgramPipelineIDConstPointer:
2353             SetParamVal<ParamType::TProgramPipelineIDConstPointer>(valueIn, valueOut);
2354             break;
2355         case ParamType::TProgramPipelineIDPointer:
2356             SetParamVal<ParamType::TProgramPipelineIDPointer>(valueIn, valueOut);
2357             break;
2358         case ParamType::TProvokingVertexConvention:
2359             SetParamVal<ParamType::TProvokingVertexConvention>(valueIn, valueOut);
2360             break;
2361         case ParamType::TQueryID:
2362             SetParamVal<ParamType::TQueryID>(valueIn, valueOut);
2363             break;
2364         case ParamType::TQueryIDConstPointer:
2365             SetParamVal<ParamType::TQueryIDConstPointer>(valueIn, valueOut);
2366             break;
2367         case ParamType::TQueryIDPointer:
2368             SetParamVal<ParamType::TQueryIDPointer>(valueIn, valueOut);
2369             break;
2370         case ParamType::TQueryType:
2371             SetParamVal<ParamType::TQueryType>(valueIn, valueOut);
2372             break;
2373         case ParamType::TRenderbufferID:
2374             SetParamVal<ParamType::TRenderbufferID>(valueIn, valueOut);
2375             break;
2376         case ParamType::TRenderbufferIDConstPointer:
2377             SetParamVal<ParamType::TRenderbufferIDConstPointer>(valueIn, valueOut);
2378             break;
2379         case ParamType::TRenderbufferIDPointer:
2380             SetParamVal<ParamType::TRenderbufferIDPointer>(valueIn, valueOut);
2381             break;
2382         case ParamType::TSamplerID:
2383             SetParamVal<ParamType::TSamplerID>(valueIn, valueOut);
2384             break;
2385         case ParamType::TSamplerIDConstPointer:
2386             SetParamVal<ParamType::TSamplerIDConstPointer>(valueIn, valueOut);
2387             break;
2388         case ParamType::TSamplerIDPointer:
2389             SetParamVal<ParamType::TSamplerIDPointer>(valueIn, valueOut);
2390             break;
2391         case ParamType::TSemaphoreID:
2392             SetParamVal<ParamType::TSemaphoreID>(valueIn, valueOut);
2393             break;
2394         case ParamType::TSemaphoreIDConstPointer:
2395             SetParamVal<ParamType::TSemaphoreIDConstPointer>(valueIn, valueOut);
2396             break;
2397         case ParamType::TSemaphoreIDPointer:
2398             SetParamVal<ParamType::TSemaphoreIDPointer>(valueIn, valueOut);
2399             break;
2400         case ParamType::TShaderProgramID:
2401             SetParamVal<ParamType::TShaderProgramID>(valueIn, valueOut);
2402             break;
2403         case ParamType::TShaderProgramIDConstPointer:
2404             SetParamVal<ParamType::TShaderProgramIDConstPointer>(valueIn, valueOut);
2405             break;
2406         case ParamType::TShaderProgramIDPointer:
2407             SetParamVal<ParamType::TShaderProgramIDPointer>(valueIn, valueOut);
2408             break;
2409         case ParamType::TShaderType:
2410             SetParamVal<ParamType::TShaderType>(valueIn, valueOut);
2411             break;
2412         case ParamType::TShadingModel:
2413             SetParamVal<ParamType::TShadingModel>(valueIn, valueOut);
2414             break;
2415         case ParamType::TTextureEnvParameter:
2416             SetParamVal<ParamType::TTextureEnvParameter>(valueIn, valueOut);
2417             break;
2418         case ParamType::TTextureEnvTarget:
2419             SetParamVal<ParamType::TTextureEnvTarget>(valueIn, valueOut);
2420             break;
2421         case ParamType::TTextureID:
2422             SetParamVal<ParamType::TTextureID>(valueIn, valueOut);
2423             break;
2424         case ParamType::TTextureIDConstPointer:
2425             SetParamVal<ParamType::TTextureIDConstPointer>(valueIn, valueOut);
2426             break;
2427         case ParamType::TTextureIDPointer:
2428             SetParamVal<ParamType::TTextureIDPointer>(valueIn, valueOut);
2429             break;
2430         case ParamType::TTextureTarget:
2431             SetParamVal<ParamType::TTextureTarget>(valueIn, valueOut);
2432             break;
2433         case ParamType::TTextureType:
2434             SetParamVal<ParamType::TTextureType>(valueIn, valueOut);
2435             break;
2436         case ParamType::TTransformFeedbackID:
2437             SetParamVal<ParamType::TTransformFeedbackID>(valueIn, valueOut);
2438             break;
2439         case ParamType::TTransformFeedbackIDConstPointer:
2440             SetParamVal<ParamType::TTransformFeedbackIDConstPointer>(valueIn, valueOut);
2441             break;
2442         case ParamType::TTransformFeedbackIDPointer:
2443             SetParamVal<ParamType::TTransformFeedbackIDPointer>(valueIn, valueOut);
2444             break;
2445         case ParamType::TUniformLocation:
2446             SetParamVal<ParamType::TUniformLocation>(valueIn, valueOut);
2447             break;
2448         case ParamType::TVertexArrayID:
2449             SetParamVal<ParamType::TVertexArrayID>(valueIn, valueOut);
2450             break;
2451         case ParamType::TVertexArrayIDConstPointer:
2452             SetParamVal<ParamType::TVertexArrayIDConstPointer>(valueIn, valueOut);
2453             break;
2454         case ParamType::TVertexArrayIDPointer:
2455             SetParamVal<ParamType::TVertexArrayIDPointer>(valueIn, valueOut);
2456             break;
2457         case ParamType::TVertexAttribType:
2458             SetParamVal<ParamType::TVertexAttribType>(valueIn, valueOut);
2459             break;
2460         case ParamType::TvoidConstPointer:
2461             SetParamVal<ParamType::TvoidConstPointer>(valueIn, valueOut);
2462             break;
2463         case ParamType::TvoidConstPointerPointer:
2464             SetParamVal<ParamType::TvoidConstPointerPointer>(valueIn, valueOut);
2465             break;
2466         case ParamType::TvoidPointer:
2467             SetParamVal<ParamType::TvoidPointer>(valueIn, valueOut);
2468             break;
2469         case ParamType::TvoidPointerPointer:
2470             SetParamVal<ParamType::TvoidPointerPointer>(valueIn, valueOut);
2471             break;
2472     }
2473 }
2474 
2475 struct CallCapture;
2476 struct ParamCapture;
2477 
2478 void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const ParamCapture &param);
2479 const char *ParamTypeToString(ParamType paramType);
2480 
2481 enum class ResourceIDType
2482 {
2483     Buffer,
2484     FenceNV,
2485     Framebuffer,
2486     MemoryObject,
2487     ProgramPipeline,
2488     Query,
2489     Renderbuffer,
2490     Sampler,
2491     Semaphore,
2492     ShaderProgram,
2493     Texture,
2494     TransformFeedback,
2495     VertexArray,
2496     EnumCount,
2497     InvalidEnum = EnumCount
2498 };
2499 
2500 ResourceIDType GetResourceIDTypeFromParamType(ParamType paramType);
2501 const char *GetResourceIDTypeName(ResourceIDType resourceIDType);
2502 }  // namespace angle
2503 
2504 #endif  // LIBANGLE_FRAME_CAPTURE_UTILS_AUTOGEN_H_
2505