glestrace: Framework for GLES tracing library
This patch provides a framework for tracing GLES 1.0 and 2.0 functions. It is missing a lot of features, but here are the things it accomplishes: - Stop building the glesv2dbg library, and build the glestrace library instead. - Replace the hooks for glesv2dbg with the ones for glestrace. - Add the basics for the trace library. Currently, this traces all GL functions, but not all required data is sent for all the functions. As a result, it will not be possible to reconstruct the entire GL state on the host side. The files gltrace.pb.* and gltrace_api.* are both generated using the tools/genapi.py script. Change-Id: Id60a468f7278657f008bc6ea1df01f9bdfecfdd3
This commit is contained in:
parent
484bc2727c
commit
0469dd6d55
|
@ -18,7 +18,7 @@ LOCAL_SRC_FILES:= \
|
|||
EGL/Loader.cpp \
|
||||
#
|
||||
|
||||
LOCAL_SHARED_LIBRARIES += libcutils libutils libGLESv2_dbg
|
||||
LOCAL_SHARED_LIBRARIES += libcutils libutils libGLES_trace
|
||||
LOCAL_LDLIBS := -lpthread -ldl
|
||||
LOCAL_MODULE:= libEGL
|
||||
LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <EGL/egl.h>
|
||||
|
||||
#include "egldefs.h"
|
||||
#include "glesv2dbg.h"
|
||||
#include "glestrace.h"
|
||||
#include "hooks.h"
|
||||
#include "Loader.h"
|
||||
|
||||
|
@ -157,7 +157,7 @@ Loader::Loader()
|
|||
|
||||
Loader::~Loader()
|
||||
{
|
||||
StopDebugServer();
|
||||
GLTrace_stop();
|
||||
}
|
||||
|
||||
const char* Loader::getTag(int dpy, int impl)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "egldefs.h"
|
||||
#include "egl_impl.h"
|
||||
#include "egl_tls.h"
|
||||
#include "glesv2dbg.h"
|
||||
#include "glestrace.h"
|
||||
#include "hooks.h"
|
||||
#include "Loader.h"
|
||||
|
||||
|
@ -67,7 +67,6 @@ static int sEGLTraceLevel;
|
|||
static int sEGLApplicationTraceLevel;
|
||||
|
||||
extern gl_hooks_t gHooksTrace;
|
||||
extern gl_hooks_t gHooksDebug;
|
||||
|
||||
static inline void setGlTraceThreadSpecific(gl_hooks_t const *value) {
|
||||
pthread_setspecific(gGLTraceKey, value);
|
||||
|
@ -89,27 +88,17 @@ void initEglTraceLevel() {
|
|||
char procPath[128] = {};
|
||||
sprintf(procPath, "/proc/%ld/cmdline", pid);
|
||||
FILE * file = fopen(procPath, "r");
|
||||
if (file)
|
||||
{
|
||||
if (file) {
|
||||
char cmdline[256] = {};
|
||||
if (fgets(cmdline, sizeof(cmdline) - 1, file))
|
||||
{
|
||||
if (fgets(cmdline, sizeof(cmdline) - 1, file)) {
|
||||
if (!strcmp(value, cmdline))
|
||||
gEGLDebugLevel = 1;
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
if (gEGLDebugLevel > 0)
|
||||
{
|
||||
property_get("debug.egl.debug_port", value, "5039");
|
||||
const unsigned short port = (unsigned short)atoi(value);
|
||||
property_get("debug.egl.debug_forceUseFile", value, "0");
|
||||
const bool forceUseFile = (bool)atoi(value);
|
||||
property_get("debug.egl.debug_maxFileSize", value, "8");
|
||||
const unsigned int maxFileSize = atoi(value) << 20;
|
||||
property_get("debug.egl.debug_filePath", value, "/data/local/tmp/dump.gles2dbg");
|
||||
StartDebugServer(port, forceUseFile, maxFileSize, value);
|
||||
if (gEGLDebugLevel > 0) {
|
||||
GLTrace_start();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +108,7 @@ void setGLHooksThreadSpecific(gl_hooks_t const *value) {
|
|||
setGlThreadSpecific(&gHooksTrace);
|
||||
} else if (gEGLDebugLevel > 0 && value != &gHooksNoContext) {
|
||||
setGlTraceThreadSpecific(value);
|
||||
setGlThreadSpecific(&gHooksDebug);
|
||||
setGlThreadSpecific(GLTrace_getGLHooks());
|
||||
} else {
|
||||
setGlThreadSpecific(value);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "egl_impl.h"
|
||||
#include "egl_tls.h"
|
||||
#include "glesv2dbg.h"
|
||||
#include "glestrace.h"
|
||||
#include "hooks.h"
|
||||
|
||||
#include "egl_display.h"
|
||||
|
@ -110,7 +110,6 @@ extern EGLBoolean egl_init_drivers();
|
|||
extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS];
|
||||
extern int gEGLDebugLevel;
|
||||
extern gl_hooks_t gHooksTrace;
|
||||
extern gl_hooks_t gHooksDebug;
|
||||
} // namespace android;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -514,6 +513,10 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
|
|||
}
|
||||
egl_context_t* c = new egl_context_t(dpy, context, config,
|
||||
dp->configs[intptr_t(config)].impl, cnx, version);
|
||||
#if EGL_TRACE
|
||||
if (gEGLDebugLevel > 0)
|
||||
GLTrace_eglCreateContext(version, c);
|
||||
#endif
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
@ -655,9 +658,10 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
|
|||
if (ctx != EGL_NO_CONTEXT) {
|
||||
setGLHooksThreadSpecific(c->cnx->hooks[c->version]);
|
||||
egl_tls_t::setContext(ctx);
|
||||
if (gEGLDebugLevel > 0) {
|
||||
CreateDbgContext(c->version, c->cnx->hooks[c->version]);
|
||||
}
|
||||
#if EGL_TRACE
|
||||
if (gEGLDebugLevel > 0)
|
||||
GLTrace_eglMakeCurrent(c->version, c->cnx->hooks[c->version]);
|
||||
#endif
|
||||
_c.acquire();
|
||||
_r.acquire();
|
||||
_d.acquire();
|
||||
|
@ -884,6 +888,10 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
|
|||
"no more slots for eglGetProcAddress(\"%s\")",
|
||||
procname);
|
||||
|
||||
#if EGL_TRACE
|
||||
gl_hooks_t *debugHooks = GLTrace_getGLHooks();
|
||||
#endif
|
||||
|
||||
if (!addr && (slot < MAX_NUMBER_OF_GL_EXTENSIONS)) {
|
||||
bool found = false;
|
||||
for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) {
|
||||
|
@ -894,7 +902,7 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
|
|||
cnx->hooks[GLESv1_INDEX]->ext.extensions[slot] =
|
||||
cnx->hooks[GLESv2_INDEX]->ext.extensions[slot] =
|
||||
#if EGL_TRACE
|
||||
gHooksDebug.ext.extensions[slot] = gHooksTrace.ext.extensions[slot] =
|
||||
debugHooks->ext.extensions[slot] = gHooksTrace.ext.extensions[slot] =
|
||||
#endif
|
||||
cnx->egl.eglGetProcAddress(procname);
|
||||
}
|
||||
|
@ -922,10 +930,6 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
|
|||
|
||||
EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
|
||||
{
|
||||
EGLBoolean Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface draw);
|
||||
if (gEGLDebugLevel > 0)
|
||||
Debug_eglSwapBuffers(dpy, draw);
|
||||
|
||||
clearError();
|
||||
|
||||
egl_display_t const * const dp = validate_display(dpy);
|
||||
|
@ -935,6 +939,11 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
|
|||
if (!_s.get())
|
||||
return setError(EGL_BAD_SURFACE, EGL_FALSE);
|
||||
|
||||
#if EGL_TRACE
|
||||
if (gEGLDebugLevel > 0)
|
||||
GLTrace_eglSwapBuffers(dpy, draw);
|
||||
#endif
|
||||
|
||||
egl_surface_t const * const s = get_surface(draw);
|
||||
return s->cnx->egl.eglSwapBuffers(dp->disp[s->impl].dpy, s->surface);
|
||||
}
|
||||
|
@ -1154,7 +1163,10 @@ EGLBoolean eglReleaseThread(void)
|
|||
}
|
||||
}
|
||||
egl_tls_t::clearTLS();
|
||||
dbgReleaseThread();
|
||||
#if EGL_TRACE
|
||||
if (gEGLDebugLevel > 0)
|
||||
GLTrace_eglReleaseThread();
|
||||
#endif
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ pthread_key_t egl_tls_t::sKey = -1;
|
|||
pthread_mutex_t egl_tls_t::sLockKey = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
egl_tls_t::egl_tls_t()
|
||||
: error(EGL_SUCCESS), ctx(0), logCallWithNoContext(EGL_TRUE), dbg(0) {
|
||||
: error(EGL_SUCCESS), ctx(0), logCallWithNoContext(EGL_TRUE) {
|
||||
}
|
||||
|
||||
const char *egl_tls_t::egl_strerror(EGLint err) {
|
||||
|
|
|
@ -37,7 +37,6 @@ class egl_tls_t {
|
|||
EGLint error;
|
||||
EGLContext ctx;
|
||||
EGLBoolean logCallWithNoContext;
|
||||
DbgContext* dbg;
|
||||
|
||||
egl_tls_t();
|
||||
static void validateTLSKey();
|
||||
|
|
|
@ -375,22 +375,6 @@ extern "C" {
|
|||
#undef TRACE_GL_VOID
|
||||
#undef TRACE_GL
|
||||
|
||||
// declare all Debug_gl* functions
|
||||
#define GL_ENTRY(_r, _api, ...) _r Debug_##_api ( __VA_ARGS__ );
|
||||
#include "glesv2dbg_functions.h"
|
||||
#undef GL_ENTRY
|
||||
|
||||
#define GL_ENTRY(_r, _api, ...) Debug_ ## _api,
|
||||
EGLAPI gl_hooks_t gHooksDebug = {
|
||||
{
|
||||
#include "entries.in"
|
||||
},
|
||||
{
|
||||
{0}
|
||||
}
|
||||
};
|
||||
#undef GL_ENTRY
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}; // namespace android
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
java
|
||||
*.pyc
|
||||
*.swp
|
||||
pyratemp.py
|
|
@ -3,13 +3,14 @@ LOCAL_PATH:= $(call my-dir)
|
|||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/api.cpp \
|
||||
src/caller.cpp \
|
||||
src/dbgcontext.cpp \
|
||||
src/debugger_message.pb.cpp \
|
||||
src/egl.cpp \
|
||||
src/server.cpp \
|
||||
src/vertex.cpp
|
||||
src/gltrace_api.cpp \
|
||||
src/gltrace_context.cpp \
|
||||
src/gltrace_egl.cpp \
|
||||
src/gltrace_eglapi.cpp \
|
||||
src/gltrace_fixup.cpp \
|
||||
src/gltrace_hooks.cpp \
|
||||
src/gltrace.pb.cpp \
|
||||
src/gltrace_transport.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH) \
|
||||
|
@ -19,20 +20,15 @@ LOCAL_C_INCLUDES := \
|
|||
external \
|
||||
bionic
|
||||
|
||||
#LOCAL_CFLAGS += -O0 -g -DDEBUG -UNDEBUG
|
||||
LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI
|
||||
LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-2.3.0-lite liblzf
|
||||
LOCAL_SHARED_LIBRARIES := libcutils libutils libstlport
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
LOCAL_CFLAGS += -fstrict-aliasing
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
|
||||
LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -DLOG_TAG=\"libGLES2_dbg\"
|
||||
|
||||
LOCAL_CFLAGS += -DLOG_TAG=\"libGLES_trace\"
|
||||
|
||||
# we need to access the private Bionic header <bionic_tls.h>
|
||||
# on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
|
||||
|
@ -42,9 +38,7 @@ ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
|
|||
endif
|
||||
LOCAL_C_INCLUDES += bionic/libc/private
|
||||
|
||||
LOCAL_MODULE:= libGLESv2_dbg
|
||||
LOCAL_MODULE:= libGLES_trace
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(LOCAL_PATH)/test/Android.mk
|
|
@ -0,0 +1,51 @@
|
|||
Design of the GLES Tracing Library
|
||||
|
||||
Code Runtime Behavior:
|
||||
|
||||
Initialization:
|
||||
|
||||
egl_display_t::initialize() calls initEglTraceLevel() to figure out whether tracing should be
|
||||
enabled. Currently, the shell properties "debug.egl.trace" and "debug.egl.debug_proc" together
|
||||
control whether tracing should be enabled for a certain process. If tracing is enabled, this
|
||||
calls GLTrace_start() to start the trace server.
|
||||
|
||||
Note that initEglTraceLevel() is also called from early_egl_init(), but that happens in the
|
||||
context of the zygote, so that invocation has no effect.
|
||||
|
||||
egl_display_t::initialize() then calls setGLHooksThreadSpecific() where we set the thread
|
||||
specific gl_hooks structure to point to the trace implementation. From this point on, every
|
||||
GLES call is redirected to the trace implementation.
|
||||
|
||||
Application runtime:
|
||||
|
||||
While the application is running, all its GLES calls are directly routed to their corresponding
|
||||
trace implementation.
|
||||
|
||||
For EGL calls, the trace library provides a bunch of functions that must be explicitly called
|
||||
from the EGL library. These functions are declared in glestrace.h
|
||||
|
||||
Application shutdown:
|
||||
|
||||
Currently, the application is killed when the user stops tracing from the frontend GUI. We need
|
||||
to explore if a more graceful method of stopping the application, or detaching tracing from the
|
||||
application is required.
|
||||
|
||||
Code Structure:
|
||||
|
||||
glestrace.h declares all the hooks exposed by libglestrace. These are used by EGL/egl.cpp and
|
||||
EGL/eglApi.cpp to initialize the trace library, and to inform the library of EGL calls.
|
||||
|
||||
All GL calls are present in GLES_Trace/src/gltrace_api.cpp. This file is generated by the
|
||||
GLES_Trace/src/genapi.py script. The structure of all the functions looks like this:
|
||||
|
||||
void GLTrace_glFunction(args) {
|
||||
// declare a protobuf
|
||||
// copy arguments into the protobuf
|
||||
// call the original GLES function
|
||||
// if there is a return value, save it into the protobuf
|
||||
// fixup the protobuf if necessary
|
||||
// transport the protobuf to the host
|
||||
}
|
||||
|
||||
The fixupGLMessage() call does any custom processing of the protobuf based on the GLES call.
|
||||
This typically amounts to copying the data corresponding to input or output pointers.
|
|
@ -0,0 +1,14 @@
|
|||
TODO:
|
||||
- Context - Currently, we don't do anything regarding the contexts that are created.
|
||||
Need to maintain more state regarding contexts, and figure out what happens in the
|
||||
presence of multiple contexts.
|
||||
|
||||
- Transport: Each GLMessage is sent via a socket as soon as the message is received.
|
||||
i.e., there is no buffering of messages. Buffering should improve performance.
|
||||
|
||||
- Initialization: On first connection, send some basic information that includes:
|
||||
1. version of the trace library
|
||||
2. implementation dependent GL state variables such as # of vertex arrays etc.
|
||||
|
||||
- eglSwapBuffers: The images are lzf compressed, but there is no mode that transfers
|
||||
only the differences from the previous images.
|
|
@ -0,0 +1,15 @@
|
|||
## NOTE
|
||||
## This file is used for development purposes only. It is not used by the build system.
|
||||
|
||||
# generate protocol buffer files
|
||||
genproto: gltrace.proto
|
||||
aprotoc --cpp_out=src --java_out=java gltrace.proto
|
||||
mv src/gltrace.pb.cc src/gltrace.pb.cpp
|
||||
|
||||
# NOTE: $OUT should be defined in the shell by doing a "lunch <config>"
|
||||
# push updated files to device
|
||||
push:
|
||||
adb push $(OUT)/system/lib/libGLESv2.so /system/lib/
|
||||
adb push $(OUT)/system/lib/libGLESv1_CM.so /system/lib/
|
||||
adb push $(OUT)/system/lib/libGLES_trace.so /system/lib/
|
||||
adb push $(OUT)/system/lib/libEGL.so /system/lib/
|
|
@ -0,0 +1,481 @@
|
|||
/*
|
||||
* Copyright (C) 2011 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.
|
||||
*/
|
||||
|
||||
package android.gltrace;
|
||||
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
option java_package = "com.android.ide.eclipse.gltrace";
|
||||
option java_outer_classname = "GLProtoBuf";
|
||||
|
||||
message GLMessage {
|
||||
enum Function {
|
||||
glActiveTexture = 0;
|
||||
glAlphaFunc = 1;
|
||||
glAlphaFuncx = 2;
|
||||
glAlphaFuncxOES = 3;
|
||||
glAttachShader = 4;
|
||||
glBeginPerfMonitorAMD = 5;
|
||||
glBindAttribLocation = 6;
|
||||
glBindBuffer = 7;
|
||||
glBindFramebuffer = 8;
|
||||
glBindFramebufferOES = 9;
|
||||
glBindRenderbuffer = 10;
|
||||
glBindRenderbufferOES = 11;
|
||||
glBindTexture = 12;
|
||||
glBindVertexArrayOES = 13;
|
||||
glBlendColor = 14;
|
||||
glBlendEquation = 15;
|
||||
glBlendEquationOES = 16;
|
||||
glBlendEquationSeparate = 17;
|
||||
glBlendEquationSeparateOES = 18;
|
||||
glBlendFunc = 19;
|
||||
glBlendFuncSeparate = 20;
|
||||
glBlendFuncSeparateOES = 21;
|
||||
glBufferData = 22;
|
||||
glBufferSubData = 23;
|
||||
glCheckFramebufferStatus = 24;
|
||||
glCheckFramebufferStatusOES = 25;
|
||||
glClearColor = 26;
|
||||
glClearColorx = 27;
|
||||
glClearColorxOES = 28;
|
||||
glClearDepthf = 29;
|
||||
glClearDepthfOES = 30;
|
||||
glClearDepthx = 31;
|
||||
glClearDepthxOES = 32;
|
||||
glClear = 33;
|
||||
glClearStencil = 34;
|
||||
glClientActiveTexture = 35;
|
||||
glClipPlanef = 36;
|
||||
glClipPlanefIMG = 37;
|
||||
glClipPlanefOES = 38;
|
||||
glClipPlanex = 39;
|
||||
glClipPlanexIMG = 40;
|
||||
glClipPlanexOES = 41;
|
||||
glColor4f = 42;
|
||||
glColor4ub = 43;
|
||||
glColor4x = 44;
|
||||
glColor4xOES = 45;
|
||||
glColorMask = 46;
|
||||
glColorPointer = 47;
|
||||
glCompileShader = 48;
|
||||
glCompressedTexImage2D = 49;
|
||||
glCompressedTexImage3DOES = 50;
|
||||
glCompressedTexSubImage2D = 51;
|
||||
glCompressedTexSubImage3DOES = 52;
|
||||
glCopyTexImage2D = 53;
|
||||
glCopyTexSubImage2D = 54;
|
||||
glCopyTexSubImage3DOES = 55;
|
||||
glCoverageMaskNV = 56;
|
||||
glCoverageOperationNV = 57;
|
||||
glCreateProgram = 58;
|
||||
glCreateShader = 59;
|
||||
glCullFace = 60;
|
||||
glCurrentPaletteMatrixOES = 61;
|
||||
glDeleteBuffers = 62;
|
||||
glDeleteFencesNV = 63;
|
||||
glDeleteFramebuffers = 64;
|
||||
glDeleteFramebuffersOES = 65;
|
||||
glDeletePerfMonitorsAMD = 66;
|
||||
glDeleteProgram = 67;
|
||||
glDeleteRenderbuffers = 68;
|
||||
glDeleteRenderbuffersOES = 69;
|
||||
glDeleteShader = 70;
|
||||
glDeleteTextures = 71;
|
||||
glDeleteVertexArraysOES = 72;
|
||||
glDepthFunc = 73;
|
||||
glDepthMask = 74;
|
||||
glDepthRangef = 75;
|
||||
glDepthRangefOES = 76;
|
||||
glDepthRangex = 77;
|
||||
glDepthRangexOES = 78;
|
||||
glDetachShader = 79;
|
||||
glDisableClientState = 80;
|
||||
glDisableDriverControlQCOM = 81;
|
||||
glDisable = 82;
|
||||
glDisableVertexAttribArray = 83;
|
||||
glDiscardFramebufferEXT = 84;
|
||||
glDrawArrays = 85;
|
||||
glDrawElements = 86;
|
||||
glDrawTexfOES = 87;
|
||||
glDrawTexfvOES = 88;
|
||||
glDrawTexiOES = 89;
|
||||
glDrawTexivOES = 90;
|
||||
glDrawTexsOES = 91;
|
||||
glDrawTexsvOES = 92;
|
||||
glDrawTexxOES = 93;
|
||||
glDrawTexxvOES = 94;
|
||||
glEGLImageTargetRenderbufferStorageOES = 95;
|
||||
glEGLImageTargetTexture2DOES = 96;
|
||||
glEnableClientState = 97;
|
||||
glEnableDriverControlQCOM = 98;
|
||||
glEnable = 99;
|
||||
glEnableVertexAttribArray = 100;
|
||||
glEndPerfMonitorAMD = 101;
|
||||
glEndTilingQCOM = 102;
|
||||
glExtGetBufferPointervQCOM = 103;
|
||||
glExtGetBuffersQCOM = 104;
|
||||
glExtGetFramebuffersQCOM = 105;
|
||||
glExtGetProgramBinarySourceQCOM = 106;
|
||||
glExtGetProgramsQCOM = 107;
|
||||
glExtGetRenderbuffersQCOM = 108;
|
||||
glExtGetShadersQCOM = 109;
|
||||
glExtGetTexLevelParameterivQCOM = 110;
|
||||
glExtGetTexSubImageQCOM = 111;
|
||||
glExtGetTexturesQCOM = 112;
|
||||
glExtIsProgramBinaryQCOM = 113;
|
||||
glExtTexObjectStateOverrideiQCOM = 114;
|
||||
glFinishFenceNV = 115;
|
||||
glFinish = 116;
|
||||
glFlush = 117;
|
||||
glFogf = 118;
|
||||
glFogfv = 119;
|
||||
glFogx = 120;
|
||||
glFogxOES = 121;
|
||||
glFogxv = 122;
|
||||
glFogxvOES = 123;
|
||||
glFramebufferRenderbuffer = 124;
|
||||
glFramebufferRenderbufferOES = 125;
|
||||
glFramebufferTexture2D = 126;
|
||||
glFramebufferTexture2DMultisampleIMG = 127;
|
||||
glFramebufferTexture2DOES = 128;
|
||||
glFramebufferTexture3DOES = 129;
|
||||
glFrontFace = 130;
|
||||
glFrustumf = 131;
|
||||
glFrustumfOES = 132;
|
||||
glFrustumx = 133;
|
||||
glFrustumxOES = 134;
|
||||
glGenBuffers = 135;
|
||||
glGenerateMipmap = 136;
|
||||
glGenerateMipmapOES = 137;
|
||||
glGenFencesNV = 138;
|
||||
glGenFramebuffers = 139;
|
||||
glGenFramebuffersOES = 140;
|
||||
glGenPerfMonitorsAMD = 141;
|
||||
glGenRenderbuffers = 142;
|
||||
glGenRenderbuffersOES = 143;
|
||||
glGenTextures = 144;
|
||||
glGenVertexArraysOES = 145;
|
||||
glGetActiveAttrib = 146;
|
||||
glGetActiveUniform = 147;
|
||||
glGetAttachedShaders = 148;
|
||||
glGetAttribLocation = 149;
|
||||
glGetBooleanv = 150;
|
||||
glGetBufferParameteriv = 151;
|
||||
glGetBufferPointervOES = 152;
|
||||
glGetClipPlanef = 153;
|
||||
glGetClipPlanefOES = 154;
|
||||
glGetClipPlanex = 155;
|
||||
glGetClipPlanexOES = 156;
|
||||
glGetDriverControlsQCOM = 157;
|
||||
glGetDriverControlStringQCOM = 158;
|
||||
glGetError = 159;
|
||||
glGetFenceivNV = 160;
|
||||
glGetFixedv = 161;
|
||||
glGetFixedvOES = 162;
|
||||
glGetFloatv = 163;
|
||||
glGetFramebufferAttachmentParameteriv = 164;
|
||||
glGetFramebufferAttachmentParameterivOES = 165;
|
||||
glGetIntegerv = 166;
|
||||
glGetLightfv = 167;
|
||||
glGetLightxv = 168;
|
||||
glGetLightxvOES = 169;
|
||||
glGetMaterialfv = 170;
|
||||
glGetMaterialxv = 171;
|
||||
glGetMaterialxvOES = 172;
|
||||
glGetPerfMonitorCounterDataAMD = 173;
|
||||
glGetPerfMonitorCounterInfoAMD = 174;
|
||||
glGetPerfMonitorCountersAMD = 175;
|
||||
glGetPerfMonitorCounterStringAMD = 176;
|
||||
glGetPerfMonitorGroupsAMD = 177;
|
||||
glGetPerfMonitorGroupStringAMD = 178;
|
||||
glGetPointerv = 179;
|
||||
glGetProgramBinaryOES = 180;
|
||||
glGetProgramInfoLog = 181;
|
||||
glGetProgramiv = 182;
|
||||
glGetRenderbufferParameteriv = 183;
|
||||
glGetRenderbufferParameterivOES = 184;
|
||||
glGetShaderInfoLog = 185;
|
||||
glGetShaderiv = 186;
|
||||
glGetShaderPrecisionFormat = 187;
|
||||
glGetShaderSource = 188;
|
||||
glGetString = 189;
|
||||
glGetTexEnvfv = 190;
|
||||
glGetTexEnviv = 191;
|
||||
glGetTexEnvxv = 192;
|
||||
glGetTexEnvxvOES = 193;
|
||||
glGetTexGenfvOES = 194;
|
||||
glGetTexGenivOES = 195;
|
||||
glGetTexGenxvOES = 196;
|
||||
glGetTexParameterfv = 197;
|
||||
glGetTexParameteriv = 198;
|
||||
glGetTexParameterxv = 199;
|
||||
glGetTexParameterxvOES = 200;
|
||||
glGetUniformfv = 201;
|
||||
glGetUniformiv = 202;
|
||||
glGetUniformLocation = 203;
|
||||
glGetVertexAttribfv = 204;
|
||||
glGetVertexAttribiv = 205;
|
||||
glGetVertexAttribPointerv = 206;
|
||||
glHint = 207;
|
||||
glIsBuffer = 208;
|
||||
glIsEnabled = 209;
|
||||
glIsFenceNV = 210;
|
||||
glIsFramebuffer = 211;
|
||||
glIsFramebufferOES = 212;
|
||||
glIsProgram = 213;
|
||||
glIsRenderbuffer = 214;
|
||||
glIsRenderbufferOES = 215;
|
||||
glIsShader = 216;
|
||||
glIsTexture = 217;
|
||||
glIsVertexArrayOES = 218;
|
||||
glLightf = 219;
|
||||
glLightfv = 220;
|
||||
glLightModelf = 221;
|
||||
glLightModelfv = 222;
|
||||
glLightModelx = 223;
|
||||
glLightModelxOES = 224;
|
||||
glLightModelxv = 225;
|
||||
glLightModelxvOES = 226;
|
||||
glLightx = 227;
|
||||
glLightxOES = 228;
|
||||
glLightxv = 229;
|
||||
glLightxvOES = 230;
|
||||
glLineWidth = 231;
|
||||
glLineWidthx = 232;
|
||||
glLineWidthxOES = 233;
|
||||
glLinkProgram = 234;
|
||||
glLoadIdentity = 235;
|
||||
glLoadMatrixf = 236;
|
||||
glLoadMatrixx = 237;
|
||||
glLoadMatrixxOES = 238;
|
||||
glLoadPaletteFromModelViewMatrixOES = 239;
|
||||
glLogicOp = 240;
|
||||
glMapBufferOES = 241;
|
||||
glMaterialf = 242;
|
||||
glMaterialfv = 243;
|
||||
glMaterialx = 244;
|
||||
glMaterialxOES = 245;
|
||||
glMaterialxv = 246;
|
||||
glMaterialxvOES = 247;
|
||||
glMatrixIndexPointerOES = 248;
|
||||
glMatrixMode = 249;
|
||||
glMultiDrawArraysEXT = 250;
|
||||
glMultiDrawElementsEXT = 251;
|
||||
glMultiTexCoord4f = 252;
|
||||
glMultiTexCoord4x = 253;
|
||||
glMultiTexCoord4xOES = 254;
|
||||
glMultMatrixf = 255;
|
||||
glMultMatrixx = 256;
|
||||
glMultMatrixxOES = 257;
|
||||
glNormal3f = 258;
|
||||
glNormal3x = 259;
|
||||
glNormal3xOES = 260;
|
||||
glNormalPointer = 261;
|
||||
glOrthof = 262;
|
||||
glOrthofOES = 263;
|
||||
glOrthox = 264;
|
||||
glOrthoxOES = 265;
|
||||
glPixelStorei = 266;
|
||||
glPointParameterf = 267;
|
||||
glPointParameterfv = 268;
|
||||
glPointParameterx = 269;
|
||||
glPointParameterxOES = 270;
|
||||
glPointParameterxv = 271;
|
||||
glPointParameterxvOES = 272;
|
||||
glPointSize = 273;
|
||||
glPointSizePointerOES = 274;
|
||||
glPointSizex = 275;
|
||||
glPointSizexOES = 276;
|
||||
glPolygonOffset = 277;
|
||||
glPolygonOffsetx = 278;
|
||||
glPolygonOffsetxOES = 279;
|
||||
glPopMatrix = 280;
|
||||
glProgramBinaryOES = 281;
|
||||
glPushMatrix = 282;
|
||||
glQueryMatrixxOES = 283;
|
||||
glReadPixels = 284;
|
||||
glReleaseShaderCompiler = 285;
|
||||
glRenderbufferStorage = 286;
|
||||
glRenderbufferStorageMultisampleIMG = 287;
|
||||
glRenderbufferStorageOES = 288;
|
||||
glRotatef = 289;
|
||||
glRotatex = 290;
|
||||
glRotatexOES = 291;
|
||||
glSampleCoverage = 292;
|
||||
glSampleCoveragex = 293;
|
||||
glSampleCoveragexOES = 294;
|
||||
glScalef = 295;
|
||||
glScalex = 296;
|
||||
glScalexOES = 297;
|
||||
glScissor = 298;
|
||||
glSelectPerfMonitorCountersAMD = 299;
|
||||
glSetFenceNV = 300;
|
||||
glShadeModel = 301;
|
||||
glShaderBinary = 302;
|
||||
glShaderSource = 303;
|
||||
glStartTilingQCOM = 304;
|
||||
glStencilFunc = 305;
|
||||
glStencilFuncSeparate = 306;
|
||||
glStencilMask = 307;
|
||||
glStencilMaskSeparate = 308;
|
||||
glStencilOp = 309;
|
||||
glStencilOpSeparate = 310;
|
||||
glTestFenceNV = 311;
|
||||
glTexCoordPointer = 312;
|
||||
glTexEnvf = 313;
|
||||
glTexEnvfv = 314;
|
||||
glTexEnvi = 315;
|
||||
glTexEnviv = 316;
|
||||
glTexEnvx = 317;
|
||||
glTexEnvxOES = 318;
|
||||
glTexEnvxv = 319;
|
||||
glTexEnvxvOES = 320;
|
||||
glTexGenfOES = 321;
|
||||
glTexGenfvOES = 322;
|
||||
glTexGeniOES = 323;
|
||||
glTexGenivOES = 324;
|
||||
glTexGenxOES = 325;
|
||||
glTexGenxvOES = 326;
|
||||
glTexImage2D = 327;
|
||||
glTexImage3DOES = 328;
|
||||
glTexParameterf = 329;
|
||||
glTexParameterfv = 330;
|
||||
glTexParameteri = 331;
|
||||
glTexParameteriv = 332;
|
||||
glTexParameterx = 333;
|
||||
glTexParameterxOES = 334;
|
||||
glTexParameterxv = 335;
|
||||
glTexParameterxvOES = 336;
|
||||
glTexSubImage2D = 337;
|
||||
glTexSubImage3DOES = 338;
|
||||
glTranslatef = 339;
|
||||
glTranslatex = 340;
|
||||
glTranslatexOES = 341;
|
||||
glUniform1f = 342;
|
||||
glUniform1fv = 343;
|
||||
glUniform1i = 344;
|
||||
glUniform1iv = 345;
|
||||
glUniform2f = 346;
|
||||
glUniform2fv = 347;
|
||||
glUniform2i = 348;
|
||||
glUniform2iv = 349;
|
||||
glUniform3f = 350;
|
||||
glUniform3fv = 351;
|
||||
glUniform3i = 352;
|
||||
glUniform3iv = 353;
|
||||
glUniform4f = 354;
|
||||
glUniform4fv = 355;
|
||||
glUniform4i = 356;
|
||||
glUniform4iv = 357;
|
||||
glUniformMatrix2fv = 358;
|
||||
glUniformMatrix3fv = 359;
|
||||
glUniformMatrix4fv = 360;
|
||||
glUnmapBufferOES = 361;
|
||||
glUseProgram = 362;
|
||||
glValidateProgram = 363;
|
||||
glVertexAttrib1f = 364;
|
||||
glVertexAttrib1fv = 365;
|
||||
glVertexAttrib2f = 366;
|
||||
glVertexAttrib2fv = 367;
|
||||
glVertexAttrib3f = 368;
|
||||
glVertexAttrib3fv = 369;
|
||||
glVertexAttrib4f = 370;
|
||||
glVertexAttrib4fv = 371;
|
||||
glVertexAttribPointer = 372;
|
||||
glVertexPointer = 373;
|
||||
glViewport = 374;
|
||||
glWeightPointerOES = 375;
|
||||
|
||||
eglGetDisplay = 2000;
|
||||
eglInitialize = 2001;
|
||||
eglTerminate = 2002;
|
||||
eglGetConfigs = 2003;
|
||||
eglChooseConfig = 2004;
|
||||
eglGetConfigAttrib = 2005;
|
||||
eglCreateWindowSurface = 2006;
|
||||
eglCreatePixmapSurface = 2007;
|
||||
eglCreatePbufferSurface = 2008;
|
||||
eglDestroySurface = 2009;
|
||||
eglQuerySurface = 2010;
|
||||
eglCreateContext = 2011;
|
||||
eglDestroyContext = 2012;
|
||||
eglMakeCurrent = 2013;
|
||||
eglGetCurrentContext = 2014;
|
||||
eglGetCurrentSurface = 2015;
|
||||
eglGetCurrentDisplay = 2016;
|
||||
eglQueryContext = 2017;
|
||||
eglWaitGL = 2018;
|
||||
eglWaitNative = 2019;
|
||||
eglSwapBuffers = 2020;
|
||||
eglCopyBuffers = 2021;
|
||||
eglGetError = 2022;
|
||||
eglQueryString = 2023;
|
||||
eglGetProcAddress = 2024;
|
||||
eglSurfaceAttrib = 2025;
|
||||
eglBindTexImage = 2026;
|
||||
eglReleaseTexImage = 2027;
|
||||
eglSwapInterval = 2028;
|
||||
eglBindAPI = 2029;
|
||||
eglQueryAPI = 2030;
|
||||
eglWaitClient = 2031;
|
||||
eglReleaseThread = 2032;
|
||||
eglCreatePbufferFromClientBuffer = 2033;
|
||||
eglLockSurfaceKHR = 2034;
|
||||
eglUnlockSurfaceKHR = 2035;
|
||||
eglCreateImageKHR = 2036;
|
||||
eglDestroyImageKHR = 2037;
|
||||
eglCreateSyncKHR = 2038;
|
||||
eglDestroySyncKHR = 2039;
|
||||
eglClientWaitSyncKHR = 2040;
|
||||
eglGetSyncAttribKHR = 2041;
|
||||
eglSetSwapRectangleANDROID = 2042;
|
||||
eglGetRenderBufferANDROID = 2043;
|
||||
eglGetSystemTimeFrequencyNV = 2044;
|
||||
eglGetSystemTimeNV = 2045;
|
||||
|
||||
invalid = 3000;
|
||||
frameBufferContents = 3001;
|
||||
}
|
||||
|
||||
// A GL call's return data and arguments are formatted into this DataType
|
||||
message DataType {
|
||||
enum Type {
|
||||
VOID = 1; // GLvoid
|
||||
CHAR = 2; // GLchar
|
||||
BYTE = 3; // GLbyte, GLubyte
|
||||
INT = 4; // GLbitfield, GLshort, GLint, GLsizei, GLushort, GLuint, GLfixed
|
||||
FLOAT = 5; // GLfloat, GLclampf
|
||||
BOOL = 6; // GLboolean
|
||||
ENUM = 7; // GLenum
|
||||
};
|
||||
|
||||
required Type type = 1 [default = VOID];
|
||||
required bool isArray = 2 [default = false];
|
||||
|
||||
repeated int32 intValue = 3;
|
||||
repeated float floatValue = 4;
|
||||
repeated bytes charValue = 5;
|
||||
repeated bytes rawBytes = 6;
|
||||
repeated bool boolValue = 7;
|
||||
}
|
||||
|
||||
required int32 context_id = 1; // GL context ID
|
||||
required Function function = 2 [default = invalid]; // GL function called
|
||||
repeated DataType args = 3; // GL function's arguments
|
||||
optional DataType returnValue = 4; // GL function's return value
|
||||
optional float duration = 5; // duration of GL call
|
||||
};
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,421 @@
|
|||
/*
|
||||
* Copyright 2011, 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 A SCRIPT. DO NOT EDIT.
|
||||
*/
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <GLES2/gl2.h>
|
||||
|
||||
#include "gltrace.pb.h"
|
||||
#include "gltrace_context.h"
|
||||
#include "gltrace_fixup.h"
|
||||
#include "gltrace_transport.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
|
||||
// Declarations for GL2 APIs
|
||||
|
||||
void GLTrace_glActiveTexture(GLenum texture);
|
||||
void GLTrace_glAttachShader(GLuint program, GLuint shader);
|
||||
void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name);
|
||||
void GLTrace_glBindBuffer(GLenum target, GLuint buffer);
|
||||
void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer);
|
||||
void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
|
||||
void GLTrace_glBindTexture(GLenum target, GLuint texture);
|
||||
void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
void GLTrace_glBlendEquation(GLenum mode);
|
||||
void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
|
||||
void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor);
|
||||
void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
|
||||
void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
|
||||
GLenum GLTrace_glCheckFramebufferStatus(GLenum target);
|
||||
void GLTrace_glClear(GLbitfield mask);
|
||||
void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
void GLTrace_glClearDepthf(GLclampf depth);
|
||||
void GLTrace_glClearStencil(GLint s);
|
||||
void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
void GLTrace_glCompileShader(GLuint shader);
|
||||
void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
|
||||
void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
|
||||
void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLuint GLTrace_glCreateProgram(void);
|
||||
GLuint GLTrace_glCreateShader(GLenum type);
|
||||
void GLTrace_glCullFace(GLenum mode);
|
||||
void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers);
|
||||
void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
|
||||
void GLTrace_glDeleteProgram(GLuint program);
|
||||
void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
|
||||
void GLTrace_glDeleteShader(GLuint shader);
|
||||
void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures);
|
||||
void GLTrace_glDepthFunc(GLenum func);
|
||||
void GLTrace_glDepthMask(GLboolean flag);
|
||||
void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar);
|
||||
void GLTrace_glDetachShader(GLuint program, GLuint shader);
|
||||
void GLTrace_glDisable(GLenum cap);
|
||||
void GLTrace_glDisableVertexAttribArray(GLuint index);
|
||||
void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count);
|
||||
void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
|
||||
void GLTrace_glEnable(GLenum cap);
|
||||
void GLTrace_glEnableVertexAttribArray(GLuint index);
|
||||
void GLTrace_glFinish(void);
|
||||
void GLTrace_glFlush(void);
|
||||
void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
void GLTrace_glFrontFace(GLenum mode);
|
||||
void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers);
|
||||
void GLTrace_glGenerateMipmap(GLenum target);
|
||||
void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers);
|
||||
void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
|
||||
void GLTrace_glGenTextures(GLsizei n, GLuint* textures);
|
||||
void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||
void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||
void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
|
||||
int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name);
|
||||
void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params);
|
||||
void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
|
||||
GLenum GLTrace_glGetError(void);
|
||||
void GLTrace_glGetFloatv(GLenum pname, GLfloat* params);
|
||||
void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
void GLTrace_glGetIntegerv(GLenum pname, GLint* params);
|
||||
void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params);
|
||||
void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||
void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
|
||||
void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
|
||||
void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||
void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
||||
void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
|
||||
const GLubyte* GLTrace_glGetString(GLenum name);
|
||||
void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
|
||||
void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
|
||||
void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params);
|
||||
void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params);
|
||||
int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name);
|
||||
void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
|
||||
void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
|
||||
void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
|
||||
void GLTrace_glHint(GLenum target, GLenum mode);
|
||||
GLboolean GLTrace_glIsBuffer(GLuint buffer);
|
||||
GLboolean GLTrace_glIsEnabled(GLenum cap);
|
||||
GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer);
|
||||
GLboolean GLTrace_glIsProgram(GLuint program);
|
||||
GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer);
|
||||
GLboolean GLTrace_glIsShader(GLuint shader);
|
||||
GLboolean GLTrace_glIsTexture(GLuint texture);
|
||||
void GLTrace_glLineWidth(GLfloat width);
|
||||
void GLTrace_glLinkProgram(GLuint program);
|
||||
void GLTrace_glPixelStorei(GLenum pname, GLint param);
|
||||
void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units);
|
||||
void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
|
||||
void GLTrace_glReleaseShaderCompiler(void);
|
||||
void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert);
|
||||
void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
|
||||
void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
|
||||
void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask);
|
||||
void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
void GLTrace_glStencilMask(GLuint mask);
|
||||
void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask);
|
||||
void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param);
|
||||
void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
|
||||
void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param);
|
||||
void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
|
||||
void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
void GLTrace_glUniform1f(GLint location, GLfloat x);
|
||||
void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
void GLTrace_glUniform1i(GLint location, GLint x);
|
||||
void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v);
|
||||
void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y);
|
||||
void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
void GLTrace_glUniform2i(GLint location, GLint x, GLint y);
|
||||
void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v);
|
||||
void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||
void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z);
|
||||
void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v);
|
||||
void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
|
||||
void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||
void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v);
|
||||
void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
void GLTrace_glUseProgram(GLuint program);
|
||||
void GLTrace_glValidateProgram(GLuint program);
|
||||
void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x);
|
||||
void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values);
|
||||
void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
|
||||
void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values);
|
||||
void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||
void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values);
|
||||
void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values);
|
||||
void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
|
||||
void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
// Declarations for GL2Ext APIs
|
||||
|
||||
void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
|
||||
void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
|
||||
void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
|
||||
void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
|
||||
void* GLTrace_glMapBufferOES(GLenum target, GLenum access);
|
||||
GLboolean GLTrace_glUnmapBufferOES(GLenum target);
|
||||
void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params);
|
||||
void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
|
||||
void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
|
||||
void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
void GLTrace_glBindVertexArrayOES(GLuint array);
|
||||
void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
|
||||
void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays);
|
||||
GLboolean GLTrace_glIsVertexArrayOES(GLuint array);
|
||||
void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
||||
void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
||||
void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
|
||||
void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
|
||||
void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data);
|
||||
void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors);
|
||||
void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors);
|
||||
void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
|
||||
void GLTrace_glBeginPerfMonitorAMD(GLuint monitor);
|
||||
void GLTrace_glEndPerfMonitorAMD(GLuint monitor);
|
||||
void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
||||
void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
|
||||
void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
|
||||
void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
|
||||
void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences);
|
||||
void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences);
|
||||
GLboolean GLTrace_glIsFenceNV(GLuint fence);
|
||||
GLboolean GLTrace_glTestFenceNV(GLuint fence);
|
||||
void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params);
|
||||
void GLTrace_glFinishFenceNV(GLuint fence);
|
||||
void GLTrace_glSetFenceNV(GLuint fence, GLenum condition);
|
||||
void GLTrace_glCoverageMaskNV(GLboolean mask);
|
||||
void GLTrace_glCoverageOperationNV(GLenum operation);
|
||||
void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls);
|
||||
void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
|
||||
void GLTrace_glEnableDriverControlQCOM(GLuint driverControl);
|
||||
void GLTrace_glDisableDriverControlQCOM(GLuint driverControl);
|
||||
void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
|
||||
void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
|
||||
void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param);
|
||||
void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
|
||||
void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params);
|
||||
void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders);
|
||||
void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms);
|
||||
GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program);
|
||||
void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length);
|
||||
void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
|
||||
void GLTrace_glEndTilingQCOM(GLbitfield preserveMask);
|
||||
|
||||
// Declarations for GL1 APIs
|
||||
|
||||
void GLTrace_glAlphaFunc(GLenum func, GLclampf ref);
|
||||
void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation);
|
||||
void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
void GLTrace_glFogf(GLenum pname, GLfloat param);
|
||||
void GLTrace_glFogfv(GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]);
|
||||
void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params);
|
||||
void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
|
||||
void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params);
|
||||
void GLTrace_glLightModelf(GLenum pname, GLfloat param);
|
||||
void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param);
|
||||
void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glLoadMatrixf(const GLfloat *m);
|
||||
void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param);
|
||||
void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glMultMatrixf(const GLfloat *m);
|
||||
void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
void GLTrace_glPointParameterf(GLenum pname, GLfloat param);
|
||||
void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glPointSize(GLfloat size);
|
||||
void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z);
|
||||
void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param);
|
||||
void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z);
|
||||
void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref);
|
||||
void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
void GLTrace_glClearDepthx(GLclampx depth);
|
||||
void GLTrace_glClientActiveTexture(GLenum texture);
|
||||
void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation);
|
||||
void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar);
|
||||
void GLTrace_glDisableClientState(GLenum array);
|
||||
void GLTrace_glEnableClientState(GLenum array);
|
||||
void GLTrace_glFogx(GLenum pname, GLfixed param);
|
||||
void GLTrace_glFogxv(GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]);
|
||||
void GLTrace_glGetFixedv(GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetPointerv(GLenum pname, GLvoid **params);
|
||||
void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params);
|
||||
void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glLightModelx(GLenum pname, GLfixed param);
|
||||
void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param);
|
||||
void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glLineWidthx(GLfixed width);
|
||||
void GLTrace_glLoadIdentity(void);
|
||||
void GLTrace_glLoadMatrixx(const GLfixed *m);
|
||||
void GLTrace_glLogicOp(GLenum opcode);
|
||||
void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param);
|
||||
void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glMatrixMode(GLenum mode);
|
||||
void GLTrace_glMultMatrixx(const GLfixed *m);
|
||||
void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
void GLTrace_glPointParameterx(GLenum pname, GLfixed param);
|
||||
void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glPointSizex(GLfixed size);
|
||||
void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units);
|
||||
void GLTrace_glPopMatrix(void);
|
||||
void GLTrace_glPushMatrix(void);
|
||||
void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert);
|
||||
void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z);
|
||||
void GLTrace_glShadeModel(GLenum mode);
|
||||
void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param);
|
||||
void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param);
|
||||
void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params);
|
||||
void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param);
|
||||
void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z);
|
||||
void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
// Declarations for GL1Ext APIs
|
||||
|
||||
void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
|
||||
void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
void GLTrace_glBlendEquationOES(GLenum mode);
|
||||
void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
|
||||
void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
|
||||
void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
|
||||
void GLTrace_glDrawTexsvOES(const GLshort *coords);
|
||||
void GLTrace_glDrawTexivOES(const GLint *coords);
|
||||
void GLTrace_glDrawTexxvOES(const GLfixed *coords);
|
||||
void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
|
||||
void GLTrace_glDrawTexfvOES(const GLfloat *coords);
|
||||
void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref);
|
||||
void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
void GLTrace_glClearDepthxOES(GLclampx depth);
|
||||
void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation);
|
||||
void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar);
|
||||
void GLTrace_glFogxOES(GLenum pname, GLfixed param);
|
||||
void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]);
|
||||
void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glLightModelxOES(GLenum pname, GLfixed param);
|
||||
void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param);
|
||||
void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glLineWidthxOES(GLfixed width);
|
||||
void GLTrace_glLoadMatrixxOES(const GLfixed *m);
|
||||
void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param);
|
||||
void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glMultMatrixxOES(const GLfixed *m);
|
||||
void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param);
|
||||
void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glPointSizexOES(GLfixed size);
|
||||
void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units);
|
||||
void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert);
|
||||
void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z);
|
||||
void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param);
|
||||
void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param);
|
||||
void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z);
|
||||
GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer);
|
||||
void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer);
|
||||
void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
|
||||
void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
|
||||
void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
|
||||
GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer);
|
||||
void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer);
|
||||
void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
|
||||
void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers);
|
||||
GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target);
|
||||
void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
void GLTrace_glGenerateMipmapOES(GLenum target);
|
||||
void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex);
|
||||
void GLTrace_glLoadPaletteFromModelViewMatrixOES(void);
|
||||
void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]);
|
||||
void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar);
|
||||
void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation);
|
||||
void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]);
|
||||
void GLTrace_glClearDepthfOES(GLclampf depth);
|
||||
void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param);
|
||||
void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params);
|
||||
void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param);
|
||||
void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params);
|
||||
void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param);
|
||||
void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params);
|
||||
void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params);
|
||||
void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params);
|
||||
void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params);
|
||||
void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn);
|
||||
void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn);
|
||||
|
||||
|
||||
}; // namespace gltrace
|
||||
}; // namespace android
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
extern "C" {
|
||||
#include "liblzf/lzf.h"
|
||||
}
|
||||
|
||||
#include "gltrace_context.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
using ::android::gl_hooks_t;
|
||||
|
||||
static pthread_key_t sTLSKey = -1;
|
||||
static pthread_once_t sPthreadOnceKey = PTHREAD_ONCE_INIT;
|
||||
|
||||
void createTLSKey() {
|
||||
pthread_key_create(&sTLSKey, NULL);
|
||||
}
|
||||
|
||||
GLTraceContext *getGLTraceContext() {
|
||||
return (GLTraceContext*) pthread_getspecific(sTLSKey);
|
||||
}
|
||||
|
||||
void setGLTraceContext(GLTraceContext *c) {
|
||||
pthread_setspecific(sTLSKey, c);
|
||||
}
|
||||
|
||||
void initContext(unsigned version, gl_hooks_t *hooks) {
|
||||
pthread_once(&sPthreadOnceKey, createTLSKey);
|
||||
|
||||
GLTraceContext *context = new GLTraceContext();
|
||||
context->hooks = hooks;
|
||||
|
||||
setGLTraceContext(context);
|
||||
}
|
||||
|
||||
void releaseContext() {
|
||||
GLTraceContext *c = getGLTraceContext();
|
||||
if (c != NULL) {
|
||||
delete c;
|
||||
setGLTraceContext(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
GLTraceContext::GLTraceContext() {
|
||||
fbcontents = fbcompressed = NULL;
|
||||
fbcontentsSize = 0;
|
||||
}
|
||||
|
||||
void GLTraceContext::resizeFBMemory(unsigned minSize) {
|
||||
if (fbcontentsSize >= minSize) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fbcontents != NULL) {
|
||||
free(fbcontents);
|
||||
free(fbcompressed);
|
||||
}
|
||||
|
||||
fbcontents = malloc(minSize);
|
||||
fbcompressed = malloc(minSize);
|
||||
|
||||
fbcontentsSize = minSize;
|
||||
}
|
||||
|
||||
/** obtain a pointer to the compressed framebuffer image */
|
||||
void GLTraceContext::getCompressedFB(void **fb, unsigned *fbsize, unsigned *fbwidth,
|
||||
unsigned *fbheight) {
|
||||
int viewport[4] = {};
|
||||
hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
|
||||
unsigned fbContentsSize = viewport[2] * viewport[3] * 4;
|
||||
|
||||
resizeFBMemory(fbContentsSize);
|
||||
|
||||
//TODO: On eglSwapBuffer, read FB0. For glDraw calls, read currently
|
||||
// bound FB.
|
||||
//hooks->gl.glGetIntegerv(GL_FRAMEBUFFER_BINDING, &bound_fb);
|
||||
//hooks->gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
hooks->gl.glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3],
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, fbcontents);
|
||||
*fbsize = lzf_compress(fbcontents, fbContentsSize, fbcompressed, fbContentsSize);
|
||||
*fb = fbcompressed;
|
||||
*fbwidth = viewport[2];
|
||||
*fbheight = viewport[3];
|
||||
}
|
||||
|
||||
}; // namespace gltrace
|
||||
}; // namespace android
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#ifndef __GLTRACE_CONTEXT_H_
|
||||
#define __GLTRACE_CONTEXT_H_
|
||||
|
||||
#include "hooks.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
using ::android::gl_hooks_t;
|
||||
|
||||
class GLTraceContext {
|
||||
void *fbcontents; /* memory area to read framebuffer contents */
|
||||
void *fbcompressed; /* destination for lzf compressed framebuffer */
|
||||
unsigned fbcontentsSize; /* size of fbcontents & fbcompressed buffers */
|
||||
|
||||
void resizeFBMemory(unsigned minSize);
|
||||
public:
|
||||
gl_hooks_t *hooks;
|
||||
|
||||
GLTraceContext();
|
||||
void getCompressedFB(void **fb, unsigned *fbsize, unsigned *fbwidth, unsigned *fbheight);
|
||||
};
|
||||
|
||||
GLTraceContext *getGLTraceContext();
|
||||
void setGLTraceContext(GLTraceContext *c);
|
||||
void initContext(unsigned version, gl_hooks_t *hooks);
|
||||
void releaseContext();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include <cutils/log.h>
|
||||
|
||||
#include "gltrace.pb.h"
|
||||
#include "gltrace_context.h"
|
||||
#include "gltrace_fixup.h"
|
||||
#include "gltrace_transport.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
|
||||
GLMessage glmessage;
|
||||
GLTraceContext *glContext = getGLTraceContext();
|
||||
|
||||
glmessage.set_context_id(1);
|
||||
glmessage.set_function(GLMessage::eglSwapBuffers);
|
||||
|
||||
fixup_addFBContents(&glmessage);
|
||||
traceGLMessage(&glmessage);
|
||||
}
|
||||
|
||||
};
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#ifndef __GLTRACE_EGL_H_
|
||||
#define __GLTRACE_EGL_H_
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
void GLTrace_eglSwapBuffers(void *dpy, void *draw);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cutils/log.h>
|
||||
#include <cutils/properties.h>
|
||||
|
||||
#include "hooks.h"
|
||||
#include "glestrace.h"
|
||||
|
||||
#include "gltrace_context.h"
|
||||
#include "gltrace_egl.h"
|
||||
#include "gltrace_hooks.h"
|
||||
#include "gltrace_transport.h"
|
||||
|
||||
namespace android {
|
||||
|
||||
void GLTrace_eglMakeCurrent(const unsigned version, gl_hooks_t *hooks) {
|
||||
gltrace::initContext(version, hooks);
|
||||
}
|
||||
|
||||
void GLTrace_eglReleaseThread() {
|
||||
gltrace::releaseContext();
|
||||
}
|
||||
|
||||
void GLTrace_eglCreateContext(int version, EGLContext c) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void GLTrace_start() {
|
||||
char value[PROPERTY_VALUE_MAX];
|
||||
|
||||
property_get("debug.egl.debug_port", value, "5039");
|
||||
const unsigned short port = (unsigned short)atoi(value);
|
||||
|
||||
gltrace::startServer(port);
|
||||
}
|
||||
|
||||
void GLTrace_stop() {
|
||||
gltrace::stopServer();
|
||||
}
|
||||
|
||||
gl_hooks_t *GLTrace_getGLHooks() {
|
||||
return gltrace::getGLHooks();
|
||||
}
|
||||
|
||||
void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
|
||||
gltrace::GLTrace_eglSwapBuffers(dpy, draw);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <GLES2/gl2.h>
|
||||
|
||||
#include "gltrace.pb.h"
|
||||
#include "gltrace_context.h"
|
||||
#include "gltrace_fixup.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
unsigned getBytesPerTexel(const GLenum format, const GLenum type) {
|
||||
/*
|
||||
Description from glTexImage2D spec:
|
||||
|
||||
Data is read from data as a sequence of unsigned bytes or shorts, depending on type.
|
||||
When type is GL_UNSIGNED_BYTE, each of the bytes is interpreted as one color component.
|
||||
When type is one of GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4, or
|
||||
GL_UNSIGNED_SHORT_5_5_5_1, each unsigned short value is interpreted as containing all
|
||||
the components for a single texel, with the color components arranged according to
|
||||
format. Color components are treated as groups of one, two, three, or four values,
|
||||
again based on format. Groups of components are referred to as texels.
|
||||
|
||||
width × height texels are read from memory, starting at location data. By default,
|
||||
these texels are taken from adjacent memory locations, except that after all width
|
||||
texels are read, the read pointer is advanced to the next four-byte boundary.
|
||||
The four-byte row alignment is specified by glPixelStorei with argument
|
||||
GL_UNPACK_ALIGNMENT, and it can be set to one, two, four, or eight bytes.
|
||||
*/
|
||||
|
||||
switch (type) {
|
||||
case GL_UNSIGNED_SHORT_5_6_5:
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
case GL_UNSIGNED_SHORT_5_5_5_1:
|
||||
return 2;
|
||||
case GL_UNSIGNED_BYTE:
|
||||
break;
|
||||
default:
|
||||
LOGE("GetBytesPerPixel: unknown type %x", type);
|
||||
}
|
||||
|
||||
switch (format) {
|
||||
case GL_ALPHA:
|
||||
case GL_LUMINANCE:
|
||||
return 1;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
return 2;
|
||||
case GL_RGB:
|
||||
return 3;
|
||||
case GL_RGBA:
|
||||
case 0x80E1: // GL_BGRA_EXT
|
||||
return 4;
|
||||
default:
|
||||
LOGE("GetBytesPerPixel: unknown format %x", format);
|
||||
}
|
||||
|
||||
return 1; // in doubt...
|
||||
}
|
||||
|
||||
/** Generic helper function: extract pointer at argIndex and
|
||||
replace it with the C style string at *pointer */
|
||||
void fixup_CStringPtr(int argIndex, GLMessage *glmsg) {
|
||||
GLMessage_DataType *arg = glmsg->mutable_args(argIndex);
|
||||
GLchar *ptr = (GLchar *)arg->intvalue(0);
|
||||
|
||||
arg->set_type(GLMessage::DataType::CHAR);
|
||||
arg->set_isarray(true);
|
||||
arg->add_charvalue(ptr);
|
||||
}
|
||||
|
||||
void fixup_glGetString(GLMessage *glmsg) {
|
||||
/* const GLubyte* GLTrace_glGetString(GLenum name) */
|
||||
GLMessage_DataType *ret = glmsg->mutable_returnvalue();
|
||||
GLchar *ptr = (GLchar *)ret->intvalue(0);
|
||||
|
||||
if (ptr != NULL) {
|
||||
ret->set_type(GLMessage::DataType::CHAR);
|
||||
ret->set_isarray(true);
|
||||
ret->add_charvalue(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the contents of the framebuffer as an argument */
|
||||
void fixup_addFBContents(GLMessage *glmsg) {
|
||||
GLMessage_DataType *arg_fb = glmsg->add_args(); /* Add the FB as the last argument */
|
||||
GLTraceContext *glContext = getGLTraceContext();
|
||||
|
||||
void *fb;
|
||||
unsigned fbsize, fbwidth, fbheight;
|
||||
glContext->getCompressedFB(&fb, &fbsize, &fbwidth, &fbheight);
|
||||
|
||||
arg_fb->set_isarray(true);
|
||||
arg_fb->set_type(GLMessage::DataType::BYTE);
|
||||
arg_fb->add_rawbytes(fb, fbsize);
|
||||
arg_fb->add_intvalue(fbwidth);
|
||||
arg_fb->add_intvalue(fbheight);
|
||||
}
|
||||
|
||||
void fixup_glTexImage2D(GLMessage *glmsg) {
|
||||
/* void glTexImage2D(GLenum target,
|
||||
GLint level,
|
||||
GLint internalformat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLint border,
|
||||
GLenum format,
|
||||
GLenum type,
|
||||
const GLvoid *data);
|
||||
*/
|
||||
GLMessage_DataType arg_width = glmsg->args(3);
|
||||
GLMessage_DataType arg_height = glmsg->args(4);
|
||||
GLMessage_DataType arg_format = glmsg->args(6);
|
||||
GLMessage_DataType arg_type = glmsg->args(7);
|
||||
GLMessage_DataType *arg_data = glmsg->mutable_args(8);
|
||||
|
||||
GLsizei width = arg_width.intvalue(0);
|
||||
GLsizei height = arg_height.intvalue(0);
|
||||
GLenum format = arg_format.intvalue(0);
|
||||
GLenum type = arg_type.intvalue(0);
|
||||
void *data = (void *)arg_data->intvalue(0);
|
||||
|
||||
int bytesPerTexel = getBytesPerTexel(format, type);
|
||||
|
||||
arg_data->set_type(GLMessage::DataType::BYTE);
|
||||
arg_data->set_isarray(true);
|
||||
arg_data->clear_rawbytes();
|
||||
|
||||
if (data != NULL) {
|
||||
arg_data->add_rawbytes(data, bytesPerTexel * width * height);
|
||||
} else {
|
||||
LOGE("fixup_glTexImage2D: image data is NULL.\n");
|
||||
arg_data->set_type(GLMessage::DataType::VOID);
|
||||
// FIXME:
|
||||
// This will create the texture, but it will be uninitialized.
|
||||
// It can later be initialized with glTexSubImage2D or by
|
||||
// attaching an FBO to it and rendering into the FBO.
|
||||
}
|
||||
}
|
||||
|
||||
void fixup_glShaderSource(GLMessage *glmsg) {
|
||||
/* void glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
|
||||
const GLint* length) */
|
||||
GLMessage_DataType arg_count = glmsg->args(1);
|
||||
GLMessage_DataType arg_lenp = glmsg->args(3);
|
||||
GLMessage_DataType *arg_strpp = glmsg->mutable_args(2);
|
||||
|
||||
GLsizei count = arg_count.intvalue(0);
|
||||
GLchar **stringpp = (GLchar **)arg_strpp->intvalue(0);
|
||||
GLint *lengthp = (GLint *)arg_lenp.intvalue(0);
|
||||
|
||||
arg_strpp->set_type(GLMessage::DataType::CHAR);
|
||||
arg_strpp->set_isarray(true);
|
||||
arg_strpp->clear_charvalue();
|
||||
|
||||
::std::string src = "";
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (lengthp != NULL)
|
||||
src.append(*stringpp, *lengthp);
|
||||
else
|
||||
src.append(*stringpp); // assume null terminated
|
||||
stringpp++;
|
||||
lengthp++;
|
||||
}
|
||||
|
||||
arg_strpp->add_charvalue(src);
|
||||
}
|
||||
|
||||
void fixup_glUniformGeneric(int argIndex, int nFloats, GLMessage *glmsg) {
|
||||
GLMessage_DataType *arg_values = glmsg->mutable_args(argIndex);
|
||||
GLfloat *src = (GLfloat*)arg_values->intvalue(0);
|
||||
|
||||
arg_values->set_type(GLMessage::DataType::FLOAT);
|
||||
arg_values->set_isarray(true);
|
||||
arg_values->clear_floatvalue();
|
||||
|
||||
for (int i = 0; i < nFloats; i++) {
|
||||
arg_values->add_floatvalue(*src++);
|
||||
}
|
||||
}
|
||||
|
||||
void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg) {
|
||||
/* void glUniformMatrix?fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
const GLfloat* value) */
|
||||
GLMessage_DataType arg_count = glmsg->args(1);
|
||||
int n_matrices = arg_count.intvalue(0);
|
||||
fixup_glUniformGeneric(3, matrixSize * matrixSize * n_matrices, glmsg);
|
||||
}
|
||||
|
||||
void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg) {
|
||||
GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
|
||||
GLint *intp = (GLint *)arg_intarray->intvalue(0);
|
||||
|
||||
arg_intarray->set_type(GLMessage::DataType::INT);
|
||||
arg_intarray->set_isarray(true);
|
||||
arg_intarray->clear_intvalue();
|
||||
|
||||
for (int i = 0; i < nInts; i++, intp++) {
|
||||
arg_intarray->add_intvalue(*intp);
|
||||
}
|
||||
}
|
||||
|
||||
void fixup_glGenGeneric(GLMessage *glmsg) {
|
||||
/* void glGen*(GLsizei n, GLuint * buffers); */
|
||||
GLMessage_DataType arg_n = glmsg->args(0);
|
||||
GLsizei n = arg_n.intvalue(0);
|
||||
|
||||
fixup_GenericIntArray(1, n, glmsg);
|
||||
}
|
||||
|
||||
void fixup_glGetBooleanv(GLMessage *glmsg) {
|
||||
/* void glGetBooleanv(GLenum pname, GLboolean *params); */
|
||||
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
|
||||
GLboolean *src = (GLboolean*)arg_params->intvalue(0);
|
||||
|
||||
arg_params->set_type(GLMessage::DataType::BOOL);
|
||||
arg_params->set_isarray(true);
|
||||
arg_params->clear_boolvalue();
|
||||
arg_params->add_boolvalue(*src);
|
||||
}
|
||||
|
||||
void fixup_glGetFloatv(GLMessage *glmsg) {
|
||||
/* void glGetFloatv(GLenum pname, GLfloat *params); */
|
||||
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
|
||||
GLfloat *src = (GLfloat*)arg_params->intvalue(0);
|
||||
|
||||
arg_params->set_type(GLMessage::DataType::FLOAT);
|
||||
arg_params->set_isarray(true);
|
||||
arg_params->clear_floatvalue();
|
||||
arg_params->add_floatvalue(*src);
|
||||
}
|
||||
|
||||
void fixupGLMessage(GLMessage *glmsg) {
|
||||
switch (glmsg->function()) {
|
||||
case GLMessage::glGenBuffers: /* void glGenBuffers(GLsizei n, GLuint * buffers); */
|
||||
case GLMessage::glGenFramebuffers: /* void glGenFramebuffers(GLsizei n, GLuint * buffers); */
|
||||
case GLMessage::glGenRenderbuffers: /* void glGenFramebuffers(GLsizei n, GLuint * buffers); */
|
||||
case GLMessage::glGenTextures: /* void glGenTextures(GLsizei n, GLuint * buffers); */
|
||||
fixup_glGenGeneric(glmsg);
|
||||
break;
|
||||
case GLMessage::glGetAttribLocation:
|
||||
case GLMessage::glGetUniformLocation:
|
||||
/* int glGetAttribLocation(GLuint program, const GLchar* name) */
|
||||
/* int glGetUniformLocation(GLuint program, const GLchar* name) */
|
||||
fixup_CStringPtr(1, glmsg);
|
||||
break;
|
||||
case GLMessage::glGetBooleanv:
|
||||
fixup_glGetBooleanv(glmsg);
|
||||
break;
|
||||
case GLMessage::glGetFloatv:
|
||||
fixup_glGetFloatv(glmsg);
|
||||
break;
|
||||
case GLMessage::glGetIntegerv: /* void glGetIntegerv(GLenum pname, GLint *params); */
|
||||
fixup_GenericIntArray(1, 1, glmsg);
|
||||
break;
|
||||
case GLMessage::glGetProgramiv:
|
||||
case GLMessage::glGetRenderbufferParameteriv:
|
||||
case GLMessage::glGetShaderiv:
|
||||
/* void glGetProgramiv(GLuint program, GLenum pname, GLint* params) */
|
||||
/* void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) */
|
||||
/* void glGetShaderiv(GLuint shader, GLenum pname, GLint* params) */
|
||||
fixup_GenericIntArray(2, 1, glmsg);
|
||||
break;
|
||||
case GLMessage::glGetString:
|
||||
fixup_glGetString(glmsg);
|
||||
break;
|
||||
case GLMessage::glTexImage2D:
|
||||
fixup_glTexImage2D(glmsg);
|
||||
break;
|
||||
case GLMessage::glShaderSource:
|
||||
fixup_glShaderSource(glmsg);
|
||||
break;
|
||||
case GLMessage::glUniformMatrix2fv:
|
||||
/* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
const GLfloat* value) */
|
||||
fixup_glUniformMatrixGeneric(2, glmsg);
|
||||
break;
|
||||
case GLMessage::glUniformMatrix3fv:
|
||||
/* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
const GLfloat* value) */
|
||||
fixup_glUniformMatrixGeneric(3, glmsg);
|
||||
break;
|
||||
case GLMessage::glUniformMatrix4fv:
|
||||
/* void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
const GLfloat* value) */
|
||||
fixup_glUniformMatrixGeneric(4, glmsg);
|
||||
break;
|
||||
case GLMessage::glDrawArrays:
|
||||
case GLMessage::glDrawElements:
|
||||
/* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
|
||||
/* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */
|
||||
fixup_addFBContents(glmsg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
};
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include "gltrace.pb.h"
|
||||
|
||||
#ifndef __GLTRACE_FIXUP_H_
|
||||
#define __GLTRACE_FIXUP_H_
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
void fixupGLMessage(GLMessage *message);
|
||||
void fixup_addFBContents(GLMessage *message);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include "hooks.h"
|
||||
#include "gltrace_api.h"
|
||||
#include "gltrace_hooks.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
// Hook up all the GLTrace functions
|
||||
#define GL_ENTRY(_r, _api, ...) GLTrace_ ## _api,
|
||||
EGLAPI gl_hooks_t gHooksDebug = {
|
||||
{
|
||||
#include "entries.in"
|
||||
},
|
||||
{
|
||||
{0}
|
||||
}
|
||||
};
|
||||
#undef GL_ENTRY
|
||||
|
||||
gl_hooks_t *getGLHooks() {
|
||||
return &gHooksDebug;
|
||||
}
|
||||
|
||||
};
|
||||
};
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#ifndef __GLD_HOOKS_H_
|
||||
#define __GLD_HOOKS_H_
|
||||
|
||||
#include "hooks.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
using ::android::gl_hooks_t;
|
||||
|
||||
gl_hooks_t *getGLHooks();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <cutils/log.h>
|
||||
|
||||
#include "gltrace_transport.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
int gServerSocket, gClientSocket;
|
||||
|
||||
void startServer(int port) {
|
||||
if (gServerSocket > 0) {
|
||||
LOGD("startServer: server socket already open!");
|
||||
return;
|
||||
}
|
||||
|
||||
gServerSocket = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (gServerSocket < 0) {
|
||||
LOGE("Error (%d) while creating socket. Check if app has network permissions.",
|
||||
gServerSocket);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
struct sockaddr_in server, client;
|
||||
|
||||
server.sin_family = AF_INET;
|
||||
server.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
server.sin_port = htons(port);
|
||||
|
||||
socklen_t sockaddr_len = sizeof(sockaddr_in);
|
||||
if (bind(gServerSocket, (struct sockaddr *) &server, sizeof(server)) < 0) {
|
||||
close(gServerSocket);
|
||||
LOGE("Failed to bind the server socket");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (listen(gServerSocket, 1) < 0) {
|
||||
close(gServerSocket);
|
||||
LOGE("Failed to listen on server socket");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
LOGD("startServer: server started on %d", port);
|
||||
|
||||
/* Wait for client connection */
|
||||
if ((gClientSocket = accept(gServerSocket, (struct sockaddr *)&client, &sockaddr_len)) < 0) {
|
||||
close(gServerSocket);
|
||||
LOGE("Failed to accept client connection");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
LOGD("startServer: client connected: %s", inet_ntoa(client.sin_addr));
|
||||
}
|
||||
|
||||
void stopServer() {
|
||||
if (gServerSocket > 0) {
|
||||
close(gServerSocket);
|
||||
close(gClientSocket);
|
||||
gServerSocket = gClientSocket = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Send GLMessage to the receiver on the host. */
|
||||
void traceGLMessage(GLMessage *call) {
|
||||
if (gClientSocket <= 0) {
|
||||
LOGE("traceGLMessage: Attempt to send while client connection is not established");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string str;
|
||||
call->SerializeToString(&str);
|
||||
const uint32_t len = str.length();
|
||||
|
||||
int n = write(gClientSocket, &len, sizeof len);
|
||||
if (n != sizeof len) {
|
||||
LOGE("traceGLMessage: Error (%d) while writing message length\n", n);
|
||||
stopServer();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
n = write(gClientSocket, str.data(), str.length());
|
||||
if (n != (int) str.length()) {
|
||||
LOGE("traceGLMessage: Error while writing out message, result = %d, length = %d\n",
|
||||
n, str.length());
|
||||
stopServer();
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
}; // namespace gltrace
|
||||
}; // namespace android
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#ifndef __GLTRACE_TRANSPORT_H_
|
||||
#define __GLTRACE_TRANSPORT_H_
|
||||
|
||||
#include "gltrace.pb.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
void startServer(int port);
|
||||
void stopServer();
|
||||
|
||||
void traceGLMessage(GLMessage *msg);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,386 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (C) 2011 Google Inc.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ABOUT
|
||||
# This script is used to generate the trace implementations of all
|
||||
# OpenGL calls. When executed, it reads the specs for the OpenGL calls
|
||||
# from the files GLES2/gl2_api.in, GLES2/gl2ext_api.in, GLES_CM/gl_api.in,
|
||||
# and GLES_CM/glext_api.in, and generates trace versions for all the
|
||||
# defined functions.
|
||||
#
|
||||
# PREREQUISITES
|
||||
# To generate C++ files, this script uses the 'pyratemp' template
|
||||
# module. The only reason to use pyratemp is that it is extremly
|
||||
# simple to install:
|
||||
# $ wget http://www.simple-is-better.org/template/pyratemp-current/pyratemp.py
|
||||
# Put the file in the GLES2_trace/tools folder, or update PYTHONPATH
|
||||
# to point to wherever it was downloaded.
|
||||
#
|
||||
# USAGE
|
||||
# $ cd GLES2_trace - run the program from GLES2_trace folder
|
||||
# $ ./tools/genapi.py - generates a .cpp and .h file
|
||||
# $ mv *.cpp *.h src/ - move the generated files into the src folder
|
||||
|
||||
import sys
|
||||
import re
|
||||
import pyratemp
|
||||
|
||||
# Constants corresponding to the protobuf DataType.Type
|
||||
class DataType:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def __str__(self):
|
||||
if self.name == "pointer": # pointers map to the INT DataType
|
||||
return "INT"
|
||||
return self.name.upper()
|
||||
|
||||
def getProtobufCall(self):
|
||||
if self.name == "void":
|
||||
raise ValueError("Attempt to set void value")
|
||||
elif self.name == "char" or self.name == "byte" \
|
||||
or self.name == "pointer" or self.name == "enum":
|
||||
return "add_intvalue((int)"
|
||||
elif self.name == "int":
|
||||
return "add_intvalue("
|
||||
elif self.name == "float":
|
||||
return "add_floatvalue("
|
||||
elif self.name == "bool":
|
||||
return "add_boolvalue("
|
||||
else:
|
||||
raise ValueError("Unknown value type %s" % self.name)
|
||||
|
||||
DataType.VOID = DataType("void")
|
||||
DataType.CHAR = DataType("char")
|
||||
DataType.BYTE = DataType("byte")
|
||||
DataType.ENUM = DataType("enum")
|
||||
DataType.BOOL = DataType("bool")
|
||||
DataType.INT = DataType("int")
|
||||
DataType.FLOAT = DataType("float")
|
||||
DataType.POINTER = DataType("pointer")
|
||||
|
||||
# mapping of GL types to protobuf DataType
|
||||
GL2PROTOBUF_TYPE_MAP = {
|
||||
"GLvoid":DataType.VOID,
|
||||
"void":DataType.VOID,
|
||||
"GLchar":DataType.CHAR,
|
||||
"GLenum":DataType.ENUM,
|
||||
"GLboolean":DataType.BOOL,
|
||||
"GLbitfield":DataType.INT,
|
||||
"GLbyte":DataType.BYTE,
|
||||
"GLshort":DataType.INT,
|
||||
"GLint":DataType.INT,
|
||||
"int":DataType.INT,
|
||||
"GLsizei":DataType.INT,
|
||||
"GLubyte":DataType.BYTE,
|
||||
"GLushort":DataType.INT,
|
||||
"GLuint":DataType.INT,
|
||||
"GLfloat":DataType.FLOAT,
|
||||
"GLclampf":DataType.FLOAT,
|
||||
"GLfixed":DataType.INT,
|
||||
"GLclampx":DataType.INT,
|
||||
"GLsizeiptr":DataType.POINTER,
|
||||
"GLintptr":DataType.POINTER,
|
||||
"GLeglImageOES":DataType.POINTER,
|
||||
}
|
||||
|
||||
API_SPECS = [
|
||||
('GL2','../GLES2/gl2_api.in'),
|
||||
('GL2Ext','../GLES2/gl2ext_api.in'),
|
||||
('GL1','../GLES_CM/gl_api.in'),
|
||||
('GL1Ext','../GLES_CM/glext_api.in'),
|
||||
]
|
||||
|
||||
HEADER_TEXT = """/*
|
||||
* Copyright 2011, 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 A SCRIPT. DO NOT EDIT.
|
||||
*/
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <GLES2/gl2.h>
|
||||
|
||||
#include "gltrace.pb.h"
|
||||
#include "gltrace_context.h"
|
||||
#include "gltrace_fixup.h"
|
||||
#include "gltrace_transport.h"
|
||||
|
||||
namespace android {
|
||||
namespace gltrace {
|
||||
|
||||
"""
|
||||
|
||||
FOOTER_TEXT = """
|
||||
|
||||
}; // namespace gltrace
|
||||
}; // namespace android
|
||||
"""
|
||||
|
||||
TRACE_CALL_TEMPLATE = pyratemp.Template(
|
||||
"""$!retType!$ GLTrace_$!func!$($!inputArgList!$) {
|
||||
GLMessage glmsg;
|
||||
GLTraceContext *glContext = getGLTraceContext();
|
||||
|
||||
glmsg.set_context_id(1);
|
||||
glmsg.set_function(GLMessage::$!func!$);
|
||||
<!--(if len(parsedArgs) > 0)-->
|
||||
<!--(for argname, argtype in parsedArgs)-->
|
||||
|
||||
// copy argument $!argname!$
|
||||
GLMessage_DataType *arg_$!argname!$ = glmsg.add_args();
|
||||
arg_$!argname!$->set_isarray(false);
|
||||
arg_$!argname!$->set_type(GLMessage::DataType::$!argtype!$);
|
||||
arg_$!argname!$->$!argtype.getProtobufCall()!$$!argname!$);
|
||||
<!--(end)-->
|
||||
<!--(end)-->
|
||||
|
||||
// call function
|
||||
<!--(if retType != "void")-->
|
||||
$!retType!$ retValue = glContext->hooks->gl.$!callsite!$;
|
||||
<!--(else)-->
|
||||
glContext->hooks->gl.$!callsite!$;
|
||||
<!--(end)-->
|
||||
<!--(if retType != "void")-->
|
||||
|
||||
// set return value
|
||||
GLMessage_DataType *rt = glmsg.mutable_returnvalue();
|
||||
rt->set_isarray(false);
|
||||
rt->set_type(GLMessage::DataType::$!retDataType!$);
|
||||
rt->$!retDataType.getProtobufCall()!$retValue);
|
||||
<!--(end)-->
|
||||
|
||||
fixupGLMessage(&glmsg);
|
||||
traceGLMessage(&glmsg);
|
||||
<!--(if retType != "void")-->
|
||||
|
||||
return retValue;
|
||||
<!--(end)-->
|
||||
}
|
||||
""")
|
||||
|
||||
def getDataTypeFromKw(kw):
|
||||
""" Get the data type given declaration.
|
||||
All pointer declarations are of type DataType.POINTER
|
||||
|
||||
e.g.: GLvoid -> DataType.VOID"""
|
||||
|
||||
if kw.count('*') > 0:
|
||||
return DataType.POINTER
|
||||
return GL2PROTOBUF_TYPE_MAP.get(kw)
|
||||
|
||||
def getNameTypePair(decl):
|
||||
""" Split declaration of a variable to a tuple of (variable name, DataType).
|
||||
e.g. "const GLChar* varName" -> (varName, POINTER) """
|
||||
elements = decl.strip().split(' ')
|
||||
name = None
|
||||
if len(elements) > 1:
|
||||
name = " ".join(elements[-1:]).strip() # last element is the name
|
||||
dataType = " ".join(elements[:-1]).strip() # everything else is the data type
|
||||
|
||||
# if name is a pointer (e.g. "*ptr"), then remove the "*" from the name
|
||||
# and add it to the data type
|
||||
pointersInName = name.count("*")
|
||||
if pointersInName > 0:
|
||||
name = name.replace("*", "")
|
||||
dataType += "*" * pointersInName
|
||||
|
||||
# if name is an array (e.g. "array[10]"), then remove the "[X]" from the name
|
||||
# and make the datatype to be a pointer
|
||||
arraysInName = name.count("[")
|
||||
if arraysInName > 0:
|
||||
name = name.split('[')[0]
|
||||
dataType += "*"
|
||||
else:
|
||||
dataType = elements[0]
|
||||
return (name, getDataTypeFromKw(dataType))
|
||||
|
||||
def parseArgs(arglist):
|
||||
""" Parse the argument list into a list of (var name, DataType) tuples """
|
||||
args = arglist.split(',')
|
||||
args = map(lambda x: x.strip(), args) # remove unnecessary whitespaces
|
||||
argtypelist = map(getNameTypePair, args) # split arg into arg type and arg name
|
||||
if len(argtypelist) == 1:
|
||||
(name, argtype) = argtypelist[0]
|
||||
if argtype == DataType.VOID:
|
||||
return []
|
||||
|
||||
return argtypelist
|
||||
|
||||
class ApiCall(object):
|
||||
"""An ApiCall models all information about a single OpenGL API"""
|
||||
|
||||
# Regex to match API_ENTRY specification:
|
||||
# e.g. void API_ENTRY(glActiveTexture)(GLenum texture) {
|
||||
# the regex uses a non greedy match (?) to match the first closing paren
|
||||
API_ENTRY_REGEX = "(.*)API_ENTRY\(.*?\)\((.*?)\)"
|
||||
|
||||
# Regex to match CALL_GL_API specification:
|
||||
# e.g. CALL_GL_API(glCullFace, mode);
|
||||
# CALL_GL_API_RETURN(glCreateProgram);
|
||||
CALL_GL_API_REGEX = "CALL_GL_API(_RETURN)?\((.*)\);"
|
||||
|
||||
def __init__(self, prefix, apientry, callsite):
|
||||
"""Construct an ApiCall from its specification.
|
||||
|
||||
The specification is provided by the two arguments:
|
||||
prefix: prefix to use for function names
|
||||
defn: specification line containing API_ENTRY macro
|
||||
e.g: void API_ENTRY(glActiveTexture)(GLenum texture) {
|
||||
callsite: specification line containing CALL_GL_API macro
|
||||
e.g: CALL_GL_API(glActiveTexture, texture);
|
||||
"""
|
||||
self.prefix = prefix
|
||||
self.ret = self.getReturnType(apientry)
|
||||
self.arglist = self.getArgList(apientry)
|
||||
|
||||
# some functions (e.g. __glEGLImageTargetRenderbufferStorageOES), define their
|
||||
# names one way in the API_ENTRY and another way in the CALL_GL_API macros.
|
||||
# so self.func is reassigned based on what is there in the call site
|
||||
self.func = self.getFunc(callsite)
|
||||
self.callsite = self.getCallSite(callsite)
|
||||
|
||||
def getReturnType(self, apientry):
|
||||
'''Extract the return type from the API_ENTRY specification'''
|
||||
m = re.search(self.API_ENTRY_REGEX, apientry)
|
||||
if not m:
|
||||
raise ValueError("%s does not match API_ENTRY specification %s"
|
||||
% (apientry, self.API_ENTRY_REGEX))
|
||||
|
||||
return m.group(1).strip()
|
||||
|
||||
def getArgList(self, apientry):
|
||||
'''Extract the argument list from the API_ENTRY specification'''
|
||||
m = re.search(self.API_ENTRY_REGEX, apientry)
|
||||
if not m:
|
||||
raise ValueError("%s does not match API_ENTRY specification %s"
|
||||
% (apientry, self.API_ENTRY_REGEX))
|
||||
|
||||
return m.group(2).strip()
|
||||
|
||||
def parseCallSite(self, callsite):
|
||||
m = re.search(self.CALL_GL_API_REGEX, callsite)
|
||||
if not m:
|
||||
raise ValueError("%s does not match CALL_GL_API specification (%s)"
|
||||
% (callsite, self.CALL_GL_API_REGEX))
|
||||
|
||||
arglist = m.group(2)
|
||||
args = arglist.split(',')
|
||||
args = map(lambda x: x.strip(), args)
|
||||
|
||||
return args
|
||||
|
||||
def getCallSite(self, callsite):
|
||||
'''Extract the callsite from the CALL_GL_API specification'''
|
||||
args = self.parseCallSite(callsite)
|
||||
return "%s(%s)" % (args[0], ", ".join(args[1:]))
|
||||
|
||||
def getFunc(self, callsite):
|
||||
'''Extract the function name from the CALL_GL_API specification'''
|
||||
args = self.parseCallSite(callsite)
|
||||
return args[0]
|
||||
|
||||
def genDeclaration(self):
|
||||
return "%s GLTrace_%s(%s);" % (self.ret, self.func, self.arglist)
|
||||
|
||||
def genCode(self):
|
||||
return TRACE_CALL_TEMPLATE(func = self.func,
|
||||
retType = self.ret,
|
||||
retDataType = getDataTypeFromKw(self.ret),
|
||||
inputArgList = self.arglist,
|
||||
callsite = self.callsite,
|
||||
parsedArgs = parseArgs(self.arglist),
|
||||
DataType=DataType)
|
||||
|
||||
def getApis(apiEntryFile, prefix):
|
||||
'''Get a list of all ApiCalls in provided specification file'''
|
||||
lines = open(apiEntryFile).readlines()
|
||||
|
||||
apis = []
|
||||
for i in range(0, len(lines)/3):
|
||||
apis.append(ApiCall(prefix, lines[i*3], lines[i*3+1]))
|
||||
|
||||
return apis
|
||||
|
||||
def parseAllSpecs(specs):
|
||||
apis = []
|
||||
for name, specfile in specs:
|
||||
a = getApis(specfile, name)
|
||||
print 'Parsed %s APIs from %s, # of entries = %d' % (name, specfile, len(a))
|
||||
apis.extend(a)
|
||||
return apis
|
||||
|
||||
def removeDuplicates(apis):
|
||||
'''Remove all duplicate function entries.
|
||||
|
||||
The input list contains functions declared in GL1 and GL2 APIs.
|
||||
This will return a list that contains only the first function if there are
|
||||
multiple functions with the same name.'''
|
||||
uniqs = []
|
||||
funcs = set()
|
||||
for api in apis:
|
||||
if api.func not in funcs:
|
||||
uniqs.append(api)
|
||||
funcs.add(api.func)
|
||||
|
||||
return uniqs
|
||||
|
||||
def genHeaders(apis, fname):
|
||||
lines = []
|
||||
lines.append(HEADER_TEXT)
|
||||
prefix = ""
|
||||
for api in apis:
|
||||
if prefix != api.prefix:
|
||||
lines.append("\n// Declarations for %s APIs\n\n" % api.prefix)
|
||||
prefix = api.prefix
|
||||
lines.append(api.genDeclaration())
|
||||
lines.append("\n")
|
||||
lines.append(FOOTER_TEXT)
|
||||
|
||||
with open(fname, "w") as f:
|
||||
f.writelines(lines)
|
||||
|
||||
def genSrcs(apis, fname):
|
||||
lines = []
|
||||
lines.append(HEADER_TEXT)
|
||||
prefix = ""
|
||||
for api in apis:
|
||||
if prefix != api.prefix:
|
||||
lines.append("\n// Definitions for %s APIs\n\n" % api.prefix)
|
||||
prefix = api.prefix
|
||||
lines.append(api.genCode())
|
||||
lines.append("\n")
|
||||
lines.append(FOOTER_TEXT)
|
||||
|
||||
with open(fname, "w") as f:
|
||||
f.writelines(lines)
|
||||
|
||||
if __name__ == '__main__':
|
||||
apis = parseAllSpecs(API_SPECS) # read in all the specfiles
|
||||
apis = removeDuplicates(apis) # remove duplication of functions common to GL1 and GL2
|
||||
genHeaders(apis, 'gltrace_api.h') # generate header file
|
||||
genSrcs(apis, 'gltrace_api.cpp') # generate source file
|
|
@ -0,0 +1,66 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (C) 2011 Google Inc.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# USAGE
|
||||
# $ cd GLES2_trace/tools
|
||||
# $ python testgenapi.py
|
||||
|
||||
import unittest
|
||||
from genapi import DataType, ApiCall, getApis, parseArgs
|
||||
|
||||
class TestApiCall(unittest.TestCase):
|
||||
def test_parsing(self):
|
||||
apientry = 'void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, ' \
|
||||
'GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, ' \
|
||||
'GLsizei height) {'
|
||||
callsite = 'CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y,' \
|
||||
'width, height, border);'
|
||||
|
||||
api = ApiCall("GL", apientry, callsite)
|
||||
self.assertEqual(api.func, "glCopyTexImage2D")
|
||||
self.assertEqual(api.callsite, 'glCopyTexImage2D(target, level, internalformat, ' \
|
||||
'x, y, width, height, border)')
|
||||
self.assertEqual(api.ret, 'void')
|
||||
self.assertEqual(api.arglist, 'GLenum target, GLint level, ' \
|
||||
'GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, ' \
|
||||
'GLsizei height')
|
||||
|
||||
def test_num_functions_parsed(self):
|
||||
gl2_apis = getApis('../../GLES2/gl2_api.in', 'GL2')
|
||||
gl2ext_apis = getApis('../../GLES2/gl2ext_api.in', 'GL2Ext')
|
||||
gl_apis = getApis('../../GLES_CM/gl_api.in', "GL1")
|
||||
glext_apis = getApis('../../GLES_CM/glext_api.in', 'GL1Ext')
|
||||
|
||||
self.assertEqual(len(gl2_apis), 142)
|
||||
self.assertEqual(len(gl2ext_apis), 60)
|
||||
self.assertEqual(len(gl_apis), 145)
|
||||
self.assertEqual(len(glext_apis), 126)
|
||||
|
||||
def test_parseArgs(self):
|
||||
args = parseArgs("void")
|
||||
self.assertEqual(len(args), 0)
|
||||
|
||||
args = parseArgs("GLchar a")
|
||||
self.assertEqual(args, [("a", DataType.CHAR)])
|
||||
|
||||
args = parseArgs("GLchar *a")
|
||||
self.assertEqual(args, [("a", DataType.POINTER)])
|
||||
|
||||
args = parseArgs("GLint exponent[16]")
|
||||
self.assertEqual(args, [("exponent", DataType.POINTER)])
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright 2011, 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 declares the API provided by the glestrace library.
|
||||
*/
|
||||
|
||||
#ifndef _GLES_TRACE_H_
|
||||
#define _GLES_TRACE_H_
|
||||
|
||||
#include "hooks.h"
|
||||
|
||||
namespace android {
|
||||
|
||||
/* Hooks to be called by "interesting" EGL functions. */
|
||||
void GLTrace_eglCreateContext(int version, EGLContext c);
|
||||
void GLTrace_eglMakeCurrent(unsigned version, gl_hooks_t *hooks);
|
||||
void GLTrace_eglReleaseThread();
|
||||
void GLTrace_eglSwapBuffers(void*, void*);
|
||||
|
||||
/* Start and stop GL Tracing. */
|
||||
void GLTrace_start();
|
||||
void GLTrace_stop();
|
||||
|
||||
/* Obtain the gl_hooks structure filled with the trace implementation for all GL functions. */
|
||||
gl_hooks_t *GLTrace_getGLHooks();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
** Copyright 2011, 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.
|
||||
*/
|
||||
|
||||
#ifndef _GLESV2_DBG_H_
|
||||
#define _GLESV2_DBG_H_
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
namespace android
|
||||
{
|
||||
struct DbgContext;
|
||||
|
||||
DbgContext* CreateDbgContext(const unsigned version, const gl_hooks_t * const hooks);
|
||||
|
||||
void dbgReleaseThread();
|
||||
|
||||
// create and bind socket if haven't already, if failed to create socket or
|
||||
// forceUseFile, then open /data/local/tmp/dump.gles2dbg, exit when size reached
|
||||
void StartDebugServer(const unsigned short port, const bool forceUseFile,
|
||||
const unsigned int maxFileSize, const char * const filePath);
|
||||
void StopDebugServer(); // close socket if open
|
||||
|
||||
}; // namespace android
|
||||
|
||||
#endif // #ifndef _GLESV2_DBG_H_
|
|
@ -1,381 +0,0 @@
|
|||
extern "C"
|
||||
{
|
||||
GL_ENTRY(void, glActiveTexture, GLenum texture)
|
||||
GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref)
|
||||
GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref)
|
||||
GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref)
|
||||
GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader)
|
||||
GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor)
|
||||
GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name)
|
||||
GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer)
|
||||
GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer)
|
||||
GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer)
|
||||
GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer)
|
||||
GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer)
|
||||
GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture)
|
||||
GL_ENTRY(void, glBindVertexArrayOES, GLuint array)
|
||||
GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
|
||||
GL_ENTRY(void, glBlendEquation, GLenum mode )
|
||||
GL_ENTRY(void, glBlendEquationOES, GLenum mode)
|
||||
GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha)
|
||||
GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha)
|
||||
GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor)
|
||||
GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
|
||||
GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
|
||||
GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
|
||||
GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
|
||||
GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target)
|
||||
GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target)
|
||||
GL_ENTRY(void, glClear, GLbitfield mask)
|
||||
GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
|
||||
GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
|
||||
GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
|
||||
GL_ENTRY(void, glClearDepthf, GLclampf depth)
|
||||
GL_ENTRY(void, glClearDepthfOES, GLclampf depth)
|
||||
GL_ENTRY(void, glClearDepthx, GLclampx depth)
|
||||
GL_ENTRY(void, glClearDepthxOES, GLclampx depth)
|
||||
GL_ENTRY(void, glClearStencil, GLint s)
|
||||
GL_ENTRY(void, glClientActiveTexture, GLenum texture)
|
||||
GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation)
|
||||
GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat *eqn)
|
||||
GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation)
|
||||
GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation)
|
||||
GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed *eqn)
|
||||
GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation)
|
||||
GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
|
||||
GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
|
||||
GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
|
||||
GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
|
||||
GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
|
||||
GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
GL_ENTRY(void, glCompileShader, GLuint shader)
|
||||
GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
|
||||
GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
|
||||
GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
|
||||
GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
|
||||
GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
||||
GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glCoverageMaskNV, GLboolean mask)
|
||||
GL_ENTRY(void, glCoverageOperationNV, GLenum operation)
|
||||
GL_ENTRY(GLuint, glCreateProgram, void)
|
||||
GL_ENTRY(GLuint, glCreateShader, GLenum type)
|
||||
GL_ENTRY(void, glCullFace, GLenum mode)
|
||||
GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex)
|
||||
GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers)
|
||||
GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences)
|
||||
GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers)
|
||||
GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers)
|
||||
GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors)
|
||||
GL_ENTRY(void, glDeleteProgram, GLuint program)
|
||||
GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers)
|
||||
GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers)
|
||||
GL_ENTRY(void, glDeleteShader, GLuint shader)
|
||||
GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures)
|
||||
GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays)
|
||||
GL_ENTRY(void, glDepthFunc, GLenum func)
|
||||
GL_ENTRY(void, glDepthMask, GLboolean flag)
|
||||
GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar)
|
||||
GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar)
|
||||
GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar)
|
||||
GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar)
|
||||
GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader)
|
||||
GL_ENTRY(void, glDisable, GLenum cap)
|
||||
GL_ENTRY(void, glDisableClientState, GLenum array)
|
||||
GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl)
|
||||
GL_ENTRY(void, glDisableVertexAttribArray, GLuint index)
|
||||
GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments)
|
||||
GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count)
|
||||
GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
|
||||
GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
|
||||
GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords)
|
||||
GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height)
|
||||
GL_ENTRY(void, glDrawTexivOES, const GLint *coords)
|
||||
GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
|
||||
GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords)
|
||||
GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
|
||||
GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords)
|
||||
GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image)
|
||||
GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image)
|
||||
GL_ENTRY(void, glEnable, GLenum cap)
|
||||
GL_ENTRY(void, glEnableClientState, GLenum array)
|
||||
GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl)
|
||||
GL_ENTRY(void, glEnableVertexAttribArray, GLuint index)
|
||||
GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor)
|
||||
GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask)
|
||||
GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params)
|
||||
GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
|
||||
GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers)
|
||||
GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length)
|
||||
GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms)
|
||||
GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers)
|
||||
GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders)
|
||||
GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels)
|
||||
GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures)
|
||||
GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program)
|
||||
GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param)
|
||||
GL_ENTRY(void, glFinish, void)
|
||||
GL_ENTRY(void, glFinishFenceNV, GLuint fence)
|
||||
GL_ENTRY(void, glFlush, void)
|
||||
GL_ENTRY(void, glFogf, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glFogx, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
||||
GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
||||
GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||
GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
|
||||
GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||
GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
|
||||
GL_ENTRY(void, glFrontFace, GLenum mode)
|
||||
GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
|
||||
GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
|
||||
GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
|
||||
GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
|
||||
GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers)
|
||||
GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences)
|
||||
GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers)
|
||||
GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers)
|
||||
GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors)
|
||||
GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers)
|
||||
GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers)
|
||||
GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures)
|
||||
GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays)
|
||||
GL_ENTRY(void, glGenerateMipmap, GLenum target)
|
||||
GL_ENTRY(void, glGenerateMipmapOES, GLenum target)
|
||||
GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
|
||||
GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
|
||||
GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
|
||||
GL_ENTRY(int, glGetAttribLocation, GLuint program, const GLchar* name)
|
||||
GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params)
|
||||
GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid ** params)
|
||||
GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4])
|
||||
GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4])
|
||||
GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4])
|
||||
GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4])
|
||||
GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString)
|
||||
GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls)
|
||||
GL_ENTRY(GLenum, glGetError, void)
|
||||
GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params)
|
||||
GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params)
|
||||
GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params)
|
||||
GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params)
|
||||
GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params)
|
||||
GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
|
||||
GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data)
|
||||
GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
|
||||
GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters)
|
||||
GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
|
||||
GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups)
|
||||
GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params)
|
||||
GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
|
||||
GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||
GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
|
||||
GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params)
|
||||
GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params)
|
||||
GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||
GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
|
||||
GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
|
||||
GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params)
|
||||
GL_ENTRY(const GLubyte *, glGetString, GLenum name)
|
||||
GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params)
|
||||
GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params)
|
||||
GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params)
|
||||
GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params)
|
||||
GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params)
|
||||
GL_ENTRY(int, glGetUniformLocation, GLuint program, const GLchar* name)
|
||||
GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params)
|
||||
GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params)
|
||||
GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
|
||||
GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params)
|
||||
GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params)
|
||||
GL_ENTRY(void, glHint, GLenum target, GLenum mode)
|
||||
GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer)
|
||||
GL_ENTRY(GLboolean, glIsEnabled, GLenum cap)
|
||||
GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence)
|
||||
GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer)
|
||||
GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer)
|
||||
GL_ENTRY(GLboolean, glIsProgram, GLuint program)
|
||||
GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer)
|
||||
GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer)
|
||||
GL_ENTRY(GLboolean, glIsShader, GLuint shader)
|
||||
GL_ENTRY(GLboolean, glIsTexture, GLuint texture)
|
||||
GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array)
|
||||
GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glLineWidth, GLfloat width)
|
||||
GL_ENTRY(void, glLineWidthx, GLfixed width)
|
||||
GL_ENTRY(void, glLineWidthxOES, GLfixed width)
|
||||
GL_ENTRY(void, glLinkProgram, GLuint program)
|
||||
GL_ENTRY(void, glLoadIdentity, void)
|
||||
GL_ENTRY(void, glLoadMatrixf, const GLfloat *m)
|
||||
GL_ENTRY(void, glLoadMatrixx, const GLfixed *m)
|
||||
GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m)
|
||||
GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void)
|
||||
GL_ENTRY(void, glLogicOp, GLenum opcode)
|
||||
GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access)
|
||||
GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
GL_ENTRY(void, glMatrixMode, GLenum mode)
|
||||
GL_ENTRY(void, glMultMatrixf, const GLfloat *m)
|
||||
GL_ENTRY(void, glMultMatrixx, const GLfixed *m)
|
||||
GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m)
|
||||
GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
|
||||
GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
|
||||
GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
|
||||
GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
|
||||
GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
|
||||
GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz)
|
||||
GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz)
|
||||
GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz)
|
||||
GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
|
||||
GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
|
||||
GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
|
||||
GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
|
||||
GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param)
|
||||
GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glPointSize, GLfloat size)
|
||||
GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
GL_ENTRY(void, glPointSizex, GLfixed size)
|
||||
GL_ENTRY(void, glPointSizexOES, GLfixed size)
|
||||
GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units)
|
||||
GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units)
|
||||
GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units)
|
||||
GL_ENTRY(void, glPopMatrix, void)
|
||||
GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
|
||||
GL_ENTRY(void, glPushMatrix, void)
|
||||
GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16])
|
||||
GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
|
||||
GL_ENTRY(void, glReleaseShaderCompiler, void)
|
||||
GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
|
||||
GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
|
||||
GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
|
||||
GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert)
|
||||
GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert)
|
||||
GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert)
|
||||
GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z)
|
||||
GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z)
|
||||
GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z)
|
||||
GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList)
|
||||
GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition)
|
||||
GL_ENTRY(void, glShadeModel, GLenum mode)
|
||||
GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
|
||||
GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
|
||||
GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
|
||||
GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask)
|
||||
GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask)
|
||||
GL_ENTRY(void, glStencilMask, GLuint mask)
|
||||
GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask)
|
||||
GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass)
|
||||
GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
|
||||
GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence)
|
||||
GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param)
|
||||
GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params)
|
||||
GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param)
|
||||
GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params)
|
||||
GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
|
||||
GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
|
||||
GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param)
|
||||
GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params)
|
||||
GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param)
|
||||
GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params)
|
||||
GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param)
|
||||
GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params)
|
||||
GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
|
||||
GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
|
||||
GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z)
|
||||
GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z)
|
||||
GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z)
|
||||
GL_ENTRY(void, glUniform1f, GLint location, GLfloat x)
|
||||
GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v)
|
||||
GL_ENTRY(void, glUniform1i, GLint location, GLint x)
|
||||
GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v)
|
||||
GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y)
|
||||
GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v)
|
||||
GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y)
|
||||
GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v)
|
||||
GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z)
|
||||
GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v)
|
||||
GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z)
|
||||
GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v)
|
||||
GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||
GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v)
|
||||
GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w)
|
||||
GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v)
|
||||
GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
|
||||
GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
|
||||
GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
|
||||
GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target)
|
||||
GL_ENTRY(void, glUseProgram, GLuint program)
|
||||
GL_ENTRY(void, glValidateProgram, GLuint program)
|
||||
GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x)
|
||||
GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values)
|
||||
GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y)
|
||||
GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values)
|
||||
GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z)
|
||||
GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values)
|
||||
GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||
GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values)
|
||||
GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
|
||||
GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue