| /* |
| * Copyright 2015, The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| * |
| * THIS FILE WAS GENERATED BY apic. DO NOT EDIT. |
| */ |
| |
| #include "gles_imports.h" |
| #include "gles_types.h" |
| #include "spy.h" |
| |
| #include <gapic/get_gfx_proc_address.h> |
| #include <gapic/lock.h> |
| #include <gapic/log.h> |
| #include <gapic/target.h> // STDCALL |
| |
| #include <memory> |
| |
| #include <string.h> |
| |
| using namespace gapii; |
| |
| extern "C" { |
| EXPORT int STDCALL eglInitialize(void* dpy, int* major, int* minor); |
| EXPORT void* STDCALL |
| eglCreateContext(void* display, void* config, void* share_context, int* attrib_list); |
| EXPORT int STDCALL eglMakeCurrent(void* display, void* draw, void* read, void* context); |
| EXPORT int STDCALL eglSwapBuffers(void* display, void* surface); |
| EXPORT int STDCALL eglQuerySurface(void* display, void* surface, int attribute, int* value); |
| EXPORT void* STDCALL glXCreateContext(void* dpy, void* vis, void* shareList, bool direct); |
| EXPORT void* STDCALL |
| glXCreateNewContext(void* display, void* fbconfig, uint32_t type, void* shared, bool direct); |
| EXPORT int STDCALL glXMakeContextCurrent(void* display, void* draw, void* read, void* ctx); |
| EXPORT int STDCALL glXMakeCurrent(void* display, void* drawable, void* ctx); |
| EXPORT void STDCALL glXSwapBuffers(void* display, void* drawable); |
| EXPORT int STDCALL glXQueryDrawable(void* display, void* draw, int attribute, int* value); |
| EXPORT void* STDCALL wglCreateContext(void* hdc); |
| EXPORT void* STDCALL wglCreateContextAttribsARB(void* hdc, void* hShareContext, int* attribList); |
| EXPORT int STDCALL wglMakeCurrent(void* hdc, void* hglrc); |
| EXPORT void STDCALL wglSwapBuffers(void* hdc); |
| EXPORT int STDCALL CGLCreateContext(void* pix, void* share, void** ctx); |
| EXPORT int STDCALL CGLSetCurrentContext(void* ctx); |
| EXPORT int STDCALL CGLGetSurface(void* ctx, void** cid, int32_t* wid, int32_t* sid); |
| EXPORT int STDCALL CGSGetSurfaceBounds(void* cid, int32_t wid, int32_t sid, double* bounds); |
| EXPORT int STDCALL CGLFlushDrawable(void* ctx); |
| EXPORT void STDCALL glEnableClientState(uint32_t type); |
| EXPORT void STDCALL glDisableClientState(uint32_t type); |
| EXPORT void STDCALL glGetProgramBinaryOES(uint32_t program, int32_t buffer_size, |
| int32_t* bytes_written, uint32_t* binary_format, |
| void* binary); |
| EXPORT void STDCALL |
| glProgramBinaryOES(uint32_t program, uint32_t binary_format, void* binary, int32_t binary_size); |
| EXPORT void STDCALL |
| glStartTilingQCOM(int32_t x, int32_t y, int32_t width, int32_t height, uint32_t preserveMask); |
| EXPORT void STDCALL glEndTilingQCOM(uint32_t preserve_mask); |
| EXPORT void STDCALL |
| glDiscardFramebufferEXT(uint32_t target, int32_t numAttachments, uint32_t* attachments); |
| EXPORT void STDCALL glInsertEventMarkerEXT(int32_t length, char* marker); |
| EXPORT void STDCALL glPushGroupMarkerEXT(int32_t length, char* marker); |
| EXPORT void STDCALL glPopGroupMarkerEXT(); |
| EXPORT void STDCALL |
| glTexStorage1DEXT(uint32_t target, int32_t levels, uint32_t format, int32_t width); |
| EXPORT void STDCALL |
| glTexStorage2DEXT(uint32_t target, int32_t levels, uint32_t format, int32_t width, int32_t height); |
| EXPORT void STDCALL glTexStorage3DEXT(uint32_t target, int32_t levels, uint32_t format, |
| int32_t width, int32_t height, int32_t depth); |
| EXPORT void STDCALL glTextureStorage1DEXT(uint32_t texture, uint32_t target, int32_t levels, |
| uint32_t format, int32_t width); |
| EXPORT void STDCALL glTextureStorage2DEXT(uint32_t texture, uint32_t target, int32_t levels, |
| uint32_t format, int32_t width, int32_t height); |
| EXPORT void STDCALL glTextureStorage3DEXT(uint32_t texture, uint32_t target, int32_t levels, |
| uint32_t format, int32_t width, int32_t height, |
| int32_t depth); |
| EXPORT void STDCALL glGenVertexArraysOES(int32_t count, uint32_t* arrays); |
| EXPORT void STDCALL glBindVertexArrayOES(uint32_t array); |
| EXPORT void STDCALL glDeleteVertexArraysOES(int32_t count, uint32_t* arrays); |
| EXPORT bool STDCALL glIsVertexArrayOES(uint32_t array); |
| EXPORT void STDCALL glEGLImageTargetTexture2DOES(uint32_t target, void* image); |
| EXPORT void STDCALL glEGLImageTargetRenderbufferStorageOES(uint32_t target, void* image); |
| EXPORT uint32_t STDCALL glGetGraphicsResetStatusEXT(); |
| EXPORT void STDCALL glBindAttribLocation(uint32_t program, int32_t location, char* name); |
| EXPORT void STDCALL glBlendFunc(uint32_t src_factor, uint32_t dst_factor); |
| EXPORT void STDCALL glBlendFuncSeparate(uint32_t src_factor_rgb, uint32_t dst_factor_rgb, |
| uint32_t src_factor_alpha, uint32_t dst_factor_alpha); |
| EXPORT void STDCALL glBlendEquation(uint32_t equation); |
| EXPORT void STDCALL glBlendEquationSeparate(uint32_t rgb, uint32_t alpha); |
| EXPORT void STDCALL glBlendColor(float red, float green, float blue, float alpha); |
| EXPORT void STDCALL glEnableVertexAttribArray(int32_t location); |
| EXPORT void STDCALL glDisableVertexAttribArray(int32_t location); |
| EXPORT void STDCALL glVertexAttribPointer(int32_t location, int32_t size, uint32_t type, |
| bool normalized, int32_t stride, void* data); |
| EXPORT void STDCALL glGetActiveAttrib(uint32_t program, int32_t location, int32_t buffer_size, |
| int32_t* buffer_bytes_written, int32_t* vector_count, |
| uint32_t* type, char* name); |
| EXPORT void STDCALL glGetActiveUniform(uint32_t program, int32_t location, int32_t buffer_size, |
| int32_t* buffer_bytes_written, int32_t* vector_count, |
| uint32_t* type, char* name); |
| EXPORT uint32_t STDCALL glGetError(); |
| EXPORT void STDCALL glGetProgramiv(uint32_t program, uint32_t parameter, int32_t* value); |
| EXPORT void STDCALL glGetShaderiv(uint32_t shader, uint32_t parameter, int32_t* value); |
| EXPORT int32_t STDCALL glGetUniformLocation(uint32_t program, char* name); |
| EXPORT int32_t STDCALL glGetAttribLocation(uint32_t program, char* name); |
| EXPORT void STDCALL glPixelStorei(uint32_t parameter, int32_t value); |
| EXPORT void STDCALL glTexParameteri(uint32_t target, uint32_t parameter, int32_t value); |
| EXPORT void STDCALL glTexParameterf(uint32_t target, uint32_t parameter, float value); |
| EXPORT void STDCALL glGetTexParameteriv(uint32_t target, uint32_t parameter, int32_t* values); |
| EXPORT void STDCALL glGetTexParameterfv(uint32_t target, uint32_t parameter, float* values); |
| EXPORT void STDCALL glUniform1i(int32_t location, int32_t value); |
| EXPORT void STDCALL glUniform2i(int32_t location, int32_t value0, int32_t value1); |
| EXPORT void STDCALL glUniform3i(int32_t location, int32_t value0, int32_t value1, int32_t value2); |
| EXPORT void STDCALL |
| glUniform4i(int32_t location, int32_t value0, int32_t value1, int32_t value2, int32_t value3); |
| EXPORT void STDCALL glUniform1iv(int32_t location, int32_t count, int32_t* values); |
| EXPORT void STDCALL glUniform2iv(int32_t location, int32_t count, int32_t* values); |
| EXPORT void STDCALL glUniform3iv(int32_t location, int32_t count, int32_t* values); |
| EXPORT void STDCALL glUniform4iv(int32_t location, int32_t count, int32_t* values); |
| EXPORT void STDCALL glUniform1f(int32_t location, float value); |
| EXPORT void STDCALL glUniform2f(int32_t location, float value0, float value1); |
| EXPORT void STDCALL glUniform3f(int32_t location, float value0, float value1, float value2); |
| EXPORT void STDCALL |
| glUniform4f(int32_t location, float value0, float value1, float value2, float value3); |
| EXPORT void STDCALL glUniform1fv(int32_t location, int32_t count, float* values); |
| EXPORT void STDCALL glUniform2fv(int32_t location, int32_t count, float* values); |
| EXPORT void STDCALL glUniform3fv(int32_t location, int32_t count, float* values); |
| EXPORT void STDCALL glUniform4fv(int32_t location, int32_t count, float* values); |
| EXPORT void STDCALL |
| glUniformMatrix2fv(int32_t location, int32_t count, bool transpose, float* values); |
| EXPORT void STDCALL |
| glUniformMatrix3fv(int32_t location, int32_t count, bool transpose, float* values); |
| EXPORT void STDCALL |
| glUniformMatrix4fv(int32_t location, int32_t count, bool transpose, float* values); |
| EXPORT void STDCALL glGetUniformfv(uint32_t program, int32_t location, float* values); |
| EXPORT void STDCALL glGetUniformiv(uint32_t program, int32_t location, int32_t* values); |
| EXPORT void STDCALL glVertexAttrib1f(int32_t location, float value0); |
| EXPORT void STDCALL glVertexAttrib2f(int32_t location, float value0, float value1); |
| EXPORT void STDCALL glVertexAttrib3f(int32_t location, float value0, float value1, float value2); |
| EXPORT void STDCALL |
| glVertexAttrib4f(int32_t location, float value0, float value1, float value2, float value3); |
| EXPORT void STDCALL glVertexAttrib1fv(int32_t location, float* value); |
| EXPORT void STDCALL glVertexAttrib2fv(int32_t location, float* value); |
| EXPORT void STDCALL glVertexAttrib3fv(int32_t location, float* value); |
| EXPORT void STDCALL glVertexAttrib4fv(int32_t location, float* value); |
| EXPORT void STDCALL glGetShaderPrecisionFormat(uint32_t shader_type, uint32_t precision_type, |
| int32_t* range, int32_t* precision); |
| EXPORT void STDCALL glDepthMask(bool enabled); |
| EXPORT void STDCALL glDepthFunc(uint32_t function); |
| EXPORT void STDCALL glDepthRangef(float near, float far); |
| EXPORT void STDCALL glColorMask(bool red, bool green, bool blue, bool alpha); |
| EXPORT void STDCALL glStencilMask(uint32_t mask); |
| EXPORT void STDCALL glStencilMaskSeparate(uint32_t face, uint32_t mask); |
| EXPORT void STDCALL |
| glStencilFuncSeparate(uint32_t face, uint32_t function, int32_t reference_value, int32_t mask); |
| EXPORT void STDCALL glStencilOpSeparate(uint32_t face, uint32_t stencil_fail, |
| uint32_t stencil_pass_depth_fail, |
| uint32_t stencil_pass_depth_pass); |
| EXPORT void STDCALL glFrontFace(uint32_t orientation); |
| EXPORT void STDCALL glViewport(int32_t x, int32_t y, int32_t width, int32_t height); |
| EXPORT void STDCALL glScissor(int32_t x, int32_t y, int32_t width, int32_t height); |
| EXPORT void STDCALL glActiveTexture(uint32_t unit); |
| EXPORT void STDCALL glGenTextures(int32_t count, uint32_t* textures); |
| EXPORT void STDCALL glDeleteTextures(int32_t count, uint32_t* textures); |
| EXPORT bool STDCALL glIsTexture(uint32_t texture); |
| EXPORT void STDCALL glBindTexture(uint32_t target, uint32_t texture); |
| EXPORT void STDCALL glTexImage2D(uint32_t target, int32_t level, uint32_t internal_format, |
| int32_t width, int32_t height, int32_t border, uint32_t format, |
| uint32_t type, void* data); |
| EXPORT void STDCALL glTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, |
| int32_t yoffset, int32_t width, int32_t height, uint32_t format, |
| uint32_t type, void* data); |
| EXPORT void STDCALL glCopyTexImage2D(uint32_t target, int32_t level, uint32_t format, int32_t x, |
| int32_t y, int32_t width, int32_t height, int32_t border); |
| EXPORT void STDCALL glCopyTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, |
| int32_t yoffset, int32_t x, int32_t y, int32_t width, |
| int32_t height); |
| EXPORT void STDCALL glCompressedTexImage2D(uint32_t target, int32_t level, uint32_t format, |
| int32_t width, int32_t height, int32_t border, |
| int32_t image_size, void* data); |
| EXPORT void STDCALL glCompressedTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, |
| int32_t yoffset, int32_t width, int32_t height, |
| uint32_t format, int32_t image_size, void* data); |
| EXPORT void STDCALL glGenerateMipmap(uint32_t target); |
| EXPORT void STDCALL glReadPixels(int32_t x, int32_t y, int32_t width, int32_t height, |
| uint32_t format, uint32_t type, void* data); |
| EXPORT void STDCALL glGenFramebuffers(int32_t count, uint32_t* framebuffers); |
| EXPORT void STDCALL glBindFramebuffer(uint32_t target, uint32_t framebuffer); |
| EXPORT uint32_t STDCALL glCheckFramebufferStatus(uint32_t target); |
| EXPORT void STDCALL glDeleteFramebuffers(int32_t count, uint32_t* framebuffers); |
| EXPORT bool STDCALL glIsFramebuffer(uint32_t framebuffer); |
| EXPORT void STDCALL glGenRenderbuffers(int32_t count, uint32_t* renderbuffers); |
| EXPORT void STDCALL glBindRenderbuffer(uint32_t target, uint32_t renderbuffer); |
| EXPORT void STDCALL |
| glRenderbufferStorage(uint32_t target, uint32_t format, int32_t width, int32_t height); |
| EXPORT void STDCALL glDeleteRenderbuffers(int32_t count, uint32_t* renderbuffers); |
| EXPORT bool STDCALL glIsRenderbuffer(uint32_t renderbuffer); |
| EXPORT void STDCALL |
| glGetRenderbufferParameteriv(uint32_t target, uint32_t parameter, int32_t* values); |
| EXPORT void STDCALL glGenBuffers(int32_t count, uint32_t* buffers); |
| EXPORT void STDCALL glBindBuffer(uint32_t target, uint32_t buffer); |
| EXPORT void STDCALL glBufferData(uint32_t target, int32_t size, void* data, uint32_t usage); |
| EXPORT void STDCALL glBufferSubData(uint32_t target, int32_t offset, int32_t size, void* data); |
| EXPORT void STDCALL glDeleteBuffers(int32_t count, uint32_t* buffers); |
| EXPORT bool STDCALL glIsBuffer(uint32_t buffer); |
| EXPORT void STDCALL glGetBufferParameteriv(uint32_t target, uint32_t parameter, int32_t* value); |
| EXPORT uint32_t STDCALL glCreateShader(uint32_t type); |
| EXPORT void STDCALL glDeleteShader(uint32_t shader); |
| EXPORT void STDCALL glShaderSource(uint32_t shader, int32_t count, char** source, int32_t* length); |
| EXPORT void STDCALL glShaderBinary(int32_t count, uint32_t* shaders, uint32_t binary_format, |
| void* binary, int32_t binary_size); |
| EXPORT void STDCALL glGetShaderInfoLog(uint32_t shader, int32_t buffer_length, |
| int32_t* string_length_written, char* info); |
| EXPORT void STDCALL glGetShaderSource(uint32_t shader, int32_t buffer_length, |
| int32_t* string_length_written, char* source); |
| EXPORT void STDCALL glReleaseShaderCompiler(); |
| EXPORT void STDCALL glCompileShader(uint32_t shader); |
| EXPORT bool STDCALL glIsShader(uint32_t shader); |
| EXPORT uint32_t STDCALL glCreateProgram(); |
| EXPORT void STDCALL glDeleteProgram(uint32_t program); |
| EXPORT void STDCALL glAttachShader(uint32_t program, uint32_t shader); |
| EXPORT void STDCALL glDetachShader(uint32_t program, uint32_t shader); |
| EXPORT void STDCALL glGetAttachedShaders(uint32_t program, int32_t buffer_length, |
| int32_t* shaders_length_written, uint32_t* shaders); |
| EXPORT void STDCALL glLinkProgram(uint32_t program); |
| EXPORT void STDCALL glGetProgramInfoLog(uint32_t program, int32_t buffer_length, |
| int32_t* string_length_written, char* info); |
| EXPORT void STDCALL glUseProgram(uint32_t program); |
| EXPORT bool STDCALL glIsProgram(uint32_t program); |
| EXPORT void STDCALL glValidateProgram(uint32_t program); |
| EXPORT void STDCALL glClearColor(float r, float g, float b, float a); |
| EXPORT void STDCALL glClearDepthf(float depth); |
| EXPORT void STDCALL glClearStencil(int32_t stencil); |
| EXPORT void STDCALL glClear(uint32_t mask); |
| EXPORT void STDCALL glCullFace(uint32_t mode); |
| EXPORT void STDCALL glPolygonOffset(float scale_factor, float units); |
| EXPORT void STDCALL glLineWidth(float width); |
| EXPORT void STDCALL glSampleCoverage(float value, bool invert); |
| EXPORT void STDCALL glHint(uint32_t target, uint32_t mode); |
| EXPORT void STDCALL glFramebufferRenderbuffer(uint32_t framebuffer_target, |
| uint32_t framebuffer_attachment, |
| uint32_t renderbuffer_target, uint32_t renderbuffer); |
| EXPORT void STDCALL glFramebufferTexture2D(uint32_t framebuffer_target, |
| uint32_t framebuffer_attachment, uint32_t texture_target, |
| uint32_t texture, int32_t level); |
| EXPORT void STDCALL glGetFramebufferAttachmentParameteriv(uint32_t framebuffer_target, |
| uint32_t attachment, uint32_t parameter, |
| int32_t* value); |
| EXPORT void STDCALL |
| glDrawElements(uint32_t draw_mode, int32_t element_count, uint32_t indices_type, void* indices); |
| EXPORT void STDCALL glDrawArrays(uint32_t draw_mode, int32_t first_index, int32_t index_count); |
| EXPORT void STDCALL glFlush(); |
| EXPORT void STDCALL glFinish(); |
| EXPORT void STDCALL glGetBooleanv(uint32_t param, bool* values); |
| EXPORT void STDCALL glGetFloatv(uint32_t param, float* values); |
| EXPORT void STDCALL glGetIntegerv(uint32_t param, int32_t* values); |
| EXPORT char* STDCALL glGetString(uint32_t param); |
| EXPORT void STDCALL glEnable(uint32_t capability); |
| EXPORT void STDCALL glDisable(uint32_t capability); |
| EXPORT bool STDCALL glIsEnabled(uint32_t capability); |
| EXPORT uint64_t STDCALL glFenceSync(uint32_t condition, uint32_t syncFlags); |
| EXPORT void STDCALL glDeleteSync(uint64_t sync); |
| EXPORT void STDCALL glWaitSync(uint64_t sync, uint32_t syncFlags, uint64_t timeout); |
| EXPORT uint32_t STDCALL glClientWaitSync(uint64_t sync, uint32_t syncFlags, uint64_t timeout); |
| EXPORT void* STDCALL |
| glMapBufferRange(uint32_t target, int32_t offset, int32_t length, uint32_t access); |
| EXPORT void STDCALL glUnmapBuffer(uint32_t target); |
| EXPORT void STDCALL glInvalidateFramebuffer(uint32_t target, int32_t count, uint32_t* attachments); |
| EXPORT void STDCALL glRenderbufferStorageMultisample(uint32_t target, int32_t samples, |
| uint32_t format, int32_t width, |
| int32_t height); |
| EXPORT void STDCALL glBlitFramebuffer(int32_t srcX0, int32_t srcY0, int32_t srcX1, int32_t srcY1, |
| int32_t dstX0, int32_t dstY0, int32_t dstX1, int32_t dstY1, |
| uint32_t mask, uint32_t filter); |
| EXPORT void STDCALL glGenQueries(int32_t count, uint32_t* queries); |
| EXPORT void STDCALL glBeginQuery(uint32_t target, uint32_t query); |
| EXPORT void STDCALL glEndQuery(uint32_t target); |
| EXPORT void STDCALL glDeleteQueries(int32_t count, uint32_t* queries); |
| EXPORT bool STDCALL glIsQuery(uint32_t query); |
| EXPORT void STDCALL glGetQueryiv(uint32_t target, uint32_t parameter, int32_t* value); |
| EXPORT void STDCALL glGetQueryObjectuiv(uint32_t query, uint32_t parameter, uint32_t* value); |
| EXPORT void STDCALL glGetActiveUniformBlockName(uint32_t program, uint32_t uniform_block_index, |
| int32_t buffer_size, int32_t* buffer_bytes_written, |
| char* name); |
| EXPORT void STDCALL glGetActiveUniformBlockiv(uint32_t program, uint32_t uniform_block_index, |
| uint32_t parameter_name, int32_t* parameters); |
| EXPORT void STDCALL glUniformBlockBinding(uint32_t program, uint32_t uniform_block_index, |
| uint32_t uniform_block_binding); |
| EXPORT void STDCALL glGetActiveUniformsiv(uint32_t program, uint32_t uniform_count, |
| uint32_t* uniform_indices, uint32_t parameter_name, |
| int32_t* parameters); |
| EXPORT void STDCALL glBindBufferBase(uint32_t target, uint32_t index, uint32_t buffer); |
| EXPORT void STDCALL glGenVertexArrays(int32_t count, uint32_t* arrays); |
| EXPORT void STDCALL glBindVertexArray(uint32_t array); |
| EXPORT void STDCALL glDeleteVertexArrays(uint32_t count, uint32_t* arrays); |
| EXPORT void STDCALL glGetQueryObjecti64v(uint32_t query, uint32_t parameter, int64_t* value); |
| EXPORT void STDCALL glGetQueryObjectui64v(uint32_t query, uint32_t parameter, uint64_t* value); |
| EXPORT void STDCALL glGenQueriesEXT(int32_t count, uint32_t* queries); |
| EXPORT void STDCALL glBeginQueryEXT(uint32_t target, uint32_t query); |
| EXPORT void STDCALL glEndQueryEXT(uint32_t target); |
| EXPORT void STDCALL glDeleteQueriesEXT(int32_t count, uint32_t* queries); |
| EXPORT bool STDCALL glIsQueryEXT(uint32_t query); |
| EXPORT void STDCALL glQueryCounterEXT(uint32_t query, uint32_t target); |
| EXPORT void STDCALL glGetQueryivEXT(uint32_t target, uint32_t parameter, int32_t* value); |
| EXPORT void STDCALL glGetQueryObjectivEXT(uint32_t query, uint32_t parameter, int32_t* value); |
| EXPORT void STDCALL glGetQueryObjectuivEXT(uint32_t query, uint32_t parameter, uint32_t* value); |
| EXPORT void STDCALL glGetQueryObjecti64vEXT(uint32_t query, uint32_t parameter, int64_t* value); |
| EXPORT void STDCALL glGetQueryObjectui64vEXT(uint32_t query, uint32_t parameter, uint64_t* value); |
| |
| EXPORT void* STDCALL eglGetProcAddress(const char* name); |
| EXPORT void* STDCALL wglGetProcAddress(const char* name); |
| EXPORT void* STDCALL glXGetProcAddress(const char* name); |
| EXPORT void* STDCALL glXGetProcAddressARB(const char* name); |
| } // extern "C" |
| |
| namespace { |
| |
| gapic::Mutex gMutex; // Guards gSpy. |
| std::unique_ptr<Spy> gSpy; // Must be accessed via spy() below, gets destroyed with the library. |
| |
| // spy lazily constructs and returns the instance to the spy. |
| Spy* spy() { |
| gapic::Lock<gapic::Mutex> lock(&gMutex); |
| if (!gSpy) { |
| GAPID_INFO("Constructing spy...\n"); |
| gSpy.reset(new Spy()); |
| GAPID_INFO("Registering spy symbols...\n"); |
| gSpy->RegisterSymbol("eglInitialize", reinterpret_cast<void*>(eglInitialize)); |
| gSpy->RegisterSymbol("eglCreateContext", reinterpret_cast<void*>(eglCreateContext)); |
| gSpy->RegisterSymbol("eglMakeCurrent", reinterpret_cast<void*>(eglMakeCurrent)); |
| gSpy->RegisterSymbol("eglSwapBuffers", reinterpret_cast<void*>(eglSwapBuffers)); |
| gSpy->RegisterSymbol("eglQuerySurface", reinterpret_cast<void*>(eglQuerySurface)); |
| gSpy->RegisterSymbol("glXCreateContext", reinterpret_cast<void*>(glXCreateContext)); |
| gSpy->RegisterSymbol("glXCreateNewContext", reinterpret_cast<void*>(glXCreateNewContext)); |
| gSpy->RegisterSymbol("glXMakeContextCurrent", |
| reinterpret_cast<void*>(glXMakeContextCurrent)); |
| gSpy->RegisterSymbol("glXMakeCurrent", reinterpret_cast<void*>(glXMakeCurrent)); |
| gSpy->RegisterSymbol("glXSwapBuffers", reinterpret_cast<void*>(glXSwapBuffers)); |
| gSpy->RegisterSymbol("glXQueryDrawable", reinterpret_cast<void*>(glXQueryDrawable)); |
| gSpy->RegisterSymbol("wglCreateContext", reinterpret_cast<void*>(wglCreateContext)); |
| gSpy->RegisterSymbol("wglCreateContextAttribsARB", |
| reinterpret_cast<void*>(wglCreateContextAttribsARB)); |
| gSpy->RegisterSymbol("wglMakeCurrent", reinterpret_cast<void*>(wglMakeCurrent)); |
| gSpy->RegisterSymbol("wglSwapBuffers", reinterpret_cast<void*>(wglSwapBuffers)); |
| gSpy->RegisterSymbol("CGLCreateContext", reinterpret_cast<void*>(CGLCreateContext)); |
| gSpy->RegisterSymbol("CGLSetCurrentContext", reinterpret_cast<void*>(CGLSetCurrentContext)); |
| gSpy->RegisterSymbol("CGLGetSurface", reinterpret_cast<void*>(CGLGetSurface)); |
| gSpy->RegisterSymbol("CGSGetSurfaceBounds", reinterpret_cast<void*>(CGSGetSurfaceBounds)); |
| gSpy->RegisterSymbol("CGLFlushDrawable", reinterpret_cast<void*>(CGLFlushDrawable)); |
| gSpy->RegisterSymbol("glEnableClientState", reinterpret_cast<void*>(glEnableClientState)); |
| gSpy->RegisterSymbol("glDisableClientState", reinterpret_cast<void*>(glDisableClientState)); |
| gSpy->RegisterSymbol("glGetProgramBinaryOES", |
| reinterpret_cast<void*>(glGetProgramBinaryOES)); |
| gSpy->RegisterSymbol("glProgramBinaryOES", reinterpret_cast<void*>(glProgramBinaryOES)); |
| gSpy->RegisterSymbol("glStartTilingQCOM", reinterpret_cast<void*>(glStartTilingQCOM)); |
| gSpy->RegisterSymbol("glEndTilingQCOM", reinterpret_cast<void*>(glEndTilingQCOM)); |
| gSpy->RegisterSymbol("glDiscardFramebufferEXT", |
| reinterpret_cast<void*>(glDiscardFramebufferEXT)); |
| gSpy->RegisterSymbol("glInsertEventMarkerEXT", |
| reinterpret_cast<void*>(glInsertEventMarkerEXT)); |
| gSpy->RegisterSymbol("glPushGroupMarkerEXT", reinterpret_cast<void*>(glPushGroupMarkerEXT)); |
| gSpy->RegisterSymbol("glPopGroupMarkerEXT", reinterpret_cast<void*>(glPopGroupMarkerEXT)); |
| gSpy->RegisterSymbol("glTexStorage1DEXT", reinterpret_cast<void*>(glTexStorage1DEXT)); |
| gSpy->RegisterSymbol("glTexStorage2DEXT", reinterpret_cast<void*>(glTexStorage2DEXT)); |
| gSpy->RegisterSymbol("glTexStorage3DEXT", reinterpret_cast<void*>(glTexStorage3DEXT)); |
| gSpy->RegisterSymbol("glTextureStorage1DEXT", |
| reinterpret_cast<void*>(glTextureStorage1DEXT)); |
| gSpy->RegisterSymbol("glTextureStorage2DEXT", |
| reinterpret_cast<void*>(glTextureStorage2DEXT)); |
| gSpy->RegisterSymbol("glTextureStorage3DEXT", |
| reinterpret_cast<void*>(glTextureStorage3DEXT)); |
| gSpy->RegisterSymbol("glGenVertexArraysOES", reinterpret_cast<void*>(glGenVertexArraysOES)); |
| gSpy->RegisterSymbol("glBindVertexArrayOES", reinterpret_cast<void*>(glBindVertexArrayOES)); |
| gSpy->RegisterSymbol("glDeleteVertexArraysOES", |
| reinterpret_cast<void*>(glDeleteVertexArraysOES)); |
| gSpy->RegisterSymbol("glIsVertexArrayOES", reinterpret_cast<void*>(glIsVertexArrayOES)); |
| gSpy->RegisterSymbol("glEGLImageTargetTexture2DOES", |
| reinterpret_cast<void*>(glEGLImageTargetTexture2DOES)); |
| gSpy->RegisterSymbol("glEGLImageTargetRenderbufferStorageOES", |
| reinterpret_cast<void*>(glEGLImageTargetRenderbufferStorageOES)); |
| gSpy->RegisterSymbol("glGetGraphicsResetStatusEXT", |
| reinterpret_cast<void*>(glGetGraphicsResetStatusEXT)); |
| gSpy->RegisterSymbol("glBindAttribLocation", reinterpret_cast<void*>(glBindAttribLocation)); |
| gSpy->RegisterSymbol("glBlendFunc", reinterpret_cast<void*>(glBlendFunc)); |
| gSpy->RegisterSymbol("glBlendFuncSeparate", reinterpret_cast<void*>(glBlendFuncSeparate)); |
| gSpy->RegisterSymbol("glBlendEquation", reinterpret_cast<void*>(glBlendEquation)); |
| gSpy->RegisterSymbol("glBlendEquationSeparate", |
| reinterpret_cast<void*>(glBlendEquationSeparate)); |
| gSpy->RegisterSymbol("glBlendColor", reinterpret_cast<void*>(glBlendColor)); |
| gSpy->RegisterSymbol("glEnableVertexAttribArray", |
| reinterpret_cast<void*>(glEnableVertexAttribArray)); |
| gSpy->RegisterSymbol("glDisableVertexAttribArray", |
| reinterpret_cast<void*>(glDisableVertexAttribArray)); |
| gSpy->RegisterSymbol("glVertexAttribPointer", |
| reinterpret_cast<void*>(glVertexAttribPointer)); |
| gSpy->RegisterSymbol("glGetActiveAttrib", reinterpret_cast<void*>(glGetActiveAttrib)); |
| gSpy->RegisterSymbol("glGetActiveUniform", reinterpret_cast<void*>(glGetActiveUniform)); |
| gSpy->RegisterSymbol("glGetError", reinterpret_cast<void*>(glGetError)); |
| gSpy->RegisterSymbol("glGetProgramiv", reinterpret_cast<void*>(glGetProgramiv)); |
| gSpy->RegisterSymbol("glGetShaderiv", reinterpret_cast<void*>(glGetShaderiv)); |
| gSpy->RegisterSymbol("glGetUniformLocation", reinterpret_cast<void*>(glGetUniformLocation)); |
| gSpy->RegisterSymbol("glGetAttribLocation", reinterpret_cast<void*>(glGetAttribLocation)); |
| gSpy->RegisterSymbol("glPixelStorei", reinterpret_cast<void*>(glPixelStorei)); |
| gSpy->RegisterSymbol("glTexParameteri", reinterpret_cast<void*>(glTexParameteri)); |
| gSpy->RegisterSymbol("glTexParameterf", reinterpret_cast<void*>(glTexParameterf)); |
| gSpy->RegisterSymbol("glGetTexParameteriv", reinterpret_cast<void*>(glGetTexParameteriv)); |
| gSpy->RegisterSymbol("glGetTexParameterfv", reinterpret_cast<void*>(glGetTexParameterfv)); |
| gSpy->RegisterSymbol("glUniform1i", reinterpret_cast<void*>(glUniform1i)); |
| gSpy->RegisterSymbol("glUniform2i", reinterpret_cast<void*>(glUniform2i)); |
| gSpy->RegisterSymbol("glUniform3i", reinterpret_cast<void*>(glUniform3i)); |
| gSpy->RegisterSymbol("glUniform4i", reinterpret_cast<void*>(glUniform4i)); |
| gSpy->RegisterSymbol("glUniform1iv", reinterpret_cast<void*>(glUniform1iv)); |
| gSpy->RegisterSymbol("glUniform2iv", reinterpret_cast<void*>(glUniform2iv)); |
| gSpy->RegisterSymbol("glUniform3iv", reinterpret_cast<void*>(glUniform3iv)); |
| gSpy->RegisterSymbol("glUniform4iv", reinterpret_cast<void*>(glUniform4iv)); |
| gSpy->RegisterSymbol("glUniform1f", reinterpret_cast<void*>(glUniform1f)); |
| gSpy->RegisterSymbol("glUniform2f", reinterpret_cast<void*>(glUniform2f)); |
| gSpy->RegisterSymbol("glUniform3f", reinterpret_cast<void*>(glUniform3f)); |
| gSpy->RegisterSymbol("glUniform4f", reinterpret_cast<void*>(glUniform4f)); |
| gSpy->RegisterSymbol("glUniform1fv", reinterpret_cast<void*>(glUniform1fv)); |
| gSpy->RegisterSymbol("glUniform2fv", reinterpret_cast<void*>(glUniform2fv)); |
| gSpy->RegisterSymbol("glUniform3fv", reinterpret_cast<void*>(glUniform3fv)); |
| gSpy->RegisterSymbol("glUniform4fv", reinterpret_cast<void*>(glUniform4fv)); |
| gSpy->RegisterSymbol("glUniformMatrix2fv", reinterpret_cast<void*>(glUniformMatrix2fv)); |
| gSpy->RegisterSymbol("glUniformMatrix3fv", reinterpret_cast<void*>(glUniformMatrix3fv)); |
| gSpy->RegisterSymbol("glUniformMatrix4fv", reinterpret_cast<void*>(glUniformMatrix4fv)); |
| gSpy->RegisterSymbol("glGetUniformfv", reinterpret_cast<void*>(glGetUniformfv)); |
| gSpy->RegisterSymbol("glGetUniformiv", reinterpret_cast<void*>(glGetUniformiv)); |
| gSpy->RegisterSymbol("glVertexAttrib1f", reinterpret_cast<void*>(glVertexAttrib1f)); |
| gSpy->RegisterSymbol("glVertexAttrib2f", reinterpret_cast<void*>(glVertexAttrib2f)); |
| gSpy->RegisterSymbol("glVertexAttrib3f", reinterpret_cast<void*>(glVertexAttrib3f)); |
| gSpy->RegisterSymbol("glVertexAttrib4f", reinterpret_cast<void*>(glVertexAttrib4f)); |
| gSpy->RegisterSymbol("glVertexAttrib1fv", reinterpret_cast<void*>(glVertexAttrib1fv)); |
| gSpy->RegisterSymbol("glVertexAttrib2fv", reinterpret_cast<void*>(glVertexAttrib2fv)); |
| gSpy->RegisterSymbol("glVertexAttrib3fv", reinterpret_cast<void*>(glVertexAttrib3fv)); |
| gSpy->RegisterSymbol("glVertexAttrib4fv", reinterpret_cast<void*>(glVertexAttrib4fv)); |
| gSpy->RegisterSymbol("glGetShaderPrecisionFormat", |
| reinterpret_cast<void*>(glGetShaderPrecisionFormat)); |
| gSpy->RegisterSymbol("glDepthMask", reinterpret_cast<void*>(glDepthMask)); |
| gSpy->RegisterSymbol("glDepthFunc", reinterpret_cast<void*>(glDepthFunc)); |
| gSpy->RegisterSymbol("glDepthRangef", reinterpret_cast<void*>(glDepthRangef)); |
| gSpy->RegisterSymbol("glColorMask", reinterpret_cast<void*>(glColorMask)); |
| gSpy->RegisterSymbol("glStencilMask", reinterpret_cast<void*>(glStencilMask)); |
| gSpy->RegisterSymbol("glStencilMaskSeparate", |
| reinterpret_cast<void*>(glStencilMaskSeparate)); |
| gSpy->RegisterSymbol("glStencilFuncSeparate", |
| reinterpret_cast<void*>(glStencilFuncSeparate)); |
| gSpy->RegisterSymbol("glStencilOpSeparate", reinterpret_cast<void*>(glStencilOpSeparate)); |
| gSpy->RegisterSymbol("glFrontFace", reinterpret_cast<void*>(glFrontFace)); |
| gSpy->RegisterSymbol("glViewport", reinterpret_cast<void*>(glViewport)); |
| gSpy->RegisterSymbol("glScissor", reinterpret_cast<void*>(glScissor)); |
| gSpy->RegisterSymbol("glActiveTexture", reinterpret_cast<void*>(glActiveTexture)); |
| gSpy->RegisterSymbol("glGenTextures", reinterpret_cast<void*>(glGenTextures)); |
| gSpy->RegisterSymbol("glDeleteTextures", reinterpret_cast<void*>(glDeleteTextures)); |
| gSpy->RegisterSymbol("glIsTexture", reinterpret_cast<void*>(glIsTexture)); |
| gSpy->RegisterSymbol("glBindTexture", reinterpret_cast<void*>(glBindTexture)); |
| gSpy->RegisterSymbol("glTexImage2D", reinterpret_cast<void*>(glTexImage2D)); |
| gSpy->RegisterSymbol("glTexSubImage2D", reinterpret_cast<void*>(glTexSubImage2D)); |
| gSpy->RegisterSymbol("glCopyTexImage2D", reinterpret_cast<void*>(glCopyTexImage2D)); |
| gSpy->RegisterSymbol("glCopyTexSubImage2D", reinterpret_cast<void*>(glCopyTexSubImage2D)); |
| gSpy->RegisterSymbol("glCompressedTexImage2D", |
| reinterpret_cast<void*>(glCompressedTexImage2D)); |
| gSpy->RegisterSymbol("glCompressedTexSubImage2D", |
| reinterpret_cast<void*>(glCompressedTexSubImage2D)); |
| gSpy->RegisterSymbol("glGenerateMipmap", reinterpret_cast<void*>(glGenerateMipmap)); |
| gSpy->RegisterSymbol("glReadPixels", reinterpret_cast<void*>(glReadPixels)); |
| gSpy->RegisterSymbol("glGenFramebuffers", reinterpret_cast<void*>(glGenFramebuffers)); |
| gSpy->RegisterSymbol("glBindFramebuffer", reinterpret_cast<void*>(glBindFramebuffer)); |
| gSpy->RegisterSymbol("glCheckFramebufferStatus", |
| reinterpret_cast<void*>(glCheckFramebufferStatus)); |
| gSpy->RegisterSymbol("glDeleteFramebuffers", reinterpret_cast<void*>(glDeleteFramebuffers)); |
| gSpy->RegisterSymbol("glIsFramebuffer", reinterpret_cast<void*>(glIsFramebuffer)); |
| gSpy->RegisterSymbol("glGenRenderbuffers", reinterpret_cast<void*>(glGenRenderbuffers)); |
| gSpy->RegisterSymbol("glBindRenderbuffer", reinterpret_cast<void*>(glBindRenderbuffer)); |
| gSpy->RegisterSymbol("glRenderbufferStorage", |
| reinterpret_cast<void*>(glRenderbufferStorage)); |
| gSpy->RegisterSymbol("glDeleteRenderbuffers", |
| reinterpret_cast<void*>(glDeleteRenderbuffers)); |
| gSpy->RegisterSymbol("glIsRenderbuffer", reinterpret_cast<void*>(glIsRenderbuffer)); |
| gSpy->RegisterSymbol("glGetRenderbufferParameteriv", |
| reinterpret_cast<void*>(glGetRenderbufferParameteriv)); |
| gSpy->RegisterSymbol("glGenBuffers", reinterpret_cast<void*>(glGenBuffers)); |
| gSpy->RegisterSymbol("glBindBuffer", reinterpret_cast<void*>(glBindBuffer)); |
| gSpy->RegisterSymbol("glBufferData", reinterpret_cast<void*>(glBufferData)); |
| gSpy->RegisterSymbol("glBufferSubData", reinterpret_cast<void*>(glBufferSubData)); |
| gSpy->RegisterSymbol("glDeleteBuffers", reinterpret_cast<void*>(glDeleteBuffers)); |
| gSpy->RegisterSymbol("glIsBuffer", reinterpret_cast<void*>(glIsBuffer)); |
| gSpy->RegisterSymbol("glGetBufferParameteriv", |
| reinterpret_cast<void*>(glGetBufferParameteriv)); |
| gSpy->RegisterSymbol("glCreateShader", reinterpret_cast<void*>(glCreateShader)); |
| gSpy->RegisterSymbol("glDeleteShader", reinterpret_cast<void*>(glDeleteShader)); |
| gSpy->RegisterSymbol("glShaderSource", reinterpret_cast<void*>(glShaderSource)); |
| gSpy->RegisterSymbol("glShaderBinary", reinterpret_cast<void*>(glShaderBinary)); |
| gSpy->RegisterSymbol("glGetShaderInfoLog", reinterpret_cast<void*>(glGetShaderInfoLog)); |
| gSpy->RegisterSymbol("glGetShaderSource", reinterpret_cast<void*>(glGetShaderSource)); |
| gSpy->RegisterSymbol("glReleaseShaderCompiler", |
| reinterpret_cast<void*>(glReleaseShaderCompiler)); |
| gSpy->RegisterSymbol("glCompileShader", reinterpret_cast<void*>(glCompileShader)); |
| gSpy->RegisterSymbol("glIsShader", reinterpret_cast<void*>(glIsShader)); |
| gSpy->RegisterSymbol("glCreateProgram", reinterpret_cast<void*>(glCreateProgram)); |
| gSpy->RegisterSymbol("glDeleteProgram", reinterpret_cast<void*>(glDeleteProgram)); |
| gSpy->RegisterSymbol("glAttachShader", reinterpret_cast<void*>(glAttachShader)); |
| gSpy->RegisterSymbol("glDetachShader", reinterpret_cast<void*>(glDetachShader)); |
| gSpy->RegisterSymbol("glGetAttachedShaders", reinterpret_cast<void*>(glGetAttachedShaders)); |
| gSpy->RegisterSymbol("glLinkProgram", reinterpret_cast<void*>(glLinkProgram)); |
| gSpy->RegisterSymbol("glGetProgramInfoLog", reinterpret_cast<void*>(glGetProgramInfoLog)); |
| gSpy->RegisterSymbol("glUseProgram", reinterpret_cast<void*>(glUseProgram)); |
| gSpy->RegisterSymbol("glIsProgram", reinterpret_cast<void*>(glIsProgram)); |
| gSpy->RegisterSymbol("glValidateProgram", reinterpret_cast<void*>(glValidateProgram)); |
| gSpy->RegisterSymbol("glClearColor", reinterpret_cast<void*>(glClearColor)); |
| gSpy->RegisterSymbol("glClearDepthf", reinterpret_cast<void*>(glClearDepthf)); |
| gSpy->RegisterSymbol("glClearStencil", reinterpret_cast<void*>(glClearStencil)); |
| gSpy->RegisterSymbol("glClear", reinterpret_cast<void*>(glClear)); |
| gSpy->RegisterSymbol("glCullFace", reinterpret_cast<void*>(glCullFace)); |
| gSpy->RegisterSymbol("glPolygonOffset", reinterpret_cast<void*>(glPolygonOffset)); |
| gSpy->RegisterSymbol("glLineWidth", reinterpret_cast<void*>(glLineWidth)); |
| gSpy->RegisterSymbol("glSampleCoverage", reinterpret_cast<void*>(glSampleCoverage)); |
| gSpy->RegisterSymbol("glHint", reinterpret_cast<void*>(glHint)); |
| gSpy->RegisterSymbol("glFramebufferRenderbuffer", |
| reinterpret_cast<void*>(glFramebufferRenderbuffer)); |
| gSpy->RegisterSymbol("glFramebufferTexture2D", |
| reinterpret_cast<void*>(glFramebufferTexture2D)); |
| gSpy->RegisterSymbol("glGetFramebufferAttachmentParameteriv", |
| reinterpret_cast<void*>(glGetFramebufferAttachmentParameteriv)); |
| gSpy->RegisterSymbol("glDrawElements", reinterpret_cast<void*>(glDrawElements)); |
| gSpy->RegisterSymbol("glDrawArrays", reinterpret_cast<void*>(glDrawArrays)); |
| gSpy->RegisterSymbol("glFlush", reinterpret_cast<void*>(glFlush)); |
| gSpy->RegisterSymbol("glFinish", reinterpret_cast<void*>(glFinish)); |
| gSpy->RegisterSymbol("glGetBooleanv", reinterpret_cast<void*>(glGetBooleanv)); |
| gSpy->RegisterSymbol("glGetFloatv", reinterpret_cast<void*>(glGetFloatv)); |
| gSpy->RegisterSymbol("glGetIntegerv", reinterpret_cast<void*>(glGetIntegerv)); |
| gSpy->RegisterSymbol("glGetString", reinterpret_cast<void*>(glGetString)); |
| gSpy->RegisterSymbol("glEnable", reinterpret_cast<void*>(glEnable)); |
| gSpy->RegisterSymbol("glDisable", reinterpret_cast<void*>(glDisable)); |
| gSpy->RegisterSymbol("glIsEnabled", reinterpret_cast<void*>(glIsEnabled)); |
| gSpy->RegisterSymbol("glFenceSync", reinterpret_cast<void*>(glFenceSync)); |
| gSpy->RegisterSymbol("glDeleteSync", reinterpret_cast<void*>(glDeleteSync)); |
| gSpy->RegisterSymbol("glWaitSync", reinterpret_cast<void*>(glWaitSync)); |
| gSpy->RegisterSymbol("glClientWaitSync", reinterpret_cast<void*>(glClientWaitSync)); |
| gSpy->RegisterSymbol("glMapBufferRange", reinterpret_cast<void*>(glMapBufferRange)); |
| gSpy->RegisterSymbol("glUnmapBuffer", reinterpret_cast<void*>(glUnmapBuffer)); |
| gSpy->RegisterSymbol("glInvalidateFramebuffer", |
| reinterpret_cast<void*>(glInvalidateFramebuffer)); |
| gSpy->RegisterSymbol("glRenderbufferStorageMultisample", |
| reinterpret_cast<void*>(glRenderbufferStorageMultisample)); |
| gSpy->RegisterSymbol("glBlitFramebuffer", reinterpret_cast<void*>(glBlitFramebuffer)); |
| gSpy->RegisterSymbol("glGenQueries", reinterpret_cast<void*>(glGenQueries)); |
| gSpy->RegisterSymbol("glBeginQuery", reinterpret_cast<void*>(glBeginQuery)); |
| gSpy->RegisterSymbol("glEndQuery", reinterpret_cast<void*>(glEndQuery)); |
| gSpy->RegisterSymbol("glDeleteQueries", reinterpret_cast<void*>(glDeleteQueries)); |
| gSpy->RegisterSymbol("glIsQuery", reinterpret_cast<void*>(glIsQuery)); |
| gSpy->RegisterSymbol("glGetQueryiv", reinterpret_cast<void*>(glGetQueryiv)); |
| gSpy->RegisterSymbol("glGetQueryObjectuiv", reinterpret_cast<void*>(glGetQueryObjectuiv)); |
| gSpy->RegisterSymbol("glGetActiveUniformBlockName", |
| reinterpret_cast<void*>(glGetActiveUniformBlockName)); |
| gSpy->RegisterSymbol("glGetActiveUniformBlockiv", |
| reinterpret_cast<void*>(glGetActiveUniformBlockiv)); |
| gSpy->RegisterSymbol("glUniformBlockBinding", |
| reinterpret_cast<void*>(glUniformBlockBinding)); |
| gSpy->RegisterSymbol("glGetActiveUniformsiv", |
| reinterpret_cast<void*>(glGetActiveUniformsiv)); |
| gSpy->RegisterSymbol("glBindBufferBase", reinterpret_cast<void*>(glBindBufferBase)); |
| gSpy->RegisterSymbol("glGenVertexArrays", reinterpret_cast<void*>(glGenVertexArrays)); |
| gSpy->RegisterSymbol("glBindVertexArray", reinterpret_cast<void*>(glBindVertexArray)); |
| gSpy->RegisterSymbol("glDeleteVertexArrays", reinterpret_cast<void*>(glDeleteVertexArrays)); |
| gSpy->RegisterSymbol("glGetQueryObjecti64v", reinterpret_cast<void*>(glGetQueryObjecti64v)); |
| gSpy->RegisterSymbol("glGetQueryObjectui64v", |
| reinterpret_cast<void*>(glGetQueryObjectui64v)); |
| gSpy->RegisterSymbol("glGenQueriesEXT", reinterpret_cast<void*>(glGenQueriesEXT)); |
| gSpy->RegisterSymbol("glBeginQueryEXT", reinterpret_cast<void*>(glBeginQueryEXT)); |
| gSpy->RegisterSymbol("glEndQueryEXT", reinterpret_cast<void*>(glEndQueryEXT)); |
| gSpy->RegisterSymbol("glDeleteQueriesEXT", reinterpret_cast<void*>(glDeleteQueriesEXT)); |
| gSpy->RegisterSymbol("glIsQueryEXT", reinterpret_cast<void*>(glIsQueryEXT)); |
| gSpy->RegisterSymbol("glQueryCounterEXT", reinterpret_cast<void*>(glQueryCounterEXT)); |
| gSpy->RegisterSymbol("glGetQueryivEXT", reinterpret_cast<void*>(glGetQueryivEXT)); |
| gSpy->RegisterSymbol("glGetQueryObjectivEXT", |
| reinterpret_cast<void*>(glGetQueryObjectivEXT)); |
| gSpy->RegisterSymbol("glGetQueryObjectuivEXT", |
| reinterpret_cast<void*>(glGetQueryObjectuivEXT)); |
| gSpy->RegisterSymbol("glGetQueryObjecti64vEXT", |
| reinterpret_cast<void*>(glGetQueryObjecti64vEXT)); |
| gSpy->RegisterSymbol("glGetQueryObjectui64vEXT", |
| reinterpret_cast<void*>(glGetQueryObjectui64vEXT)); |
| gSpy->RegisterSymbol("eglGetProcAddress", reinterpret_cast<void*>(eglGetProcAddress)); |
| gSpy->RegisterSymbol("wglGetProcAddress", reinterpret_cast<void*>(wglGetProcAddress)); |
| gSpy->RegisterSymbol("glXGetProcAddress", reinterpret_cast<void*>(glXGetProcAddress)); |
| gSpy->RegisterSymbol("glXGetProcAddressARB", reinterpret_cast<void*>(glXGetProcAddressARB)); |
| } |
| return gSpy.get(); |
| } |
| |
| void* STDCALL GetSpyProcAddress(const char* name) { |
| if (void* proc = spy()->LookupSymbol(name)) { |
| return proc; |
| } else { |
| GAPID_WARNING("%s will NOT be captured.\n", name); |
| return gapic::GetGfxProcAddress(name, true); |
| } |
| } |
| |
| } // anonymous namespace |
| |
| extern "C" { |
| |
| EXPORT int STDCALL eglInitialize(void* dpy, int* major, int* minor) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->eglInitialize(dpy, major, minor); |
| } |
| EXPORT void* STDCALL |
| eglCreateContext(void* display, void* config, void* share_context, int* attrib_list) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->eglCreateContext(display, config, share_context, attrib_list); |
| } |
| EXPORT int STDCALL eglMakeCurrent(void* display, void* draw, void* read, void* context) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->eglMakeCurrent(display, draw, read, context); |
| } |
| EXPORT int STDCALL eglSwapBuffers(void* display, void* surface) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->eglSwapBuffers(display, surface); |
| } |
| EXPORT int STDCALL eglQuerySurface(void* display, void* surface, int attribute, int* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->eglQuerySurface(display, surface, attribute, value); |
| } |
| EXPORT void* STDCALL glXCreateContext(void* dpy, void* vis, void* shareList, bool direct) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glXCreateContext(dpy, vis, shareList, direct); |
| } |
| EXPORT void* STDCALL |
| glXCreateNewContext(void* display, void* fbconfig, uint32_t type, void* shared, bool direct) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glXCreateNewContext(display, fbconfig, type, shared, direct); |
| } |
| EXPORT int STDCALL glXMakeContextCurrent(void* display, void* draw, void* read, void* ctx) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glXMakeContextCurrent(display, draw, read, ctx); |
| } |
| EXPORT int STDCALL glXMakeCurrent(void* display, void* drawable, void* ctx) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glXMakeCurrent(display, drawable, ctx); |
| } |
| EXPORT void STDCALL glXSwapBuffers(void* display, void* drawable) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glXSwapBuffers(display, drawable); |
| } |
| EXPORT int STDCALL glXQueryDrawable(void* display, void* draw, int attribute, int* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glXQueryDrawable(display, draw, attribute, value); |
| } |
| EXPORT void* STDCALL wglCreateContext(void* hdc) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->wglCreateContext(hdc); |
| } |
| EXPORT void* STDCALL wglCreateContextAttribsARB(void* hdc, void* hShareContext, int* attribList) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->wglCreateContextAttribsARB(hdc, hShareContext, attribList); |
| } |
| EXPORT int STDCALL wglMakeCurrent(void* hdc, void* hglrc) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->wglMakeCurrent(hdc, hglrc); |
| } |
| EXPORT void STDCALL wglSwapBuffers(void* hdc) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->wglSwapBuffers(hdc); |
| } |
| EXPORT int STDCALL CGLCreateContext(void* pix, void* share, void** ctx) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->CGLCreateContext(pix, share, ctx); |
| } |
| EXPORT int STDCALL CGLSetCurrentContext(void* ctx) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->CGLSetCurrentContext(ctx); |
| } |
| EXPORT int STDCALL CGLGetSurface(void* ctx, void** cid, int32_t* wid, int32_t* sid) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->CGLGetSurface(ctx, cid, wid, sid); |
| } |
| EXPORT int STDCALL CGSGetSurfaceBounds(void* cid, int32_t wid, int32_t sid, double* bounds) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->CGSGetSurfaceBounds(cid, wid, sid, bounds); |
| } |
| EXPORT int STDCALL CGLFlushDrawable(void* ctx) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->CGLFlushDrawable(ctx); |
| } |
| EXPORT void STDCALL glEnableClientState(uint32_t type) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEnableClientState(type); |
| } |
| EXPORT void STDCALL glDisableClientState(uint32_t type) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDisableClientState(type); |
| } |
| EXPORT void STDCALL glGetProgramBinaryOES(uint32_t program, int32_t buffer_size, |
| int32_t* bytes_written, uint32_t* binary_format, |
| void* binary) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetProgramBinaryOES(program, buffer_size, bytes_written, binary_format, binary); |
| } |
| EXPORT void STDCALL |
| glProgramBinaryOES(uint32_t program, uint32_t binary_format, void* binary, int32_t binary_size) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glProgramBinaryOES(program, binary_format, binary, binary_size); |
| } |
| EXPORT void STDCALL |
| glStartTilingQCOM(int32_t x, int32_t y, int32_t width, int32_t height, uint32_t preserveMask) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glStartTilingQCOM(x, y, width, height, preserveMask); |
| } |
| EXPORT void STDCALL glEndTilingQCOM(uint32_t preserve_mask) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEndTilingQCOM(preserve_mask); |
| } |
| EXPORT void STDCALL |
| glDiscardFramebufferEXT(uint32_t target, int32_t numAttachments, uint32_t* attachments) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDiscardFramebufferEXT(target, numAttachments, attachments); |
| } |
| EXPORT void STDCALL glInsertEventMarkerEXT(int32_t length, char* marker) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glInsertEventMarkerEXT(length, marker); |
| } |
| EXPORT void STDCALL glPushGroupMarkerEXT(int32_t length, char* marker) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glPushGroupMarkerEXT(length, marker); |
| } |
| EXPORT void STDCALL glPopGroupMarkerEXT() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glPopGroupMarkerEXT(); |
| } |
| EXPORT void STDCALL |
| glTexStorage1DEXT(uint32_t target, int32_t levels, uint32_t format, int32_t width) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexStorage1DEXT(target, levels, format, width); |
| } |
| EXPORT void STDCALL |
| glTexStorage2DEXT(uint32_t target, int32_t levels, uint32_t format, int32_t width, int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexStorage2DEXT(target, levels, format, width, height); |
| } |
| EXPORT void STDCALL glTexStorage3DEXT(uint32_t target, int32_t levels, uint32_t format, |
| int32_t width, int32_t height, int32_t depth) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexStorage3DEXT(target, levels, format, width, height, depth); |
| } |
| EXPORT void STDCALL glTextureStorage1DEXT(uint32_t texture, uint32_t target, int32_t levels, |
| uint32_t format, int32_t width) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTextureStorage1DEXT(texture, target, levels, format, width); |
| } |
| EXPORT void STDCALL glTextureStorage2DEXT(uint32_t texture, uint32_t target, int32_t levels, |
| uint32_t format, int32_t width, int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTextureStorage2DEXT(texture, target, levels, format, width, height); |
| } |
| EXPORT void STDCALL glTextureStorage3DEXT(uint32_t texture, uint32_t target, int32_t levels, |
| uint32_t format, int32_t width, int32_t height, |
| int32_t depth) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTextureStorage3DEXT(texture, target, levels, format, width, height, depth); |
| } |
| EXPORT void STDCALL glGenVertexArraysOES(int32_t count, uint32_t* arrays) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenVertexArraysOES(count, arrays); |
| } |
| EXPORT void STDCALL glBindVertexArrayOES(uint32_t array) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindVertexArrayOES(array); |
| } |
| EXPORT void STDCALL glDeleteVertexArraysOES(int32_t count, uint32_t* arrays) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteVertexArraysOES(count, arrays); |
| } |
| EXPORT bool STDCALL glIsVertexArrayOES(uint32_t array) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsVertexArrayOES(array); |
| } |
| EXPORT void STDCALL glEGLImageTargetTexture2DOES(uint32_t target, void* image) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEGLImageTargetTexture2DOES(target, image); |
| } |
| EXPORT void STDCALL glEGLImageTargetRenderbufferStorageOES(uint32_t target, void* image) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEGLImageTargetRenderbufferStorageOES(target, image); |
| } |
| EXPORT uint32_t STDCALL glGetGraphicsResetStatusEXT() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glGetGraphicsResetStatusEXT(); |
| } |
| EXPORT void STDCALL glBindAttribLocation(uint32_t program, int32_t location, char* name) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindAttribLocation(program, location, name); |
| } |
| EXPORT void STDCALL glBlendFunc(uint32_t src_factor, uint32_t dst_factor) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBlendFunc(src_factor, dst_factor); |
| } |
| EXPORT void STDCALL glBlendFuncSeparate(uint32_t src_factor_rgb, uint32_t dst_factor_rgb, |
| uint32_t src_factor_alpha, uint32_t dst_factor_alpha) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBlendFuncSeparate(src_factor_rgb, dst_factor_rgb, src_factor_alpha, dst_factor_alpha); |
| } |
| EXPORT void STDCALL glBlendEquation(uint32_t equation) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBlendEquation(equation); |
| } |
| EXPORT void STDCALL glBlendEquationSeparate(uint32_t rgb, uint32_t alpha) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBlendEquationSeparate(rgb, alpha); |
| } |
| EXPORT void STDCALL glBlendColor(float red, float green, float blue, float alpha) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBlendColor(red, green, blue, alpha); |
| } |
| EXPORT void STDCALL glEnableVertexAttribArray(int32_t location) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEnableVertexAttribArray(location); |
| } |
| EXPORT void STDCALL glDisableVertexAttribArray(int32_t location) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDisableVertexAttribArray(location); |
| } |
| EXPORT void STDCALL glVertexAttribPointer(int32_t location, int32_t size, uint32_t type, |
| bool normalized, int32_t stride, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttribPointer(location, size, type, normalized, stride, data); |
| } |
| EXPORT void STDCALL glGetActiveAttrib(uint32_t program, int32_t location, int32_t buffer_size, |
| int32_t* buffer_bytes_written, int32_t* vector_count, |
| uint32_t* type, char* name) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetActiveAttrib(program, location, buffer_size, buffer_bytes_written, vector_count, type, |
| name); |
| } |
| EXPORT void STDCALL glGetActiveUniform(uint32_t program, int32_t location, int32_t buffer_size, |
| int32_t* buffer_bytes_written, int32_t* vector_count, |
| uint32_t* type, char* name) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetActiveUniform(program, location, buffer_size, buffer_bytes_written, vector_count, type, |
| name); |
| } |
| EXPORT uint32_t STDCALL glGetError() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glGetError(); |
| } |
| EXPORT void STDCALL glGetProgramiv(uint32_t program, uint32_t parameter, int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetProgramiv(program, parameter, value); |
| } |
| EXPORT void STDCALL glGetShaderiv(uint32_t shader, uint32_t parameter, int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetShaderiv(shader, parameter, value); |
| } |
| EXPORT int32_t STDCALL glGetUniformLocation(uint32_t program, char* name) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glGetUniformLocation(program, name); |
| } |
| EXPORT int32_t STDCALL glGetAttribLocation(uint32_t program, char* name) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glGetAttribLocation(program, name); |
| } |
| EXPORT void STDCALL glPixelStorei(uint32_t parameter, int32_t value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glPixelStorei(parameter, value); |
| } |
| EXPORT void STDCALL glTexParameteri(uint32_t target, uint32_t parameter, int32_t value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexParameteri(target, parameter, value); |
| } |
| EXPORT void STDCALL glTexParameterf(uint32_t target, uint32_t parameter, float value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexParameterf(target, parameter, value); |
| } |
| EXPORT void STDCALL glGetTexParameteriv(uint32_t target, uint32_t parameter, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetTexParameteriv(target, parameter, values); |
| } |
| EXPORT void STDCALL glGetTexParameterfv(uint32_t target, uint32_t parameter, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetTexParameterfv(target, parameter, values); |
| } |
| EXPORT void STDCALL glUniform1i(int32_t location, int32_t value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform1i(location, value); |
| } |
| EXPORT void STDCALL glUniform2i(int32_t location, int32_t value0, int32_t value1) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform2i(location, value0, value1); |
| } |
| EXPORT void STDCALL glUniform3i(int32_t location, int32_t value0, int32_t value1, int32_t value2) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform3i(location, value0, value1, value2); |
| } |
| EXPORT void STDCALL |
| glUniform4i(int32_t location, int32_t value0, int32_t value1, int32_t value2, int32_t value3) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform4i(location, value0, value1, value2, value3); |
| } |
| EXPORT void STDCALL glUniform1iv(int32_t location, int32_t count, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform1iv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform2iv(int32_t location, int32_t count, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform2iv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform3iv(int32_t location, int32_t count, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform3iv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform4iv(int32_t location, int32_t count, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform4iv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform1f(int32_t location, float value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform1f(location, value); |
| } |
| EXPORT void STDCALL glUniform2f(int32_t location, float value0, float value1) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform2f(location, value0, value1); |
| } |
| EXPORT void STDCALL glUniform3f(int32_t location, float value0, float value1, float value2) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform3f(location, value0, value1, value2); |
| } |
| EXPORT void STDCALL |
| glUniform4f(int32_t location, float value0, float value1, float value2, float value3) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform4f(location, value0, value1, value2, value3); |
| } |
| EXPORT void STDCALL glUniform1fv(int32_t location, int32_t count, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform1fv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform2fv(int32_t location, int32_t count, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform2fv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform3fv(int32_t location, int32_t count, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform3fv(location, count, values); |
| } |
| EXPORT void STDCALL glUniform4fv(int32_t location, int32_t count, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniform4fv(location, count, values); |
| } |
| EXPORT void STDCALL |
| glUniformMatrix2fv(int32_t location, int32_t count, bool transpose, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniformMatrix2fv(location, count, transpose, values); |
| } |
| EXPORT void STDCALL |
| glUniformMatrix3fv(int32_t location, int32_t count, bool transpose, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniformMatrix3fv(location, count, transpose, values); |
| } |
| EXPORT void STDCALL |
| glUniformMatrix4fv(int32_t location, int32_t count, bool transpose, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniformMatrix4fv(location, count, transpose, values); |
| } |
| EXPORT void STDCALL glGetUniformfv(uint32_t program, int32_t location, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetUniformfv(program, location, values); |
| } |
| EXPORT void STDCALL glGetUniformiv(uint32_t program, int32_t location, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetUniformiv(program, location, values); |
| } |
| EXPORT void STDCALL glVertexAttrib1f(int32_t location, float value0) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib1f(location, value0); |
| } |
| EXPORT void STDCALL glVertexAttrib2f(int32_t location, float value0, float value1) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib2f(location, value0, value1); |
| } |
| EXPORT void STDCALL glVertexAttrib3f(int32_t location, float value0, float value1, float value2) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib3f(location, value0, value1, value2); |
| } |
| EXPORT void STDCALL |
| glVertexAttrib4f(int32_t location, float value0, float value1, float value2, float value3) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib4f(location, value0, value1, value2, value3); |
| } |
| EXPORT void STDCALL glVertexAttrib1fv(int32_t location, float* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib1fv(location, value); |
| } |
| EXPORT void STDCALL glVertexAttrib2fv(int32_t location, float* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib2fv(location, value); |
| } |
| EXPORT void STDCALL glVertexAttrib3fv(int32_t location, float* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib3fv(location, value); |
| } |
| EXPORT void STDCALL glVertexAttrib4fv(int32_t location, float* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glVertexAttrib4fv(location, value); |
| } |
| EXPORT void STDCALL glGetShaderPrecisionFormat(uint32_t shader_type, uint32_t precision_type, |
| int32_t* range, int32_t* precision) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetShaderPrecisionFormat(shader_type, precision_type, range, precision); |
| } |
| EXPORT void STDCALL glDepthMask(bool enabled) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDepthMask(enabled); |
| } |
| EXPORT void STDCALL glDepthFunc(uint32_t function) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDepthFunc(function); |
| } |
| EXPORT void STDCALL glDepthRangef(float near, float far) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDepthRangef(near, far); |
| } |
| EXPORT void STDCALL glColorMask(bool red, bool green, bool blue, bool alpha) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glColorMask(red, green, blue, alpha); |
| } |
| EXPORT void STDCALL glStencilMask(uint32_t mask) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glStencilMask(mask); |
| } |
| EXPORT void STDCALL glStencilMaskSeparate(uint32_t face, uint32_t mask) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glStencilMaskSeparate(face, mask); |
| } |
| EXPORT void STDCALL |
| glStencilFuncSeparate(uint32_t face, uint32_t function, int32_t reference_value, int32_t mask) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glStencilFuncSeparate(face, function, reference_value, mask); |
| } |
| EXPORT void STDCALL glStencilOpSeparate(uint32_t face, uint32_t stencil_fail, |
| uint32_t stencil_pass_depth_fail, |
| uint32_t stencil_pass_depth_pass) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glStencilOpSeparate(face, stencil_fail, stencil_pass_depth_fail, stencil_pass_depth_pass); |
| } |
| EXPORT void STDCALL glFrontFace(uint32_t orientation) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glFrontFace(orientation); |
| } |
| EXPORT void STDCALL glViewport(int32_t x, int32_t y, int32_t width, int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glViewport(x, y, width, height); |
| } |
| EXPORT void STDCALL glScissor(int32_t x, int32_t y, int32_t width, int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glScissor(x, y, width, height); |
| } |
| EXPORT void STDCALL glActiveTexture(uint32_t unit) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glActiveTexture(unit); |
| } |
| EXPORT void STDCALL glGenTextures(int32_t count, uint32_t* textures) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenTextures(count, textures); |
| } |
| EXPORT void STDCALL glDeleteTextures(int32_t count, uint32_t* textures) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteTextures(count, textures); |
| } |
| EXPORT bool STDCALL glIsTexture(uint32_t texture) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsTexture(texture); |
| } |
| EXPORT void STDCALL glBindTexture(uint32_t target, uint32_t texture) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindTexture(target, texture); |
| } |
| EXPORT void STDCALL glTexImage2D(uint32_t target, int32_t level, uint32_t internal_format, |
| int32_t width, int32_t height, int32_t border, uint32_t format, |
| uint32_t type, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexImage2D(target, level, internal_format, width, height, border, format, type, data); |
| } |
| EXPORT void STDCALL glTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, |
| int32_t yoffset, int32_t width, int32_t height, uint32_t format, |
| uint32_t type, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data); |
| } |
| EXPORT void STDCALL glCopyTexImage2D(uint32_t target, int32_t level, uint32_t format, int32_t x, |
| int32_t y, int32_t width, int32_t height, int32_t border) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glCopyTexImage2D(target, level, format, x, y, width, height, border); |
| } |
| EXPORT void STDCALL glCopyTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, |
| int32_t yoffset, int32_t x, int32_t y, int32_t width, |
| int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); |
| } |
| EXPORT void STDCALL glCompressedTexImage2D(uint32_t target, int32_t level, uint32_t format, |
| int32_t width, int32_t height, int32_t border, |
| int32_t image_size, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glCompressedTexImage2D(target, level, format, width, height, border, image_size, data); |
| } |
| EXPORT void STDCALL glCompressedTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, |
| int32_t yoffset, int32_t width, int32_t height, |
| uint32_t format, int32_t image_size, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, image_size, |
| data); |
| } |
| EXPORT void STDCALL glGenerateMipmap(uint32_t target) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenerateMipmap(target); |
| } |
| EXPORT void STDCALL glReadPixels(int32_t x, int32_t y, int32_t width, int32_t height, |
| uint32_t format, uint32_t type, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glReadPixels(x, y, width, height, format, type, data); |
| } |
| EXPORT void STDCALL glGenFramebuffers(int32_t count, uint32_t* framebuffers) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenFramebuffers(count, framebuffers); |
| } |
| EXPORT void STDCALL glBindFramebuffer(uint32_t target, uint32_t framebuffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindFramebuffer(target, framebuffer); |
| } |
| EXPORT uint32_t STDCALL glCheckFramebufferStatus(uint32_t target) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glCheckFramebufferStatus(target); |
| } |
| EXPORT void STDCALL glDeleteFramebuffers(int32_t count, uint32_t* framebuffers) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteFramebuffers(count, framebuffers); |
| } |
| EXPORT bool STDCALL glIsFramebuffer(uint32_t framebuffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsFramebuffer(framebuffer); |
| } |
| EXPORT void STDCALL glGenRenderbuffers(int32_t count, uint32_t* renderbuffers) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenRenderbuffers(count, renderbuffers); |
| } |
| EXPORT void STDCALL glBindRenderbuffer(uint32_t target, uint32_t renderbuffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindRenderbuffer(target, renderbuffer); |
| } |
| EXPORT void STDCALL |
| glRenderbufferStorage(uint32_t target, uint32_t format, int32_t width, int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glRenderbufferStorage(target, format, width, height); |
| } |
| EXPORT void STDCALL glDeleteRenderbuffers(int32_t count, uint32_t* renderbuffers) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteRenderbuffers(count, renderbuffers); |
| } |
| EXPORT bool STDCALL glIsRenderbuffer(uint32_t renderbuffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsRenderbuffer(renderbuffer); |
| } |
| EXPORT void STDCALL |
| glGetRenderbufferParameteriv(uint32_t target, uint32_t parameter, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetRenderbufferParameteriv(target, parameter, values); |
| } |
| EXPORT void STDCALL glGenBuffers(int32_t count, uint32_t* buffers) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenBuffers(count, buffers); |
| } |
| EXPORT void STDCALL glBindBuffer(uint32_t target, uint32_t buffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindBuffer(target, buffer); |
| } |
| EXPORT void STDCALL glBufferData(uint32_t target, int32_t size, void* data, uint32_t usage) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBufferData(target, size, data, usage); |
| } |
| EXPORT void STDCALL glBufferSubData(uint32_t target, int32_t offset, int32_t size, void* data) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBufferSubData(target, offset, size, data); |
| } |
| EXPORT void STDCALL glDeleteBuffers(int32_t count, uint32_t* buffers) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteBuffers(count, buffers); |
| } |
| EXPORT bool STDCALL glIsBuffer(uint32_t buffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsBuffer(buffer); |
| } |
| EXPORT void STDCALL glGetBufferParameteriv(uint32_t target, uint32_t parameter, int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetBufferParameteriv(target, parameter, value); |
| } |
| EXPORT uint32_t STDCALL glCreateShader(uint32_t type) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glCreateShader(type); |
| } |
| EXPORT void STDCALL glDeleteShader(uint32_t shader) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteShader(shader); |
| } |
| EXPORT void STDCALL glShaderSource(uint32_t shader, int32_t count, char** source, int32_t* length) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glShaderSource(shader, count, source, length); |
| } |
| EXPORT void STDCALL glShaderBinary(int32_t count, uint32_t* shaders, uint32_t binary_format, |
| void* binary, int32_t binary_size) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glShaderBinary(count, shaders, binary_format, binary, binary_size); |
| } |
| EXPORT void STDCALL glGetShaderInfoLog(uint32_t shader, int32_t buffer_length, |
| int32_t* string_length_written, char* info) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetShaderInfoLog(shader, buffer_length, string_length_written, info); |
| } |
| EXPORT void STDCALL glGetShaderSource(uint32_t shader, int32_t buffer_length, |
| int32_t* string_length_written, char* source) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetShaderSource(shader, buffer_length, string_length_written, source); |
| } |
| EXPORT void STDCALL glReleaseShaderCompiler() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glReleaseShaderCompiler(); |
| } |
| EXPORT void STDCALL glCompileShader(uint32_t shader) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glCompileShader(shader); |
| } |
| EXPORT bool STDCALL glIsShader(uint32_t shader) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsShader(shader); |
| } |
| EXPORT uint32_t STDCALL glCreateProgram() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glCreateProgram(); |
| } |
| EXPORT void STDCALL glDeleteProgram(uint32_t program) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteProgram(program); |
| } |
| EXPORT void STDCALL glAttachShader(uint32_t program, uint32_t shader) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glAttachShader(program, shader); |
| } |
| EXPORT void STDCALL glDetachShader(uint32_t program, uint32_t shader) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDetachShader(program, shader); |
| } |
| EXPORT void STDCALL glGetAttachedShaders(uint32_t program, int32_t buffer_length, |
| int32_t* shaders_length_written, uint32_t* shaders) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetAttachedShaders(program, buffer_length, shaders_length_written, shaders); |
| } |
| EXPORT void STDCALL glLinkProgram(uint32_t program) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glLinkProgram(program); |
| } |
| EXPORT void STDCALL glGetProgramInfoLog(uint32_t program, int32_t buffer_length, |
| int32_t* string_length_written, char* info) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetProgramInfoLog(program, buffer_length, string_length_written, info); |
| } |
| EXPORT void STDCALL glUseProgram(uint32_t program) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUseProgram(program); |
| } |
| EXPORT bool STDCALL glIsProgram(uint32_t program) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsProgram(program); |
| } |
| EXPORT void STDCALL glValidateProgram(uint32_t program) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glValidateProgram(program); |
| } |
| EXPORT void STDCALL glClearColor(float r, float g, float b, float a) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glClearColor(r, g, b, a); |
| } |
| EXPORT void STDCALL glClearDepthf(float depth) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glClearDepthf(depth); |
| } |
| EXPORT void STDCALL glClearStencil(int32_t stencil) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glClearStencil(stencil); |
| } |
| EXPORT void STDCALL glClear(uint32_t mask) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glClear(mask); |
| } |
| EXPORT void STDCALL glCullFace(uint32_t mode) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glCullFace(mode); |
| } |
| EXPORT void STDCALL glPolygonOffset(float scale_factor, float units) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glPolygonOffset(scale_factor, units); |
| } |
| EXPORT void STDCALL glLineWidth(float width) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glLineWidth(width); |
| } |
| EXPORT void STDCALL glSampleCoverage(float value, bool invert) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glSampleCoverage(value, invert); |
| } |
| EXPORT void STDCALL glHint(uint32_t target, uint32_t mode) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glHint(target, mode); |
| } |
| EXPORT void STDCALL glFramebufferRenderbuffer(uint32_t framebuffer_target, |
| uint32_t framebuffer_attachment, |
| uint32_t renderbuffer_target, uint32_t renderbuffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glFramebufferRenderbuffer(framebuffer_target, framebuffer_attachment, renderbuffer_target, |
| renderbuffer); |
| } |
| EXPORT void STDCALL glFramebufferTexture2D(uint32_t framebuffer_target, |
| uint32_t framebuffer_attachment, uint32_t texture_target, |
| uint32_t texture, int32_t level) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glFramebufferTexture2D(framebuffer_target, framebuffer_attachment, texture_target, texture, |
| level); |
| } |
| EXPORT void STDCALL glGetFramebufferAttachmentParameteriv(uint32_t framebuffer_target, |
| uint32_t attachment, uint32_t parameter, |
| int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetFramebufferAttachmentParameteriv(framebuffer_target, attachment, parameter, value); |
| } |
| EXPORT void STDCALL |
| glDrawElements(uint32_t draw_mode, int32_t element_count, uint32_t indices_type, void* indices) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDrawElements(draw_mode, element_count, indices_type, indices); |
| } |
| EXPORT void STDCALL glDrawArrays(uint32_t draw_mode, int32_t first_index, int32_t index_count) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDrawArrays(draw_mode, first_index, index_count); |
| } |
| EXPORT void STDCALL glFlush() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glFlush(); |
| } |
| EXPORT void STDCALL glFinish() { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glFinish(); |
| } |
| EXPORT void STDCALL glGetBooleanv(uint32_t param, bool* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetBooleanv(param, values); |
| } |
| EXPORT void STDCALL glGetFloatv(uint32_t param, float* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetFloatv(param, values); |
| } |
| EXPORT void STDCALL glGetIntegerv(uint32_t param, int32_t* values) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetIntegerv(param, values); |
| } |
| EXPORT char* STDCALL glGetString(uint32_t param) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glGetString(param); |
| } |
| EXPORT void STDCALL glEnable(uint32_t capability) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEnable(capability); |
| } |
| EXPORT void STDCALL glDisable(uint32_t capability) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDisable(capability); |
| } |
| EXPORT bool STDCALL glIsEnabled(uint32_t capability) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsEnabled(capability); |
| } |
| EXPORT uint64_t STDCALL glFenceSync(uint32_t condition, uint32_t syncFlags) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glFenceSync(condition, syncFlags); |
| } |
| EXPORT void STDCALL glDeleteSync(uint64_t sync) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteSync(sync); |
| } |
| EXPORT void STDCALL glWaitSync(uint64_t sync, uint32_t syncFlags, uint64_t timeout) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glWaitSync(sync, syncFlags, timeout); |
| } |
| EXPORT uint32_t STDCALL glClientWaitSync(uint64_t sync, uint32_t syncFlags, uint64_t timeout) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glClientWaitSync(sync, syncFlags, timeout); |
| } |
| EXPORT void* STDCALL |
| glMapBufferRange(uint32_t target, int32_t offset, int32_t length, uint32_t access) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glMapBufferRange(target, offset, length, access); |
| } |
| EXPORT void STDCALL glUnmapBuffer(uint32_t target) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUnmapBuffer(target); |
| } |
| EXPORT void STDCALL glInvalidateFramebuffer(uint32_t target, int32_t count, uint32_t* attachments) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glInvalidateFramebuffer(target, count, attachments); |
| } |
| EXPORT void STDCALL glRenderbufferStorageMultisample(uint32_t target, int32_t samples, |
| uint32_t format, int32_t width, |
| int32_t height) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glRenderbufferStorageMultisample(target, samples, format, width, height); |
| } |
| EXPORT void STDCALL glBlitFramebuffer(int32_t srcX0, int32_t srcY0, int32_t srcX1, int32_t srcY1, |
| int32_t dstX0, int32_t dstY0, int32_t dstX1, int32_t dstY1, |
| uint32_t mask, uint32_t filter) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); |
| } |
| EXPORT void STDCALL glGenQueries(int32_t count, uint32_t* queries) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenQueries(count, queries); |
| } |
| EXPORT void STDCALL glBeginQuery(uint32_t target, uint32_t query) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBeginQuery(target, query); |
| } |
| EXPORT void STDCALL glEndQuery(uint32_t target) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEndQuery(target); |
| } |
| EXPORT void STDCALL glDeleteQueries(int32_t count, uint32_t* queries) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteQueries(count, queries); |
| } |
| EXPORT bool STDCALL glIsQuery(uint32_t query) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsQuery(query); |
| } |
| EXPORT void STDCALL glGetQueryiv(uint32_t target, uint32_t parameter, int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryiv(target, parameter, value); |
| } |
| EXPORT void STDCALL glGetQueryObjectuiv(uint32_t query, uint32_t parameter, uint32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjectuiv(query, parameter, value); |
| } |
| EXPORT void STDCALL glGetActiveUniformBlockName(uint32_t program, uint32_t uniform_block_index, |
| int32_t buffer_size, int32_t* buffer_bytes_written, |
| char* name) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetActiveUniformBlockName(program, uniform_block_index, buffer_size, buffer_bytes_written, |
| name); |
| } |
| EXPORT void STDCALL glGetActiveUniformBlockiv(uint32_t program, uint32_t uniform_block_index, |
| uint32_t parameter_name, int32_t* parameters) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetActiveUniformBlockiv(program, uniform_block_index, parameter_name, parameters); |
| } |
| EXPORT void STDCALL glUniformBlockBinding(uint32_t program, uint32_t uniform_block_index, |
| uint32_t uniform_block_binding) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glUniformBlockBinding(program, uniform_block_index, uniform_block_binding); |
| } |
| EXPORT void STDCALL glGetActiveUniformsiv(uint32_t program, uint32_t uniform_count, |
| uint32_t* uniform_indices, uint32_t parameter_name, |
| int32_t* parameters) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetActiveUniformsiv(program, uniform_count, uniform_indices, parameter_name, parameters); |
| } |
| EXPORT void STDCALL glBindBufferBase(uint32_t target, uint32_t index, uint32_t buffer) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindBufferBase(target, index, buffer); |
| } |
| EXPORT void STDCALL glGenVertexArrays(int32_t count, uint32_t* arrays) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenVertexArrays(count, arrays); |
| } |
| EXPORT void STDCALL glBindVertexArray(uint32_t array) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBindVertexArray(array); |
| } |
| EXPORT void STDCALL glDeleteVertexArrays(uint32_t count, uint32_t* arrays) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteVertexArrays(count, arrays); |
| } |
| EXPORT void STDCALL glGetQueryObjecti64v(uint32_t query, uint32_t parameter, int64_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjecti64v(query, parameter, value); |
| } |
| EXPORT void STDCALL glGetQueryObjectui64v(uint32_t query, uint32_t parameter, uint64_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjectui64v(query, parameter, value); |
| } |
| EXPORT void STDCALL glGenQueriesEXT(int32_t count, uint32_t* queries) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGenQueriesEXT(count, queries); |
| } |
| EXPORT void STDCALL glBeginQueryEXT(uint32_t target, uint32_t query) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glBeginQueryEXT(target, query); |
| } |
| EXPORT void STDCALL glEndQueryEXT(uint32_t target) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glEndQueryEXT(target); |
| } |
| EXPORT void STDCALL glDeleteQueriesEXT(int32_t count, uint32_t* queries) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glDeleteQueriesEXT(count, queries); |
| } |
| EXPORT bool STDCALL glIsQueryEXT(uint32_t query) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| return s->glIsQueryEXT(query); |
| } |
| EXPORT void STDCALL glQueryCounterEXT(uint32_t query, uint32_t target) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glQueryCounterEXT(query, target); |
| } |
| EXPORT void STDCALL glGetQueryivEXT(uint32_t target, uint32_t parameter, int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryivEXT(target, parameter, value); |
| } |
| EXPORT void STDCALL glGetQueryObjectivEXT(uint32_t query, uint32_t parameter, int32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjectivEXT(query, parameter, value); |
| } |
| EXPORT void STDCALL glGetQueryObjectuivEXT(uint32_t query, uint32_t parameter, uint32_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjectuivEXT(query, parameter, value); |
| } |
| EXPORT void STDCALL glGetQueryObjecti64vEXT(uint32_t query, uint32_t parameter, int64_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjecti64vEXT(query, parameter, value); |
| } |
| EXPORT void STDCALL glGetQueryObjectui64vEXT(uint32_t query, uint32_t parameter, uint64_t* value) { |
| Spy* s = spy(); |
| gapic::Lock<Spy> lock__(s); |
| s->glGetQueryObjectui64vEXT(query, parameter, value); |
| } |
| |
| EXPORT void* STDCALL eglGetProcAddress(const char* name) { return GetSpyProcAddress(name); } |
| EXPORT void* STDCALL wglGetProcAddress(const char* name) { return GetSpyProcAddress(name); } |
| EXPORT void* STDCALL glXGetProcAddress(const char* name) { return GetSpyProcAddress(name); } |
| EXPORT void* STDCALL glXGetProcAddressARB(const char* name) { return GetSpyProcAddress(name); } |
| |
| } // extern "C" |