// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// capture_gles_3_0_autogen.cpp:
//   Capture functions for the OpenGL ES 3.0 entry points.

#include "libANGLE/capture_gles_3_0_autogen.h"

#include "libANGLE/Context.h"
#include "libANGLE/FrameCapture.h"
#include "libANGLE/gl_enum_utils_autogen.h"
#include "libANGLE/validationES3.h"

using namespace angle;

namespace gl
{

CallCapture CaptureBeginQuery(const Context *context,
                              bool isCallValid,
                              QueryType targetPacked,
                              GLuint id)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);

    return CallCapture(gl::EntryPoint::BeginQuery, std::move(paramBuffer));
}

CallCapture CaptureBeginTransformFeedback(const Context *context,
                                          bool isCallValid,
                                          PrimitiveMode primitiveModePacked)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("primitiveModePacked", ParamType::TPrimitiveMode,
                              primitiveModePacked);

    return CallCapture(gl::EntryPoint::BeginTransformFeedback, std::move(paramBuffer));
}

CallCapture CaptureBindBufferBase(const Context *context,
                                  bool isCallValid,
                                  BufferBinding targetPacked,
                                  GLuint index,
                                  BufferID bufferPacked)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);

    return CallCapture(gl::EntryPoint::BindBufferBase, std::move(paramBuffer));
}

CallCapture CaptureBindBufferRange(const Context *context,
                                   bool isCallValid,
                                   BufferBinding targetPacked,
                                   GLuint index,
                                   BufferID bufferPacked,
                                   GLintptr offset,
                                   GLsizeiptr size)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufferPacked", ParamType::TBufferID, bufferPacked);
    paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
    paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);

    return CallCapture(gl::EntryPoint::BindBufferRange, std::move(paramBuffer));
}

CallCapture CaptureBindSampler(const Context *context,
                               bool isCallValid,
                               GLuint unit,
                               GLuint sampler)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("unit", ParamType::TGLuint, unit);
    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);

    return CallCapture(gl::EntryPoint::BindSampler, std::move(paramBuffer));
}

CallCapture CaptureBindTransformFeedback(const Context *context,
                                         bool isCallValid,
                                         GLenum target,
                                         GLuint id)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::BindTransformFeedbackTarget, ParamType::TGLenum,
                             target);
    paramBuffer.addValueParam("id", ParamType::TGLuint, id);

    return CallCapture(gl::EntryPoint::BindTransformFeedback, std::move(paramBuffer));
}

CallCapture CaptureBindVertexArray(const Context *context, bool isCallValid, GLuint array)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("array", ParamType::TGLuint, array);

    return CallCapture(gl::EntryPoint::BindVertexArray, std::move(paramBuffer));
}

CallCapture CaptureBlitFramebuffer(const Context *context,
                                   bool isCallValid,
                                   GLint srcX0,
                                   GLint srcY0,
                                   GLint srcX1,
                                   GLint srcY1,
                                   GLint dstX0,
                                   GLint dstY0,
                                   GLint dstX1,
                                   GLint dstY1,
                                   GLbitfield mask,
                                   GLenum filter)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("srcX0", ParamType::TGLint, srcX0);
    paramBuffer.addValueParam("srcY0", ParamType::TGLint, srcY0);
    paramBuffer.addValueParam("srcX1", ParamType::TGLint, srcX1);
    paramBuffer.addValueParam("srcY1", ParamType::TGLint, srcY1);
    paramBuffer.addValueParam("dstX0", ParamType::TGLint, dstX0);
    paramBuffer.addValueParam("dstY0", ParamType::TGLint, dstY0);
    paramBuffer.addValueParam("dstX1", ParamType::TGLint, dstX1);
    paramBuffer.addValueParam("dstY1", ParamType::TGLint, dstY1);
    paramBuffer.addEnumParam("mask", GLenumGroup::ClearBufferMask, ParamType::TGLbitfield, mask);
    paramBuffer.addEnumParam("filter", GLenumGroup::BlitFramebufferFilter, ParamType::TGLenum,
                             filter);

    return CallCapture(gl::EntryPoint::BlitFramebuffer, std::move(paramBuffer));
}

CallCapture CaptureClearBufferfi(const Context *context,
                                 bool isCallValid,
                                 GLenum buffer,
                                 GLint drawbuffer,
                                 GLfloat depth,
                                 GLint stencil)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
    paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);
    paramBuffer.addValueParam("depth", ParamType::TGLfloat, depth);
    paramBuffer.addValueParam("stencil", ParamType::TGLint, stencil);

    return CallCapture(gl::EntryPoint::ClearBufferfi, std::move(paramBuffer));
}

CallCapture CaptureClearBufferfv(const Context *context,
                                 bool isCallValid,
                                 GLenum buffer,
                                 GLint drawbuffer,
                                 const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
    paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureClearBufferfv_value(context, isCallValid, buffer, drawbuffer, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::ClearBufferfv, std::move(paramBuffer));
}

CallCapture CaptureClearBufferiv(const Context *context,
                                 bool isCallValid,
                                 GLenum buffer,
                                 GLint drawbuffer,
                                 const GLint *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
    paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);

    ParamCapture valueParam("value", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, value, &valueParam.value);
    CaptureClearBufferiv_value(context, isCallValid, buffer, drawbuffer, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::ClearBufferiv, std::move(paramBuffer));
}

CallCapture CaptureClearBufferuiv(const Context *context,
                                  bool isCallValid,
                                  GLenum buffer,
                                  GLint drawbuffer,
                                  const GLuint *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("buffer", GLenumGroup::Buffer, ParamType::TGLenum, buffer);
    paramBuffer.addValueParam("drawbuffer", ParamType::TGLint, drawbuffer);

    ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
    CaptureClearBufferuiv_value(context, isCallValid, buffer, drawbuffer, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::ClearBufferuiv, std::move(paramBuffer));
}

CallCapture CaptureClientWaitSync(const Context *context,
                                  bool isCallValid,
                                  GLsync sync,
                                  GLbitfield flags,
                                  GLuint64 timeout,
                                  GLenum returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
    paramBuffer.addEnumParam("flags", GLenumGroup::SyncObjectMask, ParamType::TGLbitfield, flags);
    paramBuffer.addValueParam("timeout", ParamType::TGLuint64, timeout);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLenum);
    InitParamValue(ParamType::TGLenum, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::ClientWaitSync, std::move(paramBuffer));
}

CallCapture CaptureCompressedTexImage3D(const Context *context,
                                        bool isCallValid,
                                        TextureTarget targetPacked,
                                        GLint level,
                                        GLenum internalformat,
                                        GLsizei width,
                                        GLsizei height,
                                        GLsizei depth,
                                        GLint border,
                                        GLsizei imageSize,
                                        const void *data)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
                             internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);

    ParamCapture dataParam("data", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexImage3D_data(context, isCallValid, targetPacked, level, internalformat,
                                     width, height, depth, border, imageSize, data, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    return CallCapture(gl::EntryPoint::CompressedTexImage3D, std::move(paramBuffer));
}

CallCapture CaptureCompressedTexSubImage3D(const Context *context,
                                           bool isCallValid,
                                           TextureTarget targetPacked,
                                           GLint level,
                                           GLint xoffset,
                                           GLint yoffset,
                                           GLint zoffset,
                                           GLsizei width,
                                           GLsizei height,
                                           GLsizei depth,
                                           GLenum format,
                                           GLsizei imageSize,
                                           const void *data)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
    paramBuffer.addValueParam("imageSize", ParamType::TGLsizei, imageSize);

    ParamCapture dataParam("data", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, data, &dataParam.value);
    CaptureCompressedTexSubImage3D_data(context, isCallValid, targetPacked, level, xoffset, yoffset,
                                        zoffset, width, height, depth, format, imageSize, data,
                                        &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    return CallCapture(gl::EntryPoint::CompressedTexSubImage3D, std::move(paramBuffer));
}

CallCapture CaptureCopyBufferSubData(const Context *context,
                                     bool isCallValid,
                                     BufferBinding readTargetPacked,
                                     BufferBinding writeTargetPacked,
                                     GLintptr readOffset,
                                     GLintptr writeOffset,
                                     GLsizeiptr size)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("readTargetPacked", ParamType::TBufferBinding, readTargetPacked);
    paramBuffer.addValueParam("writeTargetPacked", ParamType::TBufferBinding, writeTargetPacked);
    paramBuffer.addValueParam("readOffset", ParamType::TGLintptr, readOffset);
    paramBuffer.addValueParam("writeOffset", ParamType::TGLintptr, writeOffset);
    paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);

    return CallCapture(gl::EntryPoint::CopyBufferSubData, std::move(paramBuffer));
}

CallCapture CaptureCopyTexSubImage3D(const Context *context,
                                     bool isCallValid,
                                     TextureTarget targetPacked,
                                     GLint level,
                                     GLint xoffset,
                                     GLint yoffset,
                                     GLint zoffset,
                                     GLint x,
                                     GLint y,
                                     GLsizei width,
                                     GLsizei height)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    return CallCapture(gl::EntryPoint::CopyTexSubImage3D, std::move(paramBuffer));
}

CallCapture CaptureDeleteQueries(const Context *context,
                                 bool isCallValid,
                                 GLsizei n,
                                 const GLuint *ids)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
    CaptureDeleteQueries_ids(context, isCallValid, n, ids, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    return CallCapture(gl::EntryPoint::DeleteQueries, std::move(paramBuffer));
}

CallCapture CaptureDeleteSamplers(const Context *context,
                                  bool isCallValid,
                                  GLsizei count,
                                  const GLuint *samplers)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture samplersParam("samplers", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, samplers, &samplersParam.value);
    CaptureDeleteSamplers_samplers(context, isCallValid, count, samplers, &samplersParam);
    paramBuffer.addParam(std::move(samplersParam));

    return CallCapture(gl::EntryPoint::DeleteSamplers, std::move(paramBuffer));
}

CallCapture CaptureDeleteSync(const Context *context, bool isCallValid, GLsync sync)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);

    return CallCapture(gl::EntryPoint::DeleteSync, std::move(paramBuffer));
}

CallCapture CaptureDeleteTransformFeedbacks(const Context *context,
                                            bool isCallValid,
                                            GLsizei n,
                                            const GLuint *ids)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
    CaptureDeleteTransformFeedbacks_ids(context, isCallValid, n, ids, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    return CallCapture(gl::EntryPoint::DeleteTransformFeedbacks, std::move(paramBuffer));
}

CallCapture CaptureDeleteVertexArrays(const Context *context,
                                      bool isCallValid,
                                      GLsizei n,
                                      const GLuint *arrays)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture arraysParam("arrays", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, arrays, &arraysParam.value);
    CaptureDeleteVertexArrays_arrays(context, isCallValid, n, arrays, &arraysParam);
    paramBuffer.addParam(std::move(arraysParam));

    return CallCapture(gl::EntryPoint::DeleteVertexArrays, std::move(paramBuffer));
}

CallCapture CaptureDrawArraysInstanced(const Context *context,
                                       bool isCallValid,
                                       PrimitiveMode modePacked,
                                       GLint first,
                                       GLsizei count,
                                       GLsizei instancecount)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("first", ParamType::TGLint, first);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);

    return CallCapture(gl::EntryPoint::DrawArraysInstanced, std::move(paramBuffer));
}

CallCapture CaptureDrawBuffers(const Context *context,
                               bool isCallValid,
                               GLsizei n,
                               const GLenum *bufs)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture bufsParam("bufs", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, bufs, &bufsParam.value);
    CaptureDrawBuffers_bufs(context, isCallValid, n, bufs, &bufsParam);
    paramBuffer.addParam(std::move(bufsParam));

    return CallCapture(gl::EntryPoint::DrawBuffers, std::move(paramBuffer));
}

CallCapture CaptureDrawElementsInstanced(const Context *context,
                                         bool isCallValid,
                                         PrimitiveMode modePacked,
                                         GLsizei count,
                                         DrawElementsType typePacked,
                                         const void *indices,
                                         GLsizei instancecount)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);

    ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
    CaptureDrawElementsInstanced_indices(context, isCallValid, modePacked, count, typePacked,
                                         indices, instancecount, &indicesParam);
    paramBuffer.addParam(std::move(indicesParam));

    paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount);

    return CallCapture(gl::EntryPoint::DrawElementsInstanced, std::move(paramBuffer));
}

CallCapture CaptureDrawRangeElements(const Context *context,
                                     bool isCallValid,
                                     PrimitiveMode modePacked,
                                     GLuint start,
                                     GLuint end,
                                     GLsizei count,
                                     DrawElementsType typePacked,
                                     const void *indices)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked);
    paramBuffer.addValueParam("start", ParamType::TGLuint, start);
    paramBuffer.addValueParam("end", ParamType::TGLuint, end);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked);

    ParamCapture indicesParam("indices", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value);
    CaptureDrawRangeElements_indices(context, isCallValid, modePacked, start, end, count,
                                     typePacked, indices, &indicesParam);
    paramBuffer.addParam(std::move(indicesParam));

    return CallCapture(gl::EntryPoint::DrawRangeElements, std::move(paramBuffer));
}

CallCapture CaptureEndQuery(const Context *context, bool isCallValid, QueryType targetPacked)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);

    return CallCapture(gl::EntryPoint::EndQuery, std::move(paramBuffer));
}

CallCapture CaptureEndTransformFeedback(const Context *context, bool isCallValid)
{
    ParamBuffer paramBuffer;

    return CallCapture(gl::EntryPoint::EndTransformFeedback, std::move(paramBuffer));
}

CallCapture CaptureFenceSync(const Context *context,
                             bool isCallValid,
                             GLenum condition,
                             GLbitfield flags,
                             GLsync returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("condition", GLenumGroup::SyncCondition, ParamType::TGLenum,
                             condition);
    paramBuffer.addEnumParam("flags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield, flags);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLsync);
    InitParamValue(ParamType::TGLsync, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::FenceSync, std::move(paramBuffer));
}

CallCapture CaptureFlushMappedBufferRange(const Context *context,
                                          bool isCallValid,
                                          BufferBinding targetPacked,
                                          GLintptr offset,
                                          GLsizeiptr length)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
    paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);

    return CallCapture(gl::EntryPoint::FlushMappedBufferRange, std::move(paramBuffer));
}

CallCapture CaptureFramebufferTextureLayer(const Context *context,
                                           bool isCallValid,
                                           GLenum target,
                                           GLenum attachment,
                                           TextureID texturePacked,
                                           GLint level,
                                           GLint layer)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
    paramBuffer.addEnumParam("attachment", GLenumGroup::FramebufferAttachment, ParamType::TGLenum,
                             attachment);
    paramBuffer.addValueParam("texturePacked", ParamType::TTextureID, texturePacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("layer", ParamType::TGLint, layer);

    return CallCapture(gl::EntryPoint::FramebufferTextureLayer, std::move(paramBuffer));
}

CallCapture CaptureGenQueries(const Context *context, bool isCallValid, GLsizei n, GLuint *ids)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture idsParam("ids", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
    CaptureGenQueries_ids(context, isCallValid, n, ids, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    return CallCapture(gl::EntryPoint::GenQueries, std::move(paramBuffer));
}

CallCapture CaptureGenSamplers(const Context *context,
                               bool isCallValid,
                               GLsizei count,
                               GLuint *samplers)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture samplersParam("samplers", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, samplers, &samplersParam.value);
    CaptureGenSamplers_samplers(context, isCallValid, count, samplers, &samplersParam);
    paramBuffer.addParam(std::move(samplersParam));

    return CallCapture(gl::EntryPoint::GenSamplers, std::move(paramBuffer));
}

CallCapture CaptureGenTransformFeedbacks(const Context *context,
                                         bool isCallValid,
                                         GLsizei n,
                                         GLuint *ids)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture idsParam("ids", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
    CaptureGenTransformFeedbacks_ids(context, isCallValid, n, ids, &idsParam);
    paramBuffer.addParam(std::move(idsParam));

    return CallCapture(gl::EntryPoint::GenTransformFeedbacks, std::move(paramBuffer));
}

CallCapture CaptureGenVertexArrays(const Context *context,
                                   bool isCallValid,
                                   GLsizei n,
                                   GLuint *arrays)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("n", ParamType::TGLsizei, n);

    ParamCapture arraysParam("arrays", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, arrays, &arraysParam.value);
    CaptureGenVertexArrays_arrays(context, isCallValid, n, arrays, &arraysParam);
    paramBuffer.addParam(std::move(arraysParam));

    return CallCapture(gl::EntryPoint::GenVertexArrays, std::move(paramBuffer));
}

CallCapture CaptureGetActiveUniformBlockName(const Context *context,
                                             bool isCallValid,
                                             GLuint program,
                                             GLuint uniformBlockIndex,
                                             GLsizei bufSize,
                                             GLsizei *length,
                                             GLchar *uniformBlockName)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetActiveUniformBlockName_length(context, isCallValid, program, uniformBlockIndex,
                                            bufSize, length, uniformBlockName, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture uniformBlockNameParam("uniformBlockName", ParamType::TGLcharPointer);
    InitParamValue(ParamType::TGLcharPointer, uniformBlockName, &uniformBlockNameParam.value);
    CaptureGetActiveUniformBlockName_uniformBlockName(context, isCallValid, program,
                                                      uniformBlockIndex, bufSize, length,
                                                      uniformBlockName, &uniformBlockNameParam);
    paramBuffer.addParam(std::move(uniformBlockNameParam));

    return CallCapture(gl::EntryPoint::GetActiveUniformBlockName, std::move(paramBuffer));
}

CallCapture CaptureGetActiveUniformBlockiv(const Context *context,
                                           bool isCallValid,
                                           GLuint program,
                                           GLuint uniformBlockIndex,
                                           GLenum pname,
                                           GLint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
    paramBuffer.addEnumParam("pname", GLenumGroup::UniformBlockPName, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetActiveUniformBlockiv_params(context, isCallValid, program, uniformBlockIndex, pname,
                                          params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetActiveUniformBlockiv, std::move(paramBuffer));
}

CallCapture CaptureGetActiveUniformsiv(const Context *context,
                                       bool isCallValid,
                                       GLuint program,
                                       GLsizei uniformCount,
                                       const GLuint *uniformIndices,
                                       GLenum pname,
                                       GLint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("uniformCount", ParamType::TGLsizei, uniformCount);

    ParamCapture uniformIndicesParam("uniformIndices", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, uniformIndices, &uniformIndicesParam.value);
    CaptureGetActiveUniformsiv_uniformIndices(context, isCallValid, program, uniformCount,
                                              uniformIndices, pname, params, &uniformIndicesParam);
    paramBuffer.addParam(std::move(uniformIndicesParam));

    paramBuffer.addEnumParam("pname", GLenumGroup::UniformPName, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetActiveUniformsiv_params(context, isCallValid, program, uniformCount, uniformIndices,
                                      pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetActiveUniformsiv, std::move(paramBuffer));
}

CallCapture CaptureGetBufferParameteri64v(const Context *context,
                                          bool isCallValid,
                                          BufferBinding targetPacked,
                                          GLenum pname,
                                          GLint64 *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
    CaptureGetBufferParameteri64v_params(context, isCallValid, targetPacked, pname, params,
                                         &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetBufferParameteri64v, std::move(paramBuffer));
}

CallCapture CaptureGetBufferPointerv(const Context *context,
                                     bool isCallValid,
                                     BufferBinding targetPacked,
                                     GLenum pname,
                                     void **params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TvoidPointerPointer);
    InitParamValue(ParamType::TvoidPointerPointer, params, &paramsParam.value);
    CaptureGetBufferPointerv_params(context, isCallValid, targetPacked, pname, params,
                                    &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetBufferPointerv, std::move(paramBuffer));
}

CallCapture CaptureGetFragDataLocation(const Context *context,
                                       bool isCallValid,
                                       GLuint program,
                                       const GLchar *name,
                                       GLint returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);

    ParamCapture nameParam("name", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, name, &nameParam.value);
    CaptureGetFragDataLocation_name(context, isCallValid, program, name, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    ParamCapture returnValueCapture("returnValue", ParamType::TGLint);
    InitParamValue(ParamType::TGLint, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::GetFragDataLocation, std::move(paramBuffer));
}

CallCapture CaptureGetInteger64i_v(const Context *context,
                                   bool isCallValid,
                                   GLenum target,
                                   GLuint index,
                                   GLint64 *data)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::TypeEnum, ParamType::TGLenum, target);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture dataParam("data", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
    CaptureGetInteger64i_v_data(context, isCallValid, target, index, data, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    return CallCapture(gl::EntryPoint::GetInteger64i_v, std::move(paramBuffer));
}

CallCapture CaptureGetInteger64v(const Context *context,
                                 bool isCallValid,
                                 GLenum pname,
                                 GLint64 *data)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("pname", GLenumGroup::GetPName, ParamType::TGLenum, pname);

    ParamCapture dataParam("data", ParamType::TGLint64Pointer);
    InitParamValue(ParamType::TGLint64Pointer, data, &dataParam.value);
    CaptureGetInteger64v_data(context, isCallValid, pname, data, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    return CallCapture(gl::EntryPoint::GetInteger64v, std::move(paramBuffer));
}

CallCapture CaptureGetIntegeri_v(const Context *context,
                                 bool isCallValid,
                                 GLenum target,
                                 GLuint index,
                                 GLint *data)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::TypeEnum, ParamType::TGLenum, target);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture dataParam("data", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, data, &dataParam.value);
    CaptureGetIntegeri_v_data(context, isCallValid, target, index, data, &dataParam);
    paramBuffer.addParam(std::move(dataParam));

    return CallCapture(gl::EntryPoint::GetIntegeri_v, std::move(paramBuffer));
}

CallCapture CaptureGetInternalformativ(const Context *context,
                                       bool isCallValid,
                                       GLenum target,
                                       GLenum internalformat,
                                       GLenum pname,
                                       GLsizei bufSize,
                                       GLint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::TextureTarget, ParamType::TGLenum, target);
    paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
                             internalformat);
    paramBuffer.addEnumParam("pname", GLenumGroup::InternalFormatPName, ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetInternalformativ_params(context, isCallValid, target, internalformat, pname, bufSize,
                                      params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetInternalformativ, std::move(paramBuffer));
}

CallCapture CaptureGetProgramBinary(const Context *context,
                                    bool isCallValid,
                                    GLuint program,
                                    GLsizei bufSize,
                                    GLsizei *length,
                                    GLenum *binaryFormat,
                                    void *binary)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetProgramBinary_length(context, isCallValid, program, bufSize, length, binaryFormat,
                                   binary, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture binaryFormatParam("binaryFormat", ParamType::TGLenumPointer);
    InitParamValue(ParamType::TGLenumPointer, binaryFormat, &binaryFormatParam.value);
    CaptureGetProgramBinary_binaryFormat(context, isCallValid, program, bufSize, length,
                                         binaryFormat, binary, &binaryFormatParam);
    paramBuffer.addParam(std::move(binaryFormatParam));

    ParamCapture binaryParam("binary", ParamType::TvoidPointer);
    InitParamValue(ParamType::TvoidPointer, binary, &binaryParam.value);
    CaptureGetProgramBinary_binary(context, isCallValid, program, bufSize, length, binaryFormat,
                                   binary, &binaryParam);
    paramBuffer.addParam(std::move(binaryParam));

    return CallCapture(gl::EntryPoint::GetProgramBinary, std::move(paramBuffer));
}

CallCapture CaptureGetQueryObjectuiv(const Context *context,
                                     bool isCallValid,
                                     GLuint id,
                                     GLenum pname,
                                     GLuint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("id", ParamType::TGLuint, id);
    paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
                             pname);

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetQueryObjectuiv_params(context, isCallValid, id, pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetQueryObjectuiv, std::move(paramBuffer));
}

CallCapture CaptureGetQueryiv(const Context *context,
                              bool isCallValid,
                              QueryType targetPacked,
                              GLenum pname,
                              GLint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
    paramBuffer.addEnumParam("pname", GLenumGroup::QueryParameterName, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetQueryiv_params(context, isCallValid, targetPacked, pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetQueryiv, std::move(paramBuffer));
}

CallCapture CaptureGetSamplerParameterfv(const Context *context,
                                         bool isCallValid,
                                         GLuint sampler,
                                         GLenum pname,
                                         GLfloat *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
    InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
    CaptureGetSamplerParameterfv_params(context, isCallValid, sampler, pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetSamplerParameterfv, std::move(paramBuffer));
}

CallCapture CaptureGetSamplerParameteriv(const Context *context,
                                         bool isCallValid,
                                         GLuint sampler,
                                         GLenum pname,
                                         GLint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetSamplerParameteriv_params(context, isCallValid, sampler, pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetSamplerParameteriv, std::move(paramBuffer));
}

CallCapture CaptureGetStringi(const Context *context,
                              bool isCallValid,
                              GLenum name,
                              GLuint index,
                              const GLubyte *returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("name", GLenumGroup::StringName, ParamType::TGLenum, name);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLubyteConstPointer);
    InitParamValue(ParamType::TGLubyteConstPointer, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::GetStringi, std::move(paramBuffer));
}

CallCapture CaptureGetSynciv(const Context *context,
                             bool isCallValid,
                             GLsync sync,
                             GLenum pname,
                             GLsizei bufSize,
                             GLsizei *length,
                             GLint *values)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
    paramBuffer.addEnumParam("pname", GLenumGroup::SyncParameterName, ParamType::TGLenum, pname);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetSynciv_length(context, isCallValid, sync, pname, bufSize, length, values,
                            &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture valuesParam("values", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, values, &valuesParam.value);
    CaptureGetSynciv_values(context, isCallValid, sync, pname, bufSize, length, values,
                            &valuesParam);
    paramBuffer.addParam(std::move(valuesParam));

    return CallCapture(gl::EntryPoint::GetSynciv, std::move(paramBuffer));
}

CallCapture CaptureGetTransformFeedbackVarying(const Context *context,
                                               bool isCallValid,
                                               GLuint program,
                                               GLuint index,
                                               GLsizei bufSize,
                                               GLsizei *length,
                                               GLsizei *size,
                                               GLenum *type,
                                               GLchar *name)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);

    ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
    CaptureGetTransformFeedbackVarying_length(context, isCallValid, program, index, bufSize, length,
                                              size, type, name, &lengthParam);
    paramBuffer.addParam(std::move(lengthParam));

    ParamCapture sizeParam("size", ParamType::TGLsizeiPointer);
    InitParamValue(ParamType::TGLsizeiPointer, size, &sizeParam.value);
    CaptureGetTransformFeedbackVarying_size(context, isCallValid, program, index, bufSize, length,
                                            size, type, name, &sizeParam);
    paramBuffer.addParam(std::move(sizeParam));

    ParamCapture typeParam("type", ParamType::TGLenumPointer);
    InitParamValue(ParamType::TGLenumPointer, type, &typeParam.value);
    CaptureGetTransformFeedbackVarying_type(context, isCallValid, program, index, bufSize, length,
                                            size, type, name, &typeParam);
    paramBuffer.addParam(std::move(typeParam));

    ParamCapture nameParam("name", ParamType::TGLcharPointer);
    InitParamValue(ParamType::TGLcharPointer, name, &nameParam.value);
    CaptureGetTransformFeedbackVarying_name(context, isCallValid, program, index, bufSize, length,
                                            size, type, name, &nameParam);
    paramBuffer.addParam(std::move(nameParam));

    return CallCapture(gl::EntryPoint::GetTransformFeedbackVarying, std::move(paramBuffer));
}

CallCapture CaptureGetUniformBlockIndex(const Context *context,
                                        bool isCallValid,
                                        GLuint program,
                                        const GLchar *uniformBlockName,
                                        GLuint returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);

    ParamCapture uniformBlockNameParam("uniformBlockName", ParamType::TGLcharConstPointer);
    InitParamValue(ParamType::TGLcharConstPointer, uniformBlockName, &uniformBlockNameParam.value);
    CaptureGetUniformBlockIndex_uniformBlockName(context, isCallValid, program, uniformBlockName,
                                                 &uniformBlockNameParam);
    paramBuffer.addParam(std::move(uniformBlockNameParam));

    ParamCapture returnValueCapture("returnValue", ParamType::TGLuint);
    InitParamValue(ParamType::TGLuint, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::GetUniformBlockIndex, std::move(paramBuffer));
}

CallCapture CaptureGetUniformIndices(const Context *context,
                                     bool isCallValid,
                                     GLuint program,
                                     GLsizei uniformCount,
                                     const GLchar *const *uniformNames,
                                     GLuint *uniformIndices)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("uniformCount", ParamType::TGLsizei, uniformCount);

    ParamCapture uniformNamesParam("uniformNames", ParamType::TGLcharConstPointerPointer);
    InitParamValue(ParamType::TGLcharConstPointerPointer, uniformNames, &uniformNamesParam.value);
    CaptureGetUniformIndices_uniformNames(context, isCallValid, program, uniformCount, uniformNames,
                                          uniformIndices, &uniformNamesParam);
    paramBuffer.addParam(std::move(uniformNamesParam));

    ParamCapture uniformIndicesParam("uniformIndices", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, uniformIndices, &uniformIndicesParam.value);
    CaptureGetUniformIndices_uniformIndices(context, isCallValid, program, uniformCount,
                                            uniformNames, uniformIndices, &uniformIndicesParam);
    paramBuffer.addParam(std::move(uniformIndicesParam));

    return CallCapture(gl::EntryPoint::GetUniformIndices, std::move(paramBuffer));
}

CallCapture CaptureGetUniformuiv(const Context *context,
                                 bool isCallValid,
                                 GLuint program,
                                 GLint location,
                                 GLuint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("location", ParamType::TGLint, location);

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetUniformuiv_params(context, isCallValid, program, location, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetUniformuiv, std::move(paramBuffer));
}

CallCapture CaptureGetVertexAttribIiv(const Context *context,
                                      bool isCallValid,
                                      GLuint index,
                                      GLenum pname,
                                      GLint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addEnumParam("pname", GLenumGroup::VertexAttribEnum, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLintPointer);
    InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
    CaptureGetVertexAttribIiv_params(context, isCallValid, index, pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetVertexAttribIiv, std::move(paramBuffer));
}

CallCapture CaptureGetVertexAttribIuiv(const Context *context,
                                       bool isCallValid,
                                       GLuint index,
                                       GLenum pname,
                                       GLuint *params)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addEnumParam("pname", GLenumGroup::VertexAttribEnum, ParamType::TGLenum, pname);

    ParamCapture paramsParam("params", ParamType::TGLuintPointer);
    InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
    CaptureGetVertexAttribIuiv_params(context, isCallValid, index, pname, params, &paramsParam);
    paramBuffer.addParam(std::move(paramsParam));

    return CallCapture(gl::EntryPoint::GetVertexAttribIuiv, std::move(paramBuffer));
}

CallCapture CaptureInvalidateFramebuffer(const Context *context,
                                         bool isCallValid,
                                         GLenum target,
                                         GLsizei numAttachments,
                                         const GLenum *attachments)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
    paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);

    ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
    CaptureInvalidateFramebuffer_attachments(context, isCallValid, target, numAttachments,
                                             attachments, &attachmentsParam);
    paramBuffer.addParam(std::move(attachmentsParam));

    return CallCapture(gl::EntryPoint::InvalidateFramebuffer, std::move(paramBuffer));
}

CallCapture CaptureInvalidateSubFramebuffer(const Context *context,
                                            bool isCallValid,
                                            GLenum target,
                                            GLsizei numAttachments,
                                            const GLenum *attachments,
                                            GLint x,
                                            GLint y,
                                            GLsizei width,
                                            GLsizei height)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::DefaultGroup, ParamType::TGLenum, target);
    paramBuffer.addValueParam("numAttachments", ParamType::TGLsizei, numAttachments);

    ParamCapture attachmentsParam("attachments", ParamType::TGLenumConstPointer);
    InitParamValue(ParamType::TGLenumConstPointer, attachments, &attachmentsParam.value);
    CaptureInvalidateSubFramebuffer_attachments(context, isCallValid, target, numAttachments,
                                                attachments, x, y, width, height,
                                                &attachmentsParam);
    paramBuffer.addParam(std::move(attachmentsParam));

    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    return CallCapture(gl::EntryPoint::InvalidateSubFramebuffer, std::move(paramBuffer));
}

CallCapture CaptureIsQuery(const Context *context,
                           bool isCallValid,
                           GLuint id,
                           GLboolean returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("id", ParamType::TGLuint, id);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
    InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::IsQuery, std::move(paramBuffer));
}

CallCapture CaptureIsSampler(const Context *context,
                             bool isCallValid,
                             GLuint sampler,
                             GLboolean returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
    InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::IsSampler, std::move(paramBuffer));
}

CallCapture CaptureIsSync(const Context *context,
                          bool isCallValid,
                          GLsync sync,
                          GLboolean returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
    InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::IsSync, std::move(paramBuffer));
}

CallCapture CaptureIsTransformFeedback(const Context *context,
                                       bool isCallValid,
                                       GLuint id,
                                       GLboolean returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("id", ParamType::TGLuint, id);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
    InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::IsTransformFeedback, std::move(paramBuffer));
}

CallCapture CaptureIsVertexArray(const Context *context,
                                 bool isCallValid,
                                 GLuint array,
                                 GLboolean returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("array", ParamType::TGLuint, array);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
    InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::IsVertexArray, std::move(paramBuffer));
}

CallCapture CaptureMapBufferRange(const Context *context,
                                  bool isCallValid,
                                  BufferBinding targetPacked,
                                  GLintptr offset,
                                  GLsizeiptr length,
                                  GLbitfield access,
                                  void *returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);
    paramBuffer.addValueParam("offset", ParamType::TGLintptr, offset);
    paramBuffer.addValueParam("length", ParamType::TGLsizeiptr, length);
    paramBuffer.addEnumParam("access", GLenumGroup::BufferAccessMask, ParamType::TGLbitfield,
                             access);

    ParamCapture returnValueCapture("returnValue", ParamType::TvoidPointer);
    InitParamValue(ParamType::TvoidPointer, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::MapBufferRange, std::move(paramBuffer));
}

CallCapture CapturePauseTransformFeedback(const Context *context, bool isCallValid)
{
    ParamBuffer paramBuffer;

    return CallCapture(gl::EntryPoint::PauseTransformFeedback, std::move(paramBuffer));
}

CallCapture CaptureProgramBinary(const Context *context,
                                 bool isCallValid,
                                 GLuint program,
                                 GLenum binaryFormat,
                                 const void *binary,
                                 GLsizei length)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addEnumParam("binaryFormat", GLenumGroup::DefaultGroup, ParamType::TGLenum,
                             binaryFormat);

    ParamCapture binaryParam("binary", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, binary, &binaryParam.value);
    CaptureProgramBinary_binary(context, isCallValid, program, binaryFormat, binary, length,
                                &binaryParam);
    paramBuffer.addParam(std::move(binaryParam));

    paramBuffer.addValueParam("length", ParamType::TGLsizei, length);

    return CallCapture(gl::EntryPoint::ProgramBinary, std::move(paramBuffer));
}

CallCapture CaptureProgramParameteri(const Context *context,
                                     bool isCallValid,
                                     GLuint program,
                                     GLenum pname,
                                     GLint value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addEnumParam("pname", GLenumGroup::ProgramParameterPName, ParamType::TGLenum,
                             pname);
    paramBuffer.addValueParam("value", ParamType::TGLint, value);

    return CallCapture(gl::EntryPoint::ProgramParameteri, std::move(paramBuffer));
}

CallCapture CaptureReadBuffer(const Context *context, bool isCallValid, GLenum src)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("src", GLenumGroup::ReadBufferMode, ParamType::TGLenum, src);

    return CallCapture(gl::EntryPoint::ReadBuffer, std::move(paramBuffer));
}

CallCapture CaptureRenderbufferStorageMultisample(const Context *context,
                                                  bool isCallValid,
                                                  GLenum target,
                                                  GLsizei samples,
                                                  GLenum internalformat,
                                                  GLsizei width,
                                                  GLsizei height)
{
    ParamBuffer paramBuffer;

    paramBuffer.addEnumParam("target", GLenumGroup::RenderbufferTarget, ParamType::TGLenum, target);
    paramBuffer.addValueParam("samples", ParamType::TGLsizei, samples);
    paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
                             internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    return CallCapture(gl::EntryPoint::RenderbufferStorageMultisample, std::move(paramBuffer));
}

CallCapture CaptureResumeTransformFeedback(const Context *context, bool isCallValid)
{
    ParamBuffer paramBuffer;

    return CallCapture(gl::EntryPoint::ResumeTransformFeedback, std::move(paramBuffer));
}

CallCapture CaptureSamplerParameterf(const Context *context,
                                     bool isCallValid,
                                     GLuint sampler,
                                     GLenum pname,
                                     GLfloat param)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
    paramBuffer.addValueParam("param", ParamType::TGLfloat, param);

    return CallCapture(gl::EntryPoint::SamplerParameterf, std::move(paramBuffer));
}

CallCapture CaptureSamplerParameterfv(const Context *context,
                                      bool isCallValid,
                                      GLuint sampler,
                                      GLenum pname,
                                      const GLfloat *param)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);

    ParamCapture paramParam("param", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, param, &paramParam.value);
    CaptureSamplerParameterfv_param(context, isCallValid, sampler, pname, param, &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    return CallCapture(gl::EntryPoint::SamplerParameterfv, std::move(paramBuffer));
}

CallCapture CaptureSamplerParameteri(const Context *context,
                                     bool isCallValid,
                                     GLuint sampler,
                                     GLenum pname,
                                     GLint param)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);
    paramBuffer.addValueParam("param", ParamType::TGLint, param);

    return CallCapture(gl::EntryPoint::SamplerParameteri, std::move(paramBuffer));
}

CallCapture CaptureSamplerParameteriv(const Context *context,
                                      bool isCallValid,
                                      GLuint sampler,
                                      GLenum pname,
                                      const GLint *param)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sampler", ParamType::TGLuint, sampler);
    paramBuffer.addEnumParam("pname", GLenumGroup::SamplerParameterName, ParamType::TGLenum, pname);

    ParamCapture paramParam("param", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, param, &paramParam.value);
    CaptureSamplerParameteriv_param(context, isCallValid, sampler, pname, param, &paramParam);
    paramBuffer.addParam(std::move(paramParam));

    return CallCapture(gl::EntryPoint::SamplerParameteriv, std::move(paramBuffer));
}

CallCapture CaptureTexImage3D(const Context *context,
                              bool isCallValid,
                              TextureTarget targetPacked,
                              GLint level,
                              GLint internalformat,
                              GLsizei width,
                              GLsizei height,
                              GLsizei depth,
                              GLint border,
                              GLenum format,
                              GLenum type,
                              const void *pixels)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("internalformat", ParamType::TGLint, internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addValueParam("border", ParamType::TGLint, border);
    paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
    paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexImage3D_pixels(context, isCallValid, targetPacked, level, internalformat, width,
                             height, depth, border, format, type, pixels, &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    return CallCapture(gl::EntryPoint::TexImage3D, std::move(paramBuffer));
}

CallCapture CaptureTexStorage2D(const Context *context,
                                bool isCallValid,
                                TextureType targetPacked,
                                GLsizei levels,
                                GLenum internalformat,
                                GLsizei width,
                                GLsizei height)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
                             internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);

    return CallCapture(gl::EntryPoint::TexStorage2D, std::move(paramBuffer));
}

CallCapture CaptureTexStorage3D(const Context *context,
                                bool isCallValid,
                                TextureType targetPacked,
                                GLsizei levels,
                                GLenum internalformat,
                                GLsizei width,
                                GLsizei height,
                                GLsizei depth)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
    paramBuffer.addValueParam("levels", ParamType::TGLsizei, levels);
    paramBuffer.addEnumParam("internalformat", GLenumGroup::InternalFormat, ParamType::TGLenum,
                             internalformat);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);

    return CallCapture(gl::EntryPoint::TexStorage3D, std::move(paramBuffer));
}

CallCapture CaptureTexSubImage3D(const Context *context,
                                 bool isCallValid,
                                 TextureTarget targetPacked,
                                 GLint level,
                                 GLint xoffset,
                                 GLint yoffset,
                                 GLint zoffset,
                                 GLsizei width,
                                 GLsizei height,
                                 GLsizei depth,
                                 GLenum format,
                                 GLenum type,
                                 const void *pixels)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TTextureTarget, targetPacked);
    paramBuffer.addValueParam("level", ParamType::TGLint, level);
    paramBuffer.addValueParam("xoffset", ParamType::TGLint, xoffset);
    paramBuffer.addValueParam("yoffset", ParamType::TGLint, yoffset);
    paramBuffer.addValueParam("zoffset", ParamType::TGLint, zoffset);
    paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
    paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
    paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
    paramBuffer.addEnumParam("format", GLenumGroup::PixelFormat, ParamType::TGLenum, format);
    paramBuffer.addEnumParam("type", GLenumGroup::PixelType, ParamType::TGLenum, type);

    ParamCapture pixelsParam("pixels", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pixels, &pixelsParam.value);
    CaptureTexSubImage3D_pixels(context, isCallValid, targetPacked, level, xoffset, yoffset,
                                zoffset, width, height, depth, format, type, pixels, &pixelsParam);
    paramBuffer.addParam(std::move(pixelsParam));

    return CallCapture(gl::EntryPoint::TexSubImage3D, std::move(paramBuffer));
}

CallCapture CaptureTransformFeedbackVaryings(const Context *context,
                                             bool isCallValid,
                                             GLuint program,
                                             GLsizei count,
                                             const GLchar *const *varyings,
                                             GLenum bufferMode)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture varyingsParam("varyings", ParamType::TGLcharConstPointerPointer);
    InitParamValue(ParamType::TGLcharConstPointerPointer, varyings, &varyingsParam.value);
    CaptureTransformFeedbackVaryings_varyings(context, isCallValid, program, count, varyings,
                                              bufferMode, &varyingsParam);
    paramBuffer.addParam(std::move(varyingsParam));

    paramBuffer.addEnumParam("bufferMode", GLenumGroup::DefaultGroup, ParamType::TGLenum,
                             bufferMode);

    return CallCapture(gl::EntryPoint::TransformFeedbackVaryings, std::move(paramBuffer));
}

CallCapture CaptureUniform1ui(const Context *context, bool isCallValid, GLint location, GLuint v0)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);

    return CallCapture(gl::EntryPoint::Uniform1ui, std::move(paramBuffer));
}

CallCapture CaptureUniform1uiv(const Context *context,
                               bool isCallValid,
                               GLint location,
                               GLsizei count,
                               const GLuint *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
    CaptureUniform1uiv_value(context, isCallValid, location, count, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::Uniform1uiv, std::move(paramBuffer));
}

CallCapture CaptureUniform2ui(const Context *context,
                              bool isCallValid,
                              GLint location,
                              GLuint v0,
                              GLuint v1)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
    paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);

    return CallCapture(gl::EntryPoint::Uniform2ui, std::move(paramBuffer));
}

CallCapture CaptureUniform2uiv(const Context *context,
                               bool isCallValid,
                               GLint location,
                               GLsizei count,
                               const GLuint *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
    CaptureUniform2uiv_value(context, isCallValid, location, count, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::Uniform2uiv, std::move(paramBuffer));
}

CallCapture CaptureUniform3ui(const Context *context,
                              bool isCallValid,
                              GLint location,
                              GLuint v0,
                              GLuint v1,
                              GLuint v2)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
    paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
    paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);

    return CallCapture(gl::EntryPoint::Uniform3ui, std::move(paramBuffer));
}

CallCapture CaptureUniform3uiv(const Context *context,
                               bool isCallValid,
                               GLint location,
                               GLsizei count,
                               const GLuint *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
    CaptureUniform3uiv_value(context, isCallValid, location, count, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::Uniform3uiv, std::move(paramBuffer));
}

CallCapture CaptureUniform4ui(const Context *context,
                              bool isCallValid,
                              GLint location,
                              GLuint v0,
                              GLuint v1,
                              GLuint v2,
                              GLuint v3)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("v0", ParamType::TGLuint, v0);
    paramBuffer.addValueParam("v1", ParamType::TGLuint, v1);
    paramBuffer.addValueParam("v2", ParamType::TGLuint, v2);
    paramBuffer.addValueParam("v3", ParamType::TGLuint, v3);

    return CallCapture(gl::EntryPoint::Uniform4ui, std::move(paramBuffer));
}

CallCapture CaptureUniform4uiv(const Context *context,
                               bool isCallValid,
                               GLint location,
                               GLsizei count,
                               const GLuint *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);

    ParamCapture valueParam("value", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, value, &valueParam.value);
    CaptureUniform4uiv_value(context, isCallValid, location, count, value, &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::Uniform4uiv, std::move(paramBuffer));
}

CallCapture CaptureUniformBlockBinding(const Context *context,
                                       bool isCallValid,
                                       GLuint program,
                                       GLuint uniformBlockIndex,
                                       GLuint uniformBlockBinding)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("program", ParamType::TGLuint, program);
    paramBuffer.addValueParam("uniformBlockIndex", ParamType::TGLuint, uniformBlockIndex);
    paramBuffer.addValueParam("uniformBlockBinding", ParamType::TGLuint, uniformBlockBinding);

    return CallCapture(gl::EntryPoint::UniformBlockBinding, std::move(paramBuffer));
}

CallCapture CaptureUniformMatrix2x3fv(const Context *context,
                                      bool isCallValid,
                                      GLint location,
                                      GLsizei count,
                                      GLboolean transpose,
                                      const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureUniformMatrix2x3fv_value(context, isCallValid, location, count, transpose, value,
                                    &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::UniformMatrix2x3fv, std::move(paramBuffer));
}

CallCapture CaptureUniformMatrix2x4fv(const Context *context,
                                      bool isCallValid,
                                      GLint location,
                                      GLsizei count,
                                      GLboolean transpose,
                                      const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureUniformMatrix2x4fv_value(context, isCallValid, location, count, transpose, value,
                                    &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::UniformMatrix2x4fv, std::move(paramBuffer));
}

CallCapture CaptureUniformMatrix3x2fv(const Context *context,
                                      bool isCallValid,
                                      GLint location,
                                      GLsizei count,
                                      GLboolean transpose,
                                      const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureUniformMatrix3x2fv_value(context, isCallValid, location, count, transpose, value,
                                    &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::UniformMatrix3x2fv, std::move(paramBuffer));
}

CallCapture CaptureUniformMatrix3x4fv(const Context *context,
                                      bool isCallValid,
                                      GLint location,
                                      GLsizei count,
                                      GLboolean transpose,
                                      const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureUniformMatrix3x4fv_value(context, isCallValid, location, count, transpose, value,
                                    &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::UniformMatrix3x4fv, std::move(paramBuffer));
}

CallCapture CaptureUniformMatrix4x2fv(const Context *context,
                                      bool isCallValid,
                                      GLint location,
                                      GLsizei count,
                                      GLboolean transpose,
                                      const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureUniformMatrix4x2fv_value(context, isCallValid, location, count, transpose, value,
                                    &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::UniformMatrix4x2fv, std::move(paramBuffer));
}

CallCapture CaptureUniformMatrix4x3fv(const Context *context,
                                      bool isCallValid,
                                      GLint location,
                                      GLsizei count,
                                      GLboolean transpose,
                                      const GLfloat *value)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("location", ParamType::TGLint, location);
    paramBuffer.addValueParam("count", ParamType::TGLsizei, count);
    paramBuffer.addValueParam("transpose", ParamType::TGLboolean, transpose);

    ParamCapture valueParam("value", ParamType::TGLfloatConstPointer);
    InitParamValue(ParamType::TGLfloatConstPointer, value, &valueParam.value);
    CaptureUniformMatrix4x3fv_value(context, isCallValid, location, count, transpose, value,
                                    &valueParam);
    paramBuffer.addParam(std::move(valueParam));

    return CallCapture(gl::EntryPoint::UniformMatrix4x3fv, std::move(paramBuffer));
}

CallCapture CaptureUnmapBuffer(const Context *context,
                               bool isCallValid,
                               BufferBinding targetPacked,
                               GLboolean returnValue)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("targetPacked", ParamType::TBufferBinding, targetPacked);

    ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
    InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
    paramBuffer.addReturnValue(std::move(returnValueCapture));

    return CallCapture(gl::EntryPoint::UnmapBuffer, std::move(paramBuffer));
}

CallCapture CaptureVertexAttribDivisor(const Context *context,
                                       bool isCallValid,
                                       GLuint index,
                                       GLuint divisor)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);

    return CallCapture(gl::EntryPoint::VertexAttribDivisor, std::move(paramBuffer));
}

CallCapture CaptureVertexAttribI4i(const Context *context,
                                   bool isCallValid,
                                   GLuint index,
                                   GLint x,
                                   GLint y,
                                   GLint z,
                                   GLint w)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("x", ParamType::TGLint, x);
    paramBuffer.addValueParam("y", ParamType::TGLint, y);
    paramBuffer.addValueParam("z", ParamType::TGLint, z);
    paramBuffer.addValueParam("w", ParamType::TGLint, w);

    return CallCapture(gl::EntryPoint::VertexAttribI4i, std::move(paramBuffer));
}

CallCapture CaptureVertexAttribI4iv(const Context *context,
                                    bool isCallValid,
                                    GLuint index,
                                    const GLint *v)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture vParam("v", ParamType::TGLintConstPointer);
    InitParamValue(ParamType::TGLintConstPointer, v, &vParam.value);
    CaptureVertexAttribI4iv_v(context, isCallValid, index, v, &vParam);
    paramBuffer.addParam(std::move(vParam));

    return CallCapture(gl::EntryPoint::VertexAttribI4iv, std::move(paramBuffer));
}

CallCapture CaptureVertexAttribI4ui(const Context *context,
                                    bool isCallValid,
                                    GLuint index,
                                    GLuint x,
                                    GLuint y,
                                    GLuint z,
                                    GLuint w)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("x", ParamType::TGLuint, x);
    paramBuffer.addValueParam("y", ParamType::TGLuint, y);
    paramBuffer.addValueParam("z", ParamType::TGLuint, z);
    paramBuffer.addValueParam("w", ParamType::TGLuint, w);

    return CallCapture(gl::EntryPoint::VertexAttribI4ui, std::move(paramBuffer));
}

CallCapture CaptureVertexAttribI4uiv(const Context *context,
                                     bool isCallValid,
                                     GLuint index,
                                     const GLuint *v)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);

    ParamCapture vParam("v", ParamType::TGLuintConstPointer);
    InitParamValue(ParamType::TGLuintConstPointer, v, &vParam.value);
    CaptureVertexAttribI4uiv_v(context, isCallValid, index, v, &vParam);
    paramBuffer.addParam(std::move(vParam));

    return CallCapture(gl::EntryPoint::VertexAttribI4uiv, std::move(paramBuffer));
}

CallCapture CaptureVertexAttribIPointer(const Context *context,
                                        bool isCallValid,
                                        GLuint index,
                                        GLint size,
                                        VertexAttribType typePacked,
                                        GLsizei stride,
                                        const void *pointer)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("index", ParamType::TGLuint, index);
    paramBuffer.addValueParam("size", ParamType::TGLint, size);
    paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
    paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);

    ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
    InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
    CaptureVertexAttribIPointer_pointer(context, isCallValid, index, size, typePacked, stride,
                                        pointer, &pointerParam);
    paramBuffer.addParam(std::move(pointerParam));

    return CallCapture(gl::EntryPoint::VertexAttribIPointer, std::move(paramBuffer));
}

CallCapture CaptureWaitSync(const Context *context,
                            bool isCallValid,
                            GLsync sync,
                            GLbitfield flags,
                            GLuint64 timeout)
{
    ParamBuffer paramBuffer;

    paramBuffer.addValueParam("sync", ParamType::TGLsync, sync);
    paramBuffer.addEnumParam("flags", GLenumGroup::DefaultGroup, ParamType::TGLbitfield, flags);
    paramBuffer.addValueParam("timeout", ParamType::TGLuint64, timeout);

    return CallCapture(gl::EntryPoint::WaitSync, std::move(paramBuffer));
}

}  // namespace gl
