summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-03-07 19:36:08 -0800
committerMathias Agopian <mathias@google.com>2012-03-07 19:36:08 -0800
commit8c79817dc6459baa2c79db88e3c3e4d5c07d6a61 (patch)
treed7e4dfcc8a7851d5851750989664ec81ca620d6d /opengl
parent08965ec67ada98f63f8ac879cc44c8b0e7ff046d (diff)
downloadframeworks_base-8c79817dc6459baa2c79db88e3c3e4d5c07d6a61.zip
frameworks_base-8c79817dc6459baa2c79db88e3c3e4d5c07d6a61.tar.gz
frameworks_base-8c79817dc6459baa2c79db88e3c3e4d5c07d6a61.tar.bz2
remove files that moved to frameworks/native
Change-Id: I140d291e520097b1148930f736823650e08488f7
Diffstat (limited to 'opengl')
-rw-r--r--opengl/include/EGL/egl.h329
-rw-r--r--opengl/include/EGL/eglext.h270
-rw-r--r--opengl/include/EGL/eglplatform.h120
-rw-r--r--opengl/include/ETC1/etc1.h106
-rw-r--r--opengl/include/GLES/egl.h15
-rw-r--r--opengl/include/GLES/gl.h770
-rw-r--r--opengl/include/GLES/glext.h1183
-rw-r--r--opengl/include/GLES/glplatform.h30
-rw-r--r--opengl/include/GLES2/gl2.h621
-rw-r--r--opengl/include/GLES2/gl2ext.h1422
-rw-r--r--opengl/include/GLES2/gl2platform.h30
-rw-r--r--opengl/include/KHR/khrplatform.h243
-rw-r--r--opengl/libagl/Android.mk52
-rw-r--r--opengl/libagl/BufferObjectManager.cpp103
-rw-r--r--opengl/libagl/BufferObjectManager.h85
-rw-r--r--opengl/libagl/TextureObjectManager.cpp325
-rw-r--r--opengl/libagl/TextureObjectManager.h111
-rw-r--r--opengl/libagl/TokenManager.cpp62
-rw-r--r--opengl/libagl/TokenManager.h53
-rw-r--r--opengl/libagl/Tokenizer.cpp173
-rw-r--r--opengl/libagl/Tokenizer.h59
-rw-r--r--opengl/libagl/array.cpp1588
-rw-r--r--opengl/libagl/array.h37
-rw-r--r--opengl/libagl/context.h642
-rw-r--r--opengl/libagl/dxt.cpp636
-rw-r--r--opengl/libagl/dxt.h33
-rw-r--r--opengl/libagl/egl.cpp2079
-rw-r--r--opengl/libagl/fixed_asm.S67
-rw-r--r--opengl/libagl/fp.cpp87
-rw-r--r--opengl/libagl/fp.h243
-rw-r--r--opengl/libagl/iterators.S89
-rw-r--r--opengl/libagl/light.cpp876
-rw-r--r--opengl/libagl/light.h45
-rw-r--r--opengl/libagl/matrix.cpp1134
-rw-r--r--opengl/libagl/matrix.h355
-rw-r--r--opengl/libagl/mipmap.cpp192
-rw-r--r--opengl/libagl/primitives.cpp1111
-rw-r--r--opengl/libagl/primitives.h37
-rw-r--r--opengl/libagl/state.cpp597
-rw-r--r--opengl/libagl/state.h54
-rw-r--r--opengl/libagl/texture.cpp1656
-rw-r--r--opengl/libagl/texture.h41
-rw-r--r--opengl/libagl/vertex.cpp247
-rw-r--r--opengl/libagl/vertex.h48
-rw-r--r--opengl/libs/Android.mk167
-rw-r--r--opengl/libs/EGL/Loader.cpp322
-rw-r--r--opengl/libs/EGL/Loader.h79
-rw-r--r--opengl/libs/EGL/egl.cpp332
-rw-r--r--opengl/libs/EGL/eglApi.cpp1139
-rw-r--r--opengl/libs/EGL/egl_cache.cpp352
-rw-r--r--opengl/libs/EGL/egl_cache.h130
-rw-r--r--opengl/libs/EGL/egl_display.cpp359
-rw-r--r--opengl/libs/EGL/egl_display.h139
-rw-r--r--opengl/libs/EGL/egl_entries.in69
-rw-r--r--opengl/libs/EGL/egl_object.cpp102
-rw-r--r--opengl/libs/EGL/egl_object.h202
-rw-r--r--opengl/libs/EGL/egl_tls.cpp148
-rw-r--r--opengl/libs/EGL/egl_tls.h82
-rw-r--r--opengl/libs/EGL/egldefs.h65
-rw-r--r--opengl/libs/EGL/getProcAddress.cpp141
-rw-r--r--opengl/libs/EGL/trace.cpp382
-rw-r--r--opengl/libs/ETC1/etc1.cpp670
-rw-r--r--opengl/libs/GLES2/gl2.cpp126
-rw-r--r--opengl/libs/GLES2/gl2_api.in426
-rw-r--r--opengl/libs/GLES2/gl2ext_api.in363
-rw-r--r--opengl/libs/GLES_CM/gl.cpp181
-rw-r--r--opengl/libs/GLES_CM/gl_api.in435
-rw-r--r--opengl/libs/GLES_CM/glext_api.in420
-rw-r--r--opengl/libs/GLES_trace/.gitignore4
-rw-r--r--opengl/libs/GLES_trace/Android.mk44
-rw-r--r--opengl/libs/GLES_trace/DESIGN.txt51
-rw-r--r--opengl/libs/GLES_trace/dev.make14
-rw-r--r--opengl/libs/GLES_trace/gltrace.proto555
-rw-r--r--opengl/libs/GLES_trace/src/gltrace.pb.cpp2081
-rw-r--r--opengl/libs/GLES_trace/src/gltrace.pb.h1895
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_api.cpp17862
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_api.h472
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_context.cpp282
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_context.h127
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_egl.cpp94
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_egl.h30
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_eglapi.cpp134
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.cpp834
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.h36
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_hooks.cpp41
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_hooks.h32
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_transport.cpp150
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_transport.h88
-rwxr-xr-xopengl/libs/GLES_trace/tools/genapi.py408
-rw-r--r--opengl/libs/GLES_trace/tools/testgenapi.py66
-rw-r--r--opengl/libs/debug.in235
-rw-r--r--opengl/libs/egl_impl.h38
-rw-r--r--opengl/libs/entries.in437
-rw-r--r--opengl/libs/enums.in702
-rw-r--r--opengl/libs/glestrace.h41
-rw-r--r--opengl/libs/hooks.h91
-rwxr-xr-xopengl/libs/tools/genfiles44
-rwxr-xr-xopengl/libs/tools/glapigen76
-rwxr-xr-xopengl/libs/tools/glentrygen38
-rwxr-xr-xopengl/libs/tools/glenumsgen38
-rwxr-xr-xopengl/libs/tools/gltracegen95
-rw-r--r--opengl/libs/trace.in437
-rw-r--r--opengl/specs/EGL_ANDROID_blob_cache.txt208
-rw-r--r--opengl/specs/EGL_ANDROID_recordable.txt140
-rw-r--r--opengl/specs/README13
-rw-r--r--opengl/tests/Android.mk1
-rw-r--r--opengl/tests/EGLTest/Android.mk41
-rw-r--r--opengl/tests/EGLTest/EGL_test.cpp129
-rw-r--r--opengl/tests/EGLTest/egl_cache_test.cpp110
-rw-r--r--opengl/tests/angeles/Android.mk10
-rw-r--r--opengl/tests/angeles/MODULE_LICENSE_BSD_OR_LGPL0
-rw-r--r--opengl/tests/angeles/README.txt77
-rw-r--r--opengl/tests/angeles/app-linux.cpp232
-rw-r--r--opengl/tests/angeles/app.h56
-rw-r--r--opengl/tests/angeles/cams.h65
-rw-r--r--opengl/tests/angeles/demo.c792
-rw-r--r--opengl/tests/angeles/include/GLES/egl.h229
-rw-r--r--opengl/tests/angeles/include/GLES/egltypes.h20
-rw-r--r--opengl/tests/angeles/include/GLES/gl.h584
-rw-r--r--opengl/tests/angeles/license-BSD.txt34
-rw-r--r--opengl/tests/angeles/license-LGPL.txt504
-rw-r--r--opengl/tests/angeles/license.txt19
-rw-r--r--opengl/tests/angeles/shapes.h59
-rw-r--r--opengl/tests/configdump/Android.mk16
-rw-r--r--opengl/tests/configdump/configdump.cpp89
-rw-r--r--opengl/tests/fillrate/Android.mk20
-rw-r--r--opengl/tests/fillrate/fillrate.cpp161
-rw-r--r--opengl/tests/filter/Android.mk21
-rw-r--r--opengl/tests/filter/filter.cpp190
-rw-r--r--opengl/tests/finish/Android.mk22
-rw-r--r--opengl/tests/finish/finish.cpp226
-rw-r--r--opengl/tests/gl2_basic/Android.mk21
-rw-r--r--opengl/tests/gl2_basic/gl2_basic.cpp356
-rw-r--r--opengl/tests/gl2_cameraeye/Android.mk16
-rw-r--r--opengl/tests/gl2_cameraeye/AndroidManifest.xml36
-rw-r--r--opengl/tests/gl2_cameraeye/res/values/strings.xml21
-rw-r--r--opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/GL2CameraEye.java508
-rw-r--r--opengl/tests/gl2_copyTexImage/Android.mk21
-rw-r--r--opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp467
-rw-r--r--opengl/tests/gl2_java/Android.mk18
-rw-r--r--opengl/tests/gl2_java/AndroidManifest.xml32
-rw-r--r--opengl/tests/gl2_java/res/values/strings.xml25
-rw-r--r--opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaActivity.java46
-rw-r--r--opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaView.java170
-rw-r--r--opengl/tests/gl2_jni/Android.mk47
-rw-r--r--opengl/tests/gl2_jni/AndroidManifest.xml31
-rw-r--r--opengl/tests/gl2_jni/jni/gl_code.cpp165
-rw-r--r--opengl/tests/gl2_jni/res/values/strings.xml25
-rw-r--r--opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIActivity.java46
-rw-r--r--opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNILib.java33
-rw-r--r--opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIView.java296
-rw-r--r--opengl/tests/gl2_yuvtex/Android.mk21
-rw-r--r--opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp427
-rw-r--r--opengl/tests/gl_basic/Android.mk19
-rw-r--r--opengl/tests/gl_basic/gl_basic.cpp364
-rw-r--r--opengl/tests/gl_jni/Android.mk49
-rw-r--r--opengl/tests/gl_jni/AndroidManifest.xml34
-rw-r--r--opengl/tests/gl_jni/jni/gl_code.cpp183
-rw-r--r--opengl/tests/gl_jni/res/values/strings.xml25
-rw-r--r--opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java45
-rw-r--r--opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java34
-rw-r--r--opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java90
-rw-r--r--opengl/tests/gl_perf/Android.mk22
-rw-r--r--opengl/tests/gl_perf/fill_common.cpp298
-rw-r--r--opengl/tests/gl_perf/filltest.cpp54
-rw-r--r--opengl/tests/gl_perf/fragment_shaders.cpp139
-rw-r--r--opengl/tests/gl_perf/gl2_perf.cpp136
-rw-r--r--opengl/tests/gl_perfapp/Android.mk50
-rw-r--r--opengl/tests/gl_perfapp/AndroidManifest.xml34
-rw-r--r--opengl/tests/gl_perfapp/jni/gl_code.cpp103
-rw-r--r--opengl/tests/gl_perfapp/res/values/strings.xml25
-rw-r--r--opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfActivity.java47
-rw-r--r--opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfLib.java33
-rw-r--r--opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfView.java296
-rw-r--r--opengl/tests/gl_yuvtex/Android.mk21
-rw-r--r--opengl/tests/gl_yuvtex/gl_yuvtex.cpp333
-rw-r--r--opengl/tests/gldual/Android.mk47
-rw-r--r--opengl/tests/gldual/AndroidManifest.xml31
-rw-r--r--opengl/tests/gldual/jni/gl_code.cpp165
-rw-r--r--opengl/tests/gldual/res/layout/gldual_activity.xml30
-rw-r--r--opengl/tests/gldual/res/values/strings.xml25
-rw-r--r--opengl/tests/gldual/src/com/android/gldual/GLDualActivity.java53
-rw-r--r--opengl/tests/gldual/src/com/android/gldual/GLDualGL2View.java299
-rw-r--r--opengl/tests/gldual/src/com/android/gldual/GLDualLib.java33
-rw-r--r--opengl/tests/gldual/src/com/android/gldual/TriangleRenderer.java165
-rw-r--r--opengl/tests/gralloc/Android.mk16
-rw-r--r--opengl/tests/gralloc/gralloc.cpp110
-rw-r--r--opengl/tests/hwc/Android.mk151
-rw-r--r--opengl/tests/hwc/hwcColorEquiv.cpp437
-rw-r--r--opengl/tests/hwc/hwcCommit.cpp1561
-rw-r--r--opengl/tests/hwc/hwcRects.cpp576
-rw-r--r--opengl/tests/hwc/hwcStress.cpp644
-rw-r--r--opengl/tests/hwc/hwcTestLib.cpp1030
-rw-r--r--opengl/tests/hwc/hwcTestLib.h134
-rw-r--r--opengl/tests/include/EGLUtils.h144
-rw-r--r--opengl/tests/include/glTestLib.h32
-rw-r--r--opengl/tests/lib/Android.mk32
-rw-r--r--opengl/tests/lib/glTestLib.cpp119
-rw-r--r--opengl/tests/lighting1709/Android.mk11
-rw-r--r--opengl/tests/lighting1709/AndroidManifest.xml13
-rw-r--r--opengl/tests/lighting1709/src/com/android/lightingtest/ClearActivity.java174
-rw-r--r--opengl/tests/linetex/Android.mk19
-rw-r--r--opengl/tests/linetex/linetex.cpp116
-rw-r--r--opengl/tests/swapinterval/Android.mk20
-rw-r--r--opengl/tests/swapinterval/swapinterval.cpp125
-rw-r--r--opengl/tests/testFramerate/Android.mk19
-rw-r--r--opengl/tests/testFramerate/AndroidManifest.xml33
-rw-r--r--opengl/tests/testFramerate/res/values/strings.xml25
-rw-r--r--opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateActivity.java47
-rw-r--r--opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateView.java91
-rw-r--r--opengl/tests/testLatency/Android.mk20
-rw-r--r--opengl/tests/testLatency/AndroidManifest.xml33
-rw-r--r--opengl/tests/testLatency/res/values/strings.xml25
-rw-r--r--opengl/tests/testLatency/src/com/android/testlatency/TestLatencyActivity.java47
-rw-r--r--opengl/tests/testLatency/src/com/android/testlatency/TestLatencyView.java267
-rw-r--r--opengl/tests/testPauseResume/Android.mk18
-rw-r--r--opengl/tests/testPauseResume/AndroidManifest.xml34
-rw-r--r--opengl/tests/testPauseResume/README37
-rw-r--r--opengl/tests/testPauseResume/res/values/strings.xml25
-rw-r--r--opengl/tests/testPauseResume/src/com/android/test/TestActivity.java64
-rw-r--r--opengl/tests/testPauseResume/src/com/android/test/TestView.java84
-rw-r--r--opengl/tests/testViewport/Android.mk22
-rw-r--r--opengl/tests/testViewport/AndroidManifest.xml33
-rw-r--r--opengl/tests/testViewport/README28
-rw-r--r--opengl/tests/testViewport/res/values/strings.xml25
-rw-r--r--opengl/tests/testViewport/src/com/android/test/TestActivity.java46
-rw-r--r--opengl/tests/testViewport/src/com/android/test/TestView.java262
-rw-r--r--opengl/tests/textures/Android.mk21
-rw-r--r--opengl/tests/textures/textures.cpp118
-rw-r--r--opengl/tests/tritex/Android.mk19
-rw-r--r--opengl/tests/tritex/tritex.cpp277
-rw-r--r--opengl/tools/glgen/.gitignore2
-rwxr-xr-xopengl/tools/glgen/gen120
-rw-r--r--opengl/tools/glgen/specs/gles11/GLES10.spec106
-rw-r--r--opengl/tools/glgen/specs/gles11/GLES10Ext.spec1
-rw-r--r--opengl/tools/glgen/specs/gles11/GLES11.spec44
-rw-r--r--opengl/tools/glgen/specs/gles11/GLES11Ext.spec90
-rw-r--r--opengl/tools/glgen/specs/gles11/GLES20.spec144
-rw-r--r--opengl/tools/glgen/specs/gles11/checks.spec42
-rw-r--r--opengl/tools/glgen/specs/jsr239/glspec-1.0106
-rw-r--r--opengl/tools/glgen/specs/jsr239/glspec-1.0ext1
-rw-r--r--opengl/tools/glgen/specs/jsr239/glspec-1.142
-rw-r--r--opengl/tools/glgen/specs/jsr239/glspec-1.1ext16
-rw-r--r--opengl/tools/glgen/specs/jsr239/glspec-1.1extpack38
-rw-r--r--opengl/tools/glgen/specs/jsr239/glspec-checks56
-rw-r--r--opengl/tools/glgen/src/.gitignore1
-rw-r--r--opengl/tools/glgen/src/CFunc.java171
-rw-r--r--opengl/tools/glgen/src/CType.java107
-rw-r--r--opengl/tools/glgen/src/CodeEmitter.java23
-rw-r--r--opengl/tools/glgen/src/GLESCodeEmitter.java56
-rw-r--r--opengl/tools/glgen/src/GenerateGL.java182
-rw-r--r--opengl/tools/glgen/src/GenerateGLES.java114
-rw-r--r--opengl/tools/glgen/src/JFunc.java169
-rw-r--r--opengl/tools/glgen/src/JType.java174
-rw-r--r--opengl/tools/glgen/src/JniCodeEmitter.java1180
-rw-r--r--opengl/tools/glgen/src/Jsr239CodeEmitter.java90
-rw-r--r--opengl/tools/glgen/src/ParameterChecker.java43
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if26
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp102
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES10Header.java-if271
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp134
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if142
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp124
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES11Header.java-if152
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp123
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES20Header.java-if330
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp128
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.cpp19
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java22
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.nativeReg1
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.cpp19
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java22
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.nativeReg1
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetString.cpp5
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetString.java21
-rw-r--r--opengl/tools/glgen/stubs/gles11/glGetString.nativeReg1
-rw-r--r--opengl/tools/glgen/stubs/gles11/glShaderSource.cpp17
-rw-r--r--opengl/tools/glgen/stubs/gles11/glShaderSource.java22
-rw-r--r--opengl/tools/glgen/stubs/gles11/glShaderSource.nativeReg1
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GL10ExtHeader.java-if22
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GL10Header.java-if259
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GL11ExtHeader.java-if40
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GL11ExtensionPackHeader.java-if108
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GL11Header.java-if145
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GL11ImplHeader.java-impl30
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp260
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GLHeader.java-if22
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl84
-rw-r--r--opengl/tools/glgen/stubs/jsr239/glGetString.cpp5
-rw-r--r--opengl/tools/glgen/stubs/jsr239/glGetString.java-10-if4
-rw-r--r--opengl/tools/glgen/stubs/jsr239/glGetString.java-if4
-rw-r--r--opengl/tools/glgen/stubs/jsr239/glGetString.java-impl16
-rw-r--r--opengl/tools/glgen/stubs/jsr239/glGetString.nativeReg1
293 files changed, 0 insertions, 75622 deletions
diff --git a/opengl/include/EGL/egl.h b/opengl/include/EGL/egl.h
deleted file mode 100644
index 99ea342..0000000
--- a/opengl/include/EGL/egl.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/* -*- mode: c; tab-width: 8; -*- */
-/* vi: set sw=4 ts=8: */
-/* Reference version of egl.h for EGL 1.4.
- * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
- */
-
-/*
-** Copyright (c) 2007-2009 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-#ifndef __egl_h_
-#define __egl_h_
-
-/* All platform-dependent types and macro boilerplate (such as EGLAPI
- * and EGLAPIENTRY) should go in eglplatform.h.
- */
-#include <EGL/eglplatform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* EGL Types */
-/* EGLint is defined in eglplatform.h */
-typedef unsigned int EGLBoolean;
-typedef unsigned int EGLenum;
-typedef void *EGLConfig;
-typedef void *EGLContext;
-typedef void *EGLDisplay;
-typedef void *EGLSurface;
-typedef void *EGLClientBuffer;
-
-/* EGL Versioning */
-#define EGL_VERSION_1_0 1
-#define EGL_VERSION_1_1 1
-#define EGL_VERSION_1_2 1
-#define EGL_VERSION_1_3 1
-#define EGL_VERSION_1_4 1
-
-/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
- * enums are assigned unique values starting at 0x3000.
- */
-
-/* EGL aliases */
-#define EGL_FALSE 0
-#define EGL_TRUE 1
-
-/* Out-of-band handle values */
-#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
-#define EGL_NO_CONTEXT ((EGLContext)0)
-#define EGL_NO_DISPLAY ((EGLDisplay)0)
-#define EGL_NO_SURFACE ((EGLSurface)0)
-
-/* Out-of-band attribute value */
-#define EGL_DONT_CARE ((EGLint)-1)
-
-/* Errors / GetError return values */
-#define EGL_SUCCESS 0x3000
-#define EGL_NOT_INITIALIZED 0x3001
-#define EGL_BAD_ACCESS 0x3002
-#define EGL_BAD_ALLOC 0x3003
-#define EGL_BAD_ATTRIBUTE 0x3004
-#define EGL_BAD_CONFIG 0x3005
-#define EGL_BAD_CONTEXT 0x3006
-#define EGL_BAD_CURRENT_SURFACE 0x3007
-#define EGL_BAD_DISPLAY 0x3008
-#define EGL_BAD_MATCH 0x3009
-#define EGL_BAD_NATIVE_PIXMAP 0x300A
-#define EGL_BAD_NATIVE_WINDOW 0x300B
-#define EGL_BAD_PARAMETER 0x300C
-#define EGL_BAD_SURFACE 0x300D
-#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
-
-/* Reserved 0x300F-0x301F for additional errors */
-
-/* Config attributes */
-#define EGL_BUFFER_SIZE 0x3020
-#define EGL_ALPHA_SIZE 0x3021
-#define EGL_BLUE_SIZE 0x3022
-#define EGL_GREEN_SIZE 0x3023
-#define EGL_RED_SIZE 0x3024
-#define EGL_DEPTH_SIZE 0x3025
-#define EGL_STENCIL_SIZE 0x3026
-#define EGL_CONFIG_CAVEAT 0x3027
-#define EGL_CONFIG_ID 0x3028
-#define EGL_LEVEL 0x3029
-#define EGL_MAX_PBUFFER_HEIGHT 0x302A
-#define EGL_MAX_PBUFFER_PIXELS 0x302B
-#define EGL_MAX_PBUFFER_WIDTH 0x302C
-#define EGL_NATIVE_RENDERABLE 0x302D
-#define EGL_NATIVE_VISUAL_ID 0x302E
-#define EGL_NATIVE_VISUAL_TYPE 0x302F
-#define EGL_SAMPLES 0x3031
-#define EGL_SAMPLE_BUFFERS 0x3032
-#define EGL_SURFACE_TYPE 0x3033
-#define EGL_TRANSPARENT_TYPE 0x3034
-#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
-#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
-#define EGL_TRANSPARENT_RED_VALUE 0x3037
-#define EGL_NONE 0x3038 /* Attrib list terminator */
-#define EGL_BIND_TO_TEXTURE_RGB 0x3039
-#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
-#define EGL_MIN_SWAP_INTERVAL 0x303B
-#define EGL_MAX_SWAP_INTERVAL 0x303C
-#define EGL_LUMINANCE_SIZE 0x303D
-#define EGL_ALPHA_MASK_SIZE 0x303E
-#define EGL_COLOR_BUFFER_TYPE 0x303F
-#define EGL_RENDERABLE_TYPE 0x3040
-#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
-#define EGL_CONFORMANT 0x3042
-
-/* Reserved 0x3041-0x304F for additional config attributes */
-
-/* Config attribute values */
-#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
-#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
-#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
-#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
-#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
-
-/* More config attribute values, for EGL_TEXTURE_FORMAT */
-#define EGL_NO_TEXTURE 0x305C
-#define EGL_TEXTURE_RGB 0x305D
-#define EGL_TEXTURE_RGBA 0x305E
-#define EGL_TEXTURE_2D 0x305F
-
-/* Config attribute mask bits */
-#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
-#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
-#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
-#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
-#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
-#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
-#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
-
-#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
-#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
-#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
-#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
-
-/* QueryString targets */
-#define EGL_VENDOR 0x3053
-#define EGL_VERSION 0x3054
-#define EGL_EXTENSIONS 0x3055
-#define EGL_CLIENT_APIS 0x308D
-
-/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
-#define EGL_HEIGHT 0x3056
-#define EGL_WIDTH 0x3057
-#define EGL_LARGEST_PBUFFER 0x3058
-#define EGL_TEXTURE_FORMAT 0x3080
-#define EGL_TEXTURE_TARGET 0x3081
-#define EGL_MIPMAP_TEXTURE 0x3082
-#define EGL_MIPMAP_LEVEL 0x3083
-#define EGL_RENDER_BUFFER 0x3086
-#define EGL_VG_COLORSPACE 0x3087
-#define EGL_VG_ALPHA_FORMAT 0x3088
-#define EGL_HORIZONTAL_RESOLUTION 0x3090
-#define EGL_VERTICAL_RESOLUTION 0x3091
-#define EGL_PIXEL_ASPECT_RATIO 0x3092
-#define EGL_SWAP_BEHAVIOR 0x3093
-#define EGL_MULTISAMPLE_RESOLVE 0x3099
-
-/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
-#define EGL_BACK_BUFFER 0x3084
-#define EGL_SINGLE_BUFFER 0x3085
-
-/* OpenVG color spaces */
-#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
-#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
-
-/* OpenVG alpha formats */
-#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
-#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
-
-/* Constant scale factor by which fractional display resolutions &
- * aspect ratio are scaled when queried as integer values.
- */
-#define EGL_DISPLAY_SCALING 10000
-
-/* Unknown display resolution/aspect ratio */
-#define EGL_UNKNOWN ((EGLint)-1)
-
-/* Back buffer swap behaviors */
-#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
-#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
-
-/* CreatePbufferFromClientBuffer buffer types */
-#define EGL_OPENVG_IMAGE 0x3096
-
-/* QueryContext targets */
-#define EGL_CONTEXT_CLIENT_TYPE 0x3097
-
-/* CreateContext attributes */
-#define EGL_CONTEXT_CLIENT_VERSION 0x3098
-
-/* Multisample resolution behaviors */
-#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
-#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
-
-/* BindAPI/QueryAPI targets */
-#define EGL_OPENGL_ES_API 0x30A0
-#define EGL_OPENVG_API 0x30A1
-#define EGL_OPENGL_API 0x30A2
-
-/* GetCurrentSurface targets */
-#define EGL_DRAW 0x3059
-#define EGL_READ 0x305A
-
-/* WaitNative engines */
-#define EGL_CORE_NATIVE_ENGINE 0x305B
-
-/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
-#define EGL_COLORSPACE EGL_VG_COLORSPACE
-#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
-#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
-#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
-#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
-#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
-
-/* EGL extensions must request enum blocks from the Khronos
- * API Registrar, who maintains the enumerant registry. Submit
- * a bug in Khronos Bugzilla against task "Registry".
- */
-
-
-
-/* EGL Functions */
-
-EGLAPI EGLint EGLAPIENTRY eglGetError(void);
-
-EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
-EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
-EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
-
-EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
-
-EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
- EGLint config_size, EGLint *num_config);
-EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value);
-
-EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
- EGLNativeWindowType win,
- const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list);
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
- EGLNativePixmapType pixmap,
- const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint *value);
-
-EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
-EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
-
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
-
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
-
-EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list);
-
-EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint value);
-EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
-
-
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
-
-
-EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_context,
- const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
-EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
- EGLSurface read, EGLContext ctx);
-
-EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
-EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
-EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
-EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
- EGLint attribute, EGLint *value);
-
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
-EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
-EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
- EGLNativePixmapType target);
-
-/* This is a generic function pointer type, whose name indicates it must
- * be cast to the proper type *and calling convention* before use.
- */
-typedef void (*__eglMustCastToProperFunctionPointerType)(void);
-
-/* Now, define eglGetProcAddress using the generic function ptr. type */
-EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
- eglGetProcAddress(const char *procname);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __egl_h_ */
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h
deleted file mode 100644
index ca11863..0000000
--- a/opengl/include/EGL/eglext.h
+++ /dev/null
@@ -1,270 +0,0 @@
-#ifndef __eglext_h_
-#define __eglext_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2007-2010 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-#include <EGL/eglplatform.h>
-
-/*************************************************************/
-
-/* Header file version number */
-/* Current version at http://www.khronos.org/registry/egl/ */
-/* $Revision: 11249 $ on $Date: 2010-05-05 09:54:28 -0700 (Wed, 05 May 2010) $ */
-#define EGL_EGLEXT_VERSION 5
-
-#ifndef EGL_KHR_config_attribs
-#define EGL_KHR_config_attribs 1
-#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
-#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
-#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
-#endif
-
-#ifndef EGL_KHR_lock_surface
-#define EGL_KHR_lock_surface 1
-#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
-#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
-#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
-#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
-#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
-#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
-#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
-#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
-#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
-#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
-#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
-#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
-#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
-#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
-#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
-#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
-#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
-#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
-#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
-#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
-#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
-#endif
-
-#ifndef EGL_KHR_image
-#define EGL_KHR_image 1
-#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
-typedef void *EGLImageKHR;
-#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
-#endif
-
-#ifndef EGL_KHR_vg_parent_image
-#define EGL_KHR_vg_parent_image 1
-#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
-#endif
-
-#ifndef EGL_KHR_gl_texture_2D_image
-#define EGL_KHR_gl_texture_2D_image 1
-#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
-#endif
-
-#ifndef EGL_KHR_gl_texture_cubemap_image
-#define EGL_KHR_gl_texture_cubemap_image 1
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
-#endif
-
-#ifndef EGL_KHR_gl_texture_3D_image
-#define EGL_KHR_gl_texture_3D_image 1
-#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
-#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
-#endif
-
-#ifndef EGL_KHR_gl_renderbuffer_image
-#define EGL_KHR_gl_renderbuffer_image 1
-#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
-#endif
-
-#ifndef EGL_KHR_reusable_sync
-#define EGL_KHR_reusable_sync 1
-
-typedef void* EGLSyncKHR;
-typedef khronos_utime_nanoseconds_t EGLTimeKHR;
-
-#define EGL_SYNC_STATUS_KHR 0x30F1
-#define EGL_SIGNALED_KHR 0x30F2
-#define EGL_UNSIGNALED_KHR 0x30F3
-#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
-#define EGL_CONDITION_SATISFIED_KHR 0x30F6
-#define EGL_SYNC_TYPE_KHR 0x30F7
-#define EGL_SYNC_REUSABLE_KHR 0x30FA
-#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
-#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
-#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
-EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
-#endif
-
-#ifndef EGL_KHR_image_base
-#define EGL_KHR_image_base 1
-/* Most interfaces defined by EGL_KHR_image_pixmap above */
-#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
-#endif
-
-#ifndef EGL_KHR_image_pixmap
-#define EGL_KHR_image_pixmap 1
-/* Interfaces defined by EGL_KHR_image above */
-#endif
-
-#ifndef EGL_IMG_context_priority
-#define EGL_IMG_context_priority 1
-#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
-#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
-#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
-#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
-#endif
-
-#ifndef EGL_NV_coverage_sample
-#define EGL_NV_coverage_sample 1
-#define EGL_COVERAGE_BUFFERS_NV 0x30E0
-#define EGL_COVERAGE_SAMPLES_NV 0x30E1
-#endif
-
-#ifndef EGL_NV_depth_nonlinear
-#define EGL_NV_depth_nonlinear 1
-#define EGL_DEPTH_ENCODING_NV 0x30E2
-#define EGL_DEPTH_ENCODING_NONE_NV 0
-#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
-#endif
-
-#ifndef EGL_NV_sync
-#define EGL_NV_sync 1
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
-#define EGL_SYNC_STATUS_NV 0x30E7
-#define EGL_SIGNALED_NV 0x30E8
-#define EGL_UNSIGNALED_NV 0x30E9
-#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
-#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
-#define EGL_ALREADY_SIGNALED_NV 0x30EA
-#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
-#define EGL_CONDITION_SATISFIED_NV 0x30EC
-#define EGL_SYNC_TYPE_NV 0x30ED
-#define EGL_SYNC_CONDITION_NV 0x30EE
-#define EGL_SYNC_FENCE_NV 0x30EF
-#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
-typedef void* EGLSyncNV;
-typedef unsigned long long EGLTimeNV;
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
-EGLBoolean eglFenceNV (EGLSyncNV sync);
-EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
-EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
-typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
-#endif
-
-#ifndef EGL_KHR_fence_sync
-#define EGL_KHR_fence_sync 1
-/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
-#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
-#define EGL_SYNC_CONDITION_KHR 0x30F8
-#define EGL_SYNC_FENCE_KHR 0x30F9
-#endif
-
-#ifndef EGL_ANDROID_image_native_buffer
-#define EGL_ANDROID_image_native_buffer 1
-struct ANativeWindowBuffer;
-#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
-#endif
-
-#ifndef EGL_ANDROID_recordable
-#define EGL_ANDROID_recordable 1
-#define EGL_RECORDABLE_ANDROID 0x3142 /* EGLConfig attribute */
-#endif
-
-/* EGL_NV_system_time
- */
-#ifndef EGL_NV_system_time
-#define EGL_NV_system_time 1
-typedef khronos_int64_t EGLint64NV;
-typedef khronos_uint64_t EGLuint64NV;
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
-EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
-#endif
-typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC)(void);
-typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC)(void);
-#endif
-
-
-/* EGL_ANDROID_blob_cache
- */
-#ifndef EGL_ANDROID_blob_cache
-#define EGL_ANDROID_blob_cache 1
-typedef khronos_ssize_t EGLsizeiANDROID;
-typedef void (*EGLSetBlobFuncANDROID) (const void* key, EGLsizeiANDROID keySize, const void* value, EGLsizeiANDROID valueSize);
-typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void* key, EGLsizeiANDROID keySize, void* value, EGLsizeiANDROID valueSize);
-#ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-#endif /* EGL_EGLEXT_PROTOTYPES */
-typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy,
- EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h
deleted file mode 100644
index bfac71b..0000000
--- a/opengl/include/EGL/eglplatform.h
+++ /dev/null
@@ -1,120 +0,0 @@
-#ifndef __eglplatform_h_
-#define __eglplatform_h_
-
-/*
-** Copyright (c) 2007-2009 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Platform-specific types and definitions for egl.h
- * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "EGL" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-/* Macros used in EGL function prototype declarations.
- *
- * EGL functions should be prototyped as:
- *
- * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
- * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
- *
- * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
- */
-
-#ifndef EGLAPI
-#define EGLAPI KHRONOS_APICALL
-#endif
-
-#ifndef EGLAPIENTRY
-#define EGLAPIENTRY KHRONOS_APIENTRY
-#endif
-#define EGLAPIENTRYP EGLAPIENTRY*
-
-/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
- * are aliases of window-system-dependent types, such as X Display * or
- * Windows Device Context. They must be defined in platform-specific
- * code below. The EGL-prefixed versions of Native*Type are the same
- * types, renamed in EGL 1.3 so all types in the API start with "EGL".
- */
-
-#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN 1
-#endif
-#include <windows.h>
-
-typedef HDC EGLNativeDisplayType;
-typedef HBITMAP EGLNativePixmapType;
-typedef HWND EGLNativeWindowType;
-
-#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
-
-typedef int EGLNativeDisplayType;
-typedef void *EGLNativeWindowType;
-typedef void *EGLNativePixmapType;
-
-#elif defined(__ANDROID__) || defined(ANDROID)
-
-#include <android/native_window.h>
-
-struct egl_native_pixmap_t;
-
-typedef struct ANativeWindow* EGLNativeWindowType;
-typedef struct egl_native_pixmap_t* EGLNativePixmapType;
-typedef void* EGLNativeDisplayType;
-
-#elif defined(__unix__)
-
-/* X11 (tentative) */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef Display *EGLNativeDisplayType;
-typedef Pixmap EGLNativePixmapType;
-typedef Window EGLNativeWindowType;
-
-#else
-#error "Platform not recognized"
-#endif
-
-/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
-typedef EGLNativeDisplayType NativeDisplayType;
-typedef EGLNativePixmapType NativePixmapType;
-typedef EGLNativeWindowType NativeWindowType;
-
-
-/* Define EGLint. This must be a signed integral type large enough to contain
- * all legal attribute names and values passed into and out of EGL, whether
- * their type is boolean, bitmask, enumerant (symbolic constant), integer,
- * handle, or other. While in general a 32-bit integer will suffice, if
- * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
- * integer type.
- */
-typedef khronos_int32_t EGLint;
-
-#endif /* __eglplatform_h */
diff --git a/opengl/include/ETC1/etc1.h b/opengl/include/ETC1/etc1.h
deleted file mode 100644
index 0d38905..0000000
--- a/opengl/include/ETC1/etc1.h
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2009 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.
-
-#ifndef __etc1_h__
-#define __etc1_h__
-
-#define ETC1_ENCODED_BLOCK_SIZE 8
-#define ETC1_DECODED_BLOCK_SIZE 48
-
-#ifndef ETC1_RGB8_OES
-#define ETC1_RGB8_OES 0x8D64
-#endif
-
-typedef unsigned char etc1_byte;
-typedef int etc1_bool;
-typedef unsigned int etc1_uint32;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Encode a block of pixels.
-//
-// pIn is a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a
-// 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
-// value of pixel (x, y).
-//
-// validPixelMask is a 16-bit mask where bit (1 << (x + y * 4)) indicates whether
-// the corresponding (x,y) pixel is valid. Invalid pixel color values are ignored when compressing.
-//
-// pOut is an ETC1 compressed version of the data.
-
-void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 validPixelMask, etc1_byte* pOut);
-
-// Decode a block of pixels.
-//
-// pIn is an ETC1 compressed version of the data.
-//
-// pOut is a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a
-// 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
-// value of pixel (x, y).
-
-void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut);
-
-// Return the size of the encoded image data (does not include size of PKM header).
-
-etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height);
-
-// Encode an entire image.
-// pIn - pointer to the image data. Formatted such that
-// pixel (x,y) is at pIn + pixelSize * x + stride * y;
-// pOut - pointer to encoded data. Must be large enough to store entire encoded image.
-// pixelSize can be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image, 3 is a GL_BYTE RGB image.
-// returns non-zero if there is an error.
-
-int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height,
- etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut);
-
-// Decode an entire image.
-// pIn - pointer to encoded data.
-// pOut - pointer to the image data. Will be written such that
-// pixel (x,y) is at pIn + pixelSize * x + stride * y. Must be
-// large enough to store entire image.
-// pixelSize can be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image, 3 is a GL_BYTE RGB image.
-// returns non-zero if there is an error.
-
-int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut,
- etc1_uint32 width, etc1_uint32 height,
- etc1_uint32 pixelSize, etc1_uint32 stride);
-
-// Size of a PKM header, in bytes.
-
-#define ETC_PKM_HEADER_SIZE 16
-
-// Format a PKM header
-
-void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height);
-
-// Check if a PKM header is correctly formatted.
-
-etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader);
-
-// Read the image width from a PKM header
-
-etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader);
-
-// Read the image height from a PKM header
-
-etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/opengl/include/GLES/egl.h b/opengl/include/GLES/egl.h
deleted file mode 100644
index 5778e00..0000000
--- a/opengl/include/GLES/egl.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Skeleton egl.h to provide compatibility for early GLES 1.0
- * applications. Several early implementations included gl.h
- * in egl.h leading applications to include only egl.h
- *
- * $Revision: 6252 $ on $Date:: 2008-08-06 16:35:08 -0700 #$
- */
-
-#ifndef __legacy_egl_h_
-#define __legacy_egl_h_
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-
-#endif /* __legacy_egl_h_ */
diff --git a/opengl/include/GLES/gl.h b/opengl/include/GLES/gl.h
deleted file mode 100644
index 5b8d85a..0000000
--- a/opengl/include/GLES/gl.h
+++ /dev/null
@@ -1,770 +0,0 @@
-#ifndef __gl_h_
-#define __gl_h_
-
-/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
-
-#include <GLES/glplatform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-typedef khronos_int32_t GLclampx;
-
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
-
-
-/*************************************************************/
-
-/* OpenGL ES core versions */
-#define GL_VERSION_ES_CM_1_0 1
-#define GL_VERSION_ES_CL_1_0 1
-#define GL_VERSION_ES_CM_1_1 1
-#define GL_VERSION_ES_CL_1_1 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
-#define GL_FALSE 0
-#define GL_TRUE 1
-
-/* BeginMode */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-
-/* BlendingFactorDest */
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* ClipPlaneName */
-#define GL_CLIP_PLANE0 0x3000
-#define GL_CLIP_PLANE1 0x3001
-#define GL_CLIP_PLANE2 0x3002
-#define GL_CLIP_PLANE3 0x3003
-#define GL_CLIP_PLANE4 0x3004
-#define GL_CLIP_PLANE5 0x3005
-
-/* ColorMaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* ColorMaterialParameter */
-/* GL_AMBIENT_AND_DIFFUSE */
-
-/* ColorPointerType */
-/* GL_UNSIGNED_BYTE */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* CullFaceMode */
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
-#define GL_FOG 0x0B60
-#define GL_LIGHTING 0x0B50
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_ALPHA_TEST 0x0BC0
-#define GL_BLEND 0x0BE2
-#define GL_COLOR_LOGIC_OP 0x0BF2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-/* GL_LIGHT0 */
-/* GL_LIGHT1 */
-/* GL_LIGHT2 */
-/* GL_LIGHT3 */
-/* GL_LIGHT4 */
-/* GL_LIGHT5 */
-/* GL_LIGHT6 */
-/* GL_LIGHT7 */
-#define GL_POINT_SMOOTH 0x0B10
-#define GL_LINE_SMOOTH 0x0B20
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_COLOR_MATERIAL 0x0B57
-#define GL_NORMALIZE 0x0BA1
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_VERTEX_ARRAY 0x8074
-#define GL_NORMAL_ARRAY 0x8075
-#define GL_COLOR_ARRAY 0x8076
-#define GL_TEXTURE_COORD_ARRAY 0x8078
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_STACK_OVERFLOW 0x0503
-#define GL_STACK_UNDERFLOW 0x0504
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* FogMode */
-/* GL_LINEAR */
-#define GL_EXP 0x0800
-#define GL_EXP2 0x0801
-
-/* FogParameter */
-#define GL_FOG_DENSITY 0x0B62
-#define GL_FOG_START 0x0B63
-#define GL_FOG_END 0x0B64
-#define GL_FOG_MODE 0x0B65
-#define GL_FOG_COLOR 0x0B66
-
-/* FrontFaceDirection */
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-
-/* GetPName */
-#define GL_CURRENT_COLOR 0x0B00
-#define GL_CURRENT_NORMAL 0x0B02
-#define GL_CURRENT_TEXTURE_COORDS 0x0B03
-#define GL_POINT_SIZE 0x0B11
-#define GL_POINT_SIZE_MIN 0x8126
-#define GL_POINT_SIZE_MAX 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
-#define GL_POINT_DISTANCE_ATTENUATION 0x8129
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_LINE_WIDTH 0x0B21
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_SHADE_MODEL 0x0B54
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_MATRIX_MODE 0x0BA0
-#define GL_VIEWPORT 0x0BA2
-#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
-#define GL_PROJECTION_STACK_DEPTH 0x0BA4
-#define GL_TEXTURE_STACK_DEPTH 0x0BA5
-#define GL_MODELVIEW_MATRIX 0x0BA6
-#define GL_PROJECTION_MATRIX 0x0BA7
-#define GL_TEXTURE_MATRIX 0x0BA8
-#define GL_ALPHA_TEST_FUNC 0x0BC1
-#define GL_ALPHA_TEST_REF 0x0BC2
-#define GL_BLEND_DST 0x0BE0
-#define GL_BLEND_SRC 0x0BE1
-#define GL_LOGIC_OP_MODE 0x0BF0
-#define GL_SCISSOR_BOX 0x0C10
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_LIGHTS 0x0D31
-#define GL_MAX_CLIP_PLANES 0x0D32
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
-#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_VERTEX_ARRAY_SIZE 0x807A
-#define GL_VERTEX_ARRAY_TYPE 0x807B
-#define GL_VERTEX_ARRAY_STRIDE 0x807C
-#define GL_NORMAL_ARRAY_TYPE 0x807E
-#define GL_NORMAL_ARRAY_STRIDE 0x807F
-#define GL_COLOR_ARRAY_SIZE 0x8081
-#define GL_COLOR_ARRAY_TYPE 0x8082
-#define GL_COLOR_ARRAY_STRIDE 0x8083
-#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
-#define GL_VERTEX_ARRAY_POINTER 0x808E
-#define GL_NORMAL_ARRAY_POINTER 0x808F
-#define GL_COLOR_ARRAY_POINTER 0x8090
-#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-
-/* GetTextureParameter */
-/* GL_TEXTURE_MAG_FILTER */
-/* GL_TEXTURE_MIN_FILTER */
-/* GL_TEXTURE_WRAP_S */
-/* GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* HintTarget */
-#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
-#define GL_POINT_SMOOTH_HINT 0x0C51
-#define GL_LINE_SMOOTH_HINT 0x0C52
-#define GL_FOG_HINT 0x0C54
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-
-/* LightModelParameter */
-#define GL_LIGHT_MODEL_AMBIENT 0x0B53
-#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
-
-/* LightParameter */
-#define GL_AMBIENT 0x1200
-#define GL_DIFFUSE 0x1201
-#define GL_SPECULAR 0x1202
-#define GL_POSITION 0x1203
-#define GL_SPOT_DIRECTION 0x1204
-#define GL_SPOT_EXPONENT 0x1205
-#define GL_SPOT_CUTOFF 0x1206
-#define GL_CONSTANT_ATTENUATION 0x1207
-#define GL_LINEAR_ATTENUATION 0x1208
-#define GL_QUADRATIC_ATTENUATION 0x1209
-
-/* DataType */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-
-/* LogicOp */
-#define GL_CLEAR 0x1500
-#define GL_AND 0x1501
-#define GL_AND_REVERSE 0x1502
-#define GL_COPY 0x1503
-#define GL_AND_INVERTED 0x1504
-#define GL_NOOP 0x1505
-#define GL_XOR 0x1506
-#define GL_OR 0x1507
-#define GL_NOR 0x1508
-#define GL_EQUIV 0x1509
-#define GL_INVERT 0x150A
-#define GL_OR_REVERSE 0x150B
-#define GL_COPY_INVERTED 0x150C
-#define GL_OR_INVERTED 0x150D
-#define GL_NAND 0x150E
-#define GL_SET 0x150F
-
-/* MaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* MaterialParameter */
-#define GL_EMISSION 0x1600
-#define GL_SHININESS 0x1601
-#define GL_AMBIENT_AND_DIFFUSE 0x1602
-/* GL_AMBIENT */
-/* GL_DIFFUSE */
-/* GL_SPECULAR */
-
-/* MatrixMode */
-#define GL_MODELVIEW 0x1700
-#define GL_PROJECTION 0x1701
-#define GL_TEXTURE 0x1702
-
-/* NormalPointerType */
-/* GL_BYTE */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* PixelFormat */
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-
-/* PixelStoreParameter */
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-
-/* PixelType */
-/* GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-
-/* ShadingModel */
-#define GL_FLAT 0x1D00
-#define GL_SMOOTH 0x1D01
-
-/* StencilFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* StencilOp */
-/* GL_ZERO */
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-/* GL_INVERT */
-
-/* StringName */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* TexCoordPointerType */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-/* GL_BYTE */
-
-/* TextureEnvMode */
-#define GL_MODULATE 0x2100
-#define GL_DECAL 0x2101
-/* GL_BLEND */
-#define GL_ADD 0x0104
-/* GL_REPLACE */
-
-/* TextureEnvParameter */
-#define GL_TEXTURE_ENV_MODE 0x2200
-#define GL_TEXTURE_ENV_COLOR 0x2201
-
-/* TextureEnvTarget */
-#define GL_TEXTURE_ENV 0x2300
-
-/* TextureMagFilter */
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-
-/* TextureMinFilter */
-/* GL_NEAREST */
-/* GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_GENERATE_MIPMAP 0x8191
-
-/* TextureTarget */
-/* GL_TEXTURE_2D */
-
-/* TextureUnit */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-
-/* TextureWrapMode */
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-
-/* VertexPointerType */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-/* GL_BYTE */
-
-/* LightName */
-#define GL_LIGHT0 0x4000
-#define GL_LIGHT1 0x4001
-#define GL_LIGHT2 0x4002
-#define GL_LIGHT3 0x4003
-#define GL_LIGHT4 0x4004
-#define GL_LIGHT5 0x4005
-#define GL_LIGHT6 0x4006
-#define GL_LIGHT7 0x4007
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
-#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
-#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
-#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
-
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-
-/* Texture combine + dot3 */
-#define GL_SUBTRACT 0x84E7
-#define GL_COMBINE 0x8570
-#define GL_COMBINE_RGB 0x8571
-#define GL_COMBINE_ALPHA 0x8572
-#define GL_RGB_SCALE 0x8573
-#define GL_ADD_SIGNED 0x8574
-#define GL_INTERPOLATE 0x8575
-#define GL_CONSTANT 0x8576
-#define GL_PRIMARY_COLOR 0x8577
-#define GL_PREVIOUS 0x8578
-#define GL_OPERAND0_RGB 0x8590
-#define GL_OPERAND1_RGB 0x8591
-#define GL_OPERAND2_RGB 0x8592
-#define GL_OPERAND0_ALPHA 0x8598
-#define GL_OPERAND1_ALPHA 0x8599
-#define GL_OPERAND2_ALPHA 0x859A
-
-#define GL_ALPHA_SCALE 0x0D1C
-
-#define GL_SRC0_RGB 0x8580
-#define GL_SRC1_RGB 0x8581
-#define GL_SRC2_RGB 0x8582
-#define GL_SRC0_ALPHA 0x8588
-#define GL_SRC1_ALPHA 0x8589
-#define GL_SRC2_ALPHA 0x858A
-
-#define GL_DOT3_RGB 0x86AE
-#define GL_DOT3_RGBA 0x86AF
-
-/*------------------------------------------------------------------------*
- * required OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* OES_read_format */
-#ifndef GL_OES_read_format
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif
-
-/* OES_point_size_array */
-#ifndef GL_OES_point_size_array
-#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
-#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
-#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
-#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
-#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
-#endif
-
-/* GL_OES_point_sprite */
-#ifndef GL_OES_point_sprite
-#define GL_POINT_SPRITE_OES 0x8861
-#define GL_COORD_REPLACE_OES 0x8862
-#endif
-
-/*************************************************************/
-
-/* Available only in Common profile */
-GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
-GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
-GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
-GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glLineWidth (GLfloat width);
-GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
-GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
-GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
-GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glPointSize (GLfloat size);
-GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
-GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
-
-/* Available in both Common and Common-Lite profiles */
-GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
-GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
-GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
-GL_API void GL_APIENTRY glClear (GLbitfield mask);
-GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
-GL_API void GL_APIENTRY glClearStencil (GLint s);
-GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
-GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
-GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
-GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glCullFace (GLenum mode);
-GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
-GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GL_API void GL_APIENTRY glDepthFunc (GLenum func);
-GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
-GL_API void GL_APIENTRY glDisable (GLenum cap);
-GL_API void GL_APIENTRY glDisableClientState (GLenum array);
-GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
-GL_API void GL_APIENTRY glEnable (GLenum cap);
-GL_API void GL_APIENTRY glEnableClientState (GLenum array);
-GL_API void GL_APIENTRY glFinish (void);
-GL_API void GL_APIENTRY glFlush (void);
-GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glFrontFace (GLenum mode);
-GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
-GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
-GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
-GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GL_API GLenum GL_APIENTRY glGetError (void);
-GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params);
-GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
-GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
-GL_API void GL_APIENTRY glLoadIdentity (void);
-GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
-GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
-GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
-GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
-GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
-GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glPointSizex (GLfixed size);
-GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
-GL_API void GL_APIENTRY glPopMatrix (void);
-GL_API void GL_APIENTRY glPushMatrix (void);
-GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
-GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
-GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glShadeModel (GLenum mode);
-GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_API void GL_APIENTRY glStencilMask (GLuint mask);
-GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
-GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
-GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-/*------------------------------------------------------------------------*
- * Required OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_read_format */
-#ifndef GL_OES_read_format
-#define GL_OES_read_format 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_point_size_array */
-#ifndef GL_OES_point_size_array
-#define GL_OES_point_size_array 1
-GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-/* GL_OES_point_sprite */
-#ifndef GL_OES_point_sprite
-#define GL_OES_point_sprite 1
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl_h_ */
-
diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h
deleted file mode 100644
index 54afaab..0000000
--- a/opengl/include/GLES/glext.h
+++ /dev/null
@@ -1,1183 +0,0 @@
-#ifndef __glext_h_
-#define __glext_h_
-
-/* $Revision: 16481 $ on $Date:: 2012-01-04 10:43:56 -0800 #$ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-#ifndef GL_APIENTRYP
-# define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_blend_equation_separate */
-#ifndef GL_OES_blend_equation_separate
-/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */
-#define GL_BLEND_EQUATION_RGB_OES 0x8009
-#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
-#endif
-
-/* GL_OES_blend_func_separate */
-#ifndef GL_OES_blend_func_separate
-#define GL_BLEND_DST_RGB_OES 0x80C8
-#define GL_BLEND_SRC_RGB_OES 0x80C9
-#define GL_BLEND_DST_ALPHA_OES 0x80CA
-#define GL_BLEND_SRC_ALPHA_OES 0x80CB
-#endif
-
-/* GL_OES_blend_subtract */
-#ifndef GL_OES_blend_subtract
-#define GL_BLEND_EQUATION_OES 0x8009
-#define GL_FUNC_ADD_OES 0x8006
-#define GL_FUNC_SUBTRACT_OES 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
-#endif
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES 0x8D64
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif
-
-/* GL_OES_draw_texture */
-#ifndef GL_OES_draw_texture
-#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT 0x1405
-#endif
-
-/* GL_OES_fixed_point */
-#ifndef GL_OES_fixed_point
-#define GL_FIXED_OES 0x140C
-#endif
-
-/* GL_OES_framebuffer_object */
-#ifndef GL_OES_framebuffer_object
-#define GL_NONE_OES 0
-#define GL_FRAMEBUFFER_OES 0x8D40
-#define GL_RENDERBUFFER_OES 0x8D41
-#define GL_RGBA4_OES 0x8056
-#define GL_RGB5_A1_OES 0x8057
-#define GL_RGB565_OES 0x8D62
-#define GL_DEPTH_COMPONENT16_OES 0x81A5
-#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
-#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
-#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
-#define GL_DEPTH_ATTACHMENT_OES 0x8D00
-#define GL_STENCIL_ATTACHMENT_OES 0x8D20
-#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
-#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
-#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
-#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
-#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
-#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-#endif
-
-/* GL_OES_matrix_get */
-#ifndef GL_OES_matrix_get
-#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
-#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
-#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
-#endif
-
-/* GL_OES_matrix_palette */
-#ifndef GL_OES_matrix_palette
-#define GL_MAX_VERTEX_UNITS_OES 0x86A4
-#define GL_MAX_PALETTE_MATRICES_OES 0x8842
-#define GL_MATRIX_PALETTE_OES 0x8840
-#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
-#define GL_WEIGHT_ARRAY_OES 0x86AD
-#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
-#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
-#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
-#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
-#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
-#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
-#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
-#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
-#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
-#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
-#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES 0x8051
-#define GL_RGBA8_OES 0x8058
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES 0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES 0x8D47
-#endif
-
-/* GL_OES_stencil8 */
-#ifndef GL_OES_stencil8
-#define GL_STENCIL_INDEX8_OES 0x8D48
-#endif
-
-/* GL_OES_stencil_wrap */
-#ifndef GL_OES_stencil_wrap
-#define GL_INCR_WRAP_OES 0x8507
-#define GL_DECR_WRAP_OES 0x8508
-#endif
-
-/* GL_OES_texture_cube_map */
-#ifndef GL_OES_texture_cube_map
-#define GL_NORMAL_MAP_OES 0x8511
-#define GL_REFLECTION_MAP_OES 0x8512
-#define GL_TEXTURE_CUBE_MAP_OES 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
-#define GL_TEXTURE_GEN_MODE_OES 0x2500
-#define GL_TEXTURE_GEN_STR_OES 0x8D60
-#endif
-
-/* GL_OES_texture_mirrored_repeat */
-#ifndef GL_OES_texture_mirrored_repeat
-#define GL_MIRRORED_REPEAT_OES 0x8370
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD 0x87F9
-#define GL_3DC_XY_AMD 0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD 0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_texture_2D_limited_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
-#define GL_MAX_SAMPLES_APPLE 0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_rgba8 */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT 0x1800
-#define GL_DEPTH_EXT 0x1801
-#define GL_STENCIL_EXT 0x1802
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
-#define GL_RENDERBUFFER_SAMPLES_EXT 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
-#define GL_MAX_SAMPLES_EXT 0x9135
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-/* reuse GL_NO_ERROR */
-#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_SRGB_EXT 0x8C40
-#define GL_SRGB_ALPHA_EXT 0x8C42
-#define GL_SRGB8_ALPHA8_EXT 0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_EXT_texture_lod_bias */
-#ifndef GL_EXT_texture_lod_bias
-#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
-#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
-#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
-#define GL_ALPHA8_EXT 0x803C
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_RGBA32F_EXT 0x8814
-#define GL_RGB32F_EXT 0x8815
-#define GL_ALPHA32F_EXT 0x8816
-#define GL_LUMINANCE32F_EXT 0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
-/* reuse GL_RGBA16F_EXT */
-#define GL_RGB16F_EXT 0x881B
-#define GL_ALPHA16F_EXT 0x881C
-#define GL_LUMINANCE16F_EXT 0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
-#define GL_RGB10_A2_EXT 0x8059
-#define GL_RGB10_EXT 0x8052
-#define GL_BGRA8_EXT 0x93A1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#endif
-
-/* GL_IMG_texture_env_enhanced_fixed_function */
-#ifndef GL_IMG_texture_env_enhanced_fixed_function
-#define GL_MODULATE_COLOR_IMG 0x8C04
-#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05
-#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06
-#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07
-#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08
-#define GL_ADD_BLEND_IMG 0x8C09
-#define GL_DOT3_RGBA_IMG 0x86AF
-#endif
-
-/* GL_IMG_user_clip_plane */
-#ifndef GL_IMG_user_clip_plane
-#define GL_CLIP_PLANE0_IMG 0x3000
-#define GL_CLIP_PLANE1_IMG 0x3001
-#define GL_CLIP_PLANE2_IMG 0x3002
-#define GL_CLIP_PLANE3_IMG 0x3003
-#define GL_CLIP_PLANE4_IMG 0x3004
-#define GL_CLIP_PLANE5_IMG 0x3005
-#define GL_MAX_CLIP_PLANES_IMG 0x0D32
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
-#define GL_MAX_SAMPLES_IMG 0x9135
-#define GL_TEXTURE_SAMPLES_IMG 0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
-#define GL_TEXTURE_TYPE_QCOM 0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
-#define GL_TEXTURE_TARGET_QCOM 0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
-#define GL_STATE_RESTORE 0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM 0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_blend_equation_separate */
-#ifndef GL_OES_blend_equation_separate
-#define GL_OES_blend_equation_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
-#endif
-
-/* GL_OES_blend_func_separate */
-#ifndef GL_OES_blend_func_separate
-#define GL_OES_blend_func_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-#endif
-
-/* GL_OES_blend_subtract */
-#ifndef GL_OES_blend_subtract
-#define GL_OES_blend_subtract 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
-#endif
-
-/* GL_OES_byte_coordinates */
-#ifndef GL_OES_byte_coordinates
-#define GL_OES_byte_coordinates 1
-#endif
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_draw_texture */
-#ifndef GL_OES_draw_texture
-#define GL_OES_draw_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
-GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
-GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
-GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
-GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
-GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif
-
-/* GL_OES_extended_matrix_palette */
-#ifndef GL_OES_extended_matrix_palette
-#define GL_OES_extended_matrix_palette 1
-#endif
-
-/* GL_OES_fbo_render_mipmap */
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif
-
-/* GL_OES_fixed_point */
-#ifndef GL_OES_fixed_point
-#define GL_OES_fixed_point 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref);
-GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth);
-GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
-GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar);
-GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]);
-GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
-GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
-GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
-GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
-GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
-GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
-GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
-GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
-GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
-#endif
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref);
-typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
-typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar);
-typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]);
-typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
-typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
-typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
-typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
-typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
-typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
-typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
-typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
-#endif
-
-/* GL_OES_framebuffer_object */
-#ifndef GL_OES_framebuffer_object
-#define GL_OES_framebuffer_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
-GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
-GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers);
-GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers);
-GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params);
-GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
-GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
-GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers);
-GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers);
-GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
-GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
-#endif
-typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
-typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
-typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers);
-typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers);
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params);
-typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
-typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
-typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers);
-typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers);
-typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params);
-#endif
-
-/* GL_OES_matrix_get */
-#ifndef GL_OES_matrix_get
-#define GL_OES_matrix_get 1
-#endif
-
-/* GL_OES_matrix_palette */
-#ifndef GL_OES_matrix_palette
-#define GL_OES_matrix_palette 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
-GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
-GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
-typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
-typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#endif
-
-/* GL_OES_query_matrix */
-#ifndef GL_OES_query_matrix
-#define GL_OES_query_matrix 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]);
-#endif
-typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]);
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif
-
-/* GL_OES_single_precision */
-#ifndef GL_OES_single_precision
-#define GL_OES_single_precision 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar);
-GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
-GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]);
-GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar);
-typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
-typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]);
-typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#endif
-
-/* GL_OES_stencil8 */
-#ifndef GL_OES_stencil8
-#define GL_OES_stencil8 1
-#endif
-
-/* GL_OES_stencil_wrap */
-#ifndef GL_OES_stencil_wrap
-#define GL_OES_stencil_wrap 1
-#endif
-
-/* GL_OES_texture_cube_map */
-#ifndef GL_OES_texture_cube_map
-#define GL_OES_texture_cube_map 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
-GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
-GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
-GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
-GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
-GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
-GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
-typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
-typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
-typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
-#endif
-
-/* GL_OES_texture_env_crossbar */
-#ifndef GL_OES_texture_env_crossbar
-#define GL_OES_texture_env_crossbar 1
-#endif
-
-/* GL_OES_texture_mirrored_repeat */
-#ifndef GL_OES_texture_mirrored_repeat
-#define GL_OES_texture_mirrored_repeat 1
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_texture_2D_limited_npot */
-#ifndef GL_APPLE_texture_2D_limited_npot
-#define GL_APPLE_texture_2D_limited_npot 1
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_rgba8 */
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
-GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif
-
-/* GL_EXT_texture_lod_bias */
-#ifndef GL_EXT_texture_lod_bias
-#define GL_EXT_texture_lod_bias 1
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_texture_env_enhanced_fixed_function */
-#ifndef GL_IMG_texture_env_enhanced_fixed_function
-#define GL_IMG_texture_env_enhanced_fixed_function 1
-#endif
-
-/* GL_IMG_user_clip_plane */
-#ifndef GL_IMG_user_clip_plane
-#define GL_IMG_user_clip_plane 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn);
-GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn);
-#endif
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
-
-/* NV_fence */
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
-GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
-GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence);
-GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-#endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_driver_control */
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
-
-/* GL_QCOM_extended_get2 */
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __glext_h_ */
-
diff --git a/opengl/include/GLES/glplatform.h b/opengl/include/GLES/glplatform.h
deleted file mode 100644
index 2db6ee2..0000000
--- a/opengl/include/GLES/glplatform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __glplatform_h_
-#define __glplatform_h_
-
-/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_API
-#define GL_API KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __glplatform_h_ */
diff --git a/opengl/include/GLES2/gl2.h b/opengl/include/GLES2/gl2.h
deleted file mode 100644
index e1d3b87..0000000
--- a/opengl/include/GLES2/gl2.h
+++ /dev/null
@@ -1,621 +0,0 @@
-#ifndef __gl2_h_
-#define __gl2_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-#include <GLES2/gl2platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
-
-typedef void GLvoid;
-typedef char GLchar;
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef khronos_int8_t GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef khronos_uint8_t GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef khronos_float_t GLfloat;
-typedef khronos_float_t GLclampf;
-typedef khronos_int32_t GLfixed;
-
-/* GL types for handling large vertex buffer objects */
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t GLsizeiptr;
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_2_0 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
-#define GL_FALSE 0
-#define GL_TRUE 1
-
-/* BeginMode */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction (not supported in ES20) */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* BlendingFactorDest */
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
-#define GL_FUNC_ADD 0x8006
-#define GL_BLEND_EQUATION 0x8009
-#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
-#define GL_BLEND_EQUATION_ALPHA 0x883D
-
-/* BlendSubtract */
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-
-/* Separate Blend Functions */
-#define GL_BLEND_DST_RGB 0x80C8
-#define GL_BLEND_SRC_RGB 0x80C9
-#define GL_BLEND_DST_ALPHA 0x80CA
-#define GL_BLEND_SRC_ALPHA 0x80CB
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-
-/* Buffer Objects */
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_ELEMENT_ARRAY_BUFFER 0x8893
-#define GL_ARRAY_BUFFER_BINDING 0x8894
-#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
-
-#define GL_STREAM_DRAW 0x88E0
-#define GL_STATIC_DRAW 0x88E4
-#define GL_DYNAMIC_DRAW 0x88E8
-
-#define GL_BUFFER_SIZE 0x8764
-#define GL_BUFFER_USAGE 0x8765
-
-#define GL_CURRENT_VERTEX_ATTRIB 0x8626
-
-/* CullFaceMode */
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_BLEND 0x0BE2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_COVERAGE 0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* FrontFaceDirection */
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-
-/* GetPName */
-#define GL_LINE_WIDTH 0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BACK_FUNC 0x8800
-#define GL_STENCIL_BACK_FAIL 0x8801
-#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
-#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
-#define GL_STENCIL_BACK_REF 0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
-#define GL_VIEWPORT 0x0BA2
-#define GL_SCISSOR_BOX 0x0C10
-/* GL_SCISSOR_TEST */
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-/* GL_POLYGON_OFFSET_FILL */
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-
-/* GetTextureParameter */
-/* GL_TEXTURE_MAG_FILTER */
-/* GL_TEXTURE_MIN_FILTER */
-/* GL_TEXTURE_WRAP_S */
-/* GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT 0x8192
-
-/* DataType */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-
-/* PixelFormat */
-#define GL_DEPTH_COMPONENT 0x1902
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-
-/* PixelType */
-/* GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS 0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
-#define GL_MAX_VARYING_VECTORS 0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
-#define GL_SHADER_TYPE 0x8B4F
-#define GL_DELETE_STATUS 0x8B80
-#define GL_LINK_STATUS 0x8B82
-#define GL_VALIDATE_STATUS 0x8B83
-#define GL_ATTACHED_SHADERS 0x8B85
-#define GL_ACTIVE_UNIFORMS 0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
-#define GL_ACTIVE_ATTRIBUTES 0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
-#define GL_CURRENT_PROGRAM 0x8B8D
-
-/* StencilFunction */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-
-/* StencilOp */
-/* GL_ZERO */
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-#define GL_INVERT 0x150A
-#define GL_INCR_WRAP 0x8507
-#define GL_DECR_WRAP 0x8508
-
-/* StringName */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* TextureMagFilter */
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-
-/* TextureMinFilter */
-/* GL_NEAREST */
-/* GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-
-/* TextureTarget */
-/* GL_TEXTURE_2D */
-#define GL_TEXTURE 0x1702
-
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-
-/* TextureUnit */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-
-/* TextureWrapMode */
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MIRRORED_REPEAT 0x8370
-
-/* Uniform Types */
-#define GL_FLOAT_VEC2 0x8B50
-#define GL_FLOAT_VEC3 0x8B51
-#define GL_FLOAT_VEC4 0x8B52
-#define GL_INT_VEC2 0x8B53
-#define GL_INT_VEC3 0x8B54
-#define GL_INT_VEC4 0x8B55
-#define GL_BOOL 0x8B56
-#define GL_BOOL_VEC2 0x8B57
-#define GL_BOOL_VEC3 0x8B58
-#define GL_BOOL_VEC4 0x8B59
-#define GL_FLOAT_MAT2 0x8B5A
-#define GL_FLOAT_MAT3 0x8B5B
-#define GL_FLOAT_MAT4 0x8B5C
-#define GL_SAMPLER_2D 0x8B5E
-#define GL_SAMPLER_CUBE 0x8B60
-
-/* Vertex Arrays */
-#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
-#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
-#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
-#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
-#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-
-/* Shader Source */
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_INFO_LOG_LENGTH 0x8B84
-#define GL_SHADER_SOURCE_LENGTH 0x8B88
-#define GL_SHADER_COMPILER 0x8DFA
-
-/* Shader Binary */
-#define GL_SHADER_BINARY_FORMATS 0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
-
-/* Shader Precision-Specified Types */
-#define GL_LOW_FLOAT 0x8DF0
-#define GL_MEDIUM_FLOAT 0x8DF1
-#define GL_HIGH_FLOAT 0x8DF2
-#define GL_LOW_INT 0x8DF3
-#define GL_MEDIUM_INT 0x8DF4
-#define GL_HIGH_INT 0x8DF5
-
-/* Framebuffer Object. */
-#define GL_FRAMEBUFFER 0x8D40
-#define GL_RENDERBUFFER 0x8D41
-
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGB565 0x8D62
-#define GL_DEPTH_COMPONENT16 0x81A5
-#define GL_STENCIL_INDEX 0x1901
-#define GL_STENCIL_INDEX8 0x8D48
-
-#define GL_RENDERBUFFER_WIDTH 0x8D42
-#define GL_RENDERBUFFER_HEIGHT 0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
-#define GL_RENDERBUFFER_RED_SIZE 0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_DEPTH_ATTACHMENT 0x8D00
-#define GL_STENCIL_ATTACHMENT 0x8D20
-
-#define GL_NONE 0
-
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
-
-#define GL_FRAMEBUFFER_BINDING 0x8CA6
-#define GL_RENDERBUFFER_BINDING 0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
-
-#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
-
-/*-------------------------------------------------------------------------
- * GL core functions.
- *-----------------------------------------------------------------------*/
-
-GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
-GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void GL_APIENTRY glFinish (void);
-GL_APICALL void GL_APIENTRY glFlush (void);
-GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum GL_APIENTRY glGetError (void);
-GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
-GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2_h_ */
diff --git a/opengl/include/GLES2/gl2ext.h b/opengl/include/GLES2/gl2ext.h
deleted file mode 100644
index 8f8d80a..0000000
--- a/opengl/include/GLES2/gl2ext.h
+++ /dev/null
@@ -1,1422 +0,0 @@
-#ifndef __gl2ext_h_
-#define __gl2ext_h_
-
-/* $Revision: 16619 $ on $Date:: 2012-01-18 10:00:14 -0800 #$ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-#ifndef GL_APIENTRYP
-# define GL_APIENTRYP GL_APIENTRY*
-#endif
-
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES 0x8D64
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES 0x81A6
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES 0x81A7
-#endif
-
-/* GL_OES_depth_texture */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_SAMPLER_EXTERNAL_OES 0x8D66
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT 0x1405
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES 0x88B9
-#define GL_BUFFER_ACCESS_OES 0x88BB
-#define GL_BUFFER_MAPPED_OES 0x88BC
-#define GL_BUFFER_MAP_POINTER_OES 0x88BD
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES 0x84F9
-#define GL_UNSIGNED_INT_24_8_OES 0x84FA
-#define GL_DEPTH24_STENCIL8_OES 0x88F0
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES 0x8051
-#define GL_RGBA8_OES 0x8058
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES 0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES 0x8D47
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_TEXTURE_WRAP_R_OES 0x8072
-#define GL_TEXTURE_3D_OES 0x806F
-#define GL_TEXTURE_BINDING_3D_OES 0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
-#define GL_SAMPLER_3D_OES 0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
-#endif
-
-/* GL_OES_texture_float */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_HALF_FLOAT_OES 0x8D61
-#endif
-
-/* GL_OES_texture_half_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
-#endif
-
-/* GL_OES_vertex_half_float */
-/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
-#define GL_INT_10_10_10_2_OES 0x8DF7
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD 0x87F9
-#define GL_3DC_XY_AMD 0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD 0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-#endif
-
-/* GL_AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_COUNTER_TYPE_AMD 0x8BC0
-#define GL_COUNTER_RANGE_AMD 0x8BC1
-#define GL_UNSIGNED_INT64_AMD 0x8BC2
-#define GL_PERCENTAGE_AMD 0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
-#define GL_PERFMON_RESULT_AMD 0x8BC6
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD 0x8740
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
-#define GL_MAX_SAMPLES_ANGLE 0x8D57
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_RGB_422_APPLE 0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
-#define GL_MAX_SAMPLES_APPLE 0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_MALI_SHADER_BINARY_ARM 0x8F60
-#endif
-
-/* GL_ARM_rgba8 */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_RGBA16F_EXT 0x881A
-#define GL_RGB16F_EXT 0x881B
-#define GL_RG16F_EXT 0x822F
-#define GL_R16F_EXT 0x822D
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
-#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
-#define GL_PROGRAM_OBJECT_EXT 0x8B40
-#define GL_SHADER_OBJECT_EXT 0x8B48
-#define GL_BUFFER_OBJECT_EXT 0x9151
-#define GL_QUERY_OBJECT_EXT 0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
-#endif
-
-/* GL_EXT_debug_marker */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT 0x1800
-#define GL_DEPTH_EXT 0x1801
-#define GL_STENCIL_EXT 0x1802
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
-#define GL_RENDERBUFFER_SAMPLES_EXT 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
-#define GL_MAX_SAMPLES_EXT 0x9135
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
-#define GL_CURRENT_QUERY_EXT 0x8865
-#define GL_QUERY_RESULT_EXT 0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-/* reuse GL_NO_ERROR */
-#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
-#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
-#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE_EXT 0x8258
-#define GL_ACTIVE_PROGRAM_EXT 0x8259
-#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
-#endif
-
-/* GL_EXT_shader_texture_lod */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
-#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
-#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
-#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_SRGB_EXT 0x8C40
-#define GL_SRGB_ALPHA_EXT 0x8C42
-#define GL_SRGB8_ALPHA8_EXT 0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_RED_EXT 0x1903
-#define GL_RG_EXT 0x8227
-#define GL_R8_EXT 0x8229
-#define GL_RG8_EXT 0x822B
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
-#define GL_ALPHA8_EXT 0x803C
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_RGBA32F_EXT 0x8814
-#define GL_RGB32F_EXT 0x8815
-#define GL_ALPHA32F_EXT 0x8816
-#define GL_LUMINANCE32F_EXT 0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
-/* reuse GL_RGBA16F_EXT */
-#define GL_RGB16F_EXT 0x881B
-#define GL_ALPHA16F_EXT 0x881C
-#define GL_LUMINANCE16F_EXT 0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
-#define GL_RGB10_A2_EXT 0x8059
-#define GL_RGB10_EXT 0x8052
-#define GL_BGRA8_EXT 0x93A1
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_SHADER_BINARY_DMP 0x9250
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_SGX_BINARY_IMG 0x8C0A
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
-#define GL_MAX_SAMPLES_IMG 0x9135
-#define GL_TEXTURE_SAMPLES_IMG 0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_COVERAGE_COMPONENT_NV 0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
-#define GL_COVERAGE_BUFFERS_NV 0x8ED3
-#define GL_COVERAGE_SAMPLES_NV 0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV 0x8000
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_MAX_DRAW_BUFFERS_NV 0x8824
-#define GL_DRAW_BUFFER0_NV 0x8825
-#define GL_DRAW_BUFFER1_NV 0x8826
-#define GL_DRAW_BUFFER2_NV 0x8827
-#define GL_DRAW_BUFFER3_NV 0x8828
-#define GL_DRAW_BUFFER4_NV 0x8829
-#define GL_DRAW_BUFFER5_NV 0x882A
-#define GL_DRAW_BUFFER6_NV 0x882B
-#define GL_DRAW_BUFFER7_NV 0x882C
-#define GL_DRAW_BUFFER8_NV 0x882D
-#define GL_DRAW_BUFFER9_NV 0x882E
-#define GL_DRAW_BUFFER10_NV 0x882F
-#define GL_DRAW_BUFFER11_NV 0x8830
-#define GL_DRAW_BUFFER12_NV 0x8831
-#define GL_DRAW_BUFFER13_NV 0x8832
-#define GL_DRAW_BUFFER14_NV 0x8833
-#define GL_DRAW_BUFFER15_NV 0x8834
-#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
-#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
-#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
-#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
-#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
-#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
-#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
-#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
-#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
-#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
-#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
-#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
-#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
-#define GL_COLOR_ATTACHMENT13_NV 0x8CED
-#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
-#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
-#endif
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
-/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_READ_BUFFER_NV 0x0C02
-#endif
-
-/* GL_NV_read_buffer_front */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_compression_s3tc_update */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_npot_2D_mipmap */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_ALPHA_TEST_QCOM 0x0BC0
-#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
-#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
-#endif
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
-#define GL_TEXTURE_TYPE_QCOM 0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
-#define GL_TEXTURE_TARGET_QCOM 0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
-#define GL_STATE_RESTORE 0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM 0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_SHADER_BINARY_VIV 0x8FC4
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_depth_texture */
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_OES_element_index_uint 1
-#endif
-
-/* GL_OES_fbo_render_mipmap */
-#ifndef GL_OES_fbo_render_mipmap
-#define GL_OES_fbo_render_mipmap 1
-#endif
-
-/* GL_OES_fragment_precision_high */
-#ifndef GL_OES_fragment_precision_high
-#define GL_OES_fragment_precision_high 1
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_OES_get_program_binary 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
-typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_OES_packed_depth_stencil 1
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_OES_rgb8_rgba8 1
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_OES_standard_derivatives 1
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_OES_stencil1 1
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_OES_stencil4 1
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_OES_texture_3D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY 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_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY 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_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
-
-/* GL_OES_texture_float */
-#ifndef GL_OES_texture_float
-#define GL_OES_texture_float 1
-#endif
-
-/* GL_OES_texture_float_linear */
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_OES_texture_half_float 1
-#endif
-
-/* GL_OES_texture_half_float_linear */
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif
-
-/* GL_OES_texture_npot */
-#ifndef GL_OES_texture_npot
-#define GL_OES_texture_npot 1
-#endif
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_OES_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
-GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
-GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
-GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
-#endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
-
-/* GL_OES_vertex_half_float */
-#ifndef GL_OES_vertex_half_float
-#define GL_OES_vertex_half_float 1
-#endif
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_OES_vertex_type_10_10_10_2 1
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_AMD_compressed_3DC_texture 1
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_AMD_compressed_ATC_texture 1
-#endif
-
-/* AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_AMD_performance_monitor 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_APPLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_APPLE_texture_format_BGRA8888 1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_APPLE_texture_max_level 1
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_ARM_mali_shader_binary 1
-#endif
-
-/* GL_ARM_rgba8 */
-#ifndef GL_ARM_rgba8
-#define GL_ARM_rgba8 1
-#endif
-
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_EXT_color_buffer_half_float 1
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_EXT_debug_label 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
-
-/* GL_EXT_debug_marker */
-#ifndef GL_EXT_debug_marker
-#define GL_EXT_debug_marker 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
-GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
-#endif
-typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#endif
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_EXT_discard_framebuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_EXT_occlusion_query_boolean 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
-GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
-GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
-GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
-GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
-GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
-#endif
-typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
-typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
-typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
-typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_EXT_read_format_bgra 1
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-#define GL_EXT_robustness 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
-GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
-GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_EXT_separate_shader_objects 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
-GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
-typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
-typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
-typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
-typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
-typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-
-/* GL_EXT_shader_texture_lod */
-#ifndef GL_EXT_shader_texture_lod
-#define GL_EXT_shader_texture_lod 1
-#endif
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_EXT_shadow_samplers 1
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_EXT_texture_format_BGRA8888 1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_EXT_texture_rg 1
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_EXT_texture_storage 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_EXT_unpack_subimage 1
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_DMP_shader_binary 1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_IMG_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
-#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_NV_draw_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
-#endif
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
-#endif
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_NV_fbo_color_attachments 1
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
-GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
-GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
-#endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_NV_read_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
-#endif
-typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
-#endif
-
-/* GL_NV_read_buffer_front */
-#ifndef GL_NV_read_buffer_front
-#define GL_NV_read_buffer_front 1
-#endif
-
-/* GL_NV_read_depth */
-#ifndef GL_NV_read_depth
-#define GL_NV_read_depth 1
-#endif
-
-/* GL_NV_read_depth_stencil */
-#ifndef GL_NV_read_depth_stencil
-#define GL_NV_read_depth_stencil 1
-#endif
-
-/* GL_NV_read_stencil */
-#ifndef GL_NV_read_stencil
-#define GL_NV_read_stencil 1
-#endif
-
-/* GL_NV_texture_compression_s3tc_update */
-#ifndef GL_NV_texture_compression_s3tc_update
-#define GL_NV_texture_compression_s3tc_update 1
-#endif
-
-/* GL_NV_texture_npot_2D_mipmap */
-#ifndef GL_NV_texture_npot_2D_mipmap
-#define GL_NV_texture_npot_2D_mipmap 1
-#endif
-
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_QCOM_alpha_test 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
-#endif
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
-#endif
-
-/* GL_QCOM_driver_control */
-#ifndef GL_QCOM_driver_control
-#define GL_QCOM_driver_control 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
-GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
-#endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_QCOM_extended_get 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
-GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
-
-/* GL_QCOM_extended_get2 */
-#ifndef GL_QCOM_extended_get2
-#define GL_QCOM_extended_get2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
-GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_QCOM_perfmon_global_mode 1
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_QCOM_tiled_rendering 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
-#endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_VIV_shader_binary 1
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl2ext_h_ */
diff --git a/opengl/include/GLES2/gl2platform.h b/opengl/include/GLES2/gl2platform.h
deleted file mode 100644
index c9fa3c4..0000000
--- a/opengl/include/GLES2/gl2platform.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __gl2platform_h_
-#define __gl2platform_h_
-
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
-
-/*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
-
-/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
- *
- * Adopters may modify khrplatform.h and this file to suit their platform.
- * You are encouraged to submit all modifications to the Khronos group so that
- * they can be included in future versions of this file. Please submit changes
- * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
- * by filing a bug against product "OpenGL-ES" component "Registry".
- */
-
-#include <KHR/khrplatform.h>
-
-#ifndef GL_APICALL
-#define GL_APICALL KHRONOS_APICALL
-#endif
-
-#ifndef GL_APIENTRY
-#define GL_APIENTRY KHRONOS_APIENTRY
-#endif
-
-#endif /* __gl2platform_h_ */
diff --git a/opengl/include/KHR/khrplatform.h b/opengl/include/KHR/khrplatform.h
deleted file mode 100644
index 1660bd7..0000000
--- a/opengl/include/KHR/khrplatform.h
+++ /dev/null
@@ -1,243 +0,0 @@
-#ifndef __khrplatform_h_
-#define __khrplatform_h_
-
-/*
-** Copyright (c) 2008-2009 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* Platform-specific types and definitions.
- * $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $
- *
- * Adopters may modify this file to suit their platform. Adopters are
- * encouraged to submit platform specific modifications to the Khronos
- * group so that they can be included in future versions of this file.
- * Please submit changes by sending them to the public Khronos Bugzilla
- * (http://khronos.org/bugzilla) by filing a bug against product
- * "Khronos (general)" component "Registry".
- *
- * A predefined template which fills in some of the bug fields can be
- * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
- * must create a Bugzilla login first.
- *
- *
- * See the Implementer's Guidelines for information about where this file
- * should be located on your system.
- * http://www.khronos.org/registry/implementers_guide.pdf
- *
- *
- * This file should be included as
- * #include <KHR/khrplatform.h>
- * by the Khronos API header file that uses its types and defines.
- *
- * The types in this file should only be used to define API-specific types.
- * Types defined in this file:
- * khronos_int8_t signed 8 bit
- * khronos_uint8_t unsigned 8 bit
- * khronos_int16_t signed 16 bit
- * khronos_uint16_t unsigned 16 bit
- * khronos_int32_t signed 32 bit
- * khronos_uint32_t unsigned 32 bit
- * khronos_int64_t signed 64 bit
- * khronos_uint64_t unsigned 64 bit
- * khronos_intptr_t signed same number of bits as a pointer
- * khronos_uintptr_t unsigned same number of bits as a pointer
- * khronos_ssize_t signed size
- * khronos_usize_t unsigned size
- * khronos_float_t signed 32 bit floating point
- * khronos_time_ns_t unsigned 64 bit time in nanoseconds
- * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
- * nanoseconds
- * khronos_stime_nanoseconds_t signed time interval in nanoseconds
- *
- * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
- * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
- *
- *
- * Macros defined in this file:
- * KHRONOS_APICALL
- * KHRONOS_APIENTRY
- * KHRONOS_APIATTRIBUTES
- * These may be used in function prototypes as:
- * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
- * int arg1,
- * int arg2) KHRONOS_APIATTRIBUTES;
- */
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APICALL
- *-------------------------------------------------------------------------
- * This precedes the return type of the function in the function prototype.
- */
-#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
-# define KHRONOS_APICALL __declspec(dllimport)
-#elif defined (__SYMBIAN32__)
-# define KHRONOS_APICALL IMPORT_C
-#elif defined(ANDROID)
-# define KHRONOS_APICALL __attribute__((visibility("default")))
-#else
-# define KHRONOS_APICALL
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIENTRY
- *-------------------------------------------------------------------------
- * This follows the return type of the function and precedes the function
- * name in the function prototype.
- */
-#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
- /* Win32 but not WinCE */
-# define KHRONOS_APIENTRY __stdcall
-#else
-# define KHRONOS_APIENTRY
-#endif
-
-/*-------------------------------------------------------------------------
- * Definition of KHRONOS_APIATTRIBUTES
- *-------------------------------------------------------------------------
- * This follows the closing parenthesis of the function prototype arguments.
- */
-#if defined (__ARMCC_2__)
-#define KHRONOS_APIATTRIBUTES __softfp
-#else
-#define KHRONOS_APIATTRIBUTES
-#endif
-
-/*-------------------------------------------------------------------------
- * basic type definitions
- *-----------------------------------------------------------------------*/
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-
-
-/*
- * Using <stdint.h>
- */
-#include <stdint.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(__VMS ) || defined(__sgi)
-
-/*
- * Using <inttypes.h>
- */
-#include <inttypes.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-
-/*
- * Win32
- */
-typedef __int32 khronos_int32_t;
-typedef unsigned __int32 khronos_uint32_t;
-typedef __int64 khronos_int64_t;
-typedef unsigned __int64 khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif defined(__sun__) || defined(__digital__)
-
-/*
- * Sun or Digital
- */
-typedef int khronos_int32_t;
-typedef unsigned int khronos_uint32_t;
-#if defined(__arch64__) || defined(_LP64)
-typedef long int khronos_int64_t;
-typedef unsigned long int khronos_uint64_t;
-#else
-typedef long long int khronos_int64_t;
-typedef unsigned long long int khronos_uint64_t;
-#endif /* __arch64__ */
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#elif 0
-
-/*
- * Hypothetical platform with no float or int64 support
- */
-typedef int khronos_int32_t;
-typedef unsigned int khronos_uint32_t;
-#define KHRONOS_SUPPORT_INT64 0
-#define KHRONOS_SUPPORT_FLOAT 0
-
-#else
-
-/*
- * Generic fallback
- */
-#include <stdint.h>
-typedef int32_t khronos_int32_t;
-typedef uint32_t khronos_uint32_t;
-typedef int64_t khronos_int64_t;
-typedef uint64_t khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64 1
-#define KHRONOS_SUPPORT_FLOAT 1
-
-#endif
-
-
-/*
- * Types that are (so far) the same on all platforms
- */
-typedef signed char khronos_int8_t;
-typedef unsigned char khronos_uint8_t;
-typedef signed short int khronos_int16_t;
-typedef unsigned short int khronos_uint16_t;
-typedef signed long int khronos_intptr_t;
-typedef unsigned long int khronos_uintptr_t;
-typedef signed long int khronos_ssize_t;
-typedef unsigned long int khronos_usize_t;
-
-#if KHRONOS_SUPPORT_FLOAT
-/*
- * Float type
- */
-typedef float khronos_float_t;
-#endif
-
-#if KHRONOS_SUPPORT_INT64
-/* Time types
- *
- * These types can be used to represent a time interval in nanoseconds or
- * an absolute Unadjusted System Time. Unadjusted System Time is the number
- * of nanoseconds since some arbitrary system event (e.g. since the last
- * time the system booted). The Unadjusted System Time is an unsigned
- * 64 bit value that wraps back to 0 every 584 years. Time intervals
- * may be either signed or unsigned.
- */
-typedef khronos_uint64_t khronos_utime_nanoseconds_t;
-typedef khronos_int64_t khronos_stime_nanoseconds_t;
-#endif
-
-
-#endif /* __khrplatform_h_ */
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
deleted file mode 100644
index 15e58f2..0000000
--- a/opengl/libagl/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#
-# Build the software OpenGL ES library
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- egl.cpp \
- state.cpp \
- texture.cpp \
- Tokenizer.cpp \
- TokenManager.cpp \
- TextureObjectManager.cpp \
- BufferObjectManager.cpp \
- array.cpp.arm \
- fp.cpp.arm \
- light.cpp.arm \
- matrix.cpp.arm \
- mipmap.cpp.arm \
- primitives.cpp.arm \
- vertex.cpp.arm
-
-LOCAL_CFLAGS += -DLOG_TAG=\"libagl\"
-LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-LOCAL_CFLAGS += -fvisibility=hidden
-
-LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils libpixelflinger libETC1
-LOCAL_LDLIBS := -lpthread -ldl
-
-ifeq ($(TARGET_ARCH),arm)
- LOCAL_SRC_FILES += fixed_asm.S iterators.S
- LOCAL_CFLAGS += -fstrict-aliasing
-endif
-
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
-# we need to access the private Bionic header <bionic_tls.h>
-# on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
-# behavior from the bionic Android.mk file
-ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-LOCAL_C_INCLUDES += bionic/libc/private
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
-LOCAL_MODULE:= libGLES_android
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/libagl/BufferObjectManager.cpp b/opengl/libagl/BufferObjectManager.cpp
deleted file mode 100644
index 6bf28ee..0000000
--- a/opengl/libagl/BufferObjectManager.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- ** Copyright 2008, 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 <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <utils/Atomic.h>
-#include <utils/RefBase.h>
-#include <utils/KeyedVector.h>
-#include <utils/Errors.h>
-
-#include <GLES/gl.h>
-
-#include "BufferObjectManager.h"
-
-
-namespace android {
-
-using namespace gl;
-
-// ----------------------------------------------------------------------------
-
-EGLBufferObjectManager::EGLBufferObjectManager()
-: TokenManager(), mCount(0)
-{
-}
-
-EGLBufferObjectManager::~EGLBufferObjectManager()
-{
- // destroy all the buffer objects and their storage
- GLsizei n = mBuffers.size();
- for (GLsizei i=0 ; i<n ; i++) {
- buffer_t* bo = mBuffers.valueAt(i);
- free(bo->data);
- delete bo;
- }
-}
-
-buffer_t const* EGLBufferObjectManager::bind(GLuint buffer)
-{
- Mutex::Autolock _l(mLock);
- int32_t i = mBuffers.indexOfKey(buffer);
- if (i >= 0) {
- return mBuffers.valueAt(i);
- }
- buffer_t* bo = new buffer_t;
- bo->data = 0;
- bo->usage = GL_STATIC_DRAW;
- bo->size = 0;
- bo->name = buffer;
- mBuffers.add(buffer, bo);
- return bo;
-}
-
-int EGLBufferObjectManager::allocateStore(buffer_t* bo,
- GLsizeiptr size, GLenum usage)
-{
- Mutex::Autolock _l(mLock);
- if (size != bo->size) {
- uint8_t* data = (uint8_t*)malloc(size);
- if (data == 0)
- return -1;
- free(bo->data);
- bo->data = data;
- bo->size = size;
- }
- bo->usage = usage;
- return 0;
-}
-
-void EGLBufferObjectManager::deleteBuffers(GLsizei n, const GLuint* buffers)
-{
- Mutex::Autolock _l(mLock);
- while (n--) {
- const GLuint t = *buffers++;
- if (t) {
- int32_t index = mBuffers.indexOfKey(t);
- if (index >= 0) {
- buffer_t* bo = mBuffers.valueAt(index);
- free(bo->data);
- mBuffers.removeItemsAt(index);
- delete bo;
- }
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
diff --git a/opengl/libagl/BufferObjectManager.h b/opengl/libagl/BufferObjectManager.h
deleted file mode 100644
index 9e9340a..0000000
--- a/opengl/libagl/BufferObjectManager.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- **
- ** Copyright 2006, 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 ANDROID_OPENGLES_BUFFER_OBJECT_MANAGER_H
-#define ANDROID_OPENGLES_BUFFER_OBJECT_MANAGER_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <utils/Atomic.h>
-#include <utils/RefBase.h>
-#include <utils/KeyedVector.h>
-#include <utils/Errors.h>
-
-#include <GLES/gl.h>
-
-#include "Tokenizer.h"
-#include "TokenManager.h"
-
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-namespace gl {
-
-struct buffer_t {
- GLsizeiptr size;
- GLenum usage;
- uint8_t* data;
- uint32_t name;
-};
-
-};
-
-class EGLBufferObjectManager : public TokenManager
-{
-public:
- EGLBufferObjectManager();
- ~EGLBufferObjectManager();
-
- // protocol for sp<>
- inline void incStrong(const void* id) const;
- inline void decStrong(const void* id) const;
- typedef void weakref_type;
-
- gl::buffer_t const* bind(GLuint buffer);
- int allocateStore(gl::buffer_t* bo, GLsizeiptr size, GLenum usage);
- void deleteBuffers(GLsizei n, const GLuint* buffers);
-
-private:
- mutable volatile int32_t mCount;
- mutable Mutex mLock;
- KeyedVector<GLuint, gl::buffer_t*> mBuffers;
-};
-
-void EGLBufferObjectManager::incStrong(const void* id) const {
- android_atomic_inc(&mCount);
-}
-void EGLBufferObjectManager::decStrong(const void* id) const {
- if (android_atomic_dec(&mCount) == 1) {
- delete this;
- }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_BUFFER_OBJECT_MANAGER_H
-
diff --git a/opengl/libagl/TextureObjectManager.cpp b/opengl/libagl/TextureObjectManager.cpp
deleted file mode 100644
index 06d45cc..0000000
--- a/opengl/libagl/TextureObjectManager.cpp
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- ** Copyright 2006, 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 <stdio.h>
-#include <stdlib.h>
-#include "context.h"
-#include "TextureObjectManager.h"
-
-namespace android {
-// ----------------------------------------------------------------------------
-
-EGLTextureObject::EGLTextureObject()
- : mSize(0)
-{
- init();
-}
-
-EGLTextureObject::~EGLTextureObject()
-{
- if (!direct) {
- if (mSize && surface.data)
- free(surface.data);
- if (mMipmaps)
- freeMipmaps();
- }
-}
-
-void EGLTextureObject::init()
-{
- memset(&surface, 0, sizeof(surface));
- surface.version = sizeof(surface);
- mMipmaps = 0;
- mNumExtraLod = 0;
- mIsComplete = false;
- wraps = GL_REPEAT;
- wrapt = GL_REPEAT;
- min_filter = GL_LINEAR;
- mag_filter = GL_LINEAR;
- internalformat = 0;
- memset(crop_rect, 0, sizeof(crop_rect));
- generate_mipmap = GL_FALSE;
- direct = GL_FALSE;
- buffer = 0;
-}
-
-void EGLTextureObject::copyParameters(const sp<EGLTextureObject>& old)
-{
- wraps = old->wraps;
- wrapt = old->wrapt;
- min_filter = old->min_filter;
- mag_filter = old->mag_filter;
- memcpy(crop_rect, old->crop_rect, sizeof(crop_rect));
- generate_mipmap = old->generate_mipmap;
- direct = old->direct;
-}
-
-status_t EGLTextureObject::allocateMipmaps()
-{
- // here, by construction, mMipmaps=0 && mNumExtraLod=0
-
- if (!surface.data)
- return NO_INIT;
-
- int w = surface.width;
- int h = surface.height;
- const int numLods = 31 - gglClz(max(w,h));
- if (numLods <= 0)
- return NO_ERROR;
-
- mMipmaps = (GGLSurface*)malloc(numLods * sizeof(GGLSurface));
- if (!mMipmaps)
- return NO_MEMORY;
-
- memset(mMipmaps, 0, numLods * sizeof(GGLSurface));
- mNumExtraLod = numLods;
- return NO_ERROR;
-}
-
-void EGLTextureObject::freeMipmaps()
-{
- if (mMipmaps) {
- for (int i=0 ; i<mNumExtraLod ; i++) {
- if (mMipmaps[i].data) {
- free(mMipmaps[i].data);
- }
- }
- free(mMipmaps);
- mMipmaps = 0;
- mNumExtraLod = 0;
- }
-}
-
-const GGLSurface& EGLTextureObject::mip(int lod) const
-{
- if (lod<=0 || !mMipmaps)
- return surface;
- lod = min(lod-1, mNumExtraLod-1);
- return mMipmaps[lod];
-}
-
-GGLSurface& EGLTextureObject::editMip(int lod)
-{
- return const_cast<GGLSurface&>(mip(lod));
-}
-
-status_t EGLTextureObject::setSurface(GGLSurface const* s)
-{
- // XXX: glFlush() on 's'
- if (mSize && surface.data) {
- free(surface.data);
- }
- surface = *s;
- internalformat = 0;
- buffer = 0;
-
- // we should keep the crop_rect, but it's delicate because
- // the new size of the surface could make it invalid.
- // so for now, we just loose it.
- memset(crop_rect, 0, sizeof(crop_rect));
-
- // it would be nice if we could keep the generate_mipmap flag,
- // we would have to generate them right now though.
- generate_mipmap = GL_FALSE;
-
- direct = GL_TRUE;
- mSize = 0; // we don't own this surface
- if (mMipmaps)
- freeMipmaps();
- mIsComplete = true;
- return NO_ERROR;
-}
-
-status_t EGLTextureObject::setImage(ANativeWindowBuffer* native_buffer)
-{
- GGLSurface sur;
- sur.version = sizeof(GGLSurface);
- sur.width = native_buffer->width;
- sur.height= native_buffer->height;
- sur.stride= native_buffer->stride;
- sur.format= native_buffer->format;
- sur.data = 0;
- setSurface(&sur);
- buffer = native_buffer;
- return NO_ERROR;
-}
-
-status_t EGLTextureObject::reallocate(
- GLint level, int w, int h, int s,
- int format, int compressedFormat, int bpr)
-{
- const size_t size = h * bpr;
- if (level == 0)
- {
- if (size!=mSize || !surface.data) {
- if (mSize && surface.data) {
- free(surface.data);
- }
- surface.data = (GGLubyte*)malloc(size);
- if (!surface.data) {
- mSize = 0;
- mIsComplete = false;
- return NO_MEMORY;
- }
- mSize = size;
- }
- surface.version = sizeof(GGLSurface);
- surface.width = w;
- surface.height = h;
- surface.stride = s;
- surface.format = format;
- surface.compressedFormat = compressedFormat;
- if (mMipmaps)
- freeMipmaps();
- mIsComplete = true;
- }
- else
- {
- if (!mMipmaps) {
- if (allocateMipmaps() != NO_ERROR)
- return NO_MEMORY;
- }
-
- ALOGW_IF(level-1 >= mNumExtraLod,
- "specifying mipmap level %d, but # of level is %d",
- level, mNumExtraLod+1);
-
- GGLSurface& mipmap = editMip(level);
- if (mipmap.data)
- free(mipmap.data);
-
- mipmap.data = (GGLubyte*)malloc(size);
- if (!mipmap.data) {
- memset(&mipmap, 0, sizeof(GGLSurface));
- mIsComplete = false;
- return NO_MEMORY;
- }
-
- mipmap.version = sizeof(GGLSurface);
- mipmap.width = w;
- mipmap.height = h;
- mipmap.stride = s;
- mipmap.format = format;
- mipmap.compressedFormat = compressedFormat;
-
- // check if the texture is complete
- mIsComplete = true;
- const GGLSurface* prev = &surface;
- for (int i=0 ; i<mNumExtraLod ; i++) {
- const GGLSurface* curr = mMipmaps + i;
- if (curr->format != surface.format) {
- mIsComplete = false;
- break;
- }
-
- uint32_t w = (prev->width >> 1) ? : 1;
- uint32_t h = (prev->height >> 1) ? : 1;
- if (w != curr->width || h != curr->height) {
- mIsComplete = false;
- break;
- }
- prev = curr;
- }
- }
- return NO_ERROR;
-}
-
-// ----------------------------------------------------------------------------
-
-EGLSurfaceManager::EGLSurfaceManager()
- : TokenManager()
-{
-}
-
-EGLSurfaceManager::~EGLSurfaceManager()
-{
- // everything gets freed automatically here...
-}
-
-sp<EGLTextureObject> EGLSurfaceManager::createTexture(GLuint name)
-{
- sp<EGLTextureObject> result;
-
- Mutex::Autolock _l(mLock);
- if (mTextures.indexOfKey(name) >= 0)
- return result; // already exists!
-
- result = new EGLTextureObject();
-
- status_t err = mTextures.add(name, result);
- if (err < 0)
- result.clear();
-
- return result;
-}
-
-sp<EGLTextureObject> EGLSurfaceManager::removeTexture(GLuint name)
-{
- Mutex::Autolock _l(mLock);
- const ssize_t index = mTextures.indexOfKey(name);
- if (index >= 0) {
- sp<EGLTextureObject> result(mTextures.valueAt(index));
- mTextures.removeItemsAt(index);
- return result;
- }
- return 0;
-}
-
-sp<EGLTextureObject> EGLSurfaceManager::replaceTexture(GLuint name)
-{
- sp<EGLTextureObject> tex;
- Mutex::Autolock _l(mLock);
- const ssize_t index = mTextures.indexOfKey(name);
- if (index >= 0) {
- const sp<EGLTextureObject>& old = mTextures.valueAt(index);
- const uint32_t refs = old->getStrongCount();
- if (ggl_likely(refs == 1)) {
- // we're the only owner
- tex = old;
- } else {
- // keep the texture's parameters
- tex = new EGLTextureObject();
- tex->copyParameters(old);
- mTextures.removeItemsAt(index);
- mTextures.add(name, tex);
- }
- }
- return tex;
-}
-
-void EGLSurfaceManager::deleteTextures(GLsizei n, const GLuint *tokens)
-{
- // free all textures
- Mutex::Autolock _l(mLock);
- for (GLsizei i=0 ; i<n ; i++) {
- const GLuint t(*tokens++);
- if (t) {
- mTextures.removeItem(t);
- }
- }
-}
-
-sp<EGLTextureObject> EGLSurfaceManager::texture(GLuint name)
-{
- Mutex::Autolock _l(mLock);
- const ssize_t index = mTextures.indexOfKey(name);
- if (index >= 0)
- return mTextures.valueAt(index);
- return 0;
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
diff --git a/opengl/libagl/TextureObjectManager.h b/opengl/libagl/TextureObjectManager.h
deleted file mode 100644
index de9e03e..0000000
--- a/opengl/libagl/TextureObjectManager.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-** Copyright 2006, 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 ANDROID_OPENGLES_SURFACE_H
-#define ANDROID_OPENGLES_SURFACE_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <utils/Atomic.h>
-#include <utils/threads.h>
-#include <utils/RefBase.h>
-#include <utils/KeyedVector.h>
-#include <utils/Errors.h>
-
-#include <private/pixelflinger/ggl_context.h>
-
-#include <GLES/gl.h>
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include "Tokenizer.h"
-#include "TokenManager.h"
-
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-class EGLTextureObject : public LightRefBase<EGLTextureObject>
-{
-public:
- EGLTextureObject();
- ~EGLTextureObject();
-
- status_t setSurface(GGLSurface const* s);
- status_t setImage(ANativeWindowBuffer* buffer);
- void setImageBits(void* vaddr) { surface.data = (GGLubyte*)vaddr; }
-
- status_t reallocate(GLint level,
- int w, int h, int s,
- int format, int compressedFormat, int bpr);
- inline size_t size() const { return mSize; }
- const GGLSurface& mip(int lod) const;
- GGLSurface& editMip(int lod);
- bool hasMipmaps() const { return mMipmaps!=0; }
- bool isComplete() const { return mIsComplete; }
- void copyParameters(const sp<EGLTextureObject>& old);
-
-private:
- status_t allocateMipmaps();
- void freeMipmaps();
- void init();
- size_t mSize;
- GGLSurface *mMipmaps;
- int mNumExtraLod;
- bool mIsComplete;
-
-public:
- GGLSurface surface;
- GLenum wraps;
- GLenum wrapt;
- GLenum min_filter;
- GLenum mag_filter;
- GLenum internalformat;
- GLint crop_rect[4];
- GLint generate_mipmap;
- GLint direct;
- ANativeWindowBuffer* buffer;
-};
-
-// ----------------------------------------------------------------------------
-
-class EGLSurfaceManager :
- public LightRefBase<EGLSurfaceManager>,
- public TokenManager
-{
-public:
- EGLSurfaceManager();
- ~EGLSurfaceManager();
-
- sp<EGLTextureObject> createTexture(GLuint name);
- sp<EGLTextureObject> removeTexture(GLuint name);
- sp<EGLTextureObject> replaceTexture(GLuint name);
- void deleteTextures(GLsizei n, const GLuint *tokens);
- sp<EGLTextureObject> texture(GLuint name);
-
-private:
- mutable Mutex mLock;
- KeyedVector< GLuint, sp<EGLTextureObject> > mTextures;
-};
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_SURFACE_H
-
diff --git a/opengl/libagl/TokenManager.cpp b/opengl/libagl/TokenManager.cpp
deleted file mode 100644
index eea6025..0000000
--- a/opengl/libagl/TokenManager.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* libs/opengles/surface.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-#include <stdlib.h>
-#include "TokenManager.h"
-
-namespace android {
-// ----------------------------------------------------------------------------
-
-TokenManager::TokenManager()
-{
- // token 0 is always reserved
- mTokenizer.reserve(0);
-}
-
-TokenManager::~TokenManager()
-{
-}
-
-status_t TokenManager::getToken(GLsizei n, GLuint *tokens)
-{
- Mutex::Autolock _l(mLock);
- for (GLsizei i=0 ; i<n ; i++)
- *tokens++ = mTokenizer.acquire();
- return NO_ERROR;
-}
-
-void TokenManager::recycleTokens(GLsizei n, const GLuint *tokens)
-{
- Mutex::Autolock _l(mLock);
- for (int i=0 ; i<n ; i++) {
- const GLuint token = *tokens++;
- if (token) {
- mTokenizer.release(token);
- }
- }
-}
-
-bool TokenManager::isTokenValid(GLuint token) const
-{
- Mutex::Autolock _l(mLock);
- return mTokenizer.isAcquired(token);
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
diff --git a/opengl/libagl/TokenManager.h b/opengl/libagl/TokenManager.h
deleted file mode 100644
index 49c1469..0000000
--- a/opengl/libagl/TokenManager.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-** Copyright 2006, 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 ANDROID_OPENGLES_TOKEN_MANAGER_H
-#define ANDROID_OPENGLES_TOKEN_MANAGER_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <utils/threads.h>
-
-#include <GLES/gl.h>
-
-#include "Tokenizer.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-class TokenManager
-{
-public:
- TokenManager();
- ~TokenManager();
-
- status_t getToken(GLsizei n, GLuint *tokens);
- void recycleTokens(GLsizei n, const GLuint *tokens);
- bool isTokenValid(GLuint token) const;
-
-private:
- mutable Mutex mLock;
- Tokenizer mTokenizer;
-};
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_TOKEN_MANAGER_H
-
diff --git a/opengl/libagl/Tokenizer.cpp b/opengl/libagl/Tokenizer.cpp
deleted file mode 100644
index eac8d6d..0000000
--- a/opengl/libagl/Tokenizer.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/* libs/opengles/Tokenizer.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-
-#include "Tokenizer.h"
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-ANDROID_BASIC_TYPES_TRAITS(Tokenizer::run_t)
-
-Tokenizer::Tokenizer()
-{
-}
-
-Tokenizer::Tokenizer(const Tokenizer& other)
- : mRanges(other.mRanges)
-{
-}
-
-Tokenizer::~Tokenizer()
-{
-}
-
-uint32_t Tokenizer::acquire()
-{
- if (!mRanges.size() || mRanges[0].first) {
- _insertTokenAt(0,0);
- return 0;
- }
-
- // just extend the first run
- const run_t& run = mRanges[0];
- uint32_t token = run.first + run.length;
- _insertTokenAt(token, 1);
- return token;
-}
-
-bool Tokenizer::isAcquired(uint32_t token) const
-{
- return (_indexOrderOf(token) >= 0);
-}
-
-status_t Tokenizer::reserve(uint32_t token)
-{
- size_t o;
- const ssize_t i = _indexOrderOf(token, &o);
- if (i >= 0) {
- return BAD_VALUE; // this token is already taken
- }
- ssize_t err = _insertTokenAt(token, o);
- return (err<0) ? err : status_t(NO_ERROR);
-}
-
-status_t Tokenizer::release(uint32_t token)
-{
- const ssize_t i = _indexOrderOf(token);
- if (i >= 0) {
- const run_t& run = mRanges[i];
- if ((token >= run.first) && (token < run.first+run.length)) {
- // token in this range, we need to split
- run_t& run = mRanges.editItemAt(i);
- if ((token == run.first) || (token == run.first+run.length-1)) {
- if (token == run.first) {
- run.first += 1;
- }
- run.length -= 1;
- if (run.length == 0) {
- // XXX: should we systematically remove a run that's empty?
- mRanges.removeItemsAt(i);
- }
- } else {
- // split the run
- run_t new_run;
- new_run.first = token+1;
- new_run.length = run.first+run.length - new_run.first;
- run.length = token - run.first;
- mRanges.insertAt(new_run, i+1);
- }
- return NO_ERROR;
- }
- }
- return NAME_NOT_FOUND;
-}
-
-ssize_t Tokenizer::_indexOrderOf(uint32_t token, size_t* order) const
-{
- // binary search
- ssize_t err = NAME_NOT_FOUND;
- ssize_t l = 0;
- ssize_t h = mRanges.size()-1;
- ssize_t mid;
- const run_t* a = mRanges.array();
- while (l <= h) {
- mid = l + (h - l)/2;
- const run_t* const curr = a + mid;
- int c = 0;
- if (token < curr->first) c = 1;
- else if (token >= curr->first+curr->length) c = -1;
- if (c == 0) {
- err = l = mid;
- break;
- } else if (c < 0) {
- l = mid + 1;
- } else {
- h = mid - 1;
- }
- }
- if (order) *order = l;
- return err;
-}
-
-ssize_t Tokenizer::_insertTokenAt(uint32_t token, size_t index)
-{
- const size_t c = mRanges.size();
-
- if (index >= 1) {
- // do we need to merge with the previous run?
- run_t& p = mRanges.editItemAt(index-1);
- if (p.first+p.length == token) {
- p.length += 1;
- if (index < c) {
- const run_t& n = mRanges[index];
- if (token+1 == n.first) {
- p.length += n.length;
- mRanges.removeItemsAt(index);
- }
- }
- return index;
- }
- }
-
- if (index < c) {
- // do we need to merge with the next run?
- run_t& n = mRanges.editItemAt(index);
- if (token+1 == n.first) {
- n.first -= 1;
- n.length += 1;
- return index;
- }
- }
-
- return mRanges.insertAt(run_t(token,1), index);
-}
-
-void Tokenizer::dump() const
-{
- const run_t* ranges = mRanges.array();
- const size_t c = mRanges.size();
- ALOGD("Tokenizer (%p, size = %u)\n", this, c);
- for (size_t i=0 ; i<c ; i++) {
- ALOGD("%u: (%u, %u)\n", i, ranges[i].first, ranges[i].length);
- }
-}
-
-}; // namespace android
-
diff --git a/opengl/libagl/Tokenizer.h b/opengl/libagl/Tokenizer.h
deleted file mode 100644
index ac555cb..0000000
--- a/opengl/libagl/Tokenizer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* libs/opengles/Tokenizer.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_TOKENIZER_H
-#define ANDROID_OPENGLES_TOKENIZER_H
-
-#include <utils/Vector.h>
-#include <utils/Errors.h>
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-class Tokenizer
-{
-public:
- Tokenizer();
- Tokenizer(const Tokenizer& other);
- ~Tokenizer();
-
- uint32_t acquire();
- status_t reserve(uint32_t token);
- status_t release(uint32_t token);
- bool isAcquired(uint32_t token) const;
-
- void dump() const;
-
- struct run_t {
- run_t() {};
- run_t(uint32_t f, uint32_t l) : first(f), length(l) {}
- uint32_t first;
- uint32_t length;
- };
-private:
- ssize_t _indexOrderOf(uint32_t token, size_t* order=0) const;
- ssize_t _insertTokenAt(uint32_t token, size_t index);
- Vector<run_t> mRanges;
-};
-
-}; // namespace android
-
-// ----------------------------------------------------------------------------
-
-#endif // ANDROID_OPENGLES_TOKENIZER_H
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp
deleted file mode 100644
index 7fbe9b5..0000000
--- a/opengl/libagl/array.cpp
+++ /dev/null
@@ -1,1588 +0,0 @@
-/*
-** Copyright 2006, 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 <stdio.h>
-
-#include "context.h"
-#include "fp.h"
-#include "state.h"
-#include "matrix.h"
-#include "vertex.h"
-#include "light.h"
-#include "primitives.h"
-#include "texture.h"
-#include "BufferObjectManager.h"
-
-// ----------------------------------------------------------------------------
-
-#define VC_CACHE_STATISTICS 0
-#define VC_CACHE_TYPE_NONE 0
-#define VC_CACHE_TYPE_INDEXED 1
-#define VC_CACHE_TYPE_LRU 2
-#define VC_CACHE_TYPE VC_CACHE_TYPE_INDEXED
-
-#if VC_CACHE_STATISTICS
-#include <utils/Timers.h>
-#endif
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-static void validate_arrays(ogles_context_t* c, GLenum mode);
-
-static void compileElements__generic(ogles_context_t*,
- vertex_t*, GLint, GLsizei);
-static void compileElement__generic(ogles_context_t*,
- vertex_t*, GLint);
-
-static void drawPrimitivesPoints(ogles_context_t*, GLint, GLsizei);
-static void drawPrimitivesLineStrip(ogles_context_t*, GLint, GLsizei);
-static void drawPrimitivesLineLoop(ogles_context_t*, GLint, GLsizei);
-static void drawPrimitivesLines(ogles_context_t*, GLint, GLsizei);
-static void drawPrimitivesTriangleStrip(ogles_context_t*, GLint, GLsizei);
-static void drawPrimitivesTriangleFan(ogles_context_t*, GLint, GLsizei);
-static void drawPrimitivesTriangles(ogles_context_t*, GLint, GLsizei);
-
-static void drawIndexedPrimitivesPoints(ogles_context_t*,
- GLsizei, const GLvoid*);
-static void drawIndexedPrimitivesLineStrip(ogles_context_t*,
- GLsizei, const GLvoid*);
-static void drawIndexedPrimitivesLineLoop(ogles_context_t*,
- GLsizei, const GLvoid*);
-static void drawIndexedPrimitivesLines(ogles_context_t*,
- GLsizei, const GLvoid*);
-static void drawIndexedPrimitivesTriangleStrip(ogles_context_t*,
- GLsizei, const GLvoid*);
-static void drawIndexedPrimitivesTriangleFan(ogles_context_t*,
- GLsizei, const GLvoid*);
-static void drawIndexedPrimitivesTriangles(ogles_context_t*,
- GLsizei, const GLvoid*);
-
-// ----------------------------------------------------------------------------
-
-typedef void (*arrays_prims_fct_t)(ogles_context_t*, GLint, GLsizei);
-static const arrays_prims_fct_t drawArraysPrims[] = {
- drawPrimitivesPoints,
- drawPrimitivesLines,
- drawPrimitivesLineLoop,
- drawPrimitivesLineStrip,
- drawPrimitivesTriangles,
- drawPrimitivesTriangleStrip,
- drawPrimitivesTriangleFan
-};
-
-typedef void (*elements_prims_fct_t)(ogles_context_t*, GLsizei, const GLvoid*);
-static const elements_prims_fct_t drawElementsPrims[] = {
- drawIndexedPrimitivesPoints,
- drawIndexedPrimitivesLines,
- drawIndexedPrimitivesLineLoop,
- drawIndexedPrimitivesLineStrip,
- drawIndexedPrimitivesTriangles,
- drawIndexedPrimitivesTriangleStrip,
- drawIndexedPrimitivesTriangleFan
-};
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-void ogles_init_array(ogles_context_t* c)
-{
- c->arrays.vertex.size = 4;
- c->arrays.vertex.type = GL_FLOAT;
- c->arrays.color.size = 4;
- c->arrays.color.type = GL_FLOAT;
- c->arrays.normal.size = 4;
- c->arrays.normal.type = GL_FLOAT;
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- c->arrays.texture[i].size = 4;
- c->arrays.texture[i].type = GL_FLOAT;
- }
- c->vc.init();
-
- if (!c->vc.vBuffer) {
- // this could have failed
- ogles_error(c, GL_OUT_OF_MEMORY);
- }
-}
-
-void ogles_uninit_array(ogles_context_t* c)
-{
- c->vc.uninit();
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Array fetchers
-#endif
-
-static void currentColor(ogles_context_t* c, GLfixed* v, const GLvoid*) {
- memcpy(v, c->current.color.v, sizeof(vec4_t));
-}
-static void currentColor_clamp(ogles_context_t* c, GLfixed* v, const GLvoid*) {
- memcpy(v, c->currentColorClamped.v, sizeof(vec4_t));
-}
-static void currentNormal(ogles_context_t* c, GLfixed* v, const GLvoid*) {
- memcpy(v, c->currentNormal.v, sizeof(vec3_t));
-}
-static void currentTexCoord(ogles_context_t* c, GLfixed* v, const GLvoid*) {
- memcpy(v, c->current.texture[c->arrays.tmu].v, sizeof(vec4_t));
-}
-
-
-static void fetchNop(ogles_context_t*, GLfixed*, const GLvoid*) {
-}
-static void fetch2b(ogles_context_t*, GLfixed* v, const GLbyte* p) {
- v[0] = gglIntToFixed(p[0]);
- v[1] = gglIntToFixed(p[1]);
-}
-static void fetch2s(ogles_context_t*, GLfixed* v, const GLshort* p) {
- v[0] = gglIntToFixed(p[0]);
- v[1] = gglIntToFixed(p[1]);
-}
-static void fetch2x(ogles_context_t*, GLfixed* v, const GLfixed* p) {
- memcpy(v, p, 2*sizeof(GLfixed));
-}
-static void fetch2f(ogles_context_t*, GLfixed* v, const GLfloat* p) {
- v[0] = gglFloatToFixed(p[0]);
- v[1] = gglFloatToFixed(p[1]);
-}
-static void fetch3b(ogles_context_t*, GLfixed* v, const GLbyte* p) {
- v[0] = gglIntToFixed(p[0]);
- v[1] = gglIntToFixed(p[1]);
- v[2] = gglIntToFixed(p[2]);
-}
-static void fetch3s(ogles_context_t*, GLfixed* v, const GLshort* p) {
- v[0] = gglIntToFixed(p[0]);
- v[1] = gglIntToFixed(p[1]);
- v[2] = gglIntToFixed(p[2]);
-}
-static void fetch3x(ogles_context_t*, GLfixed* v, const GLfixed* p) {
- memcpy(v, p, 3*sizeof(GLfixed));
-}
-static void fetch3f(ogles_context_t*, GLfixed* v, const GLfloat* p) {
- v[0] = gglFloatToFixed(p[0]);
- v[1] = gglFloatToFixed(p[1]);
- v[2] = gglFloatToFixed(p[2]);
-}
-static void fetch4b(ogles_context_t*, GLfixed* v, const GLbyte* p) {
- v[0] = gglIntToFixed(p[0]);
- v[1] = gglIntToFixed(p[1]);
- v[2] = gglIntToFixed(p[2]);
- v[3] = gglIntToFixed(p[3]);
-}
-static void fetch4s(ogles_context_t*, GLfixed* v, const GLshort* p) {
- v[0] = gglIntToFixed(p[0]);
- v[1] = gglIntToFixed(p[1]);
- v[2] = gglIntToFixed(p[2]);
- v[3] = gglIntToFixed(p[3]);
-}
-static void fetch4x(ogles_context_t*, GLfixed* v, const GLfixed* p) {
- memcpy(v, p, 4*sizeof(GLfixed));
-}
-static void fetch4f(ogles_context_t*, GLfixed* v, const GLfloat* p) {
- v[0] = gglFloatToFixed(p[0]);
- v[1] = gglFloatToFixed(p[1]);
- v[2] = gglFloatToFixed(p[2]);
- v[3] = gglFloatToFixed(p[3]);
-}
-static void fetchExpand4ub(ogles_context_t*, GLfixed* v, const GLubyte* p) {
- v[0] = GGL_UB_TO_X(p[0]);
- v[1] = GGL_UB_TO_X(p[1]);
- v[2] = GGL_UB_TO_X(p[2]);
- v[3] = GGL_UB_TO_X(p[3]);
-}
-static void fetchClamp4x(ogles_context_t*, GLfixed* v, const GLfixed* p) {
- v[0] = gglClampx(p[0]);
- v[1] = gglClampx(p[1]);
- v[2] = gglClampx(p[2]);
- v[3] = gglClampx(p[3]);
-}
-static void fetchClamp4f(ogles_context_t*, GLfixed* v, const GLfloat* p) {
- v[0] = gglClampx(gglFloatToFixed(p[0]));
- v[1] = gglClampx(gglFloatToFixed(p[1]));
- v[2] = gglClampx(gglFloatToFixed(p[2]));
- v[3] = gglClampx(gglFloatToFixed(p[3]));
-}
-static void fetchExpand3ub(ogles_context_t*, GLfixed* v, const GLubyte* p) {
- v[0] = GGL_UB_TO_X(p[0]);
- v[1] = GGL_UB_TO_X(p[1]);
- v[2] = GGL_UB_TO_X(p[2]);
- v[3] = 0x10000;
-}
-static void fetchClamp3x(ogles_context_t*, GLfixed* v, const GLfixed* p) {
- v[0] = gglClampx(p[0]);
- v[1] = gglClampx(p[1]);
- v[2] = gglClampx(p[2]);
- v[3] = 0x10000;
-}
-static void fetchClamp3f(ogles_context_t*, GLfixed* v, const GLfloat* p) {
- v[0] = gglClampx(gglFloatToFixed(p[0]));
- v[1] = gglClampx(gglFloatToFixed(p[1]));
- v[2] = gglClampx(gglFloatToFixed(p[2]));
- v[3] = 0x10000;
-}
-static void fetchExpand3b(ogles_context_t*, GLfixed* v, const GLbyte* p) {
- v[0] = GGL_B_TO_X(p[0]);
- v[1] = GGL_B_TO_X(p[1]);
- v[2] = GGL_B_TO_X(p[2]);
-}
-static void fetchExpand3s(ogles_context_t*, GLfixed* v, const GLshort* p) {
- v[0] = GGL_S_TO_X(p[0]);
- v[1] = GGL_S_TO_X(p[1]);
- v[2] = GGL_S_TO_X(p[2]);
-}
-
-typedef array_t::fetcher_t fn_t;
-
-static const fn_t color_fct[2][16] = { // size={3,4}, type={ub,f,x}
- { 0, (fn_t)fetchExpand3ub, 0, 0, 0, 0,
- (fn_t)fetch3f, 0, 0, 0, 0, 0,
- (fn_t)fetch3x },
- { 0, (fn_t)fetchExpand4ub, 0, 0, 0, 0,
- (fn_t)fetch4f, 0, 0, 0, 0, 0,
- (fn_t)fetch4x },
-};
-static const fn_t color_clamp_fct[2][16] = { // size={3,4}, type={ub,f,x}
- { 0, (fn_t)fetchExpand3ub, 0, 0, 0, 0,
- (fn_t)fetchClamp3f, 0, 0, 0, 0, 0,
- (fn_t)fetchClamp3x },
- { 0, (fn_t)fetchExpand4ub, 0, 0, 0, 0,
- (fn_t)fetchClamp4f, 0, 0, 0, 0, 0,
- (fn_t)fetchClamp4x },
-};
-static const fn_t normal_fct[1][16] = { // size={3}, type={b,s,f,x}
- { (fn_t)fetchExpand3b, 0,
- (fn_t)fetchExpand3s, 0, 0, 0,
- (fn_t)fetch3f, 0, 0, 0, 0, 0,
- (fn_t)fetch3x },
-};
-static const fn_t vertex_fct[3][16] = { // size={2,3,4}, type={b,s,f,x}
- { (fn_t)fetch2b, 0,
- (fn_t)fetch2s, 0, 0, 0,
- (fn_t)fetch2f, 0, 0, 0, 0, 0,
- (fn_t)fetch3x },
- { (fn_t)fetch3b, 0,
- (fn_t)fetch3s, 0, 0, 0,
- (fn_t)fetch3f, 0, 0, 0, 0, 0,
- (fn_t)fetch3x },
- { (fn_t)fetch4b, 0,
- (fn_t)fetch4s, 0, 0, 0,
- (fn_t)fetch4f, 0, 0, 0, 0, 0,
- (fn_t)fetch4x }
-};
-static const fn_t texture_fct[3][16] = { // size={2,3,4}, type={b,s,f,x}
- { (fn_t)fetch2b, 0,
- (fn_t)fetch2s, 0, 0, 0,
- (fn_t)fetch2f, 0, 0, 0, 0, 0,
- (fn_t)fetch2x },
- { (fn_t)fetch3b, 0,
- (fn_t)fetch3s, 0, 0, 0,
- (fn_t)fetch3f, 0, 0, 0, 0, 0,
- (fn_t)fetch3x },
- { (fn_t)fetch4b, 0,
- (fn_t)fetch4s, 0, 0, 0,
- (fn_t)fetch4f, 0, 0, 0, 0, 0,
- (fn_t)fetch4x }
-};
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark array_t
-#endif
-
-void array_t::init(
- GLint size, GLenum type, GLsizei stride,
- const GLvoid *pointer, const buffer_t* bo, GLsizei count)
-{
- if (!stride) {
- stride = size;
- switch (type) {
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- stride *= 2;
- break;
- case GL_FLOAT:
- case GL_FIXED:
- stride *= 4;
- break;
- }
- }
- this->size = size;
- this->type = type;
- this->stride = stride;
- this->pointer = pointer;
- this->bo = bo;
- this->bounds = count;
-}
-
-inline void array_t::resolve()
-{
- physical_pointer = (bo) ? (bo->data + uintptr_t(pointer)) : pointer;
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark vertex_cache_t
-#endif
-
-void vertex_cache_t::init()
-{
- // make sure the size of vertex_t allows cache-line alignment
- CTA<(sizeof(vertex_t) & 0x1F) == 0> assertAlignedSize;
-
- const int align = 32;
- const size_t s = VERTEX_BUFFER_SIZE + VERTEX_CACHE_SIZE;
- const size_t size = s*sizeof(vertex_t) + align;
- base = malloc(size);
- if (base) {
- memset(base, 0, size);
- vBuffer = (vertex_t*)((size_t(base) + align - 1) & ~(align-1));
- vCache = vBuffer + VERTEX_BUFFER_SIZE;
- sequence = 0;
- }
-}
-
-void vertex_cache_t::uninit()
-{
- free(base);
- base = vBuffer = vCache = 0;
-}
-
-void vertex_cache_t::clear()
-{
-#if VC_CACHE_STATISTICS
- startTime = systemTime(SYSTEM_TIME_THREAD);
- total = 0;
- misses = 0;
-#endif
-
-#if VC_CACHE_TYPE == VC_CACHE_TYPE_LRU
- vertex_t* v = vBuffer;
- size_t count = VERTEX_BUFFER_SIZE + VERTEX_CACHE_SIZE;
- do {
- v->mru = 0;
- v++;
- } while (--count);
-#endif
-
- sequence += INDEX_SEQ;
- if (sequence >= 0x80000000LU) {
- sequence = INDEX_SEQ;
- vertex_t* v = vBuffer;
- size_t count = VERTEX_BUFFER_SIZE + VERTEX_CACHE_SIZE;
- do {
- v->index = 0;
- v++;
- } while (--count);
- }
-}
-
-void vertex_cache_t::dump_stats(GLenum mode)
-{
-#if VC_CACHE_STATISTICS
- nsecs_t time = systemTime(SYSTEM_TIME_THREAD) - startTime;
- uint32_t hits = total - misses;
- uint32_t prim_count;
- switch (mode) {
- case GL_POINTS: prim_count = total; break;
- case GL_LINE_STRIP: prim_count = total - 1; break;
- case GL_LINE_LOOP: prim_count = total - 1; break;
- case GL_LINES: prim_count = total / 2; break;
- case GL_TRIANGLE_STRIP: prim_count = total - 2; break;
- case GL_TRIANGLE_FAN: prim_count = total - 2; break;
- case GL_TRIANGLES: prim_count = total / 3; break;
- default: return;
- }
- printf( "total=%5u, hits=%5u, miss=%5u, hitrate=%3u%%,"
- " prims=%5u, time=%6u us, prims/s=%d, v/t=%f\n",
- total, hits, misses, (hits*100)/total,
- prim_count, int(ns2us(time)), int(prim_count*float(seconds(1))/time),
- float(misses) / prim_count);
-#endif
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-static __attribute__((noinline))
-void enableDisableClientState(ogles_context_t* c, GLenum array, bool enable)
-{
- const int tmu = c->arrays.activeTexture;
- array_t* a;
- switch (array) {
- case GL_COLOR_ARRAY: a = &c->arrays.color; break;
- case GL_NORMAL_ARRAY: a = &c->arrays.normal; break;
- case GL_TEXTURE_COORD_ARRAY: a = &c->arrays.texture[tmu]; break;
- case GL_VERTEX_ARRAY: a = &c->arrays.vertex; break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- a->enable = enable ? GL_TRUE : GL_FALSE;
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Vertex Cache
-#endif
-
-static __attribute__((noinline))
-vertex_t* cache_vertex(ogles_context_t* c, vertex_t* v, uint32_t index)
-{
- #if VC_CACHE_STATISTICS
- c->vc.misses++;
- #endif
- if (ggl_unlikely(v->locked)) {
- // we're just looking for an entry in the cache that is not locked.
- // and we know that there cannot be more than 2 locked entries
- // because a triangle needs at most 3 vertices.
- // We never use the first and second entries because they might be in
- // use by the striper or faner. Any other entry will do as long as
- // it's not locked.
- // We compute directly the index of a "free" entry from the locked
- // state of v[2] and v[3].
- v = c->vc.vBuffer + 2;
- v += v[0].locked | (v[1].locked<<1);
- }
- // note: compileElement clears v->flags
- c->arrays.compileElement(c, v, index);
- v->locked = 1;
- return v;
-}
-
-static __attribute__((noinline))
-vertex_t* fetch_vertex(ogles_context_t* c, size_t index)
-{
- index |= c->vc.sequence;
-
-#if VC_CACHE_TYPE == VC_CACHE_TYPE_INDEXED
-
- vertex_t* const v = c->vc.vCache +
- (index & (vertex_cache_t::VERTEX_CACHE_SIZE-1));
-
- if (ggl_likely(v->index == index)) {
- v->locked = 1;
- return v;
- }
- return cache_vertex(c, v, index);
-
-#elif VC_CACHE_TYPE == VC_CACHE_TYPE_LRU
-
- vertex_t* v = c->vc.vCache +
- (index & ((vertex_cache_t::VERTEX_CACHE_SIZE-1)>>1))*2;
-
- // always record LRU in v[0]
- if (ggl_likely(v[0].index == index)) {
- v[0].locked = 1;
- v[0].mru = 0;
- return &v[0];
- }
-
- if (ggl_likely(v[1].index == index)) {
- v[1].locked = 1;
- v[0].mru = 1;
- return &v[1];
- }
-
- const int lru = 1 - v[0].mru;
- v[0].mru = lru;
- return cache_vertex(c, &v[lru], index);
-
-#elif VC_CACHE_TYPE == VC_CACHE_TYPE_NONE
-
- // just for debugging...
- vertex_t* v = c->vc.vBuffer + 2;
- return cache_vertex(c, v, index);
-
-#endif
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Primitive Assembly
-#endif
-
-void drawPrimitivesPoints(ogles_context_t* c, GLint first, GLsizei count)
-{
- if (ggl_unlikely(count < 1))
- return;
-
- // vertex cache size must be multiple of 1
- const GLsizei vcs =
- (vertex_cache_t::VERTEX_BUFFER_SIZE +
- vertex_cache_t::VERTEX_CACHE_SIZE);
- do {
- vertex_t* v = c->vc.vBuffer;
- GLsizei num = count > vcs ? vcs : count;
- c->arrays.cull = vertex_t::CLIP_ALL;
- c->arrays.compileElements(c, v, first, num);
- first += num;
- count -= num;
- if (!c->arrays.cull) {
- // quick/trivial reject of the whole batch
- do {
- const uint32_t cc = v[0].flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderPoint(c, v);
- v++;
- num--;
- } while (num);
- }
- } while (count);
-}
-
-// ----------------------------------------------------------------------------
-
-void drawPrimitivesLineStrip(ogles_context_t* c, GLint first, GLsizei count)
-{
- if (ggl_unlikely(count < 2))
- return;
-
- vertex_t *v, *v0, *v1;
- c->arrays.cull = vertex_t::CLIP_ALL;
- c->arrays.compileElement(c, c->vc.vBuffer, first);
- first += 1;
- count -= 1;
-
- // vertex cache size must be multiple of 1
- const GLsizei vcs =
- (vertex_cache_t::VERTEX_BUFFER_SIZE +
- vertex_cache_t::VERTEX_CACHE_SIZE - 1);
- do {
- v0 = c->vc.vBuffer + 0;
- v = c->vc.vBuffer + 1;
- GLsizei num = count > vcs ? vcs : count;
- c->arrays.compileElements(c, v, first, num);
- first += num;
- count -= num;
- if (!c->arrays.cull) {
- // quick/trivial reject of the whole batch
- do {
- v1 = v++;
- const uint32_t cc = v0->flags & v1->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v0, v1);
- v0 = v1;
- num--;
- } while (num);
- }
- // copy back the last processed vertex
- c->vc.vBuffer[0] = *v0;
- c->arrays.cull = v0->flags & vertex_t::CLIP_ALL;
- } while (count);
-}
-
-void drawPrimitivesLineLoop(ogles_context_t* c, GLint first, GLsizei count)
-{
- if (ggl_unlikely(count < 2))
- return;
- drawPrimitivesLineStrip(c, first, count);
- if (ggl_likely(count >= 3)) {
- vertex_t* v0 = c->vc.vBuffer;
- vertex_t* v1 = c->vc.vBuffer + 1;
- c->arrays.compileElement(c, v1, first);
- const uint32_t cc = v0->flags & v1->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v0, v1);
- }
-}
-
-void drawPrimitivesLines(ogles_context_t* c, GLint first, GLsizei count)
-{
- if (ggl_unlikely(count < 2))
- return;
-
- // vertex cache size must be multiple of 2
- const GLsizei vcs =
- ((vertex_cache_t::VERTEX_BUFFER_SIZE +
- vertex_cache_t::VERTEX_CACHE_SIZE) / 2) * 2;
- do {
- vertex_t* v = c->vc.vBuffer;
- GLsizei num = count > vcs ? vcs : count;
- c->arrays.cull = vertex_t::CLIP_ALL;
- c->arrays.compileElements(c, v, first, num);
- first += num;
- count -= num;
- if (!c->arrays.cull) {
- // quick/trivial reject of the whole batch
- num -= 2;
- do {
- const uint32_t cc = v[0].flags & v[1].flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v, v+1);
- v += 2;
- num -= 2;
- } while (num >= 0);
- }
- } while (count >= 2);
-}
-
-// ----------------------------------------------------------------------------
-
-static void drawPrimitivesTriangleFanOrStrip(ogles_context_t* c,
- GLint first, GLsizei count, int winding)
-{
- // winding == 2 : fan
- // winding == 1 : strip
-
- if (ggl_unlikely(count < 3))
- return;
-
- vertex_t *v, *v0, *v1, *v2;
- c->arrays.cull = vertex_t::CLIP_ALL;
- c->arrays.compileElements(c, c->vc.vBuffer, first, 2);
- first += 2;
- count -= 2;
-
- // vertex cache size must be multiple of 2. This is extremely important
- // because it allows us to preserve the same winding when the whole
- // batch is culled. We also need 2 extra vertices in the array, because
- // we always keep the two first ones.
- const GLsizei vcs =
- ((vertex_cache_t::VERTEX_BUFFER_SIZE +
- vertex_cache_t::VERTEX_CACHE_SIZE - 2) / 2) * 2;
- do {
- v0 = c->vc.vBuffer + 0;
- v1 = c->vc.vBuffer + 1;
- v = c->vc.vBuffer + 2;
- GLsizei num = count > vcs ? vcs : count;
- c->arrays.compileElements(c, v, first, num);
- first += num;
- count -= num;
- if (!c->arrays.cull) {
- // quick/trivial reject of the whole batch
- do {
- v2 = v++;
- const uint32_t cc = v0->flags & v1->flags & v2->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderTriangle(c, v0, v1, v2);
- swap(((winding^=1) ? v1 : v0), v2);
- num--;
- } while (num);
- }
- if (count) {
- v0 = c->vc.vBuffer + 2 + vcs - 2;
- v1 = c->vc.vBuffer + 2 + vcs - 1;
- if ((winding&2) == 0) {
- // for strips copy back the two last compiled vertices
- c->vc.vBuffer[0] = *v0;
- }
- c->vc.vBuffer[1] = *v1;
- c->arrays.cull = v0->flags & v1->flags & vertex_t::CLIP_ALL;
- }
- } while (count > 0);
-}
-
-void drawPrimitivesTriangleStrip(ogles_context_t* c,
- GLint first, GLsizei count) {
- drawPrimitivesTriangleFanOrStrip(c, first, count, 1);
-}
-
-void drawPrimitivesTriangleFan(ogles_context_t* c,
- GLint first, GLsizei count) {
- drawPrimitivesTriangleFanOrStrip(c, first, count, 2);
-}
-
-void drawPrimitivesTriangles(ogles_context_t* c, GLint first, GLsizei count)
-{
- if (ggl_unlikely(count < 3))
- return;
-
- // vertex cache size must be multiple of 3
- const GLsizei vcs =
- ((vertex_cache_t::VERTEX_BUFFER_SIZE +
- vertex_cache_t::VERTEX_CACHE_SIZE) / 3) * 3;
- do {
- vertex_t* v = c->vc.vBuffer;
- GLsizei num = count > vcs ? vcs : count;
- c->arrays.cull = vertex_t::CLIP_ALL;
- c->arrays.compileElements(c, v, first, num);
- first += num;
- count -= num;
- if (!c->arrays.cull) {
- // quick/trivial reject of the whole batch
- num -= 3;
- do {
- const uint32_t cc = v[0].flags & v[1].flags & v[2].flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderTriangle(c, v, v+1, v+2);
- v += 3;
- num -= 3;
- } while (num >= 0);
- }
- } while (count >= 3);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-// this looks goofy, but gcc does a great job with this...
-static inline unsigned int read_index(int type, const GLvoid*& p) {
- unsigned int r;
- if (type) {
- r = *(const GLubyte*)p;
- p = (const GLubyte*)p + 1;
- } else {
- r = *(const GLushort*)p;
- p = (const GLushort*)p + 1;
- }
- return r;
-}
-
-// ----------------------------------------------------------------------------
-
-void drawIndexedPrimitivesPoints(ogles_context_t* c,
- GLsizei count, const GLvoid *indices)
-{
- if (ggl_unlikely(count < 1))
- return;
- const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE);
- do {
- vertex_t * v = fetch_vertex(c, read_index(type, indices));
- if (ggl_likely(!(v->flags & vertex_t::CLIP_ALL)))
- c->prims.renderPoint(c, v);
- v->locked = 0;
- count--;
- } while(count);
-}
-
-// ----------------------------------------------------------------------------
-
-void drawIndexedPrimitivesLineStrip(ogles_context_t* c,
- GLsizei count, const GLvoid *indices)
-{
- if (ggl_unlikely(count < 2))
- return;
-
- vertex_t * const v = c->vc.vBuffer;
- vertex_t* v0 = v;
- vertex_t* v1;
-
- const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE);
- c->arrays.compileElement(c, v0, read_index(type, indices));
- count -= 1;
- do {
- v1 = fetch_vertex(c, read_index(type, indices));
- const uint32_t cc = v0->flags & v1->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v0, v1);
- v0->locked = 0;
- v0 = v1;
- count--;
- } while (count);
- v1->locked = 0;
-}
-
-void drawIndexedPrimitivesLineLoop(ogles_context_t* c,
- GLsizei count, const GLvoid *indices)
-{
- if (ggl_unlikely(count <= 2)) {
- drawIndexedPrimitivesLines(c, count, indices);
- return;
- }
-
- vertex_t * const v = c->vc.vBuffer;
- vertex_t* v0 = v;
- vertex_t* v1;
-
- const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE);
- c->arrays.compileElement(c, v0, read_index(type, indices));
- count -= 1;
- do {
- v1 = fetch_vertex(c, read_index(type, indices));
- const uint32_t cc = v0->flags & v1->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v0, v1);
- v0->locked = 0;
- v0 = v1;
- count--;
- } while (count);
- v1->locked = 0;
-
- v1 = c->vc.vBuffer;
- const uint32_t cc = v0->flags & v1->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v0, v1);
-}
-
-void drawIndexedPrimitivesLines(ogles_context_t* c,
- GLsizei count, const GLvoid *indices)
-{
- if (ggl_unlikely(count < 2))
- return;
-
- count -= 2;
- const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE);
- do {
- vertex_t* const v0 = fetch_vertex(c, read_index(type, indices));
- vertex_t* const v1 = fetch_vertex(c, read_index(type, indices));
- const uint32_t cc = v0->flags & v1->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderLine(c, v0, v1);
- v0->locked = 0;
- v1->locked = 0;
- count -= 2;
- } while (count >= 0);
-}
-
-// ----------------------------------------------------------------------------
-
-static void drawIndexedPrimitivesTriangleFanOrStrip(ogles_context_t* c,
- GLsizei count, const GLvoid *indices, int winding)
-{
- // winding == 2 : fan
- // winding == 1 : strip
-
- if (ggl_unlikely(count < 3))
- return;
-
- vertex_t * const v = c->vc.vBuffer;
- vertex_t* v0 = v;
- vertex_t* v1 = v+1;
- vertex_t* v2;
-
- const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE);
- c->arrays.compileElement(c, v0, read_index(type, indices));
- c->arrays.compileElement(c, v1, read_index(type, indices));
- count -= 2;
-
- // note: GCC 4.1.1 here makes a prety interesting optimization
- // where it duplicates the loop below based on c->arrays.indicesType
-
- do {
- v2 = fetch_vertex(c, read_index(type, indices));
- const uint32_t cc = v0->flags & v1->flags & v2->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderTriangle(c, v0, v1, v2);
- vertex_t* & consumed = ((winding^=1) ? v1 : v0);
- consumed->locked = 0;
- consumed = v2;
- count--;
- } while (count);
- v0->locked = v1->locked = 0;
- v2->locked = 0;
-}
-
-void drawIndexedPrimitivesTriangleStrip(ogles_context_t* c,
- GLsizei count, const GLvoid *indices) {
- drawIndexedPrimitivesTriangleFanOrStrip(c, count, indices, 1);
-}
-
-void drawIndexedPrimitivesTriangleFan(ogles_context_t* c,
- GLsizei count, const GLvoid *indices) {
- drawIndexedPrimitivesTriangleFanOrStrip(c, count, indices, 2);
-}
-
-void drawIndexedPrimitivesTriangles(ogles_context_t* c,
- GLsizei count, const GLvoid *indices)
-{
- if (ggl_unlikely(count < 3))
- return;
-
- count -= 3;
- if (ggl_likely(c->arrays.indicesType == GL_UNSIGNED_SHORT)) {
- // This case is probably our most common case...
- uint16_t const * p = (uint16_t const *)indices;
- do {
- vertex_t* const v0 = fetch_vertex(c, *p++);
- vertex_t* const v1 = fetch_vertex(c, *p++);
- vertex_t* const v2 = fetch_vertex(c, *p++);
- const uint32_t cc = v0->flags & v1->flags & v2->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderTriangle(c, v0, v1, v2);
- v0->locked = 0;
- v1->locked = 0;
- v2->locked = 0;
- count -= 3;
- } while (count >= 0);
- } else {
- uint8_t const * p = (uint8_t const *)indices;
- do {
- vertex_t* const v0 = fetch_vertex(c, *p++);
- vertex_t* const v1 = fetch_vertex(c, *p++);
- vertex_t* const v2 = fetch_vertex(c, *p++);
- const uint32_t cc = v0->flags & v1->flags & v2->flags;
- if (ggl_likely(!(cc & vertex_t::CLIP_ALL)))
- c->prims.renderTriangle(c, v0, v1, v2);
- v0->locked = 0;
- v1->locked = 0;
- v2->locked = 0;
- count -= 3;
- } while (count >= 0);
- }
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Array compilers
-#endif
-
-void compileElement__generic(ogles_context_t* c,
- vertex_t* v, GLint first)
-{
- v->flags = 0;
- v->index = first;
- first &= vertex_cache_t::INDEX_MASK;
- const GLubyte* vp = c->arrays.vertex.element(first);
- v->obj.z = 0;
- v->obj.w = 0x10000;
- c->arrays.vertex.fetch(c, v->obj.v, vp);
- c->arrays.mvp_transform(&c->transforms.mvp, &v->clip, &v->obj);
- c->arrays.perspective(c, v);
-}
-
-void compileElements__generic(ogles_context_t* c,
- vertex_t* v, GLint first, GLsizei count)
-{
- const GLubyte* vp = c->arrays.vertex.element(
- first & vertex_cache_t::INDEX_MASK);
- const size_t stride = c->arrays.vertex.stride;
- transform_t const* const mvp = &c->transforms.mvp;
- do {
- v->flags = 0;
- v->index = first++;
- v->obj.z = 0;
- v->obj.w = 0x10000;
- c->arrays.vertex.fetch(c, v->obj.v, vp);
- c->arrays.mvp_transform(mvp, &v->clip, &v->obj);
- c->arrays.perspective(c, v);
- vp += stride;
- v++;
- } while (--count);
-}
-
-/*
-void compileElements__3x_full(ogles_context_t* c,
- vertex_t* v, GLint first, GLsizei count)
-{
- const GLfixed* vp = (const GLfixed*)c->arrays.vertex.element(first);
- const size_t stride = c->arrays.vertex.stride / 4;
-// const GLfixed* const& m = c->transforms.mvp.matrix.m;
-
- GLfixed m[16];
- memcpy(&m, c->transforms.mvp.matrix.m, sizeof(m));
-
- do {
- const GLfixed rx = vp[0];
- const GLfixed ry = vp[1];
- const GLfixed rz = vp[2];
- vp += stride;
- v->index = first++;
- v->clip.x = mla3a(rx, m[ 0], ry, m[ 4], rz, m[ 8], m[12]);
- v->clip.y = mla3a(rx, m[ 1], ry, m[ 5], rz, m[ 9], m[13]);
- v->clip.z = mla3a(rx, m[ 2], ry, m[ 6], rz, m[10], m[14]);
- v->clip.w = mla3a(rx, m[ 3], ry, m[ 7], rz, m[11], m[15]);
-
- const GLfixed w = v->clip.w;
- uint32_t clip = 0;
- if (v->clip.x < -w) clip |= vertex_t::CLIP_L;
- if (v->clip.x > w) clip |= vertex_t::CLIP_R;
- if (v->clip.y < -w) clip |= vertex_t::CLIP_B;
- if (v->clip.y > w) clip |= vertex_t::CLIP_T;
- if (v->clip.z < -w) clip |= vertex_t::CLIP_N;
- if (v->clip.z > w) clip |= vertex_t::CLIP_F;
- v->flags = clip;
- c->arrays.cull &= clip;
-
- //c->arrays.perspective(c, v);
- v++;
- } while (--count);
-}
-*/
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark clippers
-#endif
-
-static void clipVec4(vec4_t& nv,
- GLfixed t, const vec4_t& s, const vec4_t& p)
-{
- for (int i=0; i<4 ; i++)
- nv.v[i] = gglMulAddx(t, s.v[i] - p.v[i], p.v[i], 28);
-}
-
-static void clipVertex(ogles_context_t* c, vertex_t* nv,
- GLfixed t, const vertex_t* s, const vertex_t* p)
-{
- clipVec4(nv->clip, t, s->clip, p->clip);
- nv->fog = gglMulAddx(t, s->fog - p->fog, p->fog, 28);
- ogles_vertex_project(c, nv);
- nv->flags |= vertex_t::LIT | vertex_t::EYE | vertex_t::TT;
- nv->flags &= ~vertex_t::CLIP_ALL;
-}
-
-static void clipVertexC(ogles_context_t* c, vertex_t* nv,
- GLfixed t, const vertex_t* s, const vertex_t* p)
-{
- clipVec4(nv->color, t, s->color, p->color);
- clipVertex(c, nv, t, s, p);
-}
-
-static void clipVertexT(ogles_context_t* c, vertex_t* nv,
- GLfixed t, const vertex_t* s, const vertex_t* p)
-{
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (c->rasterizer.state.texture[i].enable)
- clipVec4(nv->texture[i], t, s->texture[i], p->texture[i]);
- }
- clipVertex(c, nv, t, s, p);
-}
-
-static void clipVertexAll(ogles_context_t* c, vertex_t* nv,
- GLfixed t, const vertex_t* s, const vertex_t* p)
-{
- clipVec4(nv->color, t, s->color, p->color);
- clipVertexT(c, nv, t, s, p);
-}
-
-static void clipEye(ogles_context_t* c, vertex_t* nv,
- GLfixed t, const vertex_t* s, const vertex_t* p)
-{
- nv->clear();
- c->arrays.clipVertex(c, nv, t, p, s);
- clipVec4(nv->eye, t, s->eye, p->eye);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-void validate_arrays(ogles_context_t* c, GLenum mode)
-{
- uint32_t enables = c->rasterizer.state.enables;
-
- // Perspective correction is not need if Ortho transform, but
- // the user can still provide the w coordinate manually, so we can't
- // automatically turn it off (in fact we could when the 4th coordinate
- // is not spcified in the vertex array).
- // W interpolation is never needed for points.
- GLboolean perspective =
- c->perspective && mode!=GL_POINTS && (enables & GGL_ENABLE_TMUS);
- c->rasterizer.procs.enableDisable(c, GGL_W_LERP, perspective);
-
- // set anti-aliasing
- GLboolean smooth = GL_FALSE;
- switch (mode) {
- case GL_POINTS:
- smooth = c->point.smooth;
- break;
- case GL_LINES:
- case GL_LINE_LOOP:
- case GL_LINE_STRIP:
- smooth = c->line.smooth;
- break;
- }
- if (((enables & GGL_ENABLE_AA)?1:0) != smooth)
- c->rasterizer.procs.enableDisable(c, GGL_AA, smooth);
-
- // set the shade model for this primitive
- c->rasterizer.procs.shadeModel(c,
- (mode == GL_POINTS) ? GL_FLAT : c->lighting.shadeModel);
-
- // compute all the matrices we'll need...
- uint32_t want =
- transform_state_t::MVP |
- transform_state_t::VIEWPORT;
- if (c->lighting.enable) { // needs normal transforms and eye coords
- want |= transform_state_t::MVUI;
- want |= transform_state_t::MODELVIEW;
- }
- if (enables & GGL_ENABLE_TMUS) { // needs texture transforms
- want |= transform_state_t::TEXTURE;
- }
- if (c->clipPlanes.enable || (enables & GGL_ENABLE_FOG)) {
- want |= transform_state_t::MODELVIEW; // needs eye coords
- }
- ogles_validate_transform(c, want);
-
- // textures...
- if (enables & GGL_ENABLE_TMUS)
- ogles_validate_texture(c);
-
- // vertex compilers
- c->arrays.compileElement = compileElement__generic;
- c->arrays.compileElements = compileElements__generic;
-
- // vertex transform
- c->arrays.mvp_transform =
- c->transforms.mvp.pointv[c->arrays.vertex.size - 2];
-
- c->arrays.mv_transform =
- c->transforms.modelview.transform.pointv[c->arrays.vertex.size - 2];
-
- /*
- * ***********************************************************************
- * pick fetchers
- * ***********************************************************************
- */
-
- array_machine_t& am = c->arrays;
- am.vertex.fetch = fetchNop;
- am.normal.fetch = currentNormal;
- am.color.fetch = currentColor;
-
- if (am.vertex.enable) {
- am.vertex.resolve();
- if (am.vertex.bo || am.vertex.pointer) {
- am.vertex.fetch = vertex_fct[am.vertex.size-2][am.vertex.type & 0xF];
- }
- }
-
- if (am.normal.enable) {
- am.normal.resolve();
- if (am.normal.bo || am.normal.pointer) {
- am.normal.fetch = normal_fct[am.normal.size-3][am.normal.type & 0xF];
- }
- }
-
- if (am.color.enable) {
- am.color.resolve();
- if (c->lighting.enable) {
- if (am.color.bo || am.color.pointer) {
- am.color.fetch = color_fct[am.color.size-3][am.color.type & 0xF];
- }
- } else {
- if (am.color.bo || am.color.pointer) {
- am.color.fetch = color_clamp_fct[am.color.size-3][am.color.type & 0xF];
- }
- }
- }
-
- int activeTmuCount = 0;
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- am.texture[i].fetch = currentTexCoord;
- if (c->rasterizer.state.texture[i].enable) {
-
- // texture fetchers...
- if (am.texture[i].enable) {
- am.texture[i].resolve();
- if (am.texture[i].bo || am.texture[i].pointer) {
- am.texture[i].fetch = texture_fct[am.texture[i].size-2][am.texture[i].type & 0xF];
- }
- }
-
- // texture transform...
- const int index = c->arrays.texture[i].size - 2;
- c->arrays.tex_transform[i] =
- c->transforms.texture[i].transform.pointv[index];
-
- am.tmu = i;
- activeTmuCount++;
- }
- }
-
- // pick the vertex-clipper
- uint32_t clipper = 0;
- // we must reload 'enables' here
- enables = c->rasterizer.state.enables;
- if (enables & GGL_ENABLE_SMOOTH)
- clipper |= 1; // we need to interpolate colors
- if (enables & GGL_ENABLE_TMUS)
- clipper |= 2; // we need to interpolate textures
- switch (clipper) {
- case 0: c->arrays.clipVertex = clipVertex; break;
- case 1: c->arrays.clipVertex = clipVertexC; break;
- case 2: c->arrays.clipVertex = clipVertexT; break;
- case 3: c->arrays.clipVertex = clipVertexAll; break;
- }
- c->arrays.clipEye = clipEye;
-
- // pick the primitive rasterizer
- ogles_validate_primitives(c);
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-using namespace android;
-
-#if 0
-#pragma mark -
-#pragma mark array API
-#endif
-
-void glVertexPointer(
- GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (size<2 || size>4 || stride<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- switch (type) {
- case GL_BYTE:
- case GL_SHORT:
- case GL_FIXED:
- case GL_FLOAT:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->arrays.vertex.init(size, type, stride, pointer, c->arrays.array_buffer, 0);
-}
-
-void glColorPointer(
- GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (size!=4 || stride<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- switch (type) {
- case GL_UNSIGNED_BYTE:
- case GL_FIXED:
- case GL_FLOAT:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->arrays.color.init(size, type, stride, pointer, c->arrays.array_buffer, 0);
-}
-
-void glNormalPointer(
- GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (stride<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- switch (type) {
- case GL_BYTE:
- case GL_SHORT:
- case GL_FIXED:
- case GL_FLOAT:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->arrays.normal.init(3, type, stride, pointer, c->arrays.array_buffer, 0);
-}
-
-void glTexCoordPointer(
- GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (size<2 || size>4 || stride<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- switch (type) {
- case GL_BYTE:
- case GL_SHORT:
- case GL_FIXED:
- case GL_FLOAT:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- const int tmu = c->arrays.activeTexture;
- c->arrays.texture[tmu].init(size, type, stride, pointer,
- c->arrays.array_buffer, 0);
-}
-
-
-void glEnableClientState(GLenum array) {
- ogles_context_t* c = ogles_context_t::get();
- enableDisableClientState(c, array, true);
-}
-
-void glDisableClientState(GLenum array) {
- ogles_context_t* c = ogles_context_t::get();
- enableDisableClientState(c, array, false);
-}
-
-void glClientActiveTexture(GLenum texture)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (texture<GL_TEXTURE0 || texture>=GL_TEXTURE0+GGL_TEXTURE_UNIT_COUNT) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->arrays.activeTexture = texture - GL_TEXTURE0;
-}
-
-void glDrawArrays(GLenum mode, GLint first, GLsizei count)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (count<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- switch (mode) {
- case GL_POINTS:
- case GL_LINE_STRIP:
- case GL_LINE_LOOP:
- case GL_LINES:
- case GL_TRIANGLE_STRIP:
- case GL_TRIANGLE_FAN:
- case GL_TRIANGLES:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- if (count == 0 || !c->arrays.vertex.enable)
- return;
- if ((c->cull.enable) && (c->cull.cullFace == GL_FRONT_AND_BACK))
- return; // all triangles are culled
-
-
- validate_arrays(c, mode);
-
- const uint32_t enables = c->rasterizer.state.enables;
- if (enables & GGL_ENABLE_TMUS)
- ogles_lock_textures(c);
-
- drawArraysPrims[mode](c, first, count);
-
- if (enables & GGL_ENABLE_TMUS)
- ogles_unlock_textures(c);
-
-#if VC_CACHE_STATISTICS
- c->vc.total = count;
- c->vc.dump_stats(mode);
-#endif
-}
-
-void glDrawElements(
- GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (count<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- switch (mode) {
- case GL_POINTS:
- case GL_LINE_STRIP:
- case GL_LINE_LOOP:
- case GL_LINES:
- case GL_TRIANGLE_STRIP:
- case GL_TRIANGLE_FAN:
- case GL_TRIANGLES:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- switch (type) {
- case GL_UNSIGNED_BYTE:
- case GL_UNSIGNED_SHORT:
- c->arrays.indicesType = type;
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (count == 0 || !c->arrays.vertex.enable)
- return;
- if ((c->cull.enable) && (c->cull.cullFace == GL_FRONT_AND_BACK))
- return; // all triangles are culled
-
- // clear the vertex-cache
- c->vc.clear();
- validate_arrays(c, mode);
-
- // if indices are in a buffer object, the pointer is treated as an
- // offset in that buffer.
- if (c->arrays.element_array_buffer) {
- indices = c->arrays.element_array_buffer->data + uintptr_t(indices);
- }
-
- const uint32_t enables = c->rasterizer.state.enables;
- if (enables & GGL_ENABLE_TMUS)
- ogles_lock_textures(c);
-
- drawElementsPrims[mode](c, count, indices);
-
- if (enables & GGL_ENABLE_TMUS)
- ogles_unlock_textures(c);
-
-
-#if VC_CACHE_STATISTICS
- c->vc.total = count;
- c->vc.dump_stats(mode);
-#endif
-}
-
-// ----------------------------------------------------------------------------
-// buffers
-// ----------------------------------------------------------------------------
-
-void glBindBuffer(GLenum target, GLuint buffer)
-{
- ogles_context_t* c = ogles_context_t::get();
- if ((target!=GL_ARRAY_BUFFER) && (target!=GL_ELEMENT_ARRAY_BUFFER)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- // create a buffer object, or bind an existing one
- buffer_t const* bo = 0;
- if (buffer) {
- bo = c->bufferObjectManager->bind(buffer);
- if (!bo) {
- ogles_error(c, GL_OUT_OF_MEMORY);
- return;
- }
- }
- ((target == GL_ARRAY_BUFFER) ?
- c->arrays.array_buffer : c->arrays.element_array_buffer) = bo;
-}
-
-void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
-{
- ogles_context_t* c = ogles_context_t::get();
- if ((target!=GL_ARRAY_BUFFER) && (target!=GL_ELEMENT_ARRAY_BUFFER)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (size<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if ((usage!=GL_STATIC_DRAW) && (usage!=GL_DYNAMIC_DRAW)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- buffer_t const* bo = ((target == GL_ARRAY_BUFFER) ?
- c->arrays.array_buffer : c->arrays.element_array_buffer);
-
- if (bo == 0) {
- // can't modify buffer 0
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
-
- buffer_t* edit_bo = const_cast<buffer_t*>(bo);
- if (c->bufferObjectManager->allocateStore(edit_bo, size, usage) != 0) {
- ogles_error(c, GL_OUT_OF_MEMORY);
- return;
- }
- if (data) {
- memcpy(bo->data, data, size);
- }
-}
-
-void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
-{
- ogles_context_t* c = ogles_context_t::get();
- if ((target!=GL_ARRAY_BUFFER) && (target!=GL_ELEMENT_ARRAY_BUFFER)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (offset<0 || size<0 || data==0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- buffer_t const* bo = ((target == GL_ARRAY_BUFFER) ?
- c->arrays.array_buffer : c->arrays.element_array_buffer);
-
- if (bo == 0) {
- // can't modify buffer 0
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
- if (offset+size > bo->size) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- memcpy(bo->data + offset, data, size);
-}
-
-void glDeleteBuffers(GLsizei n, const GLuint* buffers)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (n<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- for (int i=0 ; i<n ; i++) {
- GLuint name = buffers[i];
- if (name) {
- // unbind bound deleted buffers...
- if (c->arrays.element_array_buffer) {
- if (c->arrays.element_array_buffer->name == name) {
- c->arrays.element_array_buffer = 0;
- }
- }
- if (c->arrays.array_buffer) {
- if (c->arrays.array_buffer->name == name) {
- c->arrays.array_buffer = 0;
- }
- }
- if (c->arrays.vertex.bo) {
- if (c->arrays.vertex.bo->name == name) {
- c->arrays.vertex.bo = 0;
- }
- }
- if (c->arrays.normal.bo) {
- if (c->arrays.normal.bo->name == name) {
- c->arrays.normal.bo = 0;
- }
- }
- if (c->arrays.color.bo) {
- if (c->arrays.color.bo->name == name) {
- c->arrays.color.bo = 0;
- }
- }
- for (int t=0 ; t<GGL_TEXTURE_UNIT_COUNT ; t++) {
- if (c->arrays.texture[t].bo) {
- if (c->arrays.texture[t].bo->name == name) {
- c->arrays.texture[t].bo = 0;
- }
- }
- }
- }
- }
- c->bufferObjectManager->deleteBuffers(n, buffers);
- c->bufferObjectManager->recycleTokens(n, buffers);
-}
-
-void glGenBuffers(GLsizei n, GLuint* buffers)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (n<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- c->bufferObjectManager->getToken(n, buffers);
-}
diff --git a/opengl/libagl/array.h b/opengl/libagl/array.h
deleted file mode 100644
index e156978..0000000
--- a/opengl/libagl/array.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* libs/opengles/array.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_ARRAY_H
-#define ANDROID_OPENGLES_ARRAY_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-namespace android {
-
-namespace gl {
-struct ogles_context_t;
-};
-
-void ogles_init_array(ogles_context_t* c);
-void ogles_uninit_array(ogles_context_t* c);
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_ARRAY_H
-
diff --git a/opengl/libagl/context.h b/opengl/libagl/context.h
deleted file mode 100644
index 7065a30..0000000
--- a/opengl/libagl/context.h
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
- * Copyright (C) 2006 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 ANDROID_OPENGLES_CONTEXT_H
-#define ANDROID_OPENGLES_CONTEXT_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <pthread.h>
-#ifdef HAVE_ANDROID_OS
-#include <bionic_tls.h>
-#endif
-
-#include <private/pixelflinger/ggl_context.h>
-#include <hardware/gralloc.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-namespace android {
-
-
-const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- + 1
-#endif
- ;
-
-class EGLTextureObject;
-class EGLSurfaceManager;
-class EGLBufferObjectManager;
-
-namespace gl {
-
-struct ogles_context_t;
-struct matrixx_t;
-struct transform_t;
-struct buffer_t;
-
-ogles_context_t* getGlContext();
-
-template<typename T>
-static inline void swap(T& a, T& b) {
- T t(a); a = b; b = t;
-}
-template<typename T>
-inline T max(T a, T b) {
- return a<b ? b : a;
-}
-template<typename T>
-inline T max(T a, T b, T c) {
- return max(a, max(b, c));
-}
-template<typename T>
-inline T min(T a, T b) {
- return a<b ? a : b;
-}
-template<typename T>
-inline T min(T a, T b, T c) {
- return min(a, min(b, c));
-}
-template<typename T>
-inline T min(T a, T b, T c, T d) {
- return min(min(a,b), min(c,d));
-}
-
-// ----------------------------------------------------------------------------
-// vertices
-// ----------------------------------------------------------------------------
-
-struct vec3_t {
- union {
- struct { GLfixed x, y, z; };
- struct { GLfixed r, g, b; };
- struct { GLfixed S, T, R; };
- GLfixed v[3];
- };
-};
-
-struct vec4_t {
- union {
- struct { GLfixed x, y, z, w; };
- struct { GLfixed r, g, b, a; };
- struct { GLfixed S, T, R, Q; };
- GLfixed v[4];
- };
-};
-
-struct vertex_t {
- enum {
- // these constant matter for our clipping
- CLIP_L = 0x0001, // clipping flags
- CLIP_R = 0x0002,
- CLIP_B = 0x0004,
- CLIP_T = 0x0008,
- CLIP_N = 0x0010,
- CLIP_F = 0x0020,
-
- EYE = 0x0040,
- RESERVED = 0x0080,
-
- USER_CLIP_0 = 0x0100, // user clipping flags
- USER_CLIP_1 = 0x0200,
- USER_CLIP_2 = 0x0400,
- USER_CLIP_3 = 0x0800,
- USER_CLIP_4 = 0x1000,
- USER_CLIP_5 = 0x2000,
-
- LIT = 0x4000, // lighting has been applied
- TT = 0x8000, // texture coords transformed
-
- FRUSTUM_CLIP_ALL= 0x003F,
- USER_CLIP_ALL = 0x3F00,
- CLIP_ALL = 0x3F3F,
- };
-
- // the fields below are arranged to minimize d-cache usage
- // we group together, by cache-line, the fields most likely to be used
-
- union {
- vec4_t obj;
- vec4_t eye;
- };
- vec4_t clip;
-
- uint32_t flags;
- size_t index; // cache tag, and vertex index
- GLfixed fog;
- uint8_t locked;
- uint8_t mru;
- uint8_t reserved[2];
- vec4_t window;
-
- vec4_t color;
- vec4_t texture[GGL_TEXTURE_UNIT_COUNT];
- uint32_t reserved1[4];
-
- inline void clear() {
- flags = index = locked = mru = 0;
- }
-};
-
-struct point_size_t {
- GGLcoord size;
- GLboolean smooth;
-};
-
-struct line_width_t {
- GGLcoord width;
- GLboolean smooth;
-};
-
-struct polygon_offset_t {
- GLfixed factor;
- GLfixed units;
- GLboolean enable;
-};
-
-// ----------------------------------------------------------------------------
-// arrays
-// ----------------------------------------------------------------------------
-
-struct array_t {
- typedef void (*fetcher_t)(ogles_context_t*, GLfixed*, const GLvoid*);
- fetcher_t fetch;
- GLvoid const* physical_pointer;
- GLint size;
- GLsizei stride;
- GLvoid const* pointer;
- buffer_t const* bo;
- uint16_t type;
- GLboolean enable;
- GLboolean pad;
- GLsizei bounds;
- void init(GLint, GLenum, GLsizei, const GLvoid *, const buffer_t*, GLsizei);
- inline void resolve();
- inline const GLubyte* element(GLint i) const {
- return (const GLubyte*)physical_pointer + i * stride;
- }
-};
-
-struct array_machine_t {
- array_t vertex;
- array_t normal;
- array_t color;
- array_t texture[GGL_TEXTURE_UNIT_COUNT];
- uint8_t activeTexture;
- uint8_t tmu;
- uint16_t cull;
- uint32_t flags;
- GLenum indicesType;
- buffer_t const* array_buffer;
- buffer_t const* element_array_buffer;
-
- void (*compileElements)(ogles_context_t*, vertex_t*, GLint, GLsizei);
- void (*compileElement)(ogles_context_t*, vertex_t*, GLint);
-
- void (*mvp_transform)(transform_t const*, vec4_t*, vec4_t const*);
- void (*mv_transform)(transform_t const*, vec4_t*, vec4_t const*);
- void (*tex_transform[2])(transform_t const*, vec4_t*, vec4_t const*);
- void (*perspective)(ogles_context_t*c, vertex_t* v);
- void (*clipVertex)(ogles_context_t* c, vertex_t* nv,
- GGLfixed t, const vertex_t* s, const vertex_t* p);
- void (*clipEye)(ogles_context_t* c, vertex_t* nv,
- GGLfixed t, const vertex_t* s, const vertex_t* p);
-};
-
-struct vertex_cache_t {
- enum {
- // must be at least 4
- // 3 vertice for triangles
- // or 2 + 2 for indexed triangles w/ cache contention
- VERTEX_BUFFER_SIZE = 8,
- // must be a power of two and at least 3
- VERTEX_CACHE_SIZE = 64, // 8 KB
-
- INDEX_BITS = 16,
- INDEX_MASK = ((1LU<<INDEX_BITS)-1),
- INDEX_SEQ = 1LU<<INDEX_BITS,
- };
- vertex_t* vBuffer;
- vertex_t* vCache;
- uint32_t sequence;
- void* base;
- uint32_t total;
- uint32_t misses;
- int64_t startTime;
- void init();
- void uninit();
- void clear();
- void dump_stats(GLenum mode);
-};
-
-// ----------------------------------------------------------------------------
-// fog
-// ----------------------------------------------------------------------------
-
-struct fog_t {
- GLfixed density;
- GLfixed start;
- GLfixed end;
- GLfixed invEndMinusStart;
- GLenum mode;
- GLfixed (*fog)(ogles_context_t* c, GLfixed z);
-};
-
-// ----------------------------------------------------------------------------
-// user clip planes
-// ----------------------------------------------------------------------------
-
-const unsigned int OGLES_MAX_CLIP_PLANES = 6;
-
-struct clip_plane_t {
- vec4_t equation;
-};
-
-struct user_clip_planes_t {
- clip_plane_t plane[OGLES_MAX_CLIP_PLANES];
- uint32_t enable;
-};
-
-// ----------------------------------------------------------------------------
-// lighting
-// ----------------------------------------------------------------------------
-
-const unsigned int OGLES_MAX_LIGHTS = 8;
-
-struct light_t {
- vec4_t ambient;
- vec4_t diffuse;
- vec4_t specular;
- vec4_t implicitAmbient;
- vec4_t implicitDiffuse;
- vec4_t implicitSpecular;
- vec4_t position; // position in eye space
- vec4_t objPosition;
- vec4_t normalizedObjPosition;
- vec4_t spotDir;
- vec4_t normalizedSpotDir;
- GLfixed spotExp;
- GLfixed spotCutoff;
- GLfixed spotCutoffCosine;
- GLfixed attenuation[3];
- GLfixed rConstAttenuation;
- GLboolean enable;
-};
-
-struct material_t {
- vec4_t ambient;
- vec4_t diffuse;
- vec4_t specular;
- vec4_t emission;
- GLfixed shininess;
-};
-
-struct light_model_t {
- vec4_t ambient;
- GLboolean twoSide;
-};
-
-struct color_material_t {
- GLenum face;
- GLenum mode;
- GLboolean enable;
-};
-
-struct lighting_t {
- light_t lights[OGLES_MAX_LIGHTS];
- material_t front;
- light_model_t lightModel;
- color_material_t colorMaterial;
- vec4_t implicitSceneEmissionAndAmbient;
- vec4_t objViewer;
- uint32_t enabledLights;
- GLboolean enable;
- GLenum shadeModel;
- typedef void (*light_fct_t)(ogles_context_t*, vertex_t*);
- void (*lightVertex)(ogles_context_t* c, vertex_t* v);
- void (*lightTriangle)(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-};
-
-struct culling_t {
- GLenum cullFace;
- GLenum frontFace;
- GLboolean enable;
-};
-
-// ----------------------------------------------------------------------------
-// textures
-// ----------------------------------------------------------------------------
-
-struct texture_unit_t {
- GLuint name;
- EGLTextureObject* texture;
- uint8_t dirty;
-};
-
-struct texture_state_t
-{
- texture_unit_t tmu[GGL_TEXTURE_UNIT_COUNT];
- int active; // active tmu
- EGLTextureObject* defaultTexture;
- GGLContext* ggl;
- uint8_t packAlignment;
- uint8_t unpackAlignment;
-};
-
-// ----------------------------------------------------------------------------
-// transformation and matrices
-// ----------------------------------------------------------------------------
-
-struct matrixf_t;
-
-struct matrixx_t {
- GLfixed m[16];
- void load(const matrixf_t& rhs);
-};
-
-struct matrix_stack_t;
-
-
-struct matrixf_t {
- void loadIdentity();
- void load(const matrixf_t& rhs);
-
- inline GLfloat* editElements() { return m; }
- inline GLfloat const* elements() const { return m; }
-
- void set(const GLfixed* rhs);
- void set(const GLfloat* rhs);
-
- static void multiply(matrixf_t& r,
- const matrixf_t& lhs, const matrixf_t& rhs);
-
- void dump(const char* what);
-
-private:
- friend struct matrix_stack_t;
- GLfloat m[16];
- void load(const GLfixed* rhs);
- void load(const GLfloat* rhs);
- void multiply(const matrixf_t& rhs);
- void translate(GLfloat x, GLfloat y, GLfloat z);
- void scale(GLfloat x, GLfloat y, GLfloat z);
- void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
-};
-
-enum {
- OP_IDENTITY = 0x00,
- OP_TRANSLATE = 0x01,
- OP_UNIFORM_SCALE = 0x02,
- OP_SCALE = 0x05,
- OP_ROTATE = 0x08,
- OP_SKEW = 0x10,
- OP_ALL = 0x1F
-};
-
-struct transform_t {
- enum {
- FLAGS_2D_PROJECTION = 0x1
- };
- matrixx_t matrix;
- uint32_t flags;
- uint32_t ops;
-
- union {
- struct {
- void (*point2)(transform_t const* t, vec4_t*, vec4_t const*);
- void (*point3)(transform_t const* t, vec4_t*, vec4_t const*);
- void (*point4)(transform_t const* t, vec4_t*, vec4_t const*);
- };
- void (*pointv[3])(transform_t const* t, vec4_t*, vec4_t const*);
- };
-
- void loadIdentity();
- void picker();
- void dump(const char* what);
-};
-
-struct mvui_transform_t : public transform_t
-{
- void picker();
-};
-
-struct matrix_stack_t {
- enum {
- DO_PICKER = 0x1,
- DO_FLOAT_TO_FIXED = 0x2
- };
- transform_t transform;
- uint8_t maxDepth;
- uint8_t depth;
- uint8_t dirty;
- uint8_t reserved;
- matrixf_t *stack;
- uint8_t *ops;
- void init(int depth);
- void uninit();
- void loadIdentity();
- void load(const GLfixed* rhs);
- void load(const GLfloat* rhs);
- void multiply(const matrixf_t& rhs);
- void translate(GLfloat x, GLfloat y, GLfloat z);
- void scale(GLfloat x, GLfloat y, GLfloat z);
- void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
- GLint push();
- GLint pop();
- void validate();
- matrixf_t& top() { return stack[depth]; }
- const matrixf_t& top() const { return stack[depth]; }
- uint32_t top_ops() const { return ops[depth]; }
- inline bool isRigidBody() const {
- return !(ops[depth] & ~(OP_TRANSLATE|OP_UNIFORM_SCALE|OP_ROTATE));
- }
-};
-
-struct vp_transform_t {
- transform_t transform;
- matrixf_t matrix;
- GLfloat zNear;
- GLfloat zFar;
- void loadIdentity();
-};
-
-struct transform_state_t {
- enum {
- MODELVIEW = 0x01,
- PROJECTION = 0x02,
- VIEWPORT = 0x04,
- TEXTURE = 0x08,
- MVUI = 0x10,
- MVIT = 0x20,
- MVP = 0x40,
- };
- matrix_stack_t *current;
- matrix_stack_t modelview;
- matrix_stack_t projection;
- matrix_stack_t texture[GGL_TEXTURE_UNIT_COUNT];
-
- // modelview * projection
- transform_t mvp __attribute__((aligned(32)));
- // viewport transformation
- vp_transform_t vpt __attribute__((aligned(32)));
- // same for 4-D vertices
- transform_t mvp4;
- // full modelview inverse transpose
- transform_t mvit4;
- // upper 3x3 of mv-inverse-transpose (for normals)
- mvui_transform_t mvui;
-
- GLenum matrixMode;
- GLenum rescaleNormals;
- uint32_t dirty;
- void invalidate();
- void update_mvp();
- void update_mvit();
- void update_mvui();
-};
-
-struct viewport_t {
- GLint x;
- GLint y;
- GLsizei w;
- GLsizei h;
- struct {
- GLint x;
- GLint y;
- } surfaceport;
- struct {
- GLint x;
- GLint y;
- GLsizei w;
- GLsizei h;
- } scissor;
-};
-
-// ----------------------------------------------------------------------------
-// Lerping
-// ----------------------------------------------------------------------------
-
-struct compute_iterators_t
-{
- void initTriangle(
- vertex_t const* v0,
- vertex_t const* v1,
- vertex_t const* v2);
-
- void initLine(
- vertex_t const* v0,
- vertex_t const* v1);
-
- inline void initLerp(vertex_t const* v0, uint32_t enables);
-
- int iteratorsScale(int32_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- void iterators1616(GGLfixed it[3],
- GGLfixed c0, GGLfixed c1, GGLfixed c2) const;
-
- void iterators0032(int32_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- void iterators0032(int64_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- GGLcoord area() const { return m_area; }
-
-private:
- // don't change order of members here -- used by iterators.S
- GGLcoord m_dx01, m_dy10, m_dx20, m_dy02;
- GGLcoord m_x0, m_y0;
- GGLcoord m_area;
- uint8_t m_scale;
- uint8_t m_area_scale;
- uint8_t m_reserved[2];
-
-};
-
-// ----------------------------------------------------------------------------
-// state
-// ----------------------------------------------------------------------------
-
-#ifdef HAVE_ANDROID_OS
- // We have a dedicated TLS slot in bionic
- inline void setGlThreadSpecific(ogles_context_t *value) {
- ((uint32_t *)__get_tls())[TLS_SLOT_OPENGL] = (uint32_t)value;
- }
- inline ogles_context_t* getGlThreadSpecific() {
- return (ogles_context_t *)(((unsigned *)__get_tls())[TLS_SLOT_OPENGL]);
- }
-#else
- extern pthread_key_t gGLKey;
- inline void setGlThreadSpecific(ogles_context_t *value) {
- pthread_setspecific(gGLKey, value);
- }
- inline ogles_context_t* getGlThreadSpecific() {
- return static_cast<ogles_context_t*>(pthread_getspecific(gGLKey));
- }
-#endif
-
-
-struct prims_t {
- typedef ogles_context_t* GL;
- void (*renderPoint)(GL, vertex_t*);
- void (*renderLine)(GL, vertex_t*, vertex_t*);
- void (*renderTriangle)(GL, vertex_t*, vertex_t*, vertex_t*);
-};
-
-struct ogles_context_t {
- context_t rasterizer;
- array_machine_t arrays __attribute__((aligned(32)));
- texture_state_t textures;
- transform_state_t transforms;
- vertex_cache_t vc;
- prims_t prims;
- culling_t cull;
- lighting_t lighting;
- user_clip_planes_t clipPlanes;
- compute_iterators_t lerp; __attribute__((aligned(32)));
- vertex_t current;
- vec4_t currentColorClamped;
- vec3_t currentNormal;
- viewport_t viewport;
- point_size_t point;
- line_width_t line;
- polygon_offset_t polygonOffset;
- fog_t fog;
- uint32_t perspective : 1;
- uint32_t transformTextures : 1;
- EGLSurfaceManager* surfaceManager;
- EGLBufferObjectManager* bufferObjectManager;
-
- GLenum error;
-
- static inline ogles_context_t* get() {
- return getGlThreadSpecific();
- }
-
-};
-
-}; // namespace gl
-}; // namespace android
-
-using namespace android::gl;
-
-#endif // ANDROID_OPENGLES_CONTEXT_H
-
diff --git a/opengl/libagl/dxt.cpp b/opengl/libagl/dxt.cpp
deleted file mode 100644
index 238c81f..0000000
--- a/opengl/libagl/dxt.cpp
+++ /dev/null
@@ -1,636 +0,0 @@
-/* libs/opengles/dxt.cpp
-**
-** Copyright 2007, 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.
-*/
-
-#define TIMING 0
-
-#if TIMING
-#include <sys/time.h> // for optimization timing
-#include <stdio.h>
-#include <stdlib.h>
-#endif
-
-#include <GLES/gl.h>
-#include <utils/Endian.h>
-
-#include "context.h"
-
-#define TIMING 0
-
-namespace android {
-
-static uint8_t avg23tab[64*64];
-static volatile int tables_initialized = 0;
-
-// Definitions below are equivalent to these over the valid range of arguments
-// #define div5(x) ((x)/5)
-// #define div7(x) ((x)/7)
-
-// Use fixed-point to divide by 5 and 7
-// 3277 = 2^14/5 + 1
-// 2341 = 2^14/7 + 1
-#define div5(x) (((x)*3277) >> 14)
-#define div7(x) (((x)*2341) >> 14)
-
-// Table with entry [a << 6 | b] = (2*a + b)/3 for 0 <= a,b < 64
-#define avg23(x0,x1) avg23tab[((x0) << 6) | (x1)]
-
-// Extract 5/6/5 RGB
-#define red(x) (((x) >> 11) & 0x1f)
-#define green(x) (((x) >> 5) & 0x3f)
-#define blue(x) ( (x) & 0x1f)
-
-/*
- * Convert 5/6/5 RGB (as 3 ints) to 8/8/8
- *
- * Operation count: 8 <<, 0 &, 5 |
- */
-inline static int rgb565SepTo888(int r, int g, int b)
-
-{
- return ((((r << 3) | (r >> 2)) << 16) |
- (((g << 2) | (g >> 4)) << 8) |
- ((b << 3) | (b >> 2)));
-}
-
-/*
- * Convert 5/6/5 RGB (as a single 16-bit word) to 8/8/8
- *
- * r4r3r2r1 r0g5g4g3 g2g1g0b4 b3b2b1b0 rgb
- * r4r3r2 r1r0g5g4 g3g2g1g0 b4b3b2b1 b0 0 0 0 rgb << 3
- * r4r3r2r1 r0r4r3r2 g5g4g3g2 g1g0g5g4 b4b3b2b1 b0b4b3b2 desired result
- *
- * Construct the 24-bit RGB word as:
- *
- * r4r3r2r1 r0------ -------- -------- -------- -------- (rgb << 8) & 0xf80000
- * r4r3r2 -------- -------- -------- -------- (rgb << 3) & 0x070000
- * g5g4g3g2 g1g0---- -------- -------- (rgb << 5) & 0x00fc00
- * g5g4 -------- -------- (rgb >> 1) & 0x000300
- * b4b3b2b1 b0------ (rgb << 3) & 0x0000f8
- * b4b3b2 (rgb >> 2) & 0x000007
- *
- * Operation count: 5 <<, 6 &, 5 | (n.b. rgb >> 3 is used twice)
- */
-inline static int rgb565To888(int rgb)
-
-{
- int rgb3 = rgb >> 3;
- return (((rgb << 8) & 0xf80000) |
- ( rgb3 & 0x070000) |
- ((rgb << 5) & 0x00fc00) |
- ((rgb >> 1) & 0x000300) |
- ( rgb3 & 0x0000f8) |
- ((rgb >> 2) & 0x000007));
-}
-
-#if __BYTE_ORDER == __BIG_ENDIAN
-static uint32_t swap(uint32_t x) {
- int b0 = (x >> 24) & 0xff;
- int b1 = (x >> 16) & 0xff;
- int b2 = (x >> 8) & 0xff;
- int b3 = (x ) & 0xff;
-
- return (uint32_t)((b3 << 24) | (b2 << 16) | (b1 << 8) | b0);
-}
-#endif
-
-static void
-init_tables()
-{
- if (tables_initialized) {
- return;
- }
-
- for (int i = 0; i < 64; i++) {
- for (int j = 0; j < 64; j++) {
- int avg = (2*i + j)/3;
- avg23tab[(i << 6) | j] = avg;
- }
- }
-
- asm volatile ("" : : : "memory");
- tables_initialized = 1;
-}
-
-/*
- * Utility to scan a DXT1 compressed texture to determine whether it
- * contains a transparent pixel (color0 < color1, code == 3). This
- * may be useful if the application lacks information as to whether
- * the true format is GL_COMPRESSED_RGB_S3TC_DXT1_EXT or
- * GL_COMPRESSED_RGBA_S3TC_DXT1_EXT.
- */
-bool
-DXT1HasAlpha(const GLvoid *data, int width, int height) {
-#if TIMING
- struct timeval start_t, end_t;
- struct timezone tz;
-
- gettimeofday(&start_t, &tz);
-#endif
-
- bool hasAlpha = false;
-
- int xblocks = (width + 3)/4;
- int yblocks = (height + 3)/4;
- int numblocks = xblocks*yblocks;
-
- uint32_t const *d32 = (uint32_t *)data;
- for (int b = 0; b < numblocks; b++) {
- uint32_t colors = *d32++;
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- colors = swap(colors);
-#endif
-
- uint16_t color0 = colors & 0xffff;
- uint16_t color1 = colors >> 16;
-
- if (color0 < color1) {
- // There's no need to endian-swap within 'bits'
- // since we don't care which pixel is the transparent one
- uint32_t bits = *d32++;
-
- // Detect if any (odd, even) pair of bits are '11'
- // bits: b31 b30 b29 ... b3 b2 b1 b0
- // bits >> 1: b31 b31 b30 ... b4 b3 b2 b1
- // &: b31 (b31 & b30) (b29 & b28) ... (b2 & b1) (b1 & b0)
- // & 0x55..: 0 (b31 & b30) 0 ... 0 (b1 & b0)
- if (((bits & (bits >> 1)) & 0x55555555) != 0) {
- hasAlpha = true;
- goto done;
- }
- } else {
- // Skip 4 bytes
- ++d32;
- }
- }
-
- done:
-#if TIMING
- gettimeofday(&end_t, &tz);
- long usec = (end_t.tv_sec - start_t.tv_sec)*1000000 +
- (end_t.tv_usec - start_t.tv_usec);
-
- printf("Scanned w=%d h=%d in %ld usec\n", width, height, usec);
-#endif
-
- return hasAlpha;
-}
-
-static void
-decodeDXT1(const GLvoid *data, int width, int height,
- void *surface, int stride,
- bool hasAlpha)
-
-{
- init_tables();
-
- uint32_t const *d32 = (uint32_t *)data;
-
- // Color table for the current block
- uint16_t c[4];
- c[0] = c[1] = c[2] = c[3] = 0;
-
- // Specified colors from the previous block
- uint16_t prev_color0 = 0x0000;
- uint16_t prev_color1 = 0x0000;
-
- uint16_t* rowPtr = (uint16_t*)surface;
- for (int base_y = 0; base_y < height; base_y += 4, rowPtr += 4*stride) {
- uint16_t *blockPtr = rowPtr;
- for (int base_x = 0; base_x < width; base_x += 4, blockPtr += 4) {
- uint32_t colors = *d32++;
- uint32_t bits = *d32++;
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- colors = swap(colors);
- bits = swap(bits);
-#endif
-
- // Raw colors
- uint16_t color0 = colors & 0xffff;
- uint16_t color1 = colors >> 16;
-
- // If the new block has the same base colors as the
- // previous one, we don't need to recompute the color
- // table c[]
- if (color0 != prev_color0 || color1 != prev_color1) {
- // Store raw colors for comparison with next block
- prev_color0 = color0;
- prev_color1 = color1;
-
- int r0 = red(color0);
- int g0 = green(color0);
- int b0 = blue(color0);
-
- int r1 = red(color1);
- int g1 = green(color1);
- int b1 = blue(color1);
-
- if (hasAlpha) {
- c[0] = (r0 << 11) | ((g0 >> 1) << 6) | (b0 << 1) | 0x1;
- c[1] = (r1 << 11) | ((g1 >> 1) << 6) | (b1 << 1) | 0x1;
- } else {
- c[0] = color0;
- c[1] = color1;
- }
-
- int r2, g2, b2, r3, g3, b3, a3;
-
- int bbits = bits >> 1;
- bool has2 = ((bbits & ~bits) & 0x55555555) != 0;
- bool has3 = ((bbits & bits) & 0x55555555) != 0;
-
- if (has2 || has3) {
- if (color0 > color1) {
- r2 = avg23(r0, r1);
- g2 = avg23(g0, g1);
- b2 = avg23(b0, b1);
-
- r3 = avg23(r1, r0);
- g3 = avg23(g1, g0);
- b3 = avg23(b1, b0);
- a3 = 1;
- } else {
- r2 = (r0 + r1) >> 1;
- g2 = (g0 + g1) >> 1;
- b2 = (b0 + b1) >> 1;
-
- r3 = g3 = b3 = a3 = 0;
- }
- if (hasAlpha) {
- c[2] = (r2 << 11) | ((g2 >> 1) << 6) |
- (b2 << 1) | 0x1;
- c[3] = (r3 << 11) | ((g3 >> 1) << 6) |
- (b3 << 1) | a3;
- } else {
- c[2] = (r2 << 11) | (g2 << 5) | b2;
- c[3] = (r3 << 11) | (g3 << 5) | b3;
- }
- }
- }
-
- uint16_t* blockRowPtr = blockPtr;
- for (int y = 0; y < 4; y++, blockRowPtr += stride) {
- // Don't process rows past the botom
- if (base_y + y >= height) {
- break;
- }
-
- int w = min(width - base_x, 4);
- for (int x = 0; x < w; x++) {
- int code = bits & 0x3;
- bits >>= 2;
-
- blockRowPtr[x] = c[code];
- }
- }
- }
- }
-}
-
-// Output data as internalformat=GL_RGBA, type=GL_UNSIGNED_BYTE
-static void
-decodeDXT3(const GLvoid *data, int width, int height,
- void *surface, int stride)
-
-{
- init_tables();
-
- uint32_t const *d32 = (uint32_t *)data;
-
- // Specified colors from the previous block
- uint16_t prev_color0 = 0x0000;
- uint16_t prev_color1 = 0x0000;
-
- // Color table for the current block
- uint32_t c[4];
- c[0] = c[1] = c[2] = c[3] = 0;
-
- uint32_t* rowPtr = (uint32_t*)surface;
- for (int base_y = 0; base_y < height; base_y += 4, rowPtr += 4*stride) {
- uint32_t *blockPtr = rowPtr;
- for (int base_x = 0; base_x < width; base_x += 4, blockPtr += 4) {
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- uint32_t alphahi = *d32++;
- uint32_t alphalo = *d32++;
- alphahi = swap(alphahi);
- alphalo = swap(alphalo);
-#else
- uint32_t alphalo = *d32++;
- uint32_t alphahi = *d32++;
-#endif
-
- uint32_t colors = *d32++;
- uint32_t bits = *d32++;
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- colors = swap(colors);
- bits = swap(bits);
-#endif
-
- uint64_t alpha = ((uint64_t)alphahi << 32) | alphalo;
-
- // Raw colors
- uint16_t color0 = colors & 0xffff;
- uint16_t color1 = colors >> 16;
-
- // If the new block has the same base colors as the
- // previous one, we don't need to recompute the color
- // table c[]
- if (color0 != prev_color0 || color1 != prev_color1) {
- // Store raw colors for comparison with next block
- prev_color0 = color0;
- prev_color1 = color1;
-
- int bbits = bits >> 1;
- bool has2 = ((bbits & ~bits) & 0x55555555) != 0;
- bool has3 = ((bbits & bits) & 0x55555555) != 0;
-
- if (has2 || has3) {
- int r0 = red(color0);
- int g0 = green(color0);
- int b0 = blue(color0);
-
- int r1 = red(color1);
- int g1 = green(color1);
- int b1 = blue(color1);
-
- int r2 = avg23(r0, r1);
- int g2 = avg23(g0, g1);
- int b2 = avg23(b0, b1);
-
- int r3 = avg23(r1, r0);
- int g3 = avg23(g1, g0);
- int b3 = avg23(b1, b0);
-
- c[0] = rgb565SepTo888(r0, g0, b0);
- c[1] = rgb565SepTo888(r1, g1, b1);
- c[2] = rgb565SepTo888(r2, g2, b2);
- c[3] = rgb565SepTo888(r3, g3, b3);
- } else {
- // Convert to 8 bits
- c[0] = rgb565To888(color0);
- c[1] = rgb565To888(color1);
- }
- }
-
- uint32_t* blockRowPtr = blockPtr;
- for (int y = 0; y < 4; y++, blockRowPtr += stride) {
- // Don't process rows past the botom
- if (base_y + y >= height) {
- break;
- }
-
- int w = min(width - base_x, 4);
- for (int x = 0; x < w; x++) {
- int a = alpha & 0xf;
- alpha >>= 4;
-
- int code = bits & 0x3;
- bits >>= 2;
-
- blockRowPtr[x] = c[code] | (a << 28) | (a << 24);
- }
- }
- }
- }
-}
-
-// Output data as internalformat=GL_RGBA, type=GL_UNSIGNED_BYTE
-static void
-decodeDXT5(const GLvoid *data, int width, int height,
- void *surface, int stride)
-
-{
- init_tables();
-
- uint32_t const *d32 = (uint32_t *)data;
-
- // Specified alphas from the previous block
- uint8_t prev_alpha0 = 0x00;
- uint8_t prev_alpha1 = 0x00;
-
- // Specified colors from the previous block
- uint16_t prev_color0 = 0x0000;
- uint16_t prev_color1 = 0x0000;
-
- // Alpha table for the current block
- uint8_t a[8];
- a[0] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = 0;
-
- // Color table for the current block
- uint32_t c[4];
- c[0] = c[1] = c[2] = c[3] = 0;
-
- int good_a5 = 0;
- int bad_a5 = 0;
- int good_a6 = 0;
- int bad_a6 = 0;
- int good_a7 = 0;
- int bad_a7 = 0;
-
- uint32_t* rowPtr = (uint32_t*)surface;
- for (int base_y = 0; base_y < height; base_y += 4, rowPtr += 4*stride) {
- uint32_t *blockPtr = rowPtr;
- for (int base_x = 0; base_x < width; base_x += 4, blockPtr += 4) {
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- uint32_t alphahi = *d32++;
- uint32_t alphalo = *d32++;
- alphahi = swap(alphahi);
- alphalo = swap(alphalo);
-#else
- uint32_t alphalo = *d32++;
- uint32_t alphahi = *d32++;
-#endif
-
- uint32_t colors = *d32++;
- uint32_t bits = *d32++;
-
-#if __BYTE_ORDER == __BIG_ENDIANx
- colors = swap(colors);
- bits = swap(bits);
-#endif
-
- uint64_t alpha = ((uint64_t)alphahi << 32) | alphalo;
- uint64_t alpha0 = alpha & 0xff;
- alpha >>= 8;
- uint64_t alpha1 = alpha & 0xff;
- alpha >>= 8;
-
- if (alpha0 != prev_alpha0 || alpha1 != prev_alpha1) {
- prev_alpha0 = alpha0;
- prev_alpha1 = alpha1;
-
- a[0] = alpha0;
- a[1] = alpha1;
- int a01 = alpha0 + alpha1 - 1;
- if (alpha0 > alpha1) {
- a[2] = div7(6*alpha0 + alpha1);
- a[4] = div7(4*alpha0 + 3*alpha1);
- a[6] = div7(2*alpha0 + 5*alpha1);
-
- // Use symmetry to derive half of the values
- // A few values will be off by 1 (~.5%)
- // Alternate which values are computed directly
- // and which are derived to try to reduce bias
- a[3] = a01 - a[6];
- a[5] = a01 - a[4];
- a[7] = a01 - a[2];
- } else {
- a[2] = div5(4*alpha0 + alpha1);
- a[4] = div5(2*alpha0 + 3*alpha1);
- a[3] = a01 - a[4];
- a[5] = a01 - a[2];
- a[6] = 0x00;
- a[7] = 0xff;
- }
- }
-
- // Raw colors
- uint16_t color0 = colors & 0xffff;
- uint16_t color1 = colors >> 16;
-
- // If the new block has the same base colors as the
- // previous one, we don't need to recompute the color
- // table c[]
- if (color0 != prev_color0 || color1 != prev_color1) {
- // Store raw colors for comparison with next block
- prev_color0 = color0;
- prev_color1 = color1;
-
- int bbits = bits >> 1;
- bool has2 = ((bbits & ~bits) & 0x55555555) != 0;
- bool has3 = ((bbits & bits) & 0x55555555) != 0;
-
- if (has2 || has3) {
- int r0 = red(color0);
- int g0 = green(color0);
- int b0 = blue(color0);
-
- int r1 = red(color1);
- int g1 = green(color1);
- int b1 = blue(color1);
-
- int r2 = avg23(r0, r1);
- int g2 = avg23(g0, g1);
- int b2 = avg23(b0, b1);
-
- int r3 = avg23(r1, r0);
- int g3 = avg23(g1, g0);
- int b3 = avg23(b1, b0);
-
- c[0] = rgb565SepTo888(r0, g0, b0);
- c[1] = rgb565SepTo888(r1, g1, b1);
- c[2] = rgb565SepTo888(r2, g2, b2);
- c[3] = rgb565SepTo888(r3, g3, b3);
- } else {
- // Convert to 8 bits
- c[0] = rgb565To888(color0);
- c[1] = rgb565To888(color1);
- }
- }
-
- uint32_t* blockRowPtr = blockPtr;
- for (int y = 0; y < 4; y++, blockRowPtr += stride) {
- // Don't process rows past the botom
- if (base_y + y >= height) {
- break;
- }
-
- int w = min(width - base_x, 4);
- for (int x = 0; x < w; x++) {
- int acode = alpha & 0x7;
- alpha >>= 3;
-
- int code = bits & 0x3;
- bits >>= 2;
-
- blockRowPtr[x] = c[code] | (a[acode] << 24);
- }
- }
- }
- }
-}
-
-/*
- * Decode a DXT-compressed texture into memory. DXT textures consist of
- * a series of 4x4 pixel blocks in left-to-right, top-down order.
- * The number of blocks is given by ceil(width/4)*ceil(height/4).
- *
- * 'data' points to the texture data. 'width' and 'height' indicate the
- * dimensions of the texture. We assume width and height are >= 0 but
- * do not require them to be powers of 2 or divisible by any factor.
- *
- * The output is written to 'surface' with each scanline separated by
- * 'stride' 2- or 4-byte words.
- *
- * 'format' indicates the type of compression and must be one of the following:
- *
- * GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- * The output is written as 5/6/5 opaque RGB (16 bit words).
- * 8 bytes are read from 'data' for each block.
- *
- * GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
- * The output is written as 5/5/5/1 RGBA (16 bit words)
- * 8 bytes are read from 'data' for each block.
- *
- * GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
- * GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
- * The output is written as 8/8/8/8 ARGB (32 bit words)
- * 16 bytes are read from 'data' for each block.
- */
-void
-decodeDXT(const GLvoid *data, int width, int height,
- void *surface, int stride, int format)
-{
-#if TIMING
- struct timeval start_t, end_t;
- struct timezone tz;
-
- gettimeofday(&start_t, &tz);
-#endif
-
- switch (format) {
- case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
- decodeDXT1(data, width, height, surface, stride, false);
- break;
-
- case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
- decodeDXT1(data, width, height, surface, stride, true);
- break;
-
- case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
- decodeDXT3(data, width, height, surface, stride);
- break;
-
- case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
- decodeDXT5(data, width, height, surface, stride);
- break;
- }
-
-#if TIMING
- gettimeofday(&end_t, &tz);
- long usec = (end_t.tv_sec - start_t.tv_sec)*1000000 +
- (end_t.tv_usec - start_t.tv_usec);
-
- printf("Loaded w=%d h=%d in %ld usec\n", width, height, usec);
-#endif
-}
-
-} // namespace android
diff --git a/opengl/libagl/dxt.h b/opengl/libagl/dxt.h
deleted file mode 100644
index d95a36c..0000000
--- a/opengl/libagl/dxt.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* libs/opengles/dxt.h
-**
-** Copyright 2007, 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 ANDROID_OPENGLES_TEXTURE_H
-#define ANDROID_OPENGLES_TEXTURE_H
-
-#include <stdlib.h>
-
-#include <GLES/gl.h>
-
-namespace android {
-
- bool DXT1HasAlpha(const GLvoid *data, int width, int height);
- void decodeDXT(const GLvoid *data, int width, int height,
- void *surface, int stride, int format);
-
-} // namespace android
-
-#endif // ANDROID_OPENGLES_TEXTURE_H
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
deleted file mode 100644
index 92d32a2..0000000
--- a/opengl/libagl/egl.cpp
+++ /dev/null
@@ -1,2079 +0,0 @@
-/*
-**
-** Copyright 2007 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 <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-
-#include <cutils/log.h>
-#include <cutils/atomic.h>
-
-#include <utils/threads.h>
-#include <ui/ANativeObjectBase.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <pixelflinger/format.h>
-#include <pixelflinger/pixelflinger.h>
-
-#include "context.h"
-#include "state.h"
-#include "texture.h"
-#include "matrix.h"
-
-#undef NELEM
-#define NELEM(x) (sizeof(x)/sizeof(*(x)))
-
-// ----------------------------------------------------------------------------
-
-EGLBoolean EGLAPI eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
- EGLint left, EGLint top, EGLint width, EGLint height);
-
-// ----------------------------------------------------------------------------
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-const unsigned int NUM_DISPLAYS = 1;
-
-static pthread_mutex_t gInitMutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t gErrorKeyMutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_key_t gEGLErrorKey = -1;
-#ifndef HAVE_ANDROID_OS
-namespace gl {
-pthread_key_t gGLKey = -1;
-}; // namespace gl
-#endif
-
-template<typename T>
-static T setError(GLint error, T returnValue) {
- if (ggl_unlikely(gEGLErrorKey == -1)) {
- pthread_mutex_lock(&gErrorKeyMutex);
- if (gEGLErrorKey == -1)
- pthread_key_create(&gEGLErrorKey, NULL);
- pthread_mutex_unlock(&gErrorKeyMutex);
- }
- pthread_setspecific(gEGLErrorKey, (void*)error);
- return returnValue;
-}
-
-static GLint getError() {
- if (ggl_unlikely(gEGLErrorKey == -1))
- return EGL_SUCCESS;
- GLint error = (GLint)pthread_getspecific(gEGLErrorKey);
- if (error == 0) {
- // The TLS key has been created by another thread, but the value for
- // this thread has not been initialized.
- return EGL_SUCCESS;
- }
- pthread_setspecific(gEGLErrorKey, (void*)EGL_SUCCESS);
- return error;
-}
-
-// ----------------------------------------------------------------------------
-
-struct egl_display_t
-{
- egl_display_t() : type(0), initialized(0) { }
-
- static egl_display_t& get_display(EGLDisplay dpy);
-
- static EGLBoolean is_valid(EGLDisplay dpy) {
- return ((uintptr_t(dpy)-1U) >= NUM_DISPLAYS) ? EGL_FALSE : EGL_TRUE;
- }
-
- NativeDisplayType type;
- volatile int32_t initialized;
-};
-
-static egl_display_t gDisplays[NUM_DISPLAYS];
-
-egl_display_t& egl_display_t::get_display(EGLDisplay dpy) {
- return gDisplays[uintptr_t(dpy)-1U];
-}
-
-struct egl_context_t {
- enum {
- IS_CURRENT = 0x00010000,
- NEVER_CURRENT = 0x00020000
- };
- uint32_t flags;
- EGLDisplay dpy;
- EGLConfig config;
- EGLSurface read;
- EGLSurface draw;
-
- static inline egl_context_t* context(EGLContext ctx) {
- ogles_context_t* const gl = static_cast<ogles_context_t*>(ctx);
- return static_cast<egl_context_t*>(gl->rasterizer.base);
- }
-};
-
-// ----------------------------------------------------------------------------
-
-struct egl_surface_t
-{
- enum {
- PAGE_FLIP = 0x00000001,
- MAGIC = 0x31415265
- };
-
- uint32_t magic;
- EGLDisplay dpy;
- EGLConfig config;
- EGLContext ctx;
-
- egl_surface_t(EGLDisplay dpy, EGLConfig config, int32_t depthFormat);
- virtual ~egl_surface_t();
- bool isValid() const;
- virtual bool initCheck() const = 0;
-
- virtual EGLBoolean bindDrawSurface(ogles_context_t* gl) = 0;
- virtual EGLBoolean bindReadSurface(ogles_context_t* gl) = 0;
- virtual EGLBoolean connect() { return EGL_TRUE; }
- virtual void disconnect() {}
- virtual EGLint getWidth() const = 0;
- virtual EGLint getHeight() const = 0;
-
- virtual EGLint getHorizontalResolution() const;
- virtual EGLint getVerticalResolution() const;
- virtual EGLint getRefreshRate() const;
- virtual EGLint getSwapBehavior() const;
- virtual EGLBoolean swapBuffers();
- virtual EGLBoolean setSwapRectangle(EGLint l, EGLint t, EGLint w, EGLint h);
-protected:
- GGLSurface depth;
-};
-
-egl_surface_t::egl_surface_t(EGLDisplay dpy,
- EGLConfig config,
- int32_t depthFormat)
- : magic(MAGIC), dpy(dpy), config(config), ctx(0)
-{
- depth.version = sizeof(GGLSurface);
- depth.data = 0;
- depth.format = depthFormat;
-}
-egl_surface_t::~egl_surface_t()
-{
- magic = 0;
- free(depth.data);
-}
-bool egl_surface_t::isValid() const {
- ALOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this);
- return magic == MAGIC;
-}
-
-EGLBoolean egl_surface_t::swapBuffers() {
- return EGL_FALSE;
-}
-EGLint egl_surface_t::getHorizontalResolution() const {
- return (0 * EGL_DISPLAY_SCALING) * (1.0f / 25.4f);
-}
-EGLint egl_surface_t::getVerticalResolution() const {
- return (0 * EGL_DISPLAY_SCALING) * (1.0f / 25.4f);
-}
-EGLint egl_surface_t::getRefreshRate() const {
- return (60 * EGL_DISPLAY_SCALING);
-}
-EGLint egl_surface_t::getSwapBehavior() const {
- return EGL_BUFFER_PRESERVED;
-}
-EGLBoolean egl_surface_t::setSwapRectangle(
- EGLint l, EGLint t, EGLint w, EGLint h)
-{
- return EGL_FALSE;
-}
-
-// ----------------------------------------------------------------------------
-
-struct egl_window_surface_v2_t : public egl_surface_t
-{
- egl_window_surface_v2_t(
- EGLDisplay dpy, EGLConfig config,
- int32_t depthFormat,
- ANativeWindow* window);
-
- ~egl_window_surface_v2_t();
-
- virtual bool initCheck() const { return true; } // TODO: report failure if ctor fails
- virtual EGLBoolean swapBuffers();
- virtual EGLBoolean bindDrawSurface(ogles_context_t* gl);
- virtual EGLBoolean bindReadSurface(ogles_context_t* gl);
- virtual EGLBoolean connect();
- virtual void disconnect();
- virtual EGLint getWidth() const { return width; }
- virtual EGLint getHeight() const { return height; }
- virtual EGLint getHorizontalResolution() const;
- virtual EGLint getVerticalResolution() const;
- virtual EGLint getRefreshRate() const;
- virtual EGLint getSwapBehavior() const;
- virtual EGLBoolean setSwapRectangle(EGLint l, EGLint t, EGLint w, EGLint h);
-
-private:
- status_t lock(ANativeWindowBuffer* buf, int usage, void** vaddr);
- status_t unlock(ANativeWindowBuffer* buf);
- ANativeWindow* nativeWindow;
- ANativeWindowBuffer* buffer;
- ANativeWindowBuffer* previousBuffer;
- gralloc_module_t const* module;
- int width;
- int height;
- void* bits;
- GGLFormat const* pixelFormatTable;
-
- struct Rect {
- inline Rect() { };
- inline Rect(int32_t w, int32_t h)
- : left(0), top(0), right(w), bottom(h) { }
- inline Rect(int32_t l, int32_t t, int32_t r, int32_t b)
- : left(l), top(t), right(r), bottom(b) { }
- Rect& andSelf(const Rect& r) {
- left = max(left, r.left);
- top = max(top, r.top);
- right = min(right, r.right);
- bottom = min(bottom, r.bottom);
- return *this;
- }
- bool isEmpty() const {
- return (left>=right || top>=bottom);
- }
- void dump(char const* what) {
- ALOGD("%s { %5d, %5d, w=%5d, h=%5d }",
- what, left, top, right-left, bottom-top);
- }
-
- int32_t left;
- int32_t top;
- int32_t right;
- int32_t bottom;
- };
-
- struct Region {
- inline Region() : count(0) { }
- typedef Rect const* const_iterator;
- const_iterator begin() const { return storage; }
- const_iterator end() const { return storage+count; }
- static Region subtract(const Rect& lhs, const Rect& rhs) {
- Region reg;
- Rect* storage = reg.storage;
- if (!lhs.isEmpty()) {
- if (lhs.top < rhs.top) { // top rect
- storage->left = lhs.left;
- storage->top = lhs.top;
- storage->right = lhs.right;
- storage->bottom = rhs.top;
- storage++;
- }
- const int32_t top = max(lhs.top, rhs.top);
- const int32_t bot = min(lhs.bottom, rhs.bottom);
- if (top < bot) {
- if (lhs.left < rhs.left) { // left-side rect
- storage->left = lhs.left;
- storage->top = top;
- storage->right = rhs.left;
- storage->bottom = bot;
- storage++;
- }
- if (lhs.right > rhs.right) { // right-side rect
- storage->left = rhs.right;
- storage->top = top;
- storage->right = lhs.right;
- storage->bottom = bot;
- storage++;
- }
- }
- if (lhs.bottom > rhs.bottom) { // bottom rect
- storage->left = lhs.left;
- storage->top = rhs.bottom;
- storage->right = lhs.right;
- storage->bottom = lhs.bottom;
- storage++;
- }
- reg.count = storage - reg.storage;
- }
- return reg;
- }
- bool isEmpty() const {
- return count<=0;
- }
- private:
- Rect storage[4];
- ssize_t count;
- };
-
- void copyBlt(
- ANativeWindowBuffer* dst, void* dst_vaddr,
- ANativeWindowBuffer* src, void const* src_vaddr,
- const Region& clip);
-
- Rect dirtyRegion;
- Rect oldDirtyRegion;
-};
-
-egl_window_surface_v2_t::egl_window_surface_v2_t(EGLDisplay dpy,
- EGLConfig config,
- int32_t depthFormat,
- ANativeWindow* window)
- : egl_surface_t(dpy, config, depthFormat),
- nativeWindow(window), buffer(0), previousBuffer(0), module(0),
- bits(NULL)
-{
- hw_module_t const* pModule;
- hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &pModule);
- module = reinterpret_cast<gralloc_module_t const*>(pModule);
-
- pixelFormatTable = gglGetPixelFormatTable();
-
- // keep a reference on the window
- nativeWindow->common.incRef(&nativeWindow->common);
- nativeWindow->query(nativeWindow, NATIVE_WINDOW_WIDTH, &width);
- nativeWindow->query(nativeWindow, NATIVE_WINDOW_HEIGHT, &height);
-}
-
-egl_window_surface_v2_t::~egl_window_surface_v2_t() {
- if (buffer) {
- buffer->common.decRef(&buffer->common);
- }
- if (previousBuffer) {
- previousBuffer->common.decRef(&previousBuffer->common);
- }
- nativeWindow->common.decRef(&nativeWindow->common);
-}
-
-EGLBoolean egl_window_surface_v2_t::connect()
-{
- // we're intending to do software rendering
- native_window_set_usage(nativeWindow,
- GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN);
-
- // dequeue a buffer
- if (nativeWindow->dequeueBuffer(nativeWindow, &buffer) != NO_ERROR) {
- return setError(EGL_BAD_ALLOC, EGL_FALSE);
- }
-
- // allocate a corresponding depth-buffer
- width = buffer->width;
- height = buffer->height;
- if (depth.format) {
- depth.width = width;
- depth.height = height;
- depth.stride = depth.width; // use the width here
- depth.data = (GGLubyte*)malloc(depth.stride*depth.height*2);
- if (depth.data == 0) {
- return setError(EGL_BAD_ALLOC, EGL_FALSE);
- }
- }
-
- // keep a reference on the buffer
- buffer->common.incRef(&buffer->common);
-
- // Lock the buffer
- nativeWindow->lockBuffer(nativeWindow, buffer);
- // pin the buffer down
- if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |
- GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) {
- ALOGE("connect() failed to lock buffer %p (%ux%u)",
- buffer, buffer->width, buffer->height);
- return setError(EGL_BAD_ACCESS, EGL_FALSE);
- // FIXME: we should make sure we're not accessing the buffer anymore
- }
- return EGL_TRUE;
-}
-
-void egl_window_surface_v2_t::disconnect()
-{
- if (buffer && bits) {
- bits = NULL;
- unlock(buffer);
- }
- // enqueue the last frame
- nativeWindow->queueBuffer(nativeWindow, buffer);
- if (buffer) {
- buffer->common.decRef(&buffer->common);
- buffer = 0;
- }
- if (previousBuffer) {
- previousBuffer->common.decRef(&previousBuffer->common);
- previousBuffer = 0;
- }
-}
-
-status_t egl_window_surface_v2_t::lock(
- ANativeWindowBuffer* buf, int usage, void** vaddr)
-{
- int err;
-
- err = module->lock(module, buf->handle,
- usage, 0, 0, buf->width, buf->height, vaddr);
-
- return err;
-}
-
-status_t egl_window_surface_v2_t::unlock(ANativeWindowBuffer* buf)
-{
- if (!buf) return BAD_VALUE;
- int err = NO_ERROR;
-
- err = module->unlock(module, buf->handle);
-
- return err;
-}
-
-void egl_window_surface_v2_t::copyBlt(
- ANativeWindowBuffer* dst, void* dst_vaddr,
- ANativeWindowBuffer* src, void const* src_vaddr,
- const Region& clip)
-{
- // NOTE: dst and src must be the same format
-
- Region::const_iterator cur = clip.begin();
- Region::const_iterator end = clip.end();
-
- const size_t bpp = pixelFormatTable[src->format].size;
- const size_t dbpr = dst->stride * bpp;
- const size_t sbpr = src->stride * bpp;
-
- uint8_t const * const src_bits = (uint8_t const *)src_vaddr;
- uint8_t * const dst_bits = (uint8_t *)dst_vaddr;
-
- while (cur != end) {
- const Rect& r(*cur++);
- ssize_t w = r.right - r.left;
- ssize_t h = r.bottom - r.top;
- if (w <= 0 || h<=0) continue;
- size_t size = w * bpp;
- uint8_t const * s = src_bits + (r.left + src->stride * r.top) * bpp;
- uint8_t * d = dst_bits + (r.left + dst->stride * r.top) * bpp;
- if (dbpr==sbpr && size==sbpr) {
- size *= h;
- h = 1;
- }
- do {
- memcpy(d, s, size);
- d += dbpr;
- s += sbpr;
- } while (--h > 0);
- }
-}
-
-EGLBoolean egl_window_surface_v2_t::swapBuffers()
-{
- if (!buffer) {
- return setError(EGL_BAD_ACCESS, EGL_FALSE);
- }
-
- /*
- * Handle eglSetSwapRectangleANDROID()
- * We copyback from the front buffer
- */
- if (!dirtyRegion.isEmpty()) {
- dirtyRegion.andSelf(Rect(buffer->width, buffer->height));
- if (previousBuffer) {
- // This was const Region copyBack, but that causes an
- // internal compile error on simulator builds
- /*const*/ Region copyBack(Region::subtract(oldDirtyRegion, dirtyRegion));
- if (!copyBack.isEmpty()) {
- void* prevBits;
- if (lock(previousBuffer,
- GRALLOC_USAGE_SW_READ_OFTEN, &prevBits) == NO_ERROR) {
- // copy from previousBuffer to buffer
- copyBlt(buffer, bits, previousBuffer, prevBits, copyBack);
- unlock(previousBuffer);
- }
- }
- }
- oldDirtyRegion = dirtyRegion;
- }
-
- if (previousBuffer) {
- previousBuffer->common.decRef(&previousBuffer->common);
- previousBuffer = 0;
- }
-
- unlock(buffer);
- previousBuffer = buffer;
- nativeWindow->queueBuffer(nativeWindow, buffer);
- buffer = 0;
-
- // dequeue a new buffer
- if (nativeWindow->dequeueBuffer(nativeWindow, &buffer) == NO_ERROR) {
-
- // TODO: lockBuffer should rather be executed when the very first
- // direct rendering occurs.
- nativeWindow->lockBuffer(nativeWindow, buffer);
-
- // reallocate the depth-buffer if needed
- if ((width != buffer->width) || (height != buffer->height)) {
- // TODO: we probably should reset the swap rect here
- // if the window size has changed
- width = buffer->width;
- height = buffer->height;
- if (depth.data) {
- free(depth.data);
- depth.width = width;
- depth.height = height;
- depth.stride = buffer->stride;
- depth.data = (GGLubyte*)malloc(depth.stride*depth.height*2);
- if (depth.data == 0) {
- setError(EGL_BAD_ALLOC, EGL_FALSE);
- return EGL_FALSE;
- }
- }
- }
-
- // keep a reference on the buffer
- buffer->common.incRef(&buffer->common);
-
- // finally pin the buffer down
- if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |
- GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) {
- ALOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)",
- buffer, buffer->width, buffer->height);
- return setError(EGL_BAD_ACCESS, EGL_FALSE);
- // FIXME: we should make sure we're not accessing the buffer anymore
- }
- } else {
- return setError(EGL_BAD_CURRENT_SURFACE, EGL_FALSE);
- }
-
- return EGL_TRUE;
-}
-
-EGLBoolean egl_window_surface_v2_t::setSwapRectangle(
- EGLint l, EGLint t, EGLint w, EGLint h)
-{
- dirtyRegion = Rect(l, t, l+w, t+h);
- return EGL_TRUE;
-}
-
-EGLBoolean egl_window_surface_v2_t::bindDrawSurface(ogles_context_t* gl)
-{
- GGLSurface buffer;
- buffer.version = sizeof(GGLSurface);
- buffer.width = this->buffer->width;
- buffer.height = this->buffer->height;
- buffer.stride = this->buffer->stride;
- buffer.data = (GGLubyte*)bits;
- buffer.format = this->buffer->format;
- gl->rasterizer.procs.colorBuffer(gl, &buffer);
- if (depth.data != gl->rasterizer.state.buffers.depth.data)
- gl->rasterizer.procs.depthBuffer(gl, &depth);
-
- return EGL_TRUE;
-}
-EGLBoolean egl_window_surface_v2_t::bindReadSurface(ogles_context_t* gl)
-{
- GGLSurface buffer;
- buffer.version = sizeof(GGLSurface);
- buffer.width = this->buffer->width;
- buffer.height = this->buffer->height;
- buffer.stride = this->buffer->stride;
- buffer.data = (GGLubyte*)bits; // FIXME: hopefully is is LOCKED!!!
- buffer.format = this->buffer->format;
- gl->rasterizer.procs.readBuffer(gl, &buffer);
- return EGL_TRUE;
-}
-EGLint egl_window_surface_v2_t::getHorizontalResolution() const {
- return (nativeWindow->xdpi * EGL_DISPLAY_SCALING) * (1.0f / 25.4f);
-}
-EGLint egl_window_surface_v2_t::getVerticalResolution() const {
- return (nativeWindow->ydpi * EGL_DISPLAY_SCALING) * (1.0f / 25.4f);
-}
-EGLint egl_window_surface_v2_t::getRefreshRate() const {
- return (60 * EGL_DISPLAY_SCALING); // FIXME
-}
-EGLint egl_window_surface_v2_t::getSwapBehavior() const
-{
- /*
- * EGL_BUFFER_PRESERVED means that eglSwapBuffers() completely preserves
- * the content of the swapped buffer.
- *
- * EGL_BUFFER_DESTROYED means that the content of the buffer is lost.
- *
- * However when ANDROID_swap_retcangle is supported, EGL_BUFFER_DESTROYED
- * only applies to the area specified by eglSetSwapRectangleANDROID(), that
- * is, everything outside of this area is preserved.
- *
- * This implementation of EGL assumes the later case.
- *
- */
-
- return EGL_BUFFER_DESTROYED;
-}
-
-// ----------------------------------------------------------------------------
-
-struct egl_pixmap_surface_t : public egl_surface_t
-{
- egl_pixmap_surface_t(
- EGLDisplay dpy, EGLConfig config,
- int32_t depthFormat,
- egl_native_pixmap_t const * pixmap);
-
- virtual ~egl_pixmap_surface_t() { }
-
- virtual bool initCheck() const { return !depth.format || depth.data!=0; }
- virtual EGLBoolean bindDrawSurface(ogles_context_t* gl);
- virtual EGLBoolean bindReadSurface(ogles_context_t* gl);
- virtual EGLint getWidth() const { return nativePixmap.width; }
- virtual EGLint getHeight() const { return nativePixmap.height; }
-private:
- egl_native_pixmap_t nativePixmap;
-};
-
-egl_pixmap_surface_t::egl_pixmap_surface_t(EGLDisplay dpy,
- EGLConfig config,
- int32_t depthFormat,
- egl_native_pixmap_t const * pixmap)
- : egl_surface_t(dpy, config, depthFormat), nativePixmap(*pixmap)
-{
- if (depthFormat) {
- depth.width = pixmap->width;
- depth.height = pixmap->height;
- depth.stride = depth.width; // use the width here
- depth.data = (GGLubyte*)malloc(depth.stride*depth.height*2);
- if (depth.data == 0) {
- setError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
- }
- }
-}
-EGLBoolean egl_pixmap_surface_t::bindDrawSurface(ogles_context_t* gl)
-{
- GGLSurface buffer;
- buffer.version = sizeof(GGLSurface);
- buffer.width = nativePixmap.width;
- buffer.height = nativePixmap.height;
- buffer.stride = nativePixmap.stride;
- buffer.data = nativePixmap.data;
- buffer.format = nativePixmap.format;
-
- gl->rasterizer.procs.colorBuffer(gl, &buffer);
- if (depth.data != gl->rasterizer.state.buffers.depth.data)
- gl->rasterizer.procs.depthBuffer(gl, &depth);
- return EGL_TRUE;
-}
-EGLBoolean egl_pixmap_surface_t::bindReadSurface(ogles_context_t* gl)
-{
- GGLSurface buffer;
- buffer.version = sizeof(GGLSurface);
- buffer.width = nativePixmap.width;
- buffer.height = nativePixmap.height;
- buffer.stride = nativePixmap.stride;
- buffer.data = nativePixmap.data;
- buffer.format = nativePixmap.format;
- gl->rasterizer.procs.readBuffer(gl, &buffer);
- return EGL_TRUE;
-}
-
-// ----------------------------------------------------------------------------
-
-struct egl_pbuffer_surface_t : public egl_surface_t
-{
- egl_pbuffer_surface_t(
- EGLDisplay dpy, EGLConfig config, int32_t depthFormat,
- int32_t w, int32_t h, int32_t f);
-
- virtual ~egl_pbuffer_surface_t();
-
- virtual bool initCheck() const { return pbuffer.data != 0; }
- virtual EGLBoolean bindDrawSurface(ogles_context_t* gl);
- virtual EGLBoolean bindReadSurface(ogles_context_t* gl);
- virtual EGLint getWidth() const { return pbuffer.width; }
- virtual EGLint getHeight() const { return pbuffer.height; }
-private:
- GGLSurface pbuffer;
-};
-
-egl_pbuffer_surface_t::egl_pbuffer_surface_t(EGLDisplay dpy,
- EGLConfig config, int32_t depthFormat,
- int32_t w, int32_t h, int32_t f)
- : egl_surface_t(dpy, config, depthFormat)
-{
- size_t size = w*h;
- switch (f) {
- case GGL_PIXEL_FORMAT_A_8: size *= 1; break;
- case GGL_PIXEL_FORMAT_RGB_565: size *= 2; break;
- case GGL_PIXEL_FORMAT_RGBA_8888: size *= 4; break;
- case GGL_PIXEL_FORMAT_RGBX_8888: size *= 4; break;
- default:
- ALOGE("incompatible pixel format for pbuffer (format=%d)", f);
- pbuffer.data = 0;
- break;
- }
- pbuffer.version = sizeof(GGLSurface);
- pbuffer.width = w;
- pbuffer.height = h;
- pbuffer.stride = w;
- pbuffer.data = (GGLubyte*)malloc(size);
- pbuffer.format = f;
-
- if (depthFormat) {
- depth.width = pbuffer.width;
- depth.height = pbuffer.height;
- depth.stride = depth.width; // use the width here
- depth.data = (GGLubyte*)malloc(depth.stride*depth.height*2);
- if (depth.data == 0) {
- setError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
- return;
- }
- }
-}
-egl_pbuffer_surface_t::~egl_pbuffer_surface_t() {
- free(pbuffer.data);
-}
-EGLBoolean egl_pbuffer_surface_t::bindDrawSurface(ogles_context_t* gl)
-{
- gl->rasterizer.procs.colorBuffer(gl, &pbuffer);
- if (depth.data != gl->rasterizer.state.buffers.depth.data)
- gl->rasterizer.procs.depthBuffer(gl, &depth);
- return EGL_TRUE;
-}
-EGLBoolean egl_pbuffer_surface_t::bindReadSurface(ogles_context_t* gl)
-{
- gl->rasterizer.procs.readBuffer(gl, &pbuffer);
- return EGL_TRUE;
-}
-
-// ----------------------------------------------------------------------------
-
-struct config_pair_t {
- GLint key;
- GLint value;
-};
-
-struct configs_t {
- const config_pair_t* array;
- int size;
-};
-
-struct config_management_t {
- GLint key;
- bool (*match)(GLint reqValue, GLint confValue);
- static bool atLeast(GLint reqValue, GLint confValue) {
- return (reqValue == EGL_DONT_CARE) || (confValue >= reqValue);
- }
- static bool exact(GLint reqValue, GLint confValue) {
- return (reqValue == EGL_DONT_CARE) || (confValue == reqValue);
- }
- static bool mask(GLint reqValue, GLint confValue) {
- return (confValue & reqValue) == reqValue;
- }
- static bool ignore(GLint reqValue, GLint confValue) {
- return true;
- }
-};
-
-// ----------------------------------------------------------------------------
-
-#define VERSION_MAJOR 1
-#define VERSION_MINOR 2
-static char const * const gVendorString = "Google Inc.";
-static char const * const gVersionString = "1.2 Android Driver 1.2.0";
-static char const * const gClientApiString = "OpenGL ES";
-static char const * const gExtensionsString =
- "EGL_KHR_image_base "
- // "KHR_image_pixmap "
- "EGL_ANDROID_image_native_buffer "
- "EGL_ANDROID_swap_rectangle "
- ;
-
-// ----------------------------------------------------------------------------
-
-struct extention_map_t {
- const char * const name;
- __eglMustCastToProperFunctionPointerType address;
-};
-
-static const extention_map_t gExtentionMap[] = {
- { "glDrawTexsOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexsOES },
- { "glDrawTexiOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexiOES },
- { "glDrawTexfOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexfOES },
- { "glDrawTexxOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexxOES },
- { "glDrawTexsvOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexsvOES },
- { "glDrawTexivOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexivOES },
- { "glDrawTexfvOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexfvOES },
- { "glDrawTexxvOES",
- (__eglMustCastToProperFunctionPointerType)&glDrawTexxvOES },
- { "glQueryMatrixxOES",
- (__eglMustCastToProperFunctionPointerType)&glQueryMatrixxOES },
- { "glEGLImageTargetTexture2DOES",
- (__eglMustCastToProperFunctionPointerType)&glEGLImageTargetTexture2DOES },
- { "glEGLImageTargetRenderbufferStorageOES",
- (__eglMustCastToProperFunctionPointerType)&glEGLImageTargetRenderbufferStorageOES },
- { "glClipPlanef",
- (__eglMustCastToProperFunctionPointerType)&glClipPlanef },
- { "glClipPlanex",
- (__eglMustCastToProperFunctionPointerType)&glClipPlanex },
- { "glBindBuffer",
- (__eglMustCastToProperFunctionPointerType)&glBindBuffer },
- { "glBufferData",
- (__eglMustCastToProperFunctionPointerType)&glBufferData },
- { "glBufferSubData",
- (__eglMustCastToProperFunctionPointerType)&glBufferSubData },
- { "glDeleteBuffers",
- (__eglMustCastToProperFunctionPointerType)&glDeleteBuffers },
- { "glGenBuffers",
- (__eglMustCastToProperFunctionPointerType)&glGenBuffers },
- { "eglCreateImageKHR",
- (__eglMustCastToProperFunctionPointerType)&eglCreateImageKHR },
- { "eglDestroyImageKHR",
- (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR },
- { "eglSetSwapRectangleANDROID",
- (__eglMustCastToProperFunctionPointerType)&eglSetSwapRectangleANDROID },
-};
-
-/*
- * In the lists below, attributes names MUST be sorted.
- * Additionally, all configs must be sorted according to
- * the EGL specification.
- */
-
-static config_pair_t const config_base_attribute_list[] = {
- { EGL_STENCIL_SIZE, 0 },
- { EGL_CONFIG_CAVEAT, EGL_SLOW_CONFIG },
- { EGL_LEVEL, 0 },
- { EGL_MAX_PBUFFER_HEIGHT, GGL_MAX_VIEWPORT_DIMS },
- { EGL_MAX_PBUFFER_PIXELS,
- GGL_MAX_VIEWPORT_DIMS*GGL_MAX_VIEWPORT_DIMS },
- { EGL_MAX_PBUFFER_WIDTH, GGL_MAX_VIEWPORT_DIMS },
- { EGL_NATIVE_RENDERABLE, EGL_TRUE },
- { EGL_NATIVE_VISUAL_ID, 0 },
- { EGL_NATIVE_VISUAL_TYPE, GGL_PIXEL_FORMAT_RGB_565 },
- { EGL_SAMPLES, 0 },
- { EGL_SAMPLE_BUFFERS, 0 },
- { EGL_TRANSPARENT_TYPE, EGL_NONE },
- { EGL_TRANSPARENT_BLUE_VALUE, 0 },
- { EGL_TRANSPARENT_GREEN_VALUE, 0 },
- { EGL_TRANSPARENT_RED_VALUE, 0 },
- { EGL_BIND_TO_TEXTURE_RGBA, EGL_FALSE },
- { EGL_BIND_TO_TEXTURE_RGB, EGL_FALSE },
- { EGL_MIN_SWAP_INTERVAL, 1 },
- { EGL_MAX_SWAP_INTERVAL, 1 },
- { EGL_LUMINANCE_SIZE, 0 },
- { EGL_ALPHA_MASK_SIZE, 0 },
- { EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER },
- { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT },
- { EGL_CONFORMANT, 0 }
-};
-
-// These configs can override the base attribute list
-// NOTE: when adding a config here, don't forget to update eglCreate*Surface()
-
-// 565 configs
-static config_pair_t const config_0_attribute_list[] = {
- { EGL_BUFFER_SIZE, 16 },
- { EGL_ALPHA_SIZE, 0 },
- { EGL_BLUE_SIZE, 5 },
- { EGL_GREEN_SIZE, 6 },
- { EGL_RED_SIZE, 5 },
- { EGL_DEPTH_SIZE, 0 },
- { EGL_CONFIG_ID, 0 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_RGB_565 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-static config_pair_t const config_1_attribute_list[] = {
- { EGL_BUFFER_SIZE, 16 },
- { EGL_ALPHA_SIZE, 0 },
- { EGL_BLUE_SIZE, 5 },
- { EGL_GREEN_SIZE, 6 },
- { EGL_RED_SIZE, 5 },
- { EGL_DEPTH_SIZE, 16 },
- { EGL_CONFIG_ID, 1 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_RGB_565 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-// RGB 888 configs
-static config_pair_t const config_2_attribute_list[] = {
- { EGL_BUFFER_SIZE, 32 },
- { EGL_ALPHA_SIZE, 0 },
- { EGL_BLUE_SIZE, 8 },
- { EGL_GREEN_SIZE, 8 },
- { EGL_RED_SIZE, 8 },
- { EGL_DEPTH_SIZE, 0 },
- { EGL_CONFIG_ID, 6 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_RGBX_8888 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-static config_pair_t const config_3_attribute_list[] = {
- { EGL_BUFFER_SIZE, 32 },
- { EGL_ALPHA_SIZE, 0 },
- { EGL_BLUE_SIZE, 8 },
- { EGL_GREEN_SIZE, 8 },
- { EGL_RED_SIZE, 8 },
- { EGL_DEPTH_SIZE, 16 },
- { EGL_CONFIG_ID, 7 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_RGBX_8888 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-// 8888 configs
-static config_pair_t const config_4_attribute_list[] = {
- { EGL_BUFFER_SIZE, 32 },
- { EGL_ALPHA_SIZE, 8 },
- { EGL_BLUE_SIZE, 8 },
- { EGL_GREEN_SIZE, 8 },
- { EGL_RED_SIZE, 8 },
- { EGL_DEPTH_SIZE, 0 },
- { EGL_CONFIG_ID, 2 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_RGBA_8888 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-static config_pair_t const config_5_attribute_list[] = {
- { EGL_BUFFER_SIZE, 32 },
- { EGL_ALPHA_SIZE, 8 },
- { EGL_BLUE_SIZE, 8 },
- { EGL_GREEN_SIZE, 8 },
- { EGL_RED_SIZE, 8 },
- { EGL_DEPTH_SIZE, 16 },
- { EGL_CONFIG_ID, 3 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_RGBA_8888 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-// A8 configs
-static config_pair_t const config_6_attribute_list[] = {
- { EGL_BUFFER_SIZE, 8 },
- { EGL_ALPHA_SIZE, 8 },
- { EGL_BLUE_SIZE, 0 },
- { EGL_GREEN_SIZE, 0 },
- { EGL_RED_SIZE, 0 },
- { EGL_DEPTH_SIZE, 0 },
- { EGL_CONFIG_ID, 4 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_A_8 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-static config_pair_t const config_7_attribute_list[] = {
- { EGL_BUFFER_SIZE, 8 },
- { EGL_ALPHA_SIZE, 8 },
- { EGL_BLUE_SIZE, 0 },
- { EGL_GREEN_SIZE, 0 },
- { EGL_RED_SIZE, 0 },
- { EGL_DEPTH_SIZE, 16 },
- { EGL_CONFIG_ID, 5 },
- { EGL_NATIVE_VISUAL_ID, GGL_PIXEL_FORMAT_A_8 },
- { EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT|EGL_PIXMAP_BIT },
-};
-
-static configs_t const gConfigs[] = {
- { config_0_attribute_list, NELEM(config_0_attribute_list) },
- { config_1_attribute_list, NELEM(config_1_attribute_list) },
- { config_2_attribute_list, NELEM(config_2_attribute_list) },
- { config_3_attribute_list, NELEM(config_3_attribute_list) },
- { config_4_attribute_list, NELEM(config_4_attribute_list) },
- { config_5_attribute_list, NELEM(config_5_attribute_list) },
- { config_6_attribute_list, NELEM(config_6_attribute_list) },
- { config_7_attribute_list, NELEM(config_7_attribute_list) },
-};
-
-static config_management_t const gConfigManagement[] = {
- { EGL_BUFFER_SIZE, config_management_t::atLeast },
- { EGL_ALPHA_SIZE, config_management_t::atLeast },
- { EGL_BLUE_SIZE, config_management_t::atLeast },
- { EGL_GREEN_SIZE, config_management_t::atLeast },
- { EGL_RED_SIZE, config_management_t::atLeast },
- { EGL_DEPTH_SIZE, config_management_t::atLeast },
- { EGL_STENCIL_SIZE, config_management_t::atLeast },
- { EGL_CONFIG_CAVEAT, config_management_t::exact },
- { EGL_CONFIG_ID, config_management_t::exact },
- { EGL_LEVEL, config_management_t::exact },
- { EGL_MAX_PBUFFER_HEIGHT, config_management_t::ignore },
- { EGL_MAX_PBUFFER_PIXELS, config_management_t::ignore },
- { EGL_MAX_PBUFFER_WIDTH, config_management_t::ignore },
- { EGL_NATIVE_RENDERABLE, config_management_t::exact },
- { EGL_NATIVE_VISUAL_ID, config_management_t::ignore },
- { EGL_NATIVE_VISUAL_TYPE, config_management_t::exact },
- { EGL_SAMPLES, config_management_t::exact },
- { EGL_SAMPLE_BUFFERS, config_management_t::exact },
- { EGL_SURFACE_TYPE, config_management_t::mask },
- { EGL_TRANSPARENT_TYPE, config_management_t::exact },
- { EGL_TRANSPARENT_BLUE_VALUE, config_management_t::exact },
- { EGL_TRANSPARENT_GREEN_VALUE, config_management_t::exact },
- { EGL_TRANSPARENT_RED_VALUE, config_management_t::exact },
- { EGL_BIND_TO_TEXTURE_RGBA, config_management_t::exact },
- { EGL_BIND_TO_TEXTURE_RGB, config_management_t::exact },
- { EGL_MIN_SWAP_INTERVAL, config_management_t::exact },
- { EGL_MAX_SWAP_INTERVAL, config_management_t::exact },
- { EGL_LUMINANCE_SIZE, config_management_t::atLeast },
- { EGL_ALPHA_MASK_SIZE, config_management_t::atLeast },
- { EGL_COLOR_BUFFER_TYPE, config_management_t::exact },
- { EGL_RENDERABLE_TYPE, config_management_t::mask },
- { EGL_CONFORMANT, config_management_t::mask }
-};
-
-
-static config_pair_t const config_defaults[] = {
- // attributes that are not specified are simply ignored, if a particular
- // one needs not be ignored, it must be specified here, eg:
- // { EGL_SURFACE_TYPE, EGL_WINDOW_BIT },
-};
-
-// ----------------------------------------------------------------------------
-
-static status_t getConfigFormatInfo(EGLint configID,
- int32_t& pixelFormat, int32_t& depthFormat)
-{
- switch(configID) {
- case 0:
- pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
- depthFormat = 0;
- break;
- case 1:
- pixelFormat = GGL_PIXEL_FORMAT_RGB_565;
- depthFormat = GGL_PIXEL_FORMAT_Z_16;
- break;
- case 2:
- pixelFormat = GGL_PIXEL_FORMAT_RGBX_8888;
- depthFormat = 0;
- break;
- case 3:
- pixelFormat = GGL_PIXEL_FORMAT_RGBX_8888;
- depthFormat = GGL_PIXEL_FORMAT_Z_16;
- break;
- case 4:
- pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
- depthFormat = 0;
- break;
- case 5:
- pixelFormat = GGL_PIXEL_FORMAT_RGBA_8888;
- depthFormat = GGL_PIXEL_FORMAT_Z_16;
- break;
- case 6:
- pixelFormat = GGL_PIXEL_FORMAT_A_8;
- depthFormat = 0;
- break;
- case 7:
- pixelFormat = GGL_PIXEL_FORMAT_A_8;
- depthFormat = GGL_PIXEL_FORMAT_Z_16;
- break;
- default:
- return NAME_NOT_FOUND;
- }
- return NO_ERROR;
-}
-
-// ----------------------------------------------------------------------------
-
-template<typename T>
-static int binarySearch(T const sortedArray[], int first, int last, EGLint key)
-{
- while (first <= last) {
- int mid = (first + last) / 2;
- if (key > sortedArray[mid].key) {
- first = mid + 1;
- } else if (key < sortedArray[mid].key) {
- last = mid - 1;
- } else {
- return mid;
- }
- }
- return -1;
-}
-
-static int isAttributeMatching(int i, EGLint attr, EGLint val)
-{
- // look for the attribute in all of our configs
- config_pair_t const* configFound = gConfigs[i].array;
- int index = binarySearch<config_pair_t>(
- gConfigs[i].array,
- 0, gConfigs[i].size-1,
- attr);
- if (index < 0) {
- configFound = config_base_attribute_list;
- index = binarySearch<config_pair_t>(
- config_base_attribute_list,
- 0, NELEM(config_base_attribute_list)-1,
- attr);
- }
- if (index >= 0) {
- // attribute found, check if this config could match
- int cfgMgtIndex = binarySearch<config_management_t>(
- gConfigManagement,
- 0, NELEM(gConfigManagement)-1,
- attr);
- if (cfgMgtIndex >= 0) {
- bool match = gConfigManagement[cfgMgtIndex].match(
- val, configFound[index].value);
- if (match) {
- // this config matches
- return 1;
- }
- } else {
- // attribute not found. this should NEVER happen.
- }
- } else {
- // error, this attribute doesn't exist
- }
- return 0;
-}
-
-static int makeCurrent(ogles_context_t* gl)
-{
- ogles_context_t* current = (ogles_context_t*)getGlThreadSpecific();
- if (gl) {
- egl_context_t* c = egl_context_t::context(gl);
- if (c->flags & egl_context_t::IS_CURRENT) {
- if (current != gl) {
- // it is an error to set a context current, if it's already
- // current to another thread
- return -1;
- }
- } else {
- if (current) {
- // mark the current context as not current, and flush
- glFlush();
- egl_context_t::context(current)->flags &= ~egl_context_t::IS_CURRENT;
- }
- }
- if (!(c->flags & egl_context_t::IS_CURRENT)) {
- // The context is not current, make it current!
- setGlThreadSpecific(gl);
- c->flags |= egl_context_t::IS_CURRENT;
- }
- } else {
- if (current) {
- // mark the current context as not current, and flush
- glFlush();
- egl_context_t::context(current)->flags &= ~egl_context_t::IS_CURRENT;
- }
- // this thread has no context attached to it
- setGlThreadSpecific(0);
- }
- return 0;
-}
-
-static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value)
-{
- size_t numConfigs = NELEM(gConfigs);
- int index = (int)config;
- if (uint32_t(index) >= numConfigs)
- return setError(EGL_BAD_CONFIG, EGL_FALSE);
-
- int attrIndex;
- attrIndex = binarySearch<config_pair_t>(
- gConfigs[index].array,
- 0, gConfigs[index].size-1,
- attribute);
- if (attrIndex>=0) {
- *value = gConfigs[index].array[attrIndex].value;
- return EGL_TRUE;
- }
-
- attrIndex = binarySearch<config_pair_t>(
- config_base_attribute_list,
- 0, NELEM(config_base_attribute_list)-1,
- attribute);
- if (attrIndex>=0) {
- *value = config_base_attribute_list[attrIndex].value;
- return EGL_TRUE;
- }
- return setError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
-}
-
-static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config,
- NativeWindowType window, const EGLint *attrib_list)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
- if (window == 0)
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- EGLint surfaceType;
- if (getConfigAttrib(dpy, config, EGL_SURFACE_TYPE, &surfaceType) == EGL_FALSE)
- return EGL_FALSE;
-
- if (!(surfaceType & EGL_WINDOW_BIT))
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- if (static_cast<ANativeWindow*>(window)->common.magic !=
- ANDROID_NATIVE_WINDOW_MAGIC) {
- return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
- }
-
- EGLint configID;
- if (getConfigAttrib(dpy, config, EGL_CONFIG_ID, &configID) == EGL_FALSE)
- return EGL_FALSE;
-
- int32_t depthFormat;
- int32_t pixelFormat;
- if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) {
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
- }
-
- // FIXME: we don't have access to the pixelFormat here just yet.
- // (it's possible that the surface is not fully initialized)
- // maybe this should be done after the page-flip
- //if (EGLint(info.format) != pixelFormat)
- // return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- egl_surface_t* surface;
- surface = new egl_window_surface_v2_t(dpy, config, depthFormat,
- static_cast<ANativeWindow*>(window));
-
- if (!surface->initCheck()) {
- // there was a problem in the ctor, the error
- // flag has been set.
- delete surface;
- surface = 0;
- }
- return surface;
-}
-
-static EGLSurface createPixmapSurface(EGLDisplay dpy, EGLConfig config,
- NativePixmapType pixmap, const EGLint *attrib_list)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
- if (pixmap == 0)
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- EGLint surfaceType;
- if (getConfigAttrib(dpy, config, EGL_SURFACE_TYPE, &surfaceType) == EGL_FALSE)
- return EGL_FALSE;
-
- if (!(surfaceType & EGL_PIXMAP_BIT))
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- if (static_cast<egl_native_pixmap_t*>(pixmap)->version !=
- sizeof(egl_native_pixmap_t)) {
- return setError(EGL_BAD_NATIVE_PIXMAP, EGL_NO_SURFACE);
- }
-
- EGLint configID;
- if (getConfigAttrib(dpy, config, EGL_CONFIG_ID, &configID) == EGL_FALSE)
- return EGL_FALSE;
-
- int32_t depthFormat;
- int32_t pixelFormat;
- if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) {
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
- }
-
- if (pixmap->format != pixelFormat)
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- egl_surface_t* surface =
- new egl_pixmap_surface_t(dpy, config, depthFormat,
- static_cast<egl_native_pixmap_t*>(pixmap));
-
- if (!surface->initCheck()) {
- // there was a problem in the ctor, the error
- // flag has been set.
- delete surface;
- surface = 0;
- }
- return surface;
-}
-
-static EGLSurface createPbufferSurface(EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
-
- EGLint surfaceType;
- if (getConfigAttrib(dpy, config, EGL_SURFACE_TYPE, &surfaceType) == EGL_FALSE)
- return EGL_FALSE;
-
- if (!(surfaceType & EGL_PBUFFER_BIT))
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
-
- EGLint configID;
- if (getConfigAttrib(dpy, config, EGL_CONFIG_ID, &configID) == EGL_FALSE)
- return EGL_FALSE;
-
- int32_t depthFormat;
- int32_t pixelFormat;
- if (getConfigFormatInfo(configID, pixelFormat, depthFormat) != NO_ERROR) {
- return setError(EGL_BAD_MATCH, EGL_NO_SURFACE);
- }
-
- int32_t w = 0;
- int32_t h = 0;
- while (attrib_list[0]) {
- if (attrib_list[0] == EGL_WIDTH) w = attrib_list[1];
- if (attrib_list[0] == EGL_HEIGHT) h = attrib_list[1];
- attrib_list+=2;
- }
-
- egl_surface_t* surface =
- new egl_pbuffer_surface_t(dpy, config, depthFormat, w, h, pixelFormat);
-
- if (!surface->initCheck()) {
- // there was a problem in the ctor, the error
- // flag has been set.
- delete surface;
- surface = 0;
- }
- return surface;
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-using namespace android;
-
-// ----------------------------------------------------------------------------
-// Initialization
-// ----------------------------------------------------------------------------
-
-EGLDisplay eglGetDisplay(NativeDisplayType display)
-{
-#ifndef HAVE_ANDROID_OS
- // this just needs to be done once
- if (gGLKey == -1) {
- pthread_mutex_lock(&gInitMutex);
- if (gGLKey == -1)
- pthread_key_create(&gGLKey, NULL);
- pthread_mutex_unlock(&gInitMutex);
- }
-#endif
- if (display == EGL_DEFAULT_DISPLAY) {
- EGLDisplay dpy = (EGLDisplay)1;
- egl_display_t& d = egl_display_t::get_display(dpy);
- d.type = display;
- return dpy;
- }
- return EGL_NO_DISPLAY;
-}
-
-EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- EGLBoolean res = EGL_TRUE;
- egl_display_t& d = egl_display_t::get_display(dpy);
-
- if (android_atomic_inc(&d.initialized) == 0) {
- // initialize stuff here if needed
- //pthread_mutex_lock(&gInitMutex);
- //pthread_mutex_unlock(&gInitMutex);
- }
-
- if (res == EGL_TRUE) {
- if (major != NULL) *major = VERSION_MAJOR;
- if (minor != NULL) *minor = VERSION_MINOR;
- }
- return res;
-}
-
-EGLBoolean eglTerminate(EGLDisplay dpy)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- EGLBoolean res = EGL_TRUE;
- egl_display_t& d = egl_display_t::get_display(dpy);
- if (android_atomic_dec(&d.initialized) == 1) {
- // TODO: destroy all resources (surfaces, contexts, etc...)
- //pthread_mutex_lock(&gInitMutex);
- //pthread_mutex_unlock(&gInitMutex);
- }
- return res;
-}
-
-// ----------------------------------------------------------------------------
-// configuration
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglGetConfigs( EGLDisplay dpy,
- EGLConfig *configs,
- EGLint config_size, EGLint *num_config)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- GLint numConfigs = NELEM(gConfigs);
- if (!configs) {
- *num_config = numConfigs;
- return EGL_TRUE;
- }
- GLint i;
- for (i=0 ; i<numConfigs && i<config_size ; i++) {
- *configs++ = (EGLConfig)i;
- }
- *num_config = i;
- return EGL_TRUE;
-}
-
-EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- if (ggl_unlikely(num_config==0)) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- if (ggl_unlikely(attrib_list==0)) {
- /*
- * A NULL attrib_list should be treated as though it was an empty
- * one (terminated with EGL_NONE) as defined in
- * section 3.4.1 "Querying Configurations" in the EGL specification.
- */
- static const EGLint dummy = EGL_NONE;
- attrib_list = &dummy;
- }
-
- int numAttributes = 0;
- int numConfigs = NELEM(gConfigs);
- uint32_t possibleMatch = (1<<numConfigs)-1;
- while(possibleMatch && *attrib_list != EGL_NONE) {
- numAttributes++;
- EGLint attr = *attrib_list++;
- EGLint val = *attrib_list++;
- for (int i=0 ; possibleMatch && i<numConfigs ; i++) {
- if (!(possibleMatch & (1<<i)))
- continue;
- if (isAttributeMatching(i, attr, val) == 0) {
- possibleMatch &= ~(1<<i);
- }
- }
- }
-
- // now, handle the attributes which have a useful default value
- for (size_t j=0 ; possibleMatch && j<NELEM(config_defaults) ; j++) {
- // see if this attribute was specified, if not, apply its
- // default value
- if (binarySearch<config_pair_t>(
- (config_pair_t const*)attrib_list,
- 0, numAttributes-1,
- config_defaults[j].key) < 0)
- {
- for (int i=0 ; possibleMatch && i<numConfigs ; i++) {
- if (!(possibleMatch & (1<<i)))
- continue;
- if (isAttributeMatching(i,
- config_defaults[j].key,
- config_defaults[j].value) == 0)
- {
- possibleMatch &= ~(1<<i);
- }
- }
- }
- }
-
- // return the configurations found
- int n=0;
- if (possibleMatch) {
- if (configs) {
- for (int i=0 ; config_size && i<numConfigs ; i++) {
- if (possibleMatch & (1<<i)) {
- *configs++ = (EGLConfig)i;
- config_size--;
- n++;
- }
- }
- } else {
- for (int i=0 ; i<numConfigs ; i++) {
- if (possibleMatch & (1<<i)) {
- n++;
- }
- }
- }
- }
- *num_config = n;
- return EGL_TRUE;
-}
-
-EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- return getConfigAttrib(dpy, config, attribute, value);
-}
-
-// ----------------------------------------------------------------------------
-// surfaces
-// ----------------------------------------------------------------------------
-
-EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
- NativeWindowType window,
- const EGLint *attrib_list)
-{
- return createWindowSurface(dpy, config, window, attrib_list);
-}
-
-EGLSurface eglCreatePixmapSurface( EGLDisplay dpy, EGLConfig config,
- NativePixmapType pixmap,
- const EGLint *attrib_list)
-{
- return createPixmapSurface(dpy, config, pixmap, attrib_list);
-}
-
-EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- return createPbufferSurface(dpy, config, attrib_list);
-}
-
-EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface eglSurface)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- if (eglSurface != EGL_NO_SURFACE) {
- egl_surface_t* surface( static_cast<egl_surface_t*>(eglSurface) );
- if (!surface->isValid())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
- if (surface->dpy != dpy)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- if (surface->ctx) {
- // FIXME: this surface is current check what the spec says
- surface->disconnect();
- surface->ctx = 0;
- }
- delete surface;
- }
- return EGL_TRUE;
-}
-
-EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface eglSurface,
- EGLint attribute, EGLint *value)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- egl_surface_t* surface = static_cast<egl_surface_t*>(eglSurface);
- if (!surface->isValid())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
- if (surface->dpy != dpy)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- EGLBoolean ret = EGL_TRUE;
- switch (attribute) {
- case EGL_CONFIG_ID:
- ret = getConfigAttrib(dpy, surface->config, EGL_CONFIG_ID, value);
- break;
- case EGL_WIDTH:
- *value = surface->getWidth();
- break;
- case EGL_HEIGHT:
- *value = surface->getHeight();
- break;
- case EGL_LARGEST_PBUFFER:
- // not modified for a window or pixmap surface
- break;
- case EGL_TEXTURE_FORMAT:
- *value = EGL_NO_TEXTURE;
- break;
- case EGL_TEXTURE_TARGET:
- *value = EGL_NO_TEXTURE;
- break;
- case EGL_MIPMAP_TEXTURE:
- *value = EGL_FALSE;
- break;
- case EGL_MIPMAP_LEVEL:
- *value = 0;
- break;
- case EGL_RENDER_BUFFER:
- // TODO: return the real RENDER_BUFFER here
- *value = EGL_BACK_BUFFER;
- break;
- case EGL_HORIZONTAL_RESOLUTION:
- // pixel/mm * EGL_DISPLAY_SCALING
- *value = surface->getHorizontalResolution();
- break;
- case EGL_VERTICAL_RESOLUTION:
- // pixel/mm * EGL_DISPLAY_SCALING
- *value = surface->getVerticalResolution();
- break;
- case EGL_PIXEL_ASPECT_RATIO: {
- // w/h * EGL_DISPLAY_SCALING
- int wr = surface->getHorizontalResolution();
- int hr = surface->getVerticalResolution();
- *value = (wr * EGL_DISPLAY_SCALING) / hr;
- } break;
- case EGL_SWAP_BEHAVIOR:
- *value = surface->getSwapBehavior();
- break;
- default:
- ret = setError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
- }
- return ret;
-}
-
-EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_list, const EGLint *attrib_list)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
-
- ogles_context_t* gl = ogles_init(sizeof(egl_context_t));
- if (!gl) return setError(EGL_BAD_ALLOC, EGL_NO_CONTEXT);
-
- egl_context_t* c = static_cast<egl_context_t*>(gl->rasterizer.base);
- c->flags = egl_context_t::NEVER_CURRENT;
- c->dpy = dpy;
- c->config = config;
- c->read = 0;
- c->draw = 0;
- return (EGLContext)gl;
-}
-
-EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- egl_context_t* c = egl_context_t::context(ctx);
- if (c->flags & egl_context_t::IS_CURRENT)
- setGlThreadSpecific(0);
- ogles_uninit((ogles_context_t*)ctx);
- return EGL_TRUE;
-}
-
-EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
- EGLSurface read, EGLContext ctx)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- if (draw) {
- egl_surface_t* s = (egl_surface_t*)draw;
- if (!s->isValid())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
- if (s->dpy != dpy)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: check that draw is compatible with the context
- }
- if (read && read!=draw) {
- egl_surface_t* s = (egl_surface_t*)read;
- if (!s->isValid())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
- if (s->dpy != dpy)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: check that read is compatible with the context
- }
-
- EGLContext current_ctx = EGL_NO_CONTEXT;
-
- if ((read == EGL_NO_SURFACE && draw == EGL_NO_SURFACE) && (ctx != EGL_NO_CONTEXT))
- return setError(EGL_BAD_MATCH, EGL_FALSE);
-
- if ((read != EGL_NO_SURFACE || draw != EGL_NO_SURFACE) && (ctx == EGL_NO_CONTEXT))
- return setError(EGL_BAD_MATCH, EGL_FALSE);
-
- if (ctx == EGL_NO_CONTEXT) {
- // if we're detaching, we need the current context
- current_ctx = (EGLContext)getGlThreadSpecific();
- } else {
- egl_context_t* c = egl_context_t::context(ctx);
- egl_surface_t* d = (egl_surface_t*)draw;
- egl_surface_t* r = (egl_surface_t*)read;
- if ((d && d->ctx && d->ctx != ctx) ||
- (r && r->ctx && r->ctx != ctx)) {
- // one of the surface is bound to a context in another thread
- return setError(EGL_BAD_ACCESS, EGL_FALSE);
- }
- }
-
- ogles_context_t* gl = (ogles_context_t*)ctx;
- if (makeCurrent(gl) == 0) {
- if (ctx) {
- egl_context_t* c = egl_context_t::context(ctx);
- egl_surface_t* d = (egl_surface_t*)draw;
- egl_surface_t* r = (egl_surface_t*)read;
-
- if (c->draw) {
- egl_surface_t* s = reinterpret_cast<egl_surface_t*>(c->draw);
- s->disconnect();
- }
- if (c->read) {
- // FIXME: unlock/disconnect the read surface too
- }
-
- c->draw = draw;
- c->read = read;
-
- if (c->flags & egl_context_t::NEVER_CURRENT) {
- c->flags &= ~egl_context_t::NEVER_CURRENT;
- GLint w = 0;
- GLint h = 0;
- if (draw) {
- w = d->getWidth();
- h = d->getHeight();
- }
- ogles_surfaceport(gl, 0, 0);
- ogles_viewport(gl, 0, 0, w, h);
- ogles_scissor(gl, 0, 0, w, h);
- }
- if (d) {
- if (d->connect() == EGL_FALSE) {
- return EGL_FALSE;
- }
- d->ctx = ctx;
- d->bindDrawSurface(gl);
- }
- if (r) {
- // FIXME: lock/connect the read surface too
- r->ctx = ctx;
- r->bindReadSurface(gl);
- }
- } else {
- // if surfaces were bound to the context bound to this thread
- // mark then as unbound.
- if (current_ctx) {
- egl_context_t* c = egl_context_t::context(current_ctx);
- egl_surface_t* d = (egl_surface_t*)c->draw;
- egl_surface_t* r = (egl_surface_t*)c->read;
- if (d) {
- c->draw = 0;
- d->ctx = EGL_NO_CONTEXT;
- d->disconnect();
- }
- if (r) {
- c->read = 0;
- r->ctx = EGL_NO_CONTEXT;
- // FIXME: unlock/disconnect the read surface too
- }
- }
- }
- return EGL_TRUE;
- }
- return setError(EGL_BAD_ACCESS, EGL_FALSE);
-}
-
-EGLContext eglGetCurrentContext(void)
-{
- // eglGetCurrentContext returns the current EGL rendering context,
- // as specified by eglMakeCurrent. If no context is current,
- // EGL_NO_CONTEXT is returned.
- return (EGLContext)getGlThreadSpecific();
-}
-
-EGLSurface eglGetCurrentSurface(EGLint readdraw)
-{
- // eglGetCurrentSurface returns the read or draw surface attached
- // to the current EGL rendering context, as specified by eglMakeCurrent.
- // If no context is current, EGL_NO_SURFACE is returned.
- EGLContext ctx = (EGLContext)getGlThreadSpecific();
- if (ctx == EGL_NO_CONTEXT) return EGL_NO_SURFACE;
- egl_context_t* c = egl_context_t::context(ctx);
- if (readdraw == EGL_READ) {
- return c->read;
- } else if (readdraw == EGL_DRAW) {
- return c->draw;
- }
- return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE);
-}
-
-EGLDisplay eglGetCurrentDisplay(void)
-{
- // eglGetCurrentDisplay returns the current EGL display connection
- // for the current EGL rendering context, as specified by eglMakeCurrent.
- // If no context is current, EGL_NO_DISPLAY is returned.
- EGLContext ctx = (EGLContext)getGlThreadSpecific();
- if (ctx == EGL_NO_CONTEXT) return EGL_NO_DISPLAY;
- egl_context_t* c = egl_context_t::context(ctx);
- return c->dpy;
-}
-
-EGLBoolean eglQueryContext( EGLDisplay dpy, EGLContext ctx,
- EGLint attribute, EGLint *value)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- egl_context_t* c = egl_context_t::context(ctx);
- switch (attribute) {
- case EGL_CONFIG_ID:
- // Returns the ID of the EGL frame buffer configuration with
- // respect to which the context was created
- return getConfigAttrib(dpy, c->config, EGL_CONFIG_ID, value);
- }
- return setError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
-}
-
-EGLBoolean eglWaitGL(void)
-{
- return EGL_TRUE;
-}
-
-EGLBoolean eglWaitNative(EGLint engine)
-{
- return EGL_TRUE;
-}
-
-EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- egl_surface_t* d = static_cast<egl_surface_t*>(draw);
- if (!d->isValid())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
- if (d->dpy != dpy)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- // post the surface
- d->swapBuffers();
-
- // if it's bound to a context, update the buffer
- if (d->ctx != EGL_NO_CONTEXT) {
- d->bindDrawSurface((ogles_context_t*)d->ctx);
- // if this surface is also the read surface of the context
- // it is bound to, make sure to update the read buffer as well.
- // The EGL spec is a little unclear about this.
- egl_context_t* c = egl_context_t::context(d->ctx);
- if (c->read == draw) {
- d->bindReadSurface((ogles_context_t*)d->ctx);
- }
- }
-
- return EGL_TRUE;
-}
-
-EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
- NativePixmapType target)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: eglCopyBuffers()
- return EGL_FALSE;
-}
-
-EGLint eglGetError(void)
-{
- return getError();
-}
-
-const char* eglQueryString(EGLDisplay dpy, EGLint name)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, (const char*)0);
-
- switch (name) {
- case EGL_VENDOR:
- return gVendorString;
- case EGL_VERSION:
- return gVersionString;
- case EGL_EXTENSIONS:
- return gExtensionsString;
- case EGL_CLIENT_APIS:
- return gClientApiString;
- }
- return setError(EGL_BAD_PARAMETER, (const char *)0);
-}
-
-// ----------------------------------------------------------------------------
-// EGL 1.1
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglSurfaceAttrib(
- EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: eglSurfaceAttrib()
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-}
-
-EGLBoolean eglBindTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: eglBindTexImage()
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-}
-
-EGLBoolean eglReleaseTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: eglReleaseTexImage()
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-}
-
-EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- // TODO: eglSwapInterval()
- return EGL_TRUE;
-}
-
-// ----------------------------------------------------------------------------
-// EGL 1.2
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglBindAPI(EGLenum api)
-{
- if (api != EGL_OPENGL_ES_API)
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- return EGL_TRUE;
-}
-
-EGLenum eglQueryAPI(void)
-{
- return EGL_OPENGL_ES_API;
-}
-
-EGLBoolean eglWaitClient(void)
-{
- glFinish();
- return EGL_TRUE;
-}
-
-EGLBoolean eglReleaseThread(void)
-{
- // TODO: eglReleaseThread()
- return EGL_TRUE;
-}
-
-EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
- // TODO: eglCreatePbufferFromClientBuffer()
- return setError(EGL_BAD_PARAMETER, EGL_NO_SURFACE);
-}
-
-// ----------------------------------------------------------------------------
-// EGL_EGLEXT_VERSION 3
-// ----------------------------------------------------------------------------
-
-void (*eglGetProcAddress (const char *procname))()
-{
- extention_map_t const * const map = gExtentionMap;
- for (uint32_t i=0 ; i<NELEM(gExtentionMap) ; i++) {
- if (!strcmp(procname, map[i].name)) {
- return map[i].address;
- }
- }
- return NULL;
-}
-
-EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
- const EGLint *attrib_list)
-{
- EGLBoolean result = EGL_FALSE;
- return result;
-}
-
-EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
-{
- EGLBoolean result = EGL_FALSE;
- return result;
-}
-
-EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
- EGLClientBuffer buffer, const EGLint *attrib_list)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE) {
- return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR);
- }
- if (ctx != EGL_NO_CONTEXT) {
- return setError(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR);
- }
- if (target != EGL_NATIVE_BUFFER_ANDROID) {
- return setError(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
- }
-
- ANativeWindowBuffer* native_buffer = (ANativeWindowBuffer*)buffer;
-
- if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC)
- return setError(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
-
- if (native_buffer->common.version != sizeof(ANativeWindowBuffer))
- return setError(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
-
- switch (native_buffer->format) {
- case HAL_PIXEL_FORMAT_RGBA_8888:
- case HAL_PIXEL_FORMAT_RGBX_8888:
- case HAL_PIXEL_FORMAT_RGB_888:
- case HAL_PIXEL_FORMAT_RGB_565:
- case HAL_PIXEL_FORMAT_BGRA_8888:
- case HAL_PIXEL_FORMAT_RGBA_5551:
- case HAL_PIXEL_FORMAT_RGBA_4444:
- break;
- default:
- return setError(EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
- }
-
- native_buffer->common.incRef(&native_buffer->common);
- return (EGLImageKHR)native_buffer;
-}
-
-EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE) {
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
- }
-
- ANativeWindowBuffer* native_buffer = (ANativeWindowBuffer*)img;
-
- if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC)
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-
- if (native_buffer->common.version != sizeof(ANativeWindowBuffer))
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
-
- native_buffer->common.decRef(&native_buffer->common);
-
- return EGL_TRUE;
-}
-
-// ----------------------------------------------------------------------------
-// ANDROID extensions
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
- EGLint left, EGLint top, EGLint width, EGLint height)
-{
- if (egl_display_t::is_valid(dpy) == EGL_FALSE)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- egl_surface_t* d = static_cast<egl_surface_t*>(draw);
- if (!d->isValid())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
- if (d->dpy != dpy)
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- // post the surface
- d->setSwapRectangle(left, top, width, height);
-
- return EGL_TRUE;
-}
diff --git a/opengl/libagl/fixed_asm.S b/opengl/libagl/fixed_asm.S
deleted file mode 100644
index 05044f2..0000000
--- a/opengl/libagl/fixed_asm.S
+++ /dev/null
@@ -1,67 +0,0 @@
-/* libs/opengles/fixed_asm.S
-**
-** Copyright 2006, 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.
-*/
-
-
- .text
- .align
-
- .global gglFloatToFixed
- .type gglFloatToFixed, %function
- .global gglFloatToFixedFast
- .type gglFloatToFixedFast, %function
-
-
-/*
- * Converts a float to a s15.16 fixed-point number.
- * this doesn't handle floats out of the [-32768, +32768[ range
- * and doesn't performs round-to-nearest.
- * however, it's very fast :-)
- */
-
-gglFloatToFixedFast:
- movs r1, r0, lsl #1 /* remove bit sign */
- mov r2, #0x8E /* 127 + 15 */
- sub r1, r2, r1, lsr #24 /* compute shift */
- mov r2, r0, lsl #8 /* mantissa<<8 */
- orr r2, r2, #0x80000000 /* add the missing 1 */
- mov r0, r2, lsr r1 /* scale to 16.16 */
- rsbcs r0, r0, #0 /* negate if needed */
- bx lr
-
-/*
- * this version rounds-to-nearest and saturates numbers
- * outside the range (but not NaNs).
- */
-
-gglFloatToFixed:
- mov r1, r0, lsl #1 /* remove bit sign */
- mov r2, #0x8E /* 127 + 15 */
- subs r1, r2, r1, lsr #24 /* compute shift */
- bls 0f /* too big */
- mov r2, r0, lsl #8 /* mantissa<<8 */
- orr r2, r2, #0x80000000 /* add the missing 1 */
- mov r3, r0
- movs r0, r2, lsr r1 /* scale to 16.16 */
- addcs r0, r0, #1 /* round-to-nearest */
- tst r3, #0x80000000 /* negative? */
- rsbne r0, r0, #0 /* negate if needed */
- bx lr
-
-0: ands r0, r0, #0x80000000 /* keep only the sign bit */
- moveq r0, #0x7fffffff /* positive, maximum value */
- bx lr
-
diff --git a/opengl/libagl/fp.cpp b/opengl/libagl/fp.cpp
deleted file mode 100644
index ae5f1fe..0000000
--- a/opengl/libagl/fp.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/* libs/opengles/fp.cpp
-**
-** Copyright 2006, 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 "fp.h"
-
-// ----------------------------------------------------------------------------
-
-#if !defined(__arm__)
-GGLfixed gglFloatToFixed(float v) {
- return GGLfixed(floorf(v * 65536.0f + 0.5f));
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-
-namespace gl {
-
-GLfloat fixedToFloat(GLfixed x)
-{
-#if DEBUG_USE_FLOATS
- return x / 65536.0f;
-#else
- if (!x) return 0;
- const uint32_t s = x & 0x80000000;
- union {
- uint32_t i;
- float f;
- };
- i = s ? -x : x;
- const int c = gglClz(i) - 8;
- i = (c>=0) ? (i<<c) : (i>>-c);
- const uint32_t e = 134 - c;
- i &= ~0x800000;
- i |= e<<23;
- i |= s;
- return f;
-#endif
-}
-
-float sinef(float x)
-{
- const float A = 1.0f / (2.0f*M_PI);
- const float B = -16.0f;
- const float C = 8.0f;
-
- // scale angle for easy argument reduction
- x *= A;
-
- if (fabsf(x) >= 0.5f) {
- // Argument reduction
- x = x - ceilf(x + 0.5f) + 1.0f;
- }
-
- const float y = B*x*fabsf(x) + C*x;
- return 0.2215f * (y*fabsf(y) - y) + y;
-}
-
-float cosinef(float x)
-{
- return sinef(x + float(M_PI/2));
-}
-
-void sincosf(GLfloat angle, GLfloat* s, GLfloat* c) {
- *s = sinef(angle);
- *c = cosinef(angle);
-}
-
-}; // namespace fp_utils
-
-// ----------------------------------------------------------------------------
-}; // namespace android
diff --git a/opengl/libagl/fp.h b/opengl/libagl/fp.h
deleted file mode 100644
index 6d0c183..0000000
--- a/opengl/libagl/fp.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/* libs/opengles/fp.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_FP_H
-#define ANDROID_OPENGLES_FP_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <math.h>
-
-#include <private/pixelflinger/ggl_context.h>
-
-#include <GLES/gl.h>
-
-#define DEBUG_USE_FLOATS 0
-
-// ----------------------------------------------------------------------------
-
-extern "C" GLfixed gglFloatToFixed(float f) __attribute__((const));
-
-// ----------------------------------------------------------------------------
-namespace android {
-
-namespace gl {
-
- GLfloat fixedToFloat(GLfixed) CONST;
-
- void sincosf(GLfloat angle, GLfloat* s, GLfloat* c);
- float sinef(GLfloat x) CONST;
- float cosinef(GLfloat x) CONST;
-
-inline bool cmpf(GLfloat a, GLfloat b) CONST;
-inline bool isZerof(GLfloat) CONST;
-inline bool isOnef(GLfloat) CONST;
-
-inline int isZeroOrNegativef(GLfloat) CONST;
-
-inline int exponent(GLfloat) CONST;
-inline int32_t mantissa(GLfloat) CONST;
-inline GLfloat clampToZerof(GLfloat) CONST;
-inline GLfloat reciprocalf(GLfloat) CONST;
-inline GLfloat rsqrtf(GLfloat) CONST;
-inline GLfloat sqrf(GLfloat) CONST;
-inline GLfloat addExpf(GLfloat v, int e) CONST;
-inline GLfloat mul2f(GLfloat v) CONST;
-inline GLfloat div2f(GLfloat v) CONST;
-inline GLfloat absf(GLfloat v) CONST;
-
-
-/*
- * float fastexpf(float) : a fast approximation of expf(x)
- * give somewhat accurate results for -88 <= x <= 88
- *
- * exp(x) = 2^(x/ln(2))
- * we use the properties of float encoding
- * to get a fast 2^ and linear interpolation
- *
- */
-
-inline float fastexpf(float y) __attribute__((const));
-
-inline float fastexpf(float y)
-{
- union {
- float r;
- int32_t i;
- } u;
-
- // 127*ln(2) = 88
- if (y < -88.0f) {
- u.r = 0.0f;
- } else if (y > 88.0f) {
- u.r = INFINITY;
- } else {
- const float kOneOverLogTwo = (1L<<23) / M_LN2;
- const int32_t kExponentBias = 127L<<23;
- const int32_t e = int32_t(y*kOneOverLogTwo);
- u.i = e + kExponentBias;
- }
-
- return u.r;
-}
-
-
-bool cmpf(GLfloat a, GLfloat b) {
-#if DEBUG_USE_FLOATS
- return a == b;
-#else
- union {
- float f;
- uint32_t i;
- } ua, ub;
- ua.f = a;
- ub.f = b;
- return ua.i == ub.i;
-#endif
-}
-
-bool isZerof(GLfloat v) {
-#if DEBUG_USE_FLOATS
- return v == 0;
-#else
- union {
- float f;
- int32_t i;
- };
- f = v;
- return (i<<1) == 0;
-#endif
-}
-
-bool isOnef(GLfloat v) {
- return cmpf(v, 1.0f);
-}
-
-int isZeroOrNegativef(GLfloat v) {
-#if DEBUG_USE_FLOATS
- return v <= 0;
-#else
- union {
- float f;
- int32_t i;
- };
- f = v;
- return isZerof(v) | (i>>31);
-#endif
-}
-
-int exponent(GLfloat v) {
- union {
- float f;
- uint32_t i;
- };
- f = v;
- return ((i << 1) >> 24) - 127;
-}
-
-int32_t mantissa(GLfloat v) {
- union {
- float f;
- uint32_t i;
- };
- f = v;
- if (!(i&0x7F800000)) return 0;
- const int s = i >> 31;
- i |= (1L<<23);
- i &= ~0xFF000000;
- return s ? -i : i;
-}
-
-GLfloat clampToZerof(GLfloat v) {
-#if DEBUG_USE_FLOATS
- return v<0 ? 0 : (v>1 ? 1 : v);
-#else
- union {
- float f;
- int32_t i;
- };
- f = v;
- i &= ~(i>>31);
- return f;
-#endif
-}
-
-GLfloat reciprocalf(GLfloat v) {
- // XXX: do better
- return 1.0f / v;
-}
-
-GLfloat rsqrtf(GLfloat v) {
- // XXX: do better
- return 1.0f / sqrtf(v);
-}
-
-GLfloat sqrf(GLfloat v) {
- // XXX: do better
- return v*v;
-}
-
-GLfloat addExpf(GLfloat v, int e) {
- union {
- float f;
- int32_t i;
- };
- f = v;
- if (i<<1) { // XXX: deal with over/underflow
- i += int32_t(e)<<23;
- }
- return f;
-}
-
-GLfloat mul2f(GLfloat v) {
-#if DEBUG_USE_FLOATS
- return v*2;
-#else
- return addExpf(v, 1);
-#endif
-}
-
-GLfloat div2f(GLfloat v) {
-#if DEBUG_USE_FLOATS
- return v*0.5f;
-#else
- return addExpf(v, -1);
-#endif
-}
-
-GLfloat absf(GLfloat v) {
-#if DEBUG_USE_FLOATS
- return v<0 ? -v : v;
-#else
- union {
- float f;
- int32_t i;
- };
- f = v;
- i &= ~0x80000000;
- return f;
-#endif
-}
-
-}; // namespace gl
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_FP_H
-
diff --git a/opengl/libagl/iterators.S b/opengl/libagl/iterators.S
deleted file mode 100644
index 8c86482..0000000
--- a/opengl/libagl/iterators.S
+++ /dev/null
@@ -1,89 +0,0 @@
-/* libs/opengles/iterators.S
-**
-** Copyright 2006, 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.
-*/
-
-
- .text
- .align
- .arm
-
- .global iterators0032
- .type iterators0032, %function
-
-/*
- * iterators0032
- *
- * MUST BE CALLED FROM ARM CODE
- *
- * r0: const compute_iterators_t* (this)
- * r0 + 0: m_dx01
- * r0 + 4: m_dy10
- * r0 + 8: m_dx20
- * r0 +12: m_dy02
- * r0 +16: m_x0
- * r0 +20: m_y0
- * r0 +24: m_area
- * r0 +28: m_scale
- * r0 +29: m_area_scale;
- * r1: int32_t* (out)
- * r1 + 0: c
- * r1 + 4: dcdx
- * r1 + 8: dcdy
- * r2: c0
- * r3: c1
- * [sp]: c2
- */
-
-iterators0032:
- stmfd sp!, {r4, r5, r6, r7, r8, lr}
- ldr r4, [sp, #4*6]
-
- ldrb r12, [r0, #29]
- sub r3, r3, r2
- sub r4, r4, r2
- sub r12, r12, #16
- mov r3, r3, asr r12
- mov r4, r4, asr r12
-
- ldr r5, [r0, #0]
- ldr r12, [r0, #4]
- smull r8, lr, r4, r5
- ldr r5, [r0, #8]
- smull r6, r7, r4, r12
- ldr r12, [r0, #12]
- smlal r8, lr, r3, r5
- smlal r6, r7, r3, r12
-
- ldr r3, [r0, #16] // m_x0
- ldr r4, [r0, #20] // m_x1
-
- str r6, [r1, #4]
- str r8, [r1, #8]
-
- umull r6, r5, r3, r6
- umull r8, r0, r4, r8
- mla r7, r3, r7, r5
- mla lr, r4, lr, r0
- adds r6, r6, r8
- adc r7, r7, lr
-
- movs r6, r6, lsr #4
- adc r6, r6, r7, lsl #28
- rsb r6, r6, r2, lsl #16
- str r6, [r1, #0]
-
- ldmfd sp!, {r4, r5, r6, r7, r8, pc}
-
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp
deleted file mode 100644
index ca715db..0000000
--- a/opengl/libagl/light.cpp
+++ /dev/null
@@ -1,876 +0,0 @@
-/* libs/opengles/light.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-#include "context.h"
-#include "fp.h"
-#include "light.h"
-#include "state.h"
-#include "matrix.h"
-
-
-#if defined(__arm__) && defined(__thumb__)
-#warning "light.cpp should not be compiled in thumb on ARM."
-#endif
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static void invalidate_lighting(ogles_context_t* c);
-static void lightVertexValidate(ogles_context_t* c, vertex_t* v);
-static void lightVertexNop(ogles_context_t* c, vertex_t* v);
-static void lightVertex(ogles_context_t* c, vertex_t* v);
-static void lightVertexMaterial(ogles_context_t* c, vertex_t* v);
-
-static inline void vscale3(GLfixed* d, const GLfixed* m, GLfixed s);
-
-static __attribute__((noinline))
-void vnorm3(GLfixed* d, const GLfixed* a);
-
-static inline void vsa3(GLfixed* d,
- const GLfixed* m, GLfixed s, const GLfixed* a);
-static inline void vss3(GLfixed* d,
- const GLfixed* m, GLfixed s, const GLfixed* a);
-static inline void vmla3(GLfixed* d,
- const GLfixed* m0, const GLfixed* m1, const GLfixed* a);
-static inline void vmul3(GLfixed* d,
- const GLfixed* m0, const GLfixed* m1);
-
-static GLfixed fog_linear(ogles_context_t* c, GLfixed z);
-static GLfixed fog_exp(ogles_context_t* c, GLfixed z);
-static GLfixed fog_exp2(ogles_context_t* c, GLfixed z);
-
-
-// ----------------------------------------------------------------------------
-
-static void init_white(vec4_t& c) {
- c.r = c.g = c.b = c.a = 0x10000;
-}
-
-void ogles_init_light(ogles_context_t* c)
-{
- for (unsigned int i=0 ; i<OGLES_MAX_LIGHTS ; i++) {
- c->lighting.lights[i].ambient.a = 0x10000;
- c->lighting.lights[i].position.z = 0x10000;
- c->lighting.lights[i].spotDir.z = -0x10000;
- c->lighting.lights[i].spotCutoff = gglIntToFixed(180);
- c->lighting.lights[i].attenuation[0] = 0x10000;
- }
- init_white(c->lighting.lights[0].diffuse);
- init_white(c->lighting.lights[0].specular);
-
- c->lighting.front.ambient.r =
- c->lighting.front.ambient.g =
- c->lighting.front.ambient.b = gglFloatToFixed(0.2f);
- c->lighting.front.ambient.a = 0x10000;
- c->lighting.front.diffuse.r =
- c->lighting.front.diffuse.g =
- c->lighting.front.diffuse.b = gglFloatToFixed(0.8f);
- c->lighting.front.diffuse.a = 0x10000;
- c->lighting.front.specular.a = 0x10000;
- c->lighting.front.emission.a = 0x10000;
-
- c->lighting.lightModel.ambient.r =
- c->lighting.lightModel.ambient.g =
- c->lighting.lightModel.ambient.b = gglFloatToFixed(0.2f);
- c->lighting.lightModel.ambient.a = 0x10000;
-
- c->lighting.colorMaterial.face = GL_FRONT_AND_BACK;
- c->lighting.colorMaterial.mode = GL_AMBIENT_AND_DIFFUSE;
-
- c->fog.mode = GL_EXP;
- c->fog.fog = fog_exp;
- c->fog.density = 0x10000;
- c->fog.end = 0x10000;
- c->fog.invEndMinusStart = 0x10000;
-
- invalidate_lighting(c);
-
- c->rasterizer.procs.shadeModel(c, GL_SMOOTH);
- c->lighting.shadeModel = GL_SMOOTH;
-}
-
-void ogles_uninit_light(ogles_context_t* c)
-{
-}
-
-static inline int32_t clampF(GLfixed f) CONST;
-int32_t clampF(GLfixed f) {
- f = (f & ~(f>>31));
- if (f >= 0x10000)
- f = 0x10000;
- return f;
-}
-
-static GLfixed fog_linear(ogles_context_t* c, GLfixed z) {
- return clampF(gglMulx((c->fog.end - ((z<0)?-z:z)), c->fog.invEndMinusStart));
-}
-
-static GLfixed fog_exp(ogles_context_t* c, GLfixed z) {
- const float e = fixedToFloat(gglMulx(c->fog.density, ((z<0)?-z:z)));
- return clampF(gglFloatToFixed(fastexpf(-e)));
-}
-
-static GLfixed fog_exp2(ogles_context_t* c, GLfixed z) {
- const float e = fixedToFloat(gglMulx(c->fog.density, z));
- return clampF(gglFloatToFixed(fastexpf(-e*e)));
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark math helpers
-#endif
-
-static inline
-void vscale3(GLfixed* d, const GLfixed* m, GLfixed s) {
- d[0] = gglMulx(m[0], s);
- d[1] = gglMulx(m[1], s);
- d[2] = gglMulx(m[2], s);
-}
-
-static inline
-void vsa3(GLfixed* d, const GLfixed* m, GLfixed s, const GLfixed* a) {
- d[0] = gglMulAddx(m[0], s, a[0]);
- d[1] = gglMulAddx(m[1], s, a[1]);
- d[2] = gglMulAddx(m[2], s, a[2]);
-}
-
-static inline
-void vss3(GLfixed* d, const GLfixed* m, GLfixed s, const GLfixed* a) {
- d[0] = gglMulSubx(m[0], s, a[0]);
- d[1] = gglMulSubx(m[1], s, a[1]);
- d[2] = gglMulSubx(m[2], s, a[2]);
-}
-
-static inline
-void vmla3(GLfixed* d,
- const GLfixed* m0, const GLfixed* m1, const GLfixed* a)
-{
- d[0] = gglMulAddx(m0[0], m1[0], a[0]);
- d[1] = gglMulAddx(m0[1], m1[1], a[1]);
- d[2] = gglMulAddx(m0[2], m1[2], a[2]);
-}
-
-static inline
-void vmul3(GLfixed* d, const GLfixed* m0, const GLfixed* m1) {
- d[0] = gglMulx(m0[0], m1[0]);
- d[1] = gglMulx(m0[1], m1[1]);
- d[2] = gglMulx(m0[2], m1[2]);
-}
-
-void vnorm3(GLfixed* d, const GLfixed* a)
-{
- // we must take care of overflows when normalizing a vector
- GLfixed n;
- int32_t x = a[0]; x = x>=0 ? x : -x;
- int32_t y = a[1]; y = y>=0 ? y : -y;
- int32_t z = a[2]; z = z>=0 ? z : -z;
- if (ggl_likely(x<=0x6800 && y<=0x6800 && z<= 0x6800)) {
- // in this case this will all fit on 32 bits
- n = x*x + y*y + z*z;
- n = gglSqrtRecipx(n);
- n <<= 8;
- } else {
- // here norm^2 is at least 0x7EC00000 (>>32 == 0.495117)
- n = vsquare3(x, y, z);
- n = gglSqrtRecipx(n);
- }
- vscale3(d, a, n);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark lighting equations
-#endif
-
-static inline void light_picker(ogles_context_t* c)
-{
- if (ggl_likely(!c->lighting.enable)) {
- c->lighting.lightVertex = lightVertexNop;
- return;
- }
- if (c->lighting.colorMaterial.enable) {
- c->lighting.lightVertex = lightVertexMaterial;
- } else {
- c->lighting.lightVertex = lightVertex;
- }
-}
-
-static inline void validate_light_mvi(ogles_context_t* c)
-{
- uint32_t en = c->lighting.enabledLights;
- // Vector from object to viewer, in eye coordinates
- while (en) {
- const int i = 31 - gglClz(en);
- en &= ~(1<<i);
- light_t& l = c->lighting.lights[i];
-#if OBJECT_SPACE_LIGHTING
- c->transforms.mvui.point4(&c->transforms.mvui,
- &l.objPosition, &l.position);
-#else
- l.objPosition = l.position;
-#endif
- vnorm3(l.normalizedObjPosition.v, l.objPosition.v);
- }
- const vec4_t eyeViewer = { 0, 0, 0x10000, 0 };
-#if OBJECT_SPACE_LIGHTING
- c->transforms.mvui.point3(&c->transforms.mvui,
- &c->lighting.objViewer, &eyeViewer);
- vnorm3(c->lighting.objViewer.v, c->lighting.objViewer.v);
-#else
- c->lighting.objViewer = eyeViewer;
-#endif
-}
-
-static inline void validate_light(ogles_context_t* c)
-{
- // if colorMaterial is enabled, we get the color from the vertex
- if (!c->lighting.colorMaterial.enable) {
- material_t& material = c->lighting.front;
- uint32_t en = c->lighting.enabledLights;
- while (en) {
- const int i = 31 - gglClz(en);
- en &= ~(1<<i);
- light_t& l = c->lighting.lights[i];
- vmul3(l.implicitAmbient.v, material.ambient.v, l.ambient.v);
- vmul3(l.implicitDiffuse.v, material.diffuse.v, l.diffuse.v);
- vmul3(l.implicitSpecular.v, material.specular.v, l.specular.v);
-
- // this is just a flag to tell if we have a specular component
- l.implicitSpecular.v[3] =
- l.implicitSpecular.r |
- l.implicitSpecular.g |
- l.implicitSpecular.b;
-
- l.rConstAttenuation = (l.attenuation[1] | l.attenuation[2])==0;
- if (l.rConstAttenuation)
- l.rConstAttenuation = gglRecipFast(l.attenuation[0]);
- }
- // emission and ambient for the whole scene
- vmla3( c->lighting.implicitSceneEmissionAndAmbient.v,
- c->lighting.lightModel.ambient.v,
- material.ambient.v,
- material.emission.v);
- c->lighting.implicitSceneEmissionAndAmbient.a = material.diffuse.a;
- }
- validate_light_mvi(c);
-}
-
-void invalidate_lighting(ogles_context_t* c)
-{
- // TODO: pick lightVertexValidate or lightVertexValidateMVI
- // instead of systematically the heavier lightVertexValidate()
- c->lighting.lightVertex = lightVertexValidate;
-}
-
-void ogles_invalidate_lighting_mvui(ogles_context_t* c)
-{
- invalidate_lighting(c);
-}
-
-void lightVertexNop(ogles_context_t*, vertex_t* v)
-{
- // we should never end-up here
-}
-
-void lightVertexValidateMVI(ogles_context_t* c, vertex_t* v)
-{
- validate_light_mvi(c);
- light_picker(c);
- c->lighting.lightVertex(c, v);
-}
-
-void lightVertexValidate(ogles_context_t* c, vertex_t* v)
-{
- validate_light(c);
- light_picker(c);
- c->lighting.lightVertex(c, v);
-}
-
-void lightVertexMaterial(ogles_context_t* c, vertex_t* v)
-{
- // fetch the material color
- const GLvoid* cp = c->arrays.color.element(
- v->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v->color.v, cp);
-
- // acquire the color-material from the vertex
- material_t& material = c->lighting.front;
- material.ambient =
- material.diffuse = v->color;
- // implicit arguments need to be computed per/vertex
- uint32_t en = c->lighting.enabledLights;
- while (en) {
- const int i = 31 - gglClz(en);
- en &= ~(1<<i);
- light_t& l = c->lighting.lights[i];
- vmul3(l.implicitAmbient.v, material.ambient.v, l.ambient.v);
- vmul3(l.implicitDiffuse.v, material.diffuse.v, l.diffuse.v);
- vmul3(l.implicitSpecular.v, material.specular.v, l.specular.v);
- // this is just a flag to tell if we have a specular component
- l.implicitSpecular.v[3] =
- l.implicitSpecular.r |
- l.implicitSpecular.g |
- l.implicitSpecular.b;
- }
- // emission and ambient for the whole scene
- vmla3( c->lighting.implicitSceneEmissionAndAmbient.v,
- c->lighting.lightModel.ambient.v,
- material.ambient.v,
- material.emission.v);
- c->lighting.implicitSceneEmissionAndAmbient.a = material.diffuse.a;
-
- // now we can light our vertex as usual
- lightVertex(c, v);
-}
-
-void lightVertex(ogles_context_t* c, vertex_t* v)
-{
- // emission and ambient for the whole scene
- vec4_t r = c->lighting.implicitSceneEmissionAndAmbient;
- const vec4_t objViewer = c->lighting.objViewer;
-
- uint32_t en = c->lighting.enabledLights;
- if (ggl_likely(en)) {
- // since we do the lighting in object-space, we don't need to
- // transform each normal. However, we might still have to normalize
- // it if GL_NORMALIZE is enabled.
- vec4_t n;
- c->arrays.normal.fetch(c, n.v,
- c->arrays.normal.element(v->index & vertex_cache_t::INDEX_MASK));
-
-#if !OBJECT_SPACE_LIGHTING
- c->transforms.mvui.point3(&c->transforms.mvui, &n, &n);
-#endif
-
- // TODO: right now we handle GL_RESCALE_NORMALS as if it were
- // GL_NORMALIZE. We could optimize this by scaling mvui
- // appropriately instead.
- if (c->transforms.rescaleNormals)
- vnorm3(n.v, n.v);
-
- const material_t& material = c->lighting.front;
- const int twoSide = c->lighting.lightModel.twoSide;
-
- while (en) {
- const int i = 31 - gglClz(en);
- en &= ~(1<<i);
- const light_t& l = c->lighting.lights[i];
-
- vec4_t d, t;
- GLfixed s;
- GLfixed sqDist = 0x10000;
-
- // compute vertex-to-light vector
- if (ggl_unlikely(l.position.w)) {
- // lightPos/1.0 - vertex/vertex.w == lightPos*vertex.w - vertex
- vss3(d.v, l.objPosition.v, v->obj.w, v->obj.v);
- sqDist = dot3(d.v, d.v);
- vscale3(d.v, d.v, gglSqrtRecipx(sqDist));
- } else {
- // TODO: avoid copy here
- d = l.normalizedObjPosition;
- }
-
- // ambient & diffuse
- s = dot3(n.v, d.v);
- s = (s<0) ? (twoSide?(-s):0) : s;
- vsa3(t.v, l.implicitDiffuse.v, s, l.implicitAmbient.v);
-
- // specular
- if (ggl_unlikely(s && l.implicitSpecular.v[3])) {
- vec4_t h;
- h.x = d.x + objViewer.x;
- h.y = d.y + objViewer.y;
- h.z = d.z + objViewer.z;
- vnorm3(h.v, h.v);
- s = dot3(n.v, h.v);
- s = (s<0) ? (twoSide?(-s):0) : s;
- if (s > 0) {
- s = gglPowx(s, material.shininess);
- vsa3(t.v, l.implicitSpecular.v, s, t.v);
- }
- }
-
- // spot
- if (ggl_unlikely(l.spotCutoff != gglIntToFixed(180))) {
- GLfixed spotAtt = -dot3(l.normalizedSpotDir.v, d.v);
- if (spotAtt >= l.spotCutoffCosine) {
- vscale3(t.v, t.v, gglPowx(spotAtt, l.spotExp));
- }
- }
-
- // attenuation
- if (ggl_unlikely(l.position.w)) {
- if (l.rConstAttenuation) {
- s = l.rConstAttenuation;
- } else {
- s = gglMulAddx(sqDist, l.attenuation[2], l.attenuation[0]);
- if (l.attenuation[1])
- s = gglMulAddx(gglSqrtx(sqDist), l.attenuation[1], s);
- s = gglRecipFast(s);
- }
- vscale3(t.v, t.v, s);
- }
-
- r.r += t.r;
- r.g += t.g;
- r.b += t.b;
- }
- }
- v->color.r = gglClampx(r.r);
- v->color.g = gglClampx(r.g);
- v->color.b = gglClampx(r.b);
- v->color.a = gglClampx(r.a);
- v->flags |= vertex_t::LIT;
-}
-
-static void lightModelx(GLenum pname, GLfixed param, ogles_context_t* c)
-{
- if (ggl_unlikely(pname != GL_LIGHT_MODEL_TWO_SIDE)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->lighting.lightModel.twoSide = param ? GL_TRUE : GL_FALSE;
- invalidate_lighting(c);
-}
-
-static void lightx(GLenum i, GLenum pname, GLfixed param, ogles_context_t* c)
-{
- if (ggl_unlikely(uint32_t(i-GL_LIGHT0) >= OGLES_MAX_LIGHTS)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- light_t& light = c->lighting.lights[i-GL_LIGHT0];
- const GLfixed kDegToRad = GLfixed((M_PI * gglIntToFixed(1)) / 180.0f);
- switch (pname) {
- case GL_SPOT_EXPONENT:
- if (GGLfixed(param) >= gglIntToFixed(128)) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- light.spotExp = param;
- break;
- case GL_SPOT_CUTOFF:
- if (param!=gglIntToFixed(180) && GGLfixed(param)>=gglIntToFixed(90)) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- light.spotCutoff = param;
- light.spotCutoffCosine =
- gglFloatToFixed(cosinef((M_PI/(180.0f*65536.0f))*param));
- break;
- case GL_CONSTANT_ATTENUATION:
- if (param < 0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- light.attenuation[0] = param;
- break;
- case GL_LINEAR_ATTENUATION:
- if (param < 0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- light.attenuation[1] = param;
- break;
- case GL_QUADRATIC_ATTENUATION:
- if (param < 0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- light.attenuation[2] = param;
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- invalidate_lighting(c);
-}
-
-static void lightxv(GLenum i, GLenum pname, const GLfixed *params, ogles_context_t* c)
-{
- if (ggl_unlikely(uint32_t(i-GL_LIGHT0) >= OGLES_MAX_LIGHTS)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- GLfixed* what;
- light_t& light = c->lighting.lights[i-GL_LIGHT0];
- switch (pname) {
- case GL_AMBIENT:
- what = light.ambient.v;
- break;
- case GL_DIFFUSE:
- what = light.diffuse.v;
- break;
- case GL_SPECULAR:
- what = light.specular.v;
- break;
- case GL_POSITION: {
- ogles_validate_transform(c, transform_state_t::MODELVIEW);
- transform_t& mv = c->transforms.modelview.transform;
- mv.point4(&mv, &light.position, reinterpret_cast<vec4_t const*>(params));
- invalidate_lighting(c);
- return;
- }
- case GL_SPOT_DIRECTION: {
-#if OBJECT_SPACE_LIGHTING
- ogles_validate_transform(c, transform_state_t::MVUI);
- transform_t& mvui = c->transforms.mvui;
- mvui.point3(&mvui, &light.spotDir, reinterpret_cast<vec4_t const*>(params));
-#else
- light.spotDir = *reinterpret_cast<vec4_t const*>(params);
-#endif
- vnorm3(light.normalizedSpotDir.v, light.spotDir.v);
- invalidate_lighting(c);
- return;
- }
- default:
- lightx(i, pname, params[0], c);
- return;
- }
- what[0] = params[0];
- what[1] = params[1];
- what[2] = params[2];
- what[3] = params[3];
- invalidate_lighting(c);
-}
-
-static void materialx(GLenum face, GLenum pname, GLfixed param, ogles_context_t* c)
-{
- if (ggl_unlikely(face != GL_FRONT_AND_BACK)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (ggl_unlikely(pname != GL_SHININESS)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->lighting.front.shininess = param;
- invalidate_lighting(c);
-}
-
-static void fogx(GLenum pname, GLfixed param, ogles_context_t* c)
-{
- switch (pname) {
- case GL_FOG_DENSITY:
- if (param >= 0) {
- c->fog.density = param;
- break;
- }
- ogles_error(c, GL_INVALID_VALUE);
- break;
- case GL_FOG_START:
- c->fog.start = param;
- c->fog.invEndMinusStart = gglRecip(c->fog.end - c->fog.start);
- break;
- case GL_FOG_END:
- c->fog.end = param;
- c->fog.invEndMinusStart = gglRecip(c->fog.end - c->fog.start);
- break;
- case GL_FOG_MODE:
- switch (param) {
- case GL_LINEAR:
- c->fog.mode = param;
- c->fog.fog = fog_linear;
- break;
- case GL_EXP:
- c->fog.mode = param;
- c->fog.fog = fog_exp;
- break;
- case GL_EXP2:
- c->fog.mode = param;
- c->fog.fog = fog_exp2;
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- break;
- }
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- break;
- }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-using namespace android;
-
-#if 0
-#pragma mark -
-#pragma mark lighting APIs
-#endif
-
-void glShadeModel(GLenum mode)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (ggl_unlikely(mode != GL_SMOOTH && mode != GL_FLAT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->lighting.shadeModel = mode;
-}
-
-void glLightModelf(GLenum pname, GLfloat param)
-{
- ogles_context_t* c = ogles_context_t::get();
- lightModelx(pname, gglFloatToFixed(param), c);
-}
-
-void glLightModelx(GLenum pname, GLfixed param)
-{
- ogles_context_t* c = ogles_context_t::get();
- lightModelx(pname, param, c);
-}
-
-void glLightModelfv(GLenum pname, const GLfloat *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (pname == GL_LIGHT_MODEL_TWO_SIDE) {
- lightModelx(pname, gglFloatToFixed(params[0]), c);
- return;
- }
-
- if (ggl_unlikely(pname != GL_LIGHT_MODEL_AMBIENT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- c->lighting.lightModel.ambient.r = gglFloatToFixed(params[0]);
- c->lighting.lightModel.ambient.g = gglFloatToFixed(params[1]);
- c->lighting.lightModel.ambient.b = gglFloatToFixed(params[2]);
- c->lighting.lightModel.ambient.a = gglFloatToFixed(params[3]);
- invalidate_lighting(c);
-}
-
-void glLightModelxv(GLenum pname, const GLfixed *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (pname == GL_LIGHT_MODEL_TWO_SIDE) {
- lightModelx(pname, params[0], c);
- return;
- }
-
- if (ggl_unlikely(pname != GL_LIGHT_MODEL_AMBIENT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- c->lighting.lightModel.ambient.r = params[0];
- c->lighting.lightModel.ambient.g = params[1];
- c->lighting.lightModel.ambient.b = params[2];
- c->lighting.lightModel.ambient.a = params[3];
- invalidate_lighting(c);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-void glLightf(GLenum i, GLenum pname, GLfloat param)
-{
- ogles_context_t* c = ogles_context_t::get();
- lightx(i, pname, gglFloatToFixed(param), c);
-}
-
-void glLightx(GLenum i, GLenum pname, GLfixed param)
-{
- ogles_context_t* c = ogles_context_t::get();
- lightx(i, pname, param, c);
-}
-
-void glLightfv(GLenum i, GLenum pname, const GLfloat *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- switch (pname) {
- case GL_SPOT_EXPONENT:
- case GL_SPOT_CUTOFF:
- case GL_CONSTANT_ATTENUATION:
- case GL_LINEAR_ATTENUATION:
- case GL_QUADRATIC_ATTENUATION:
- lightx(i, pname, gglFloatToFixed(params[0]), c);
- return;
- }
-
- GLfixed paramsx[4];
- paramsx[0] = gglFloatToFixed(params[0]);
- paramsx[1] = gglFloatToFixed(params[1]);
- paramsx[2] = gglFloatToFixed(params[2]);
- if (pname != GL_SPOT_DIRECTION)
- paramsx[3] = gglFloatToFixed(params[3]);
-
- lightxv(i, pname, paramsx, c);
-}
-
-void glLightxv(GLenum i, GLenum pname, const GLfixed *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- lightxv(i, pname, params, c);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-void glMaterialf(GLenum face, GLenum pname, GLfloat param)
-{
- ogles_context_t* c = ogles_context_t::get();
- materialx(face, pname, gglFloatToFixed(param), c);
-}
-
-void glMaterialx(GLenum face, GLenum pname, GLfixed param)
-{
- ogles_context_t* c = ogles_context_t::get();
- materialx(face, pname, param, c);
-}
-
-void glMaterialfv(
- GLenum face, GLenum pname, const GLfloat *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (ggl_unlikely(face != GL_FRONT_AND_BACK)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- GLfixed* what=0;
- GLfixed* other=0;
- switch (pname) {
- case GL_AMBIENT: what = c->lighting.front.ambient.v; break;
- case GL_DIFFUSE: what = c->lighting.front.diffuse.v; break;
- case GL_SPECULAR: what = c->lighting.front.specular.v; break;
- case GL_EMISSION: what = c->lighting.front.emission.v; break;
- case GL_AMBIENT_AND_DIFFUSE:
- what = c->lighting.front.ambient.v;
- other = c->lighting.front.diffuse.v;
- break;
- case GL_SHININESS:
- c->lighting.front.shininess = gglFloatToFixed(params[0]);
- invalidate_lighting(c);
- return;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- what[0] = gglFloatToFixed(params[0]);
- what[1] = gglFloatToFixed(params[1]);
- what[2] = gglFloatToFixed(params[2]);
- what[3] = gglFloatToFixed(params[3]);
- if (other) {
- other[0] = what[0];
- other[1] = what[1];
- other[2] = what[2];
- other[3] = what[3];
- }
- invalidate_lighting(c);
-}
-
-void glMaterialxv(
- GLenum face, GLenum pname, const GLfixed *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (ggl_unlikely(face != GL_FRONT_AND_BACK)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- GLfixed* what=0;
- GLfixed* other=0;
- switch (pname) {
- case GL_AMBIENT: what = c->lighting.front.ambient.v; break;
- case GL_DIFFUSE: what = c->lighting.front.diffuse.v; break;
- case GL_SPECULAR: what = c->lighting.front.specular.v; break;
- case GL_EMISSION: what = c->lighting.front.emission.v; break;
- case GL_AMBIENT_AND_DIFFUSE:
- what = c->lighting.front.ambient.v;
- other = c->lighting.front.diffuse.v;
- break;
- case GL_SHININESS:
- c->lighting.front.shininess = gglFloatToFixed(params[0]);
- invalidate_lighting(c);
- return;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- what[0] = params[0];
- what[1] = params[1];
- what[2] = params[2];
- what[3] = params[3];
- if (other) {
- other[0] = what[0];
- other[1] = what[1];
- other[2] = what[2];
- other[3] = what[3];
- }
- invalidate_lighting(c);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark fog
-#endif
-
-void glFogf(GLenum pname, GLfloat param) {
- ogles_context_t* c = ogles_context_t::get();
- GLfixed paramx = (GLfixed)param;
- if (pname != GL_FOG_MODE)
- paramx = gglFloatToFixed(param);
- fogx(pname, paramx, c);
-}
-
-void glFogx(GLenum pname, GLfixed param) {
- ogles_context_t* c = ogles_context_t::get();
- fogx(pname, param, c);
-}
-
-void glFogfv(GLenum pname, const GLfloat *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (pname != GL_FOG_COLOR) {
- GLfixed paramx = (GLfixed)params[0];
- if (pname != GL_FOG_MODE)
- paramx = gglFloatToFixed(params[0]);
- fogx(pname, paramx, c);
- return;
- }
- GLfixed paramsx[4];
- paramsx[0] = gglFloatToFixed(params[0]);
- paramsx[1] = gglFloatToFixed(params[1]);
- paramsx[2] = gglFloatToFixed(params[2]);
- paramsx[3] = gglFloatToFixed(params[3]);
- c->rasterizer.procs.fogColor3xv(c, paramsx);
-}
-
-void glFogxv(GLenum pname, const GLfixed *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (pname != GL_FOG_COLOR) {
- fogx(pname, params[0], c);
- return;
- }
- c->rasterizer.procs.fogColor3xv(c, params);
-}
diff --git a/opengl/libagl/light.h b/opengl/libagl/light.h
deleted file mode 100644
index 39e3309..0000000
--- a/opengl/libagl/light.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* libs/opengles/light.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_LIGHT_H
-#define ANDROID_OPENGLES_LIGHT_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-
-// Set to 1 for object-space lighting evaluation.
-// There are still some bugs with object-space lighting,
-// especially visible in the San Angeles demo.
-#define OBJECT_SPACE_LIGHTING 0
-
-
-namespace android {
-
-namespace gl {
-struct ogles_context_t;
-};
-
-void ogles_init_light(ogles_context_t* c);
-void ogles_uninit_light(ogles_context_t* c);
-void ogles_invalidate_lighting_mvui(ogles_context_t* c);
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_LIGHT_H
-
diff --git a/opengl/libagl/matrix.cpp b/opengl/libagl/matrix.cpp
deleted file mode 100644
index cdeccb3..0000000
--- a/opengl/libagl/matrix.cpp
+++ /dev/null
@@ -1,1134 +0,0 @@
-/* libs/opengles/matrix.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-
-#include "context.h"
-#include "fp.h"
-#include "state.h"
-#include "matrix.h"
-#include "vertex.h"
-#include "light.h"
-
-#if defined(__arm__) && defined(__thumb__)
-#warning "matrix.cpp should not be compiled in thumb on ARM."
-#endif
-
-#define I(_i, _j) ((_j)+ 4*(_i))
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static const GLfloat gIdentityf[16] = { 1,0,0,0,
- 0,1,0,0,
- 0,0,1,0,
- 0,0,0,1 };
-
-static const matrixx_t gIdentityx = {
- { 0x10000,0,0,0,
- 0,0x10000,0,0,
- 0,0,0x10000,0,
- 0,0,0,0x10000
- }
- };
-
-static void point2__nop(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point3__nop(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point4__nop(transform_t const*, vec4_t* c, vec4_t const* o);
-static void normal__nop(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point2__generic(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point3__generic(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point4__generic(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point3__mvui(transform_t const*, vec4_t* c, vec4_t const* o);
-static void point4__mvui(transform_t const*, vec4_t* c, vec4_t const* o);
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-void ogles_init_matrix(ogles_context_t* c)
-{
- c->transforms.modelview.init(OGLES_MODELVIEW_STACK_DEPTH);
- c->transforms.projection.init(OGLES_PROJECTION_STACK_DEPTH);
- for (int i=0; i<GGL_TEXTURE_UNIT_COUNT ; i++)
- c->transforms.texture[i].init(OGLES_TEXTURE_STACK_DEPTH);
-
- c->transforms.current = &c->transforms.modelview;
- c->transforms.matrixMode = GL_MODELVIEW;
- c->transforms.dirty = transform_state_t::VIEWPORT |
- transform_state_t::MVUI |
- transform_state_t::MVIT |
- transform_state_t::MVP;
- c->transforms.mvp.loadIdentity();
- c->transforms.mvp4.loadIdentity();
- c->transforms.mvit4.loadIdentity();
- c->transforms.mvui.loadIdentity();
- c->transforms.vpt.loadIdentity();
- c->transforms.vpt.zNear = 0.0f;
- c->transforms.vpt.zFar = 1.0f;
-}
-
-void ogles_uninit_matrix(ogles_context_t* c)
-{
- c->transforms.modelview.uninit();
- c->transforms.projection.uninit();
- for (int i=0; i<GGL_TEXTURE_UNIT_COUNT ; i++)
- c->transforms.texture[i].uninit();
-}
-
-static void validate_perspective(ogles_context_t* c, vertex_t* v)
-{
- const uint32_t enables = c->rasterizer.state.enables;
- c->arrays.perspective = (c->clipPlanes.enable) ?
- ogles_vertex_clipAllPerspective3D : ogles_vertex_perspective3D;
- if (enables & (GGL_ENABLE_DEPTH_TEST|GGL_ENABLE_FOG)) {
- c->arrays.perspective = ogles_vertex_perspective3DZ;
- if (c->clipPlanes.enable || (enables&GGL_ENABLE_FOG))
- c->arrays.perspective = ogles_vertex_clipAllPerspective3DZ;
- }
- if ((c->arrays.vertex.size != 4) &&
- (c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION)) {
- c->arrays.perspective = ogles_vertex_perspective2D;
- }
- c->arrays.perspective(c, v);
-}
-
-void ogles_invalidate_perspective(ogles_context_t* c)
-{
- c->arrays.perspective = validate_perspective;
-}
-
-void ogles_validate_transform_impl(ogles_context_t* c, uint32_t want)
-{
- int dirty = c->transforms.dirty & want;
-
- // Validate the modelview
- if (dirty & transform_state_t::MODELVIEW) {
- c->transforms.modelview.validate();
- }
-
- // Validate the projection stack (in fact, it's never needed)
- if (dirty & transform_state_t::PROJECTION) {
- c->transforms.projection.validate();
- }
-
- // Validate the viewport transformation
- if (dirty & transform_state_t::VIEWPORT) {
- vp_transform_t& vpt = c->transforms.vpt;
- vpt.transform.matrix.load(vpt.matrix);
- vpt.transform.picker();
- }
-
- // We need to update the mvp (used to transform each vertex)
- if (dirty & transform_state_t::MVP) {
- c->transforms.update_mvp();
- // invalidate perspective (divide by W) and view volume clipping
- ogles_invalidate_perspective(c);
- }
-
- // Validate the mvui (for normal transformation)
- if (dirty & transform_state_t::MVUI) {
- c->transforms.update_mvui();
- ogles_invalidate_lighting_mvui(c);
- }
-
- // Validate the texture stack
- if (dirty & transform_state_t::TEXTURE) {
- for (int i=0; i<GGL_TEXTURE_UNIT_COUNT ; i++)
- c->transforms.texture[i].validate();
- }
-
- // Validate the mvit4 (user-clip planes)
- if (dirty & transform_state_t::MVIT) {
- c->transforms.update_mvit();
- }
-
- c->transforms.dirty &= ~want;
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark transform_t
-#endif
-
-void transform_t::loadIdentity() {
- matrix = gIdentityx;
- flags = 0;
- ops = OP_IDENTITY;
- point2 = point2__nop;
- point3 = point3__nop;
- point4 = point4__nop;
-}
-
-
-static inline
-int notZero(GLfixed v) {
- return abs(v) & ~0x3;
-}
-
-static inline
-int notOne(GLfixed v) {
- return notZero(v - 0x10000);
-}
-
-void transform_t::picker()
-{
- const GLfixed* const m = matrix.m;
-
- // XXX: picker needs to be smarter
- flags = 0;
- ops = OP_ALL;
- point2 = point2__generic;
- point3 = point3__generic;
- point4 = point4__generic;
-
- // find out if this is a 2D projection
- if (!(notZero(m[3]) | notZero(m[7]) | notZero(m[11]) | notOne(m[15]))) {
- flags |= FLAGS_2D_PROJECTION;
- }
-}
-
-void mvui_transform_t::picker()
-{
- flags = 0;
- ops = OP_ALL;
- point3 = point3__mvui;
- point4 = point4__mvui;
-}
-
-void transform_t::dump(const char* what)
-{
- GLfixed const * const m = matrix.m;
- ALOGD("%s:", what);
- for (int i=0 ; i<4 ; i++)
- ALOGD("[%08x %08x %08x %08x] [%f %f %f %f]\n",
- m[I(0,i)], m[I(1,i)], m[I(2,i)], m[I(3,i)],
- fixedToFloat(m[I(0,i)]),
- fixedToFloat(m[I(1,i)]),
- fixedToFloat(m[I(2,i)]),
- fixedToFloat(m[I(3,i)]));
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark matrixx_t
-#endif
-
-void matrixx_t::load(const matrixf_t& rhs) {
- GLfixed* xp = m;
- GLfloat const* fp = rhs.elements();
- unsigned int i = 16;
- do {
- const GLfloat f = *fp++;
- *xp++ = isZerof(f) ? 0 : gglFloatToFixed(f);
- } while (--i);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark matrixf_t
-#endif
-
-void matrixf_t::multiply(matrixf_t& r, const matrixf_t& lhs, const matrixf_t& rhs)
-{
- GLfloat const* const m = lhs.m;
- for (int i=0 ; i<4 ; i++) {
- register const float rhs_i0 = rhs.m[ I(i,0) ];
- register float ri0 = m[ I(0,0) ] * rhs_i0;
- register float ri1 = m[ I(0,1) ] * rhs_i0;
- register float ri2 = m[ I(0,2) ] * rhs_i0;
- register float ri3 = m[ I(0,3) ] * rhs_i0;
- for (int j=1 ; j<4 ; j++) {
- register const float rhs_ij = rhs.m[ I(i,j) ];
- ri0 += m[ I(j,0) ] * rhs_ij;
- ri1 += m[ I(j,1) ] * rhs_ij;
- ri2 += m[ I(j,2) ] * rhs_ij;
- ri3 += m[ I(j,3) ] * rhs_ij;
- }
- r.m[ I(i,0) ] = ri0;
- r.m[ I(i,1) ] = ri1;
- r.m[ I(i,2) ] = ri2;
- r.m[ I(i,3) ] = ri3;
- }
-}
-
-void matrixf_t::dump(const char* what) {
- ALOGD("%s", what);
- ALOGD("[ %9f %9f %9f %9f ]", m[I(0,0)], m[I(1,0)], m[I(2,0)], m[I(3,0)]);
- ALOGD("[ %9f %9f %9f %9f ]", m[I(0,1)], m[I(1,1)], m[I(2,1)], m[I(3,1)]);
- ALOGD("[ %9f %9f %9f %9f ]", m[I(0,2)], m[I(1,2)], m[I(2,2)], m[I(3,2)]);
- ALOGD("[ %9f %9f %9f %9f ]", m[I(0,3)], m[I(1,3)], m[I(2,3)], m[I(3,3)]);
-}
-
-void matrixf_t::loadIdentity() {
- memcpy(m, gIdentityf, sizeof(m));
-}
-
-void matrixf_t::set(const GLfixed* rhs) {
- load(rhs);
-}
-
-void matrixf_t::set(const GLfloat* rhs) {
- load(rhs);
-}
-
-void matrixf_t::load(const GLfixed* rhs) {
- GLfloat* fp = m;
- unsigned int i = 16;
- do {
- *fp++ = fixedToFloat(*rhs++);
- } while (--i);
-}
-
-void matrixf_t::load(const GLfloat* rhs) {
- memcpy(m, rhs, sizeof(m));
-}
-
-void matrixf_t::load(const matrixf_t& rhs) {
- operator = (rhs);
-}
-
-void matrixf_t::multiply(const matrixf_t& rhs) {
- matrixf_t r;
- multiply(r, *this, rhs);
- operator = (r);
-}
-
-void matrixf_t::translate(GLfloat x, GLfloat y, GLfloat z) {
- for (int i=0 ; i<4 ; i++) {
- m[12+i] += m[i]*x + m[4+i]*y + m[8+i]*z;
- }
-}
-
-void matrixf_t::scale(GLfloat x, GLfloat y, GLfloat z) {
- for (int i=0 ; i<4 ; i++) {
- m[ i] *= x;
- m[4+i] *= y;
- m[8+i] *= z;
- }
-}
-
-void matrixf_t::rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z)
-{
- matrixf_t rotation;
- GLfloat* r = rotation.m;
- GLfloat c, s;
- r[3] = 0; r[7] = 0; r[11]= 0;
- r[12]= 0; r[13]= 0; r[14]= 0; r[15]= 1;
- a *= GLfloat(M_PI / 180.0f);
- sincosf(a, &s, &c);
- if (isOnef(x) && isZerof(y) && isZerof(z)) {
- r[5] = c; r[10]= c;
- r[6] = s; r[9] = -s;
- r[1] = 0; r[2] = 0;
- r[4] = 0; r[8] = 0;
- r[0] = 1;
- } else if (isZerof(x) && isOnef(y) && isZerof(z)) {
- r[0] = c; r[10]= c;
- r[8] = s; r[2] = -s;
- r[1] = 0; r[4] = 0;
- r[6] = 0; r[9] = 0;
- r[5] = 1;
- } else if (isZerof(x) && isZerof(y) && isOnef(z)) {
- r[0] = c; r[5] = c;
- r[1] = s; r[4] = -s;
- r[2] = 0; r[6] = 0;
- r[8] = 0; r[9] = 0;
- r[10]= 1;
- } else {
- const GLfloat len = sqrtf(x*x + y*y + z*z);
- if (!isOnef(len)) {
- const GLfloat recipLen = reciprocalf(len);
- x *= recipLen;
- y *= recipLen;
- z *= recipLen;
- }
- const GLfloat nc = 1.0f - c;
- const GLfloat xy = x * y;
- const GLfloat yz = y * z;
- const GLfloat zx = z * x;
- const GLfloat xs = x * s;
- const GLfloat ys = y * s;
- const GLfloat zs = z * s;
- r[ 0] = x*x*nc + c; r[ 4] = xy*nc - zs; r[ 8] = zx*nc + ys;
- r[ 1] = xy*nc + zs; r[ 5] = y*y*nc + c; r[ 9] = yz*nc - xs;
- r[ 2] = zx*nc - ys; r[ 6] = yz*nc + xs; r[10] = z*z*nc + c;
- }
- multiply(rotation);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark matrix_stack_t
-#endif
-
-void matrix_stack_t::init(int depth) {
- stack = new matrixf_t[depth];
- ops = new uint8_t[depth];
- maxDepth = depth;
- depth = 0;
- dirty = 0;
- loadIdentity();
-}
-
-void matrix_stack_t::uninit() {
- delete [] stack;
- delete [] ops;
-}
-
-void matrix_stack_t::loadIdentity() {
- transform.loadIdentity();
- stack[depth].loadIdentity();
- ops[depth] = OP_IDENTITY;
-}
-
-void matrix_stack_t::load(const GLfixed* rhs)
-{
- memcpy(transform.matrix.m, rhs, sizeof(transform.matrix.m));
- stack[depth].load(rhs);
- ops[depth] = OP_ALL; // TODO: we should look at the matrix
-}
-
-void matrix_stack_t::load(const GLfloat* rhs)
-{
- stack[depth].load(rhs);
- ops[depth] = OP_ALL; // TODO: we should look at the matrix
-}
-
-void matrix_stack_t::multiply(const matrixf_t& rhs)
-{
- stack[depth].multiply(rhs);
- ops[depth] = OP_ALL; // TODO: we should look at the matrix
-}
-
-void matrix_stack_t::translate(GLfloat x, GLfloat y, GLfloat z)
-{
- stack[depth].translate(x,y,z);
- ops[depth] |= OP_TRANSLATE;
-}
-
-void matrix_stack_t::scale(GLfloat x, GLfloat y, GLfloat z)
-{
- stack[depth].scale(x,y,z);
- if (x==y && y==z) {
- ops[depth] |= OP_UNIFORM_SCALE;
- } else {
- ops[depth] |= OP_SCALE;
- }
-}
-
-void matrix_stack_t::rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z)
-{
- stack[depth].rotate(a,x,y,z);
- ops[depth] |= OP_ROTATE;
-}
-
-void matrix_stack_t::validate()
-{
- if (dirty & DO_FLOAT_TO_FIXED) {
- transform.matrix.load(top());
- }
- if (dirty & DO_PICKER) {
- transform.picker();
- }
- dirty = 0;
-}
-
-GLint matrix_stack_t::push()
-{
- if (depth >= (maxDepth-1)) {
- return GL_STACK_OVERFLOW;
- }
- stack[depth+1] = stack[depth];
- ops[depth+1] = ops[depth];
- depth++;
- return 0;
-}
-
-GLint matrix_stack_t::pop()
-{
- if (depth == 0) {
- return GL_STACK_UNDERFLOW;
- }
- depth--;
- return 0;
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark vp_transform_t
-#endif
-
-void vp_transform_t::loadIdentity() {
- transform.loadIdentity();
- matrix.loadIdentity();
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark transform_state_t
-#endif
-
-void transform_state_t::invalidate()
-{
- switch (matrixMode) {
- case GL_MODELVIEW: dirty |= MODELVIEW | MVP | MVUI | MVIT; break;
- case GL_PROJECTION: dirty |= PROJECTION | MVP; break;
- case GL_TEXTURE: dirty |= TEXTURE | MVP; break;
- }
- current->dirty = matrix_stack_t::DO_PICKER |
- matrix_stack_t::DO_FLOAT_TO_FIXED;
-}
-
-void transform_state_t::update_mvp()
-{
- matrixf_t temp_mvp;
- matrixf_t::multiply(temp_mvp, projection.top(), modelview.top());
- mvp4.matrix.load(temp_mvp);
- mvp4.picker();
-
- if (mvp4.flags & transform_t::FLAGS_2D_PROJECTION) {
- // the mvp matrix doesn't transform W, in this case we can
- // premultiply it with the viewport transformation. In addition to
- // being more efficient, this is also much more accurate and in fact
- // is needed for 2D drawing with a resulting 1:1 mapping.
- matrixf_t mvpv;
- matrixf_t::multiply(mvpv, vpt.matrix, temp_mvp);
- mvp.matrix.load(mvpv);
- mvp.picker();
- } else {
- mvp = mvp4;
- }
-}
-
-static inline
-GLfloat det22(GLfloat a, GLfloat b, GLfloat c, GLfloat d) {
- return a*d - b*c;
-}
-
-static inline
-GLfloat ndet22(GLfloat a, GLfloat b, GLfloat c, GLfloat d) {
- return b*c - a*d;
-}
-
-static __attribute__((noinline))
-void invert(GLfloat* inverse, const GLfloat* src)
-{
- double t;
- int i, j, k, swap;
- GLfloat tmp[4][4];
-
- memcpy(inverse, gIdentityf, sizeof(gIdentityf));
- memcpy(tmp, src, sizeof(GLfloat)*16);
-
- for (i = 0; i < 4; i++) {
- // look for largest element in column
- swap = i;
- for (j = i + 1; j < 4; j++) {
- if (fabs(tmp[j][i]) > fabs(tmp[i][i])) {
- swap = j;
- }
- }
-
- if (swap != i) {
- /* swap rows. */
- for (k = 0; k < 4; k++) {
- t = tmp[i][k];
- tmp[i][k] = tmp[swap][k];
- tmp[swap][k] = t;
-
- t = inverse[i*4+k];
- inverse[i*4+k] = inverse[swap*4+k];
- inverse[swap*4+k] = t;
- }
- }
-
- t = 1.0f / tmp[i][i];
- for (k = 0; k < 4; k++) {
- tmp[i][k] *= t;
- inverse[i*4+k] *= t;
- }
- for (j = 0; j < 4; j++) {
- if (j != i) {
- t = tmp[j][i];
- for (k = 0; k < 4; k++) {
- tmp[j][k] -= tmp[i][k]*t;
- inverse[j*4+k] -= inverse[i*4+k]*t;
- }
- }
- }
- }
-}
-
-void transform_state_t::update_mvit()
-{
- GLfloat r[16];
- const GLfloat* const mv = modelview.top().elements();
- invert(r, mv);
- // convert to fixed-point and transpose
- GLfixed* const x = mvit4.matrix.m;
- for (int i=0 ; i<4 ; i++)
- for (int j=0 ; j<4 ; j++)
- x[I(i,j)] = gglFloatToFixed(r[I(j,i)]);
- mvit4.picker();
-}
-
-void transform_state_t::update_mvui()
-{
- GLfloat r[16];
- const GLfloat* const mv = modelview.top().elements();
-
- /*
- When evaluating the lighting equation in eye-space, normals
- are transformed by the upper 3x3 modelview inverse-transpose.
- http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node26.html
-
- (note that inverse-transpose is distributive).
- Also note that:
- l(obj) = inv(modelview).l(eye) for local light
- l(obj) = tr(modelview).l(eye) for infinite light
- */
-
- invert(r, mv);
-
- GLfixed* const x = mvui.matrix.m;
-
-#if OBJECT_SPACE_LIGHTING
- for (int i=0 ; i<4 ; i++)
- for (int j=0 ; j<4 ; j++)
- x[I(i,j)] = gglFloatToFixed(r[I(i,j)]);
-#else
- for (int i=0 ; i<4 ; i++)
- for (int j=0 ; j<4 ; j++)
- x[I(i,j)] = gglFloatToFixed(r[I(j,i)]);
-#endif
-
- mvui.picker();
-}
-
-
-// ----------------------------------------------------------------------------
-// transformation and matrices API
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark transformation and matrices API
-#endif
-
-int ogles_surfaceport(ogles_context_t* c, GLint x, GLint y)
-{
- c->viewport.surfaceport.x = x;
- c->viewport.surfaceport.y = y;
-
- ogles_viewport(c,
- c->viewport.x,
- c->viewport.y,
- c->viewport.w,
- c->viewport.h);
-
- ogles_scissor(c,
- c->viewport.scissor.x,
- c->viewport.scissor.y,
- c->viewport.scissor.w,
- c->viewport.scissor.h);
-
- return 0;
-}
-
-void ogles_scissor(ogles_context_t* c,
- GLint x, GLint y, GLsizei w, GLsizei h)
-{
- if ((w|h) < 0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- c->viewport.scissor.x = x;
- c->viewport.scissor.y = y;
- c->viewport.scissor.w = w;
- c->viewport.scissor.h = h;
-
- x += c->viewport.surfaceport.x;
- y += c->viewport.surfaceport.y;
-
- y = c->rasterizer.state.buffers.color.height - (y + h);
- c->rasterizer.procs.scissor(c, x, y, w, h);
-}
-
-void ogles_viewport(ogles_context_t* c,
- GLint x, GLint y, GLsizei w, GLsizei h)
-{
- if ((w|h)<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- c->viewport.x = x;
- c->viewport.y = y;
- c->viewport.w = w;
- c->viewport.h = h;
-
- x += c->viewport.surfaceport.x;
- y += c->viewport.surfaceport.y;
-
- GLint H = c->rasterizer.state.buffers.color.height;
- GLfloat sx = div2f(w);
- GLfloat ox = sx + x;
- GLfloat sy = div2f(h);
- GLfloat oy = sy - y + (H - h);
-
- GLfloat near = c->transforms.vpt.zNear;
- GLfloat far = c->transforms.vpt.zFar;
- GLfloat A = div2f(far - near);
- GLfloat B = div2f(far + near);
-
- // compute viewport matrix
- GLfloat* const f = c->transforms.vpt.matrix.editElements();
- f[0] = sx; f[4] = 0; f[ 8] = 0; f[12] = ox;
- f[1] = 0; f[5] =-sy; f[ 9] = 0; f[13] = oy;
- f[2] = 0; f[6] = 0; f[10] = A; f[14] = B;
- f[3] = 0; f[7] = 0; f[11] = 0; f[15] = 1;
- c->transforms.dirty |= transform_state_t::VIEWPORT;
- if (c->transforms.mvp4.flags & transform_t::FLAGS_2D_PROJECTION)
- c->transforms.dirty |= transform_state_t::MVP;
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark matrix * vertex
-#endif
-
-void point2__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
- const GLfixed* const m = mx->matrix.m;
- const GLfixed rx = rhs->x;
- const GLfixed ry = rhs->y;
- lhs->x = mla2a(rx, m[ 0], ry, m[ 4], m[12]);
- lhs->y = mla2a(rx, m[ 1], ry, m[ 5], m[13]);
- lhs->z = mla2a(rx, m[ 2], ry, m[ 6], m[14]);
- lhs->w = mla2a(rx, m[ 3], ry, m[ 7], m[15]);
-}
-
-void point3__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
- const GLfixed* const m = mx->matrix.m;
- const GLfixed rx = rhs->x;
- const GLfixed ry = rhs->y;
- const GLfixed rz = rhs->z;
- lhs->x = mla3a(rx, m[ 0], ry, m[ 4], rz, m[ 8], m[12]);
- lhs->y = mla3a(rx, m[ 1], ry, m[ 5], rz, m[ 9], m[13]);
- lhs->z = mla3a(rx, m[ 2], ry, m[ 6], rz, m[10], m[14]);
- lhs->w = mla3a(rx, m[ 3], ry, m[ 7], rz, m[11], m[15]);
-}
-
-void point4__generic(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
- const GLfixed* const m = mx->matrix.m;
- const GLfixed rx = rhs->x;
- const GLfixed ry = rhs->y;
- const GLfixed rz = rhs->z;
- const GLfixed rw = rhs->w;
- lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]);
- lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]);
- lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]);
- lhs->w = mla4(rx, m[ 3], ry, m[ 7], rz, m[11], rw, m[15]);
-}
-
-void point3__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
- // this is used for transforming light positions back to object space.
- // w is used as a switch for directional lights, so we need
- // to preserve it.
- const GLfixed* const m = mx->matrix.m;
- const GLfixed rx = rhs->x;
- const GLfixed ry = rhs->y;
- const GLfixed rz = rhs->z;
- lhs->x = mla3(rx, m[ 0], ry, m[ 4], rz, m[ 8]);
- lhs->y = mla3(rx, m[ 1], ry, m[ 5], rz, m[ 9]);
- lhs->z = mla3(rx, m[ 2], ry, m[ 6], rz, m[10]);
- lhs->w = 0;
-}
-
-void point4__mvui(transform_t const* mx, vec4_t* lhs, vec4_t const* rhs) {
- // this is used for transforming light positions back to object space.
- // w is used as a switch for directional lights, so we need
- // to preserve it.
- const GLfixed* const m = mx->matrix.m;
- const GLfixed rx = rhs->x;
- const GLfixed ry = rhs->y;
- const GLfixed rz = rhs->z;
- const GLfixed rw = rhs->w;
- lhs->x = mla4(rx, m[ 0], ry, m[ 4], rz, m[ 8], rw, m[12]);
- lhs->y = mla4(rx, m[ 1], ry, m[ 5], rz, m[ 9], rw, m[13]);
- lhs->z = mla4(rx, m[ 2], ry, m[ 6], rz, m[10], rw, m[14]);
- lhs->w = rw;
-}
-
-void point2__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) {
- lhs->z = 0;
- lhs->w = 0x10000;
- if (lhs != rhs) {
- lhs->x = rhs->x;
- lhs->y = rhs->y;
- }
-}
-
-void point3__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) {
- lhs->w = 0x10000;
- if (lhs != rhs) {
- lhs->x = rhs->x;
- lhs->y = rhs->y;
- lhs->z = rhs->z;
- }
-}
-
-void point4__nop(transform_t const*, vec4_t* lhs, vec4_t const* rhs) {
- if (lhs != rhs)
- *lhs = *rhs;
-}
-
-
-static void frustumf(
- GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
- GLfloat zNear, GLfloat zFar,
- ogles_context_t* c)
- {
- if (cmpf(left,right) ||
- cmpf(top, bottom) ||
- cmpf(zNear, zFar) ||
- isZeroOrNegativef(zNear) ||
- isZeroOrNegativef(zFar))
- {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- const GLfloat r_width = reciprocalf(right - left);
- const GLfloat r_height = reciprocalf(top - bottom);
- const GLfloat r_depth = reciprocalf(zNear - zFar);
- const GLfloat x = mul2f(zNear * r_width);
- const GLfloat y = mul2f(zNear * r_height);
- const GLfloat A = mul2f((right + left) * r_width);
- const GLfloat B = (top + bottom) * r_height;
- const GLfloat C = (zFar + zNear) * r_depth;
- const GLfloat D = mul2f(zFar * zNear * r_depth);
- GLfloat f[16];
- f[ 0] = x;
- f[ 5] = y;
- f[ 8] = A;
- f[ 9] = B;
- f[10] = C;
- f[14] = D;
- f[11] = -1.0f;
- f[ 1] = f[ 2] = f[ 3] =
- f[ 4] = f[ 6] = f[ 7] =
- f[12] = f[13] = f[15] = 0.0f;
-
- matrixf_t rhs;
- rhs.set(f);
- c->transforms.current->multiply(rhs);
- c->transforms.invalidate();
-}
-
-static void orthof(
- GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
- GLfloat zNear, GLfloat zFar,
- ogles_context_t* c)
-{
- if (cmpf(left,right) ||
- cmpf(top, bottom) ||
- cmpf(zNear, zFar))
- {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- const GLfloat r_width = reciprocalf(right - left);
- const GLfloat r_height = reciprocalf(top - bottom);
- const GLfloat r_depth = reciprocalf(zFar - zNear);
- const GLfloat x = mul2f(r_width);
- const GLfloat y = mul2f(r_height);
- const GLfloat z = -mul2f(r_depth);
- const GLfloat tx = -(right + left) * r_width;
- const GLfloat ty = -(top + bottom) * r_height;
- const GLfloat tz = -(zFar + zNear) * r_depth;
- GLfloat f[16];
- f[ 0] = x;
- f[ 5] = y;
- f[10] = z;
- f[12] = tx;
- f[13] = ty;
- f[14] = tz;
- f[15] = 1.0f;
- f[ 1] = f[ 2] = f[ 3] =
- f[ 4] = f[ 6] = f[ 7] =
- f[ 8] = f[ 9] = f[11] = 0.0f;
- matrixf_t rhs;
- rhs.set(f);
- c->transforms.current->multiply(rhs);
- c->transforms.invalidate();
-}
-
-static void depthRangef(GLclampf zNear, GLclampf zFar, ogles_context_t* c)
-{
- zNear = clampToZerof(zNear > 1 ? 1 : zNear);
- zFar = clampToZerof(zFar > 1 ? 1 : zFar);
- GLfloat* const f = c->transforms.vpt.matrix.editElements();
- f[10] = div2f(zFar - zNear);
- f[14] = div2f(zFar + zNear);
- c->transforms.dirty |= transform_state_t::VIEWPORT;
- c->transforms.vpt.zNear = zNear;
- c->transforms.vpt.zFar = zFar;
-}
-
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-
-using namespace android;
-
-void glMatrixMode(GLenum mode)
-{
- ogles_context_t* c = ogles_context_t::get();
- matrix_stack_t* stack = 0;
- switch (mode) {
- case GL_MODELVIEW:
- stack = &c->transforms.modelview;
- break;
- case GL_PROJECTION:
- stack = &c->transforms.projection;
- break;
- case GL_TEXTURE:
- stack = &c->transforms.texture[c->textures.active];
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->transforms.matrixMode = mode;
- c->transforms.current = stack;
-}
-
-void glLoadIdentity()
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->loadIdentity(); // also loads the GLfixed transform
- c->transforms.invalidate();
- c->transforms.current->dirty = 0;
-}
-
-void glLoadMatrixf(const GLfloat* m)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->load(m);
- c->transforms.invalidate();
-}
-
-void glLoadMatrixx(const GLfixed* m)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->load(m); // also loads the GLfixed transform
- c->transforms.invalidate();
- c->transforms.current->dirty &= ~matrix_stack_t::DO_FLOAT_TO_FIXED;
-}
-
-void glMultMatrixf(const GLfloat* m)
-{
- ogles_context_t* c = ogles_context_t::get();
- matrixf_t rhs;
- rhs.set(m);
- c->transforms.current->multiply(rhs);
- c->transforms.invalidate();
-}
-
-void glMultMatrixx(const GLfixed* m)
-{
- ogles_context_t* c = ogles_context_t::get();
- matrixf_t rhs;
- rhs.set(m);
- c->transforms.current->multiply(rhs);
- c->transforms.invalidate();
-}
-
-void glPopMatrix()
-{
- ogles_context_t* c = ogles_context_t::get();
- GLint err = c->transforms.current->pop();
- if (ggl_unlikely(err)) {
- ogles_error(c, err);
- return;
- }
- c->transforms.invalidate();
-}
-
-void glPushMatrix()
-{
- ogles_context_t* c = ogles_context_t::get();
- GLint err = c->transforms.current->push();
- if (ggl_unlikely(err)) {
- ogles_error(c, err);
- return;
- }
- c->transforms.invalidate();
-}
-
-void glFrustumf(
- GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
- GLfloat zNear, GLfloat zFar)
-{
- ogles_context_t* c = ogles_context_t::get();
- frustumf(left, right, bottom, top, zNear, zFar, c);
-}
-
-void glFrustumx(
- GLfixed left, GLfixed right,
- GLfixed bottom, GLfixed top,
- GLfixed zNear, GLfixed zFar)
-{
- ogles_context_t* c = ogles_context_t::get();
- frustumf( fixedToFloat(left), fixedToFloat(right),
- fixedToFloat(bottom), fixedToFloat(top),
- fixedToFloat(zNear), fixedToFloat(zFar),
- c);
-}
-
-void glOrthof(
- GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
- GLfloat zNear, GLfloat zFar)
-{
- ogles_context_t* c = ogles_context_t::get();
- orthof(left, right, bottom, top, zNear, zFar, c);
-}
-
-void glOrthox(
- GLfixed left, GLfixed right,
- GLfixed bottom, GLfixed top,
- GLfixed zNear, GLfixed zFar)
-{
- ogles_context_t* c = ogles_context_t::get();
- orthof( fixedToFloat(left), fixedToFloat(right),
- fixedToFloat(bottom), fixedToFloat(top),
- fixedToFloat(zNear), fixedToFloat(zFar),
- c);
-}
-
-void glRotatef(GLfloat a, GLfloat x, GLfloat y, GLfloat z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->rotate(a, x, y, z);
- c->transforms.invalidate();
-}
-
-void glRotatex(GLfixed a, GLfixed x, GLfixed y, GLfixed z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->rotate(
- fixedToFloat(a), fixedToFloat(x),
- fixedToFloat(y), fixedToFloat(z));
- c->transforms.invalidate();
-}
-
-void glScalef(GLfloat x, GLfloat y, GLfloat z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->scale(x, y, z);
- c->transforms.invalidate();
-}
-
-void glScalex(GLfixed x, GLfixed y, GLfixed z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->scale(
- fixedToFloat(x), fixedToFloat(y), fixedToFloat(z));
- c->transforms.invalidate();
-}
-
-void glTranslatef(GLfloat x, GLfloat y, GLfloat z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->translate(x, y, z);
- c->transforms.invalidate();
-}
-
-void glTranslatex(GLfixed x, GLfixed y, GLfixed z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->transforms.current->translate(
- fixedToFloat(x), fixedToFloat(y), fixedToFloat(z));
- c->transforms.invalidate();
-}
-
-void glScissor(GLint x, GLint y, GLsizei w, GLsizei h)
-{
- ogles_context_t* c = ogles_context_t::get();
- ogles_scissor(c, x, y, w, h);
-}
-
-void glViewport(GLint x, GLint y, GLsizei w, GLsizei h)
-{
- ogles_context_t* c = ogles_context_t::get();
- ogles_viewport(c, x, y, w, h);
-}
-
-void glDepthRangef(GLclampf zNear, GLclampf zFar)
-{
- ogles_context_t* c = ogles_context_t::get();
- depthRangef(zNear, zFar, c);
-}
-
-void glDepthRangex(GLclampx zNear, GLclampx zFar)
-{
- ogles_context_t* c = ogles_context_t::get();
- depthRangef(fixedToFloat(zNear), fixedToFloat(zFar), c);
-}
-
-void glPolygonOffsetx(GLfixed factor, GLfixed units)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->polygonOffset.factor = factor;
- c->polygonOffset.units = units;
-}
-
-void glPolygonOffset(GLfloat factor, GLfloat units)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->polygonOffset.factor = gglFloatToFixed(factor);
- c->polygonOffset.units = gglFloatToFixed(units);
-}
-
-GLbitfield glQueryMatrixxOES(GLfixed* m, GLint* e)
-{
- ogles_context_t* c = ogles_context_t::get();
- GLbitfield status = 0;
- GLfloat const* f = c->transforms.current->top().elements();
- for (int i=0 ; i<16 ; i++) {
- if (isnan(f[i]) || isinf(f[i])) {
- status |= 1<<i;
- continue;
- }
- e[i] = exponent(f[i]) - 7;
- m[i] = mantissa(f[i]);
- }
- return status;
-}
diff --git a/opengl/libagl/matrix.h b/opengl/libagl/matrix.h
deleted file mode 100644
index c9a38a9..0000000
--- a/opengl/libagl/matrix.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* libs/opengles/matrix.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_MATRIX_H
-#define ANDROID_OPENGLES_MATRIX_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <utils/Log.h>
-
-#include <private/pixelflinger/ggl_context.h>
-
-#include <GLES/gl.h>
-
-namespace android {
-
-const int OGLES_MODELVIEW_STACK_DEPTH = 16;
-const int OGLES_PROJECTION_STACK_DEPTH = 2;
-const int OGLES_TEXTURE_STACK_DEPTH = 2;
-
-void ogles_init_matrix(ogles_context_t*);
-void ogles_uninit_matrix(ogles_context_t*);
-void ogles_invalidate_perspective(ogles_context_t* c);
-void ogles_validate_transform_impl(ogles_context_t* c, uint32_t want);
-
-int ogles_surfaceport(ogles_context_t* c, GLint x, GLint y);
-
-void ogles_scissor(ogles_context_t* c,
- GLint x, GLint y, GLsizei w, GLsizei h);
-
-void ogles_viewport(ogles_context_t* c,
- GLint x, GLint y, GLsizei w, GLsizei h);
-
-inline void ogles_validate_transform(
- ogles_context_t* c, uint32_t want)
-{
- if (c->transforms.dirty & want)
- ogles_validate_transform_impl(c, want);
-}
-
-// ----------------------------------------------------------------------------
-
-inline
-GLfixed vsquare3(GLfixed a, GLfixed b, GLfixed c)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- int32_t t;
- asm(
- "smull %0, %1, %2, %2 \n"
- "smlal %0, %1, %3, %3 \n"
- "smlal %0, %1, %4, %4 \n"
- "movs %0, %0, lsr #16 \n"
- "adc %0, %0, %1, lsl #16 \n"
- : "=&r"(r), "=&r"(t)
- : "%r"(a), "r"(b), "r"(c)
- : "cc"
- );
- return r;
-
-#else
-
- return (( int64_t(a)*a +
- int64_t(b)*b +
- int64_t(c)*c + 0x8000)>>16);
-
-#endif
-}
-
-static inline GLfixed mla2a( GLfixed a0, GLfixed b0,
- GLfixed a1, GLfixed b1,
- GLfixed c)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- int32_t t;
- asm(
- "smull %0, %1, %2, %3 \n"
- "smlal %0, %1, %4, %5 \n"
- "add %0, %6, %0, lsr #16 \n"
- "add %0, %0, %1, lsl #16 \n"
- : "=&r"(r), "=&r"(t)
- : "%r"(a0), "r"(b0),
- "%r"(a1), "r"(b1),
- "r"(c)
- :
- );
- return r;
-
-#else
-
- return (( int64_t(a0)*b0 +
- int64_t(a1)*b1)>>16) + c;
-
-#endif
-}
-
-static inline GLfixed mla3a( GLfixed a0, GLfixed b0,
- GLfixed a1, GLfixed b1,
- GLfixed a2, GLfixed b2,
- GLfixed c)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- int32_t t;
- asm(
- "smull %0, %1, %2, %3 \n"
- "smlal %0, %1, %4, %5 \n"
- "smlal %0, %1, %6, %7 \n"
- "add %0, %8, %0, lsr #16 \n"
- "add %0, %0, %1, lsl #16 \n"
- : "=&r"(r), "=&r"(t)
- : "%r"(a0), "r"(b0),
- "%r"(a1), "r"(b1),
- "%r"(a2), "r"(b2),
- "r"(c)
- :
- );
- return r;
-
-#else
-
- return (( int64_t(a0)*b0 +
- int64_t(a1)*b1 +
- int64_t(a2)*b2)>>16) + c;
-
-#endif
-}
-
-// b0, b1, b2 are signed 16-bit quanities
-// that have been shifted right by 'shift' bits relative to normal
-// S16.16 fixed point
-static inline GLfixed mla3a16( GLfixed a0, int32_t b1b0,
- GLfixed a1,
- GLfixed a2, int32_t b2,
- GLint shift,
- GLfixed c)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- asm(
- "smulwb %0, %1, %2 \n"
- "smlawt %0, %3, %2, %0 \n"
- "smlawb %0, %4, %5, %0 \n"
- "add %0, %7, %0, lsl %6 \n"
- : "=&r"(r)
- : "r"(a0), "r"(b1b0),
- "r"(a1),
- "r"(a2), "r"(b2),
- "r"(shift),
- "r"(c)
- :
- );
- return r;
-
-#else
-
- int32_t accum;
- int16_t b0 = b1b0 & 0xffff;
- int16_t b1 = (b1b0 >> 16) & 0xffff;
- accum = int64_t(a0)*int16_t(b0) >> 16;
- accum += int64_t(a1)*int16_t(b1) >> 16;
- accum += int64_t(a2)*int16_t(b2) >> 16;
- accum = (accum << shift) + c;
- return accum;
-
-#endif
-}
-
-
-static inline GLfixed mla3a16_btb( GLfixed a0,
- GLfixed a1,
- GLfixed a2,
- int32_t b1b0, int32_t xxb2,
- GLint shift,
- GLfixed c)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- asm(
- "smulwb %0, %1, %4 \n"
- "smlawt %0, %2, %4, %0 \n"
- "smlawb %0, %3, %5, %0 \n"
- "add %0, %7, %0, lsl %6 \n"
- : "=&r"(r)
- : "r"(a0),
- "r"(a1),
- "r"(a2),
- "r"(b1b0), "r"(xxb2),
- "r"(shift),
- "r"(c)
- :
- );
- return r;
-
-#else
-
- int32_t accum;
- int16_t b0 = b1b0 & 0xffff;
- int16_t b1 = (b1b0 >> 16) & 0xffff;
- int16_t b2 = xxb2 & 0xffff;
- accum = int64_t(a0)*int16_t(b0) >> 16;
- accum += int64_t(a1)*int16_t(b1) >> 16;
- accum += int64_t(a2)*int16_t(b2) >> 16;
- accum = (accum << shift) + c;
- return accum;
-
-#endif
-}
-
-static inline GLfixed mla3a16_btt( GLfixed a0,
- GLfixed a1,
- GLfixed a2,
- int32_t b1b0, int32_t b2xx,
- GLint shift,
- GLfixed c)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- asm(
- "smulwb %0, %1, %4 \n"
- "smlawt %0, %2, %4, %0 \n"
- "smlawt %0, %3, %5, %0 \n"
- "add %0, %7, %0, lsl %6 \n"
- : "=&r"(r)
- : "r"(a0),
- "r"(a1),
- "r"(a2),
- "r"(b1b0), "r"(b2xx),
- "r"(shift),
- "r"(c)
- :
- );
- return r;
-
-#else
-
- int32_t accum;
- int16_t b0 = b1b0 & 0xffff;
- int16_t b1 = (b1b0 >> 16) & 0xffff;
- int16_t b2 = (b2xx >> 16) & 0xffff;
- accum = int64_t(a0)*int16_t(b0) >> 16;
- accum += int64_t(a1)*int16_t(b1) >> 16;
- accum += int64_t(a2)*int16_t(b2) >> 16;
- accum = (accum << shift) + c;
- return accum;
-
-#endif
-}
-
-static inline GLfixed mla3( GLfixed a0, GLfixed b0,
- GLfixed a1, GLfixed b1,
- GLfixed a2, GLfixed b2)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- int32_t t;
- asm(
- "smull %0, %1, %2, %3 \n"
- "smlal %0, %1, %4, %5 \n"
- "smlal %0, %1, %6, %7 \n"
- "movs %0, %0, lsr #16 \n"
- "adc %0, %0, %1, lsl #16 \n"
- : "=&r"(r), "=&r"(t)
- : "%r"(a0), "r"(b0),
- "%r"(a1), "r"(b1),
- "%r"(a2), "r"(b2)
- : "cc"
- );
- return r;
-
-#else
-
- return (( int64_t(a0)*b0 +
- int64_t(a1)*b1 +
- int64_t(a2)*b2 + 0x8000)>>16);
-
-#endif
-}
-
-static inline GLfixed mla4( GLfixed a0, GLfixed b0,
- GLfixed a1, GLfixed b1,
- GLfixed a2, GLfixed b2,
- GLfixed a3, GLfixed b3)
-{
-#if defined(__arm__) && !defined(__thumb__)
-
- GLfixed r;
- int32_t t;
- asm(
- "smull %0, %1, %2, %3 \n"
- "smlal %0, %1, %4, %5 \n"
- "smlal %0, %1, %6, %7 \n"
- "smlal %0, %1, %8, %9 \n"
- "movs %0, %0, lsr #16 \n"
- "adc %0, %0, %1, lsl #16 \n"
- : "=&r"(r), "=&r"(t)
- : "%r"(a0), "r"(b0),
- "%r"(a1), "r"(b1),
- "%r"(a2), "r"(b2),
- "%r"(a3), "r"(b3)
- : "cc"
- );
- return r;
-
-#else
-
- return (( int64_t(a0)*b0 +
- int64_t(a1)*b1 +
- int64_t(a2)*b2 +
- int64_t(a3)*b3 + 0x8000)>>16);
-
-#endif
-}
-
-inline
-GLfixed dot4(const GLfixed* a, const GLfixed* b)
-{
- return mla4(a[0], b[0], a[1], b[1], a[2], b[2], a[3], b[3]);
-}
-
-
-inline
-GLfixed dot3(const GLfixed* a, const GLfixed* b)
-{
- return mla3(a[0], b[0], a[1], b[1], a[2], b[2]);
-}
-
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_MATRIX_H
-
diff --git a/opengl/libagl/mipmap.cpp b/opengl/libagl/mipmap.cpp
deleted file mode 100644
index e142a58..0000000
--- a/opengl/libagl/mipmap.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/* libs/opengles/mipmap.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-#include <stdlib.h>
-
-#include "context.h"
-#include "state.h"
-#include "texture.h"
-#include "TextureObjectManager.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-status_t buildAPyramid(ogles_context_t* c, EGLTextureObject* tex)
-{
- int level = 0;
- const GGLSurface* base = &tex->surface;
- const GGLFormat& pixelFormat(c->rasterizer.formats[base->format]);
-
- int w = base->width;
- int h = base->height;
- if ((w&h) == 1)
- return NO_ERROR;
-
- w = (w>>1) ? : 1;
- h = (h>>1) ? : 1;
-
- while(true) {
- ++level;
- const int bpr = w * pixelFormat.size;
- if (tex->reallocate(level, w, h, w,
- base->format, base->compressedFormat, bpr) != NO_ERROR) {
- return NO_MEMORY;
- }
-
- int stride = w;
- int bs = base->stride;
- GGLSurface& cur = tex->editMip(level);
-
- if (base->format == GGL_PIXEL_FORMAT_RGB_565)
- {
- uint16_t const * src = (uint16_t const *)base->data;
- uint16_t* dst = (uint16_t*)cur.data;
- const uint32_t mask = 0x07E0F81F;
- for (int y=0 ; y<h ; y++) {
- size_t offset = (y*2) * bs;
- for (int x=0 ; x<w ; x++) {
- uint32_t p00 = src[offset];
- uint32_t p10 = src[offset+1];
- uint32_t p01 = src[offset+bs];
- uint32_t p11 = src[offset+bs+1];
- p00 = (p00 | (p00 << 16)) & mask;
- p01 = (p01 | (p01 << 16)) & mask;
- p10 = (p10 | (p10 << 16)) & mask;
- p11 = (p11 | (p11 << 16)) & mask;
- uint32_t grb = ((p00 + p10 + p01 + p11) >> 2) & mask;
- uint32_t rgb = (grb & 0xFFFF) | (grb >> 16);
- dst[x + y*stride] = rgb;
- offset += 2;
- }
- }
- }
- else if (base->format == GGL_PIXEL_FORMAT_RGBA_5551)
- {
- uint16_t const * src = (uint16_t const *)base->data;
- uint16_t* dst = (uint16_t*)cur.data;
- for (int y=0 ; y<h ; y++) {
- size_t offset = (y*2) * bs;
- for (int x=0 ; x<w ; x++) {
- uint32_t p00 = src[offset];
- uint32_t p10 = src[offset+1];
- uint32_t p01 = src[offset+bs];
- uint32_t p11 = src[offset+bs+1];
- uint32_t r = ((p00>>11)+(p10>>11)+(p01>>11)+(p11>>11)+2)>>2;
- uint32_t g = (((p00>>6)+(p10>>6)+(p01>>6)+(p11>>6)+2)>>2)&0x3F;
- uint32_t b = ((p00&0x3E)+(p10&0x3E)+(p01&0x3E)+(p11&0x3E)+4)>>3;
- uint32_t a = ((p00&1)+(p10&1)+(p01&1)+(p11&1)+2)>>2;
- dst[x + y*stride] = (r<<11)|(g<<6)|(b<<1)|a;
- offset += 2;
- }
- }
- }
- else if (base->format == GGL_PIXEL_FORMAT_RGBA_8888)
- {
- uint32_t const * src = (uint32_t const *)base->data;
- uint32_t* dst = (uint32_t*)cur.data;
- for (int y=0 ; y<h ; y++) {
- size_t offset = (y*2) * bs;
- for (int x=0 ; x<w ; x++) {
- uint32_t p00 = src[offset];
- uint32_t p10 = src[offset+1];
- uint32_t p01 = src[offset+bs];
- uint32_t p11 = src[offset+bs+1];
- uint32_t rb00 = p00 & 0x00FF00FF;
- uint32_t rb01 = p01 & 0x00FF00FF;
- uint32_t rb10 = p10 & 0x00FF00FF;
- uint32_t rb11 = p11 & 0x00FF00FF;
- uint32_t ga00 = (p00 >> 8) & 0x00FF00FF;
- uint32_t ga01 = (p01 >> 8) & 0x00FF00FF;
- uint32_t ga10 = (p10 >> 8) & 0x00FF00FF;
- uint32_t ga11 = (p11 >> 8) & 0x00FF00FF;
- uint32_t rb = (rb00 + rb01 + rb10 + rb11)>>2;
- uint32_t ga = (ga00 + ga01 + ga10 + ga11)>>2;
- uint32_t rgba = (rb & 0x00FF00FF) | ((ga & 0x00FF00FF)<<8);
- dst[x + y*stride] = rgba;
- offset += 2;
- }
- }
- }
- else if ((base->format == GGL_PIXEL_FORMAT_RGB_888) ||
- (base->format == GGL_PIXEL_FORMAT_LA_88) ||
- (base->format == GGL_PIXEL_FORMAT_A_8) ||
- (base->format == GGL_PIXEL_FORMAT_L_8))
- {
- int skip;
- switch (base->format) {
- case GGL_PIXEL_FORMAT_RGB_888: skip = 3; break;
- case GGL_PIXEL_FORMAT_LA_88: skip = 2; break;
- default: skip = 1; break;
- }
- uint8_t const * src = (uint8_t const *)base->data;
- uint8_t* dst = (uint8_t*)cur.data;
- bs *= skip;
- stride *= skip;
- for (int y=0 ; y<h ; y++) {
- size_t offset = (y*2) * bs;
- for (int x=0 ; x<w ; x++) {
- for (int c=0 ; c<skip ; c++) {
- uint32_t p00 = src[c+offset];
- uint32_t p10 = src[c+offset+skip];
- uint32_t p01 = src[c+offset+bs];
- uint32_t p11 = src[c+offset+bs+skip];
- dst[x + y*stride + c] = (p00 + p10 + p01 + p11) >> 2;
- }
- offset += 2*skip;
- }
- }
- }
- else if (base->format == GGL_PIXEL_FORMAT_RGBA_4444)
- {
- uint16_t const * src = (uint16_t const *)base->data;
- uint16_t* dst = (uint16_t*)cur.data;
- for (int y=0 ; y<h ; y++) {
- size_t offset = (y*2) * bs;
- for (int x=0 ; x<w ; x++) {
- uint32_t p00 = src[offset];
- uint32_t p10 = src[offset+1];
- uint32_t p01 = src[offset+bs];
- uint32_t p11 = src[offset+bs+1];
- p00 = ((p00 << 12) & 0x0F0F0000) | (p00 & 0x0F0F);
- p10 = ((p10 << 12) & 0x0F0F0000) | (p10 & 0x0F0F);
- p01 = ((p01 << 12) & 0x0F0F0000) | (p01 & 0x0F0F);
- p11 = ((p11 << 12) & 0x0F0F0000) | (p11 & 0x0F0F);
- uint32_t rbga = (p00 + p10 + p01 + p11) >> 2;
- uint32_t rgba = (rbga & 0x0F0F) | ((rbga>>12) & 0xF0F0);
- dst[x + y*stride] = rgba;
- offset += 2;
- }
- }
- } else {
- ALOGE("Unsupported format (%d)", base->format);
- return BAD_TYPE;
- }
-
- // exit condition: we just processed the 1x1 LODs
- if ((w&h) == 1)
- break;
-
- base = &cur;
- w = (w>>1) ? : 1;
- h = (h>>1) ? : 1;
- }
- return NO_ERROR;
-}
-
-}; // namespace android
diff --git a/opengl/libagl/primitives.cpp b/opengl/libagl/primitives.cpp
deleted file mode 100644
index 769ec40..0000000
--- a/opengl/libagl/primitives.cpp
+++ /dev/null
@@ -1,1111 +0,0 @@
-/* libs/opengles/primitives.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include "context.h"
-#include "primitives.h"
-#include "light.h"
-#include "matrix.h"
-#include "vertex.h"
-#include "fp.h"
-#include "TextureObjectManager.h"
-
-extern "C" void iterators0032(const void* that,
- int32_t* it, int32_t c0, int32_t c1, int32_t c2);
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static void primitive_point(ogles_context_t* c, vertex_t* v);
-static void primitive_line(ogles_context_t* c, vertex_t* v0, vertex_t* v1);
-static void primitive_clip_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static void primitive_nop_point(ogles_context_t* c, vertex_t* v);
-static void primitive_nop_line(ogles_context_t* c, vertex_t* v0, vertex_t* v1);
-static void primitive_nop_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static inline bool cull_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static void lerp_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static void lerp_texcoords(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static void lerp_texcoords_w(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static void triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static void clip_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-
-static unsigned int clip_line(ogles_context_t* c,
- vertex_t* s, vertex_t* p);
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-static void lightTriangleDarkSmooth(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- if (!(v0->flags & vertex_t::LIT)) {
- v0->flags |= vertex_t::LIT;
- const GLvoid* cp = c->arrays.color.element(
- v0->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v0->color.v, cp);
- }
- if (!(v1->flags & vertex_t::LIT)) {
- v1->flags |= vertex_t::LIT;
- const GLvoid* cp = c->arrays.color.element(
- v1->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v1->color.v, cp);
- }
- if(!(v2->flags & vertex_t::LIT)) {
- v2->flags |= vertex_t::LIT;
- const GLvoid* cp = c->arrays.color.element(
- v2->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v2->color.v, cp);
- }
-}
-
-static void lightTriangleDarkFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- if (!(v2->flags & vertex_t::LIT)) {
- v2->flags |= vertex_t::LIT;
- const GLvoid* cp = c->arrays.color.element(
- v2->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v2->color.v, cp);
- }
- // configure the rasterizer here, before we clip
- c->rasterizer.procs.color4xv(c, v2->color.v);
-}
-
-static void lightTriangleSmooth(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- if (!(v0->flags & vertex_t::LIT))
- c->lighting.lightVertex(c, v0);
- if (!(v1->flags & vertex_t::LIT))
- c->lighting.lightVertex(c, v1);
- if(!(v2->flags & vertex_t::LIT))
- c->lighting.lightVertex(c, v2);
-}
-
-static void lightTriangleFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- if (!(v2->flags & vertex_t::LIT))
- c->lighting.lightVertex(c, v2);
- // configure the rasterizer here, before we clip
- c->rasterizer.procs.color4xv(c, v2->color.v);
-}
-
-// The fog versions...
-
-static inline
-void lightVertexDarkSmoothFog(ogles_context_t* c, vertex_t* v)
-{
- if (!(v->flags & vertex_t::LIT)) {
- v->flags |= vertex_t::LIT;
- v->fog = c->fog.fog(c, v->eye.z);
- const GLvoid* cp = c->arrays.color.element(
- v->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v->color.v, cp);
- }
-}
-static inline
-void lightVertexDarkFlatFog(ogles_context_t* c, vertex_t* v)
-{
- if (!(v->flags & vertex_t::LIT)) {
- v->flags |= vertex_t::LIT;
- v->fog = c->fog.fog(c, v->eye.z);
- }
-}
-static inline
-void lightVertexSmoothFog(ogles_context_t* c, vertex_t* v)
-{
- if (!(v->flags & vertex_t::LIT)) {
- v->fog = c->fog.fog(c, v->eye.z);
- c->lighting.lightVertex(c, v);
- }
-}
-
-static void lightTriangleDarkSmoothFog(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- lightVertexDarkSmoothFog(c, v0);
- lightVertexDarkSmoothFog(c, v1);
- lightVertexDarkSmoothFog(c, v2);
-}
-
-static void lightTriangleDarkFlatFog(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- lightVertexDarkFlatFog(c, v0);
- lightVertexDarkFlatFog(c, v1);
- lightVertexDarkSmoothFog(c, v2);
- // configure the rasterizer here, before we clip
- c->rasterizer.procs.color4xv(c, v2->color.v);
-}
-
-static void lightTriangleSmoothFog(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- lightVertexSmoothFog(c, v0);
- lightVertexSmoothFog(c, v1);
- lightVertexSmoothFog(c, v2);
-}
-
-static void lightTriangleFlatFog(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- lightVertexDarkFlatFog(c, v0);
- lightVertexDarkFlatFog(c, v1);
- lightVertexSmoothFog(c, v2);
- // configure the rasterizer here, before we clip
- c->rasterizer.procs.color4xv(c, v2->color.v);
-}
-
-
-
-typedef void (*light_primitive_t)(ogles_context_t*,
- vertex_t*, vertex_t*, vertex_t*);
-
-// fog 0x4, light 0x2, smooth 0x1
-static const light_primitive_t lightPrimitive[8] = {
- lightTriangleDarkFlat, // no fog | dark | flat
- lightTriangleDarkSmooth, // no fog | dark | smooth
- lightTriangleFlat, // no fog | light | flat
- lightTriangleSmooth, // no fog | light | smooth
- lightTriangleDarkFlatFog, // fog | dark | flat
- lightTriangleDarkSmoothFog, // fog | dark | smooth
- lightTriangleFlatFog, // fog | light | flat
- lightTriangleSmoothFog // fog | light | smooth
-};
-
-void ogles_validate_primitives(ogles_context_t* c)
-{
- const uint32_t enables = c->rasterizer.state.enables;
-
- // set up the lighting/shading/smoothing/fogging function
- int index = enables & GGL_ENABLE_SMOOTH ? 0x1 : 0;
- index |= c->lighting.enable ? 0x2 : 0;
- index |= enables & GGL_ENABLE_FOG ? 0x4 : 0;
- c->lighting.lightTriangle = lightPrimitive[index];
-
- // set up the primitive renderers
- if (ggl_likely(c->arrays.vertex.enable)) {
- c->prims.renderPoint = primitive_point;
- c->prims.renderLine = primitive_line;
- c->prims.renderTriangle = primitive_clip_triangle;
- } else {
- c->prims.renderPoint = primitive_nop_point;
- c->prims.renderLine = primitive_nop_line;
- c->prims.renderTriangle = primitive_nop_triangle;
- }
-}
-
-// ----------------------------------------------------------------------------
-
-void compute_iterators_t::initTriangle(
- vertex_t const* v0, vertex_t const* v1, vertex_t const* v2)
-{
- m_dx01 = v1->window.x - v0->window.x;
- m_dy10 = v0->window.y - v1->window.y;
- m_dx20 = v0->window.x - v2->window.x;
- m_dy02 = v2->window.y - v0->window.y;
- m_area = m_dx01*m_dy02 + (-m_dy10)*m_dx20;
-}
-
-void compute_iterators_t::initLine(
- vertex_t const* v0, vertex_t const* v1)
-{
- m_dx01 = m_dy02 = v1->window.x - v0->window.x;
- m_dy10 = m_dx20 = v0->window.y - v1->window.y;
- m_area = m_dx01*m_dy02 + (-m_dy10)*m_dx20;
-}
-
-void compute_iterators_t::initLerp(vertex_t const* v0, uint32_t enables)
-{
- m_x0 = v0->window.x;
- m_y0 = v0->window.y;
- const GGLcoord area = (m_area + TRI_HALF) >> TRI_FRACTION_BITS;
- const GGLcoord minArea = 2; // cannot be inverted
- // triangles with an area smaller than 1.0 are not smooth-shaded
-
- int q=0, s=0, d=0;
- if (abs(area) >= minArea) {
- // Here we do some voodoo magic, to compute a suitable scale
- // factor for deltas/area:
-
- // First compute the 1/area with full 32-bits precision,
- // gglRecipQNormalized returns a number [-0.5, 0.5[ and an exponent.
- d = gglRecipQNormalized(area, &q);
-
- // Then compute the minimum left-shift to not overflow the muls
- // below.
- s = 32 - gglClz(abs(m_dy02)|abs(m_dy10)|abs(m_dx01)|abs(m_dx20));
-
- // We'll keep 16-bits of precision for deltas/area. So we need
- // to shift everything left an extra 15 bits.
- s += 15;
-
- // make sure all final shifts are not > 32, because gglMulx
- // can't handle it.
- if (s < q) s = q;
- if (s > 32) {
- d >>= 32-s;
- s = 32;
- }
- }
-
- m_dx01 = gglMulx(m_dx01, d, s);
- m_dy10 = gglMulx(m_dy10, d, s);
- m_dx20 = gglMulx(m_dx20, d, s);
- m_dy02 = gglMulx(m_dy02, d, s);
- m_area_scale = 32 + q - s;
- m_scale = 0;
-
- if (enables & GGL_ENABLE_TMUS) {
- const int A = gglClz(abs(m_dy02)|abs(m_dy10)|abs(m_dx01)|abs(m_dx20));
- const int B = gglClz(abs(m_x0)|abs(m_y0));
- m_scale = max(0, 32 - (A + 16)) +
- max(0, 32 - (B + TRI_FRACTION_BITS)) + 1;
- }
-}
-
-int compute_iterators_t::iteratorsScale(GGLfixed* it,
- int32_t c0, int32_t c1, int32_t c2) const
-{
- int32_t dc01 = c1 - c0;
- int32_t dc02 = c2 - c0;
- const int A = gglClz(abs(c0));
- const int B = gglClz(abs(dc01)|abs(dc02));
- const int scale = min(A, B - m_scale) - 2;
- if (scale >= 0) {
- c0 <<= scale;
- dc01 <<= scale;
- dc02 <<= scale;
- } else {
- c0 >>= -scale;
- dc01 >>= -scale;
- dc02 >>= -scale;
- }
- const int s = m_area_scale;
- int32_t dcdx = gglMulAddx(dc01, m_dy02, gglMulx(dc02, m_dy10, s), s);
- int32_t dcdy = gglMulAddx(dc02, m_dx01, gglMulx(dc01, m_dx20, s), s);
- int32_t c = c0 - (gglMulAddx(dcdx, m_x0,
- gglMulx(dcdy, m_y0, TRI_FRACTION_BITS), TRI_FRACTION_BITS));
- it[0] = c;
- it[1] = dcdx;
- it[2] = dcdy;
- return scale;
-}
-
-void compute_iterators_t::iterators1616(GGLfixed* it,
- GGLfixed c0, GGLfixed c1, GGLfixed c2) const
-{
- const GGLfixed dc01 = c1 - c0;
- const GGLfixed dc02 = c2 - c0;
- // 16.16 x 16.16 == 32.32 --> 16.16
- const int s = m_area_scale;
- int32_t dcdx = gglMulAddx(dc01, m_dy02, gglMulx(dc02, m_dy10, s), s);
- int32_t dcdy = gglMulAddx(dc02, m_dx01, gglMulx(dc01, m_dx20, s), s);
- int32_t c = c0 - (gglMulAddx(dcdx, m_x0,
- gglMulx(dcdy, m_y0, TRI_FRACTION_BITS), TRI_FRACTION_BITS));
- it[0] = c;
- it[1] = dcdx;
- it[2] = dcdy;
-}
-
-void compute_iterators_t::iterators0032(int64_t* it,
- int32_t c0, int32_t c1, int32_t c2) const
-{
- const int s = m_area_scale - 16;
- int32_t dc01 = (c1 - c0)>>s;
- int32_t dc02 = (c2 - c0)>>s;
- // 16.16 x 16.16 == 32.32
- int64_t dcdx = gglMulii(dc01, m_dy02) + gglMulii(dc02, m_dy10);
- int64_t dcdy = gglMulii(dc02, m_dx01) + gglMulii(dc01, m_dx20);
- it[ 0] = (c0<<16) - ((dcdx*m_x0 + dcdy*m_y0)>>4);
- it[ 1] = dcdx;
- it[ 2] = dcdy;
-}
-
-#if defined(__arm__) && !defined(__thumb__)
-inline void compute_iterators_t::iterators0032(int32_t* it,
- int32_t c0, int32_t c1, int32_t c2) const
-{
- ::iterators0032(this, it, c0, c1, c2);
-}
-#else
-void compute_iterators_t::iterators0032(int32_t* it,
- int32_t c0, int32_t c1, int32_t c2) const
-{
- int64_t it64[3];
- iterators0032(it64, c0, c1, c2);
- it[0] = it64[0];
- it[1] = it64[1];
- it[2] = it64[2];
-}
-#endif
-
-// ----------------------------------------------------------------------------
-
-static inline int32_t clampZ(GLfixed z) CONST;
-int32_t clampZ(GLfixed z) {
- z = (z & ~(z>>31));
- if (z >= 0x10000)
- z = 0xFFFF;
- return z;
-}
-
-static __attribute__((noinline))
-void fetch_texcoord_impl(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- vertex_t* const vtx[3] = { v0, v1, v2 };
- array_t const * const texcoordArray = c->arrays.texture;
-
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (!(c->rasterizer.state.texture[i].enable))
- continue;
-
- for (int j=0 ; j<3 ; j++) {
- vertex_t* const v = vtx[j];
- if (v->flags & vertex_t::TT)
- continue;
-
- // NOTE: here we could compute automatic texgen
- // such as sphere/cube maps, instead of fetching them
- // from the textcoord array.
-
- vec4_t& coords = v->texture[i];
- const GLubyte* tp = texcoordArray[i].element(
- v->index & vertex_cache_t::INDEX_MASK);
- texcoordArray[i].fetch(c, coords.v, tp);
-
- // transform texture coordinates...
- coords.Q = 0x10000;
- const transform_t& tr = c->transforms.texture[i].transform;
- if (ggl_unlikely(tr.ops)) {
- c->arrays.tex_transform[i](&tr, &coords, &coords);
- }
-
- // divide by Q
- const GGLfixed q = coords.Q;
- if (ggl_unlikely(q != 0x10000)) {
- const int32_t qinv = gglRecip28(q);
- coords.S = gglMulx(coords.S, qinv, 28);
- coords.T = gglMulx(coords.T, qinv, 28);
- }
- }
- }
- v0->flags |= vertex_t::TT;
- v1->flags |= vertex_t::TT;
- v2->flags |= vertex_t::TT;
-}
-
-inline void fetch_texcoord(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- const uint32_t enables = c->rasterizer.state.enables;
- if (!(enables & GGL_ENABLE_TMUS))
- return;
-
- // Fetch & transform texture coordinates...
- if (ggl_likely(v0->flags & v1->flags & v2->flags & vertex_t::TT)) {
- // already done for all three vertices, bail...
- return;
- }
- fetch_texcoord_impl(c, v0, v1, v2);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Point
-#endif
-
-void primitive_nop_point(ogles_context_t*, vertex_t*) {
-}
-
-void primitive_point(ogles_context_t* c, vertex_t* v)
-{
- // lighting & clamping...
- const uint32_t enables = c->rasterizer.state.enables;
-
- if (ggl_unlikely(!(v->flags & vertex_t::LIT))) {
- if (c->lighting.enable) {
- c->lighting.lightVertex(c, v);
- } else {
- v->flags |= vertex_t::LIT;
- const GLvoid* cp = c->arrays.color.element(
- v->index & vertex_cache_t::INDEX_MASK);
- c->arrays.color.fetch(c, v->color.v, cp);
- }
- if (enables & GGL_ENABLE_FOG) {
- v->fog = c->fog.fog(c, v->eye.z);
- }
- }
-
- // XXX: we don't need to do that each-time
- // if color array and lighting not enabled
- c->rasterizer.procs.color4xv(c, v->color.v);
-
- // XXX: look into ES point-sprite extension
- if (enables & GGL_ENABLE_TMUS) {
- fetch_texcoord(c, v,v,v);
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (!c->rasterizer.state.texture[i].enable)
- continue;
- int32_t itt[8];
- itt[1] = itt[2] = itt[4] = itt[5] = 0;
- itt[6] = itt[7] = 16; // XXX: check that
- if (c->rasterizer.state.texture[i].s_wrap == GGL_CLAMP) {
- int width = c->textures.tmu[i].texture->surface.width;
- itt[0] = v->texture[i].S * width;
- itt[6] = 0;
- }
- if (c->rasterizer.state.texture[i].t_wrap == GGL_CLAMP) {
- int height = c->textures.tmu[i].texture->surface.height;
- itt[3] = v->texture[i].T * height;
- itt[7] = 0;
- }
- c->rasterizer.procs.texCoordGradScale8xv(c, i, itt);
- }
- }
-
- if (enables & GGL_ENABLE_DEPTH_TEST) {
- int32_t itz[3];
- itz[0] = clampZ(v->window.z) * 0x00010001;
- itz[1] = itz[2] = 0;
- c->rasterizer.procs.zGrad3xv(c, itz);
- }
-
- if (enables & GGL_ENABLE_FOG) {
- GLfixed itf[3];
- itf[0] = v->fog;
- itf[1] = itf[2] = 0;
- c->rasterizer.procs.fogGrad3xv(c, itf);
- }
-
- // Render our point...
- c->rasterizer.procs.pointx(c, v->window.v, c->point.size);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Line
-#endif
-
-void primitive_nop_line(ogles_context_t*, vertex_t*, vertex_t*) {
-}
-
-void primitive_line(ogles_context_t* c, vertex_t* v0, vertex_t* v1)
-{
- // get texture coordinates
- fetch_texcoord(c, v0, v1, v1);
-
- // light/shade the vertices first (they're copied below)
- c->lighting.lightTriangle(c, v0, v1, v1);
-
- // clip the line if needed
- if (ggl_unlikely((v0->flags | v1->flags) & vertex_t::CLIP_ALL)) {
- unsigned int count = clip_line(c, v0, v1);
- if (ggl_unlikely(count == 0))
- return;
- }
-
- // compute iterators...
- const uint32_t enables = c->rasterizer.state.enables;
- const uint32_t mask = GGL_ENABLE_TMUS |
- GGL_ENABLE_SMOOTH |
- GGL_ENABLE_W |
- GGL_ENABLE_FOG |
- GGL_ENABLE_DEPTH_TEST;
-
- if (ggl_unlikely(enables & mask)) {
- c->lerp.initLine(v0, v1);
- lerp_triangle(c, v0, v1, v0);
- }
-
- // render our line
- c->rasterizer.procs.linex(c, v0->window.v, v1->window.v, c->line.width);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Triangle
-#endif
-
-void primitive_nop_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2) {
-}
-
-void primitive_clip_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- uint32_t cc = (v0->flags | v1->flags | v2->flags) & vertex_t::CLIP_ALL;
- if (ggl_likely(!cc)) {
- // code below must be as optimized as possible, this is the
- // common code path.
-
- // This triangle is not clipped, test if it's culled
- // unclipped triangle...
- c->lerp.initTriangle(v0, v1, v2);
- if (cull_triangle(c, v0, v1, v2))
- return; // culled!
-
- // Fetch all texture coordinates if needed
- fetch_texcoord(c, v0, v1, v2);
-
- // light (or shade) our triangle!
- c->lighting.lightTriangle(c, v0, v1, v2);
-
- triangle(c, v0, v1, v2);
- return;
- }
-
- // The assumption here is that we're not going to clip very often,
- // and even more rarely will we clip a triangle that ends up
- // being culled out. So it's okay to light the vertices here, even though
- // in a few cases we won't render the triangle (if culled).
-
- // Fetch texture coordinates...
- fetch_texcoord(c, v0, v1, v2);
-
- // light (or shade) our triangle!
- c->lighting.lightTriangle(c, v0, v1, v2);
-
- clip_triangle(c, v0, v1, v2);
-}
-
-// -----------------------------------------------------------------------
-
-void triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- // compute iterators...
- const uint32_t enables = c->rasterizer.state.enables;
- const uint32_t mask = GGL_ENABLE_TMUS |
- GGL_ENABLE_SMOOTH |
- GGL_ENABLE_W |
- GGL_ENABLE_FOG |
- GGL_ENABLE_DEPTH_TEST;
-
- if (ggl_likely(enables & mask))
- lerp_triangle(c, v0, v1, v2);
-
- c->rasterizer.procs.trianglex(c, v0->window.v, v1->window.v, v2->window.v);
-}
-
-void lerp_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- const uint32_t enables = c->rasterizer.state.enables;
- c->lerp.initLerp(v0, enables);
-
- // set up texture iterators
- if (enables & GGL_ENABLE_TMUS) {
- if (enables & GGL_ENABLE_W) {
- lerp_texcoords_w(c, v0, v1, v2);
- } else {
- lerp_texcoords(c, v0, v1, v2);
- }
- }
-
- // set up the color iterators
- const compute_iterators_t& lerp = c->lerp;
- if (enables & GGL_ENABLE_SMOOTH) {
- GLfixed itc[12];
- for (int i=0 ; i<4 ; i++) {
- const GGLcolor c0 = v0->color.v[i] * 255;
- const GGLcolor c1 = v1->color.v[i] * 255;
- const GGLcolor c2 = v2->color.v[i] * 255;
- lerp.iterators1616(&itc[i*3], c0, c1, c2);
- }
- c->rasterizer.procs.colorGrad12xv(c, itc);
- }
-
- if (enables & GGL_ENABLE_DEPTH_TEST) {
- int32_t itz[3];
- const int32_t v0z = clampZ(v0->window.z);
- const int32_t v1z = clampZ(v1->window.z);
- const int32_t v2z = clampZ(v2->window.z);
- if (ggl_unlikely(c->polygonOffset.enable)) {
- const int32_t units = (c->polygonOffset.units << 16);
- const GLfixed factor = c->polygonOffset.factor;
- if (factor) {
- int64_t itz64[3];
- lerp.iterators0032(itz64, v0z, v1z, v2z);
- int64_t maxDepthSlope = max(itz64[1], itz64[2]);
- itz[0] = uint32_t(itz64[0])
- + uint32_t((maxDepthSlope*factor)>>16) + units;
- itz[1] = uint32_t(itz64[1]);
- itz[2] = uint32_t(itz64[2]);
- } else {
- lerp.iterators0032(itz, v0z, v1z, v2z);
- itz[0] += units;
- }
- } else {
- lerp.iterators0032(itz, v0z, v1z, v2z);
- }
- c->rasterizer.procs.zGrad3xv(c, itz);
- }
-
- if (ggl_unlikely(enables & GGL_ENABLE_FOG)) {
- GLfixed itf[3];
- lerp.iterators1616(itf, v0->fog, v1->fog, v2->fog);
- c->rasterizer.procs.fogGrad3xv(c, itf);
- }
-}
-
-
-static inline
-int compute_lod(ogles_context_t* c, int i,
- int32_t s0, int32_t t0, int32_t s1, int32_t t1, int32_t s2, int32_t t2)
-{
- // Compute mipmap level / primitive
- // rho = sqrt( texelArea / area )
- // lod = log2( rho )
- // lod = log2( texelArea / area ) / 2
- // lod = (log2( texelArea ) - log2( area )) / 2
- const compute_iterators_t& lerp = c->lerp;
- const GGLcoord area = abs(lerp.area());
- const int w = c->textures.tmu[i].texture->surface.width;
- const int h = c->textures.tmu[i].texture->surface.height;
- const int shift = 16 + (16 - TRI_FRACTION_BITS);
- int32_t texelArea = abs( gglMulx(s1-s0, t2-t0, shift) -
- gglMulx(s2-s0, t1-t0, shift) )*w*h;
- int log2TArea = (32-TRI_FRACTION_BITS -1) - gglClz(texelArea);
- int log2Area = (32-TRI_FRACTION_BITS*2-1) - gglClz(area);
- int lod = (log2TArea - log2Area + 1) >> 1;
- return lod;
-}
-
-void lerp_texcoords(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- const compute_iterators_t& lerp = c->lerp;
- int32_t itt[8] __attribute__((aligned(16)));
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- const texture_t& tmu = c->rasterizer.state.texture[i];
- if (!tmu.enable)
- continue;
-
- // compute the jacobians using block floating-point
- int32_t s0 = v0->texture[i].S;
- int32_t t0 = v0->texture[i].T;
- int32_t s1 = v1->texture[i].S;
- int32_t t1 = v1->texture[i].T;
- int32_t s2 = v2->texture[i].S;
- int32_t t2 = v2->texture[i].T;
-
- const GLenum min_filter = c->textures.tmu[i].texture->min_filter;
- if (ggl_unlikely(min_filter >= GL_NEAREST_MIPMAP_NEAREST)) {
- int lod = compute_lod(c, i, s0, t0, s1, t1, s2, t2);
- c->rasterizer.procs.bindTextureLod(c, i,
- &c->textures.tmu[i].texture->mip(lod));
- }
-
- // premultiply (s,t) when clampling
- if (tmu.s_wrap == GGL_CLAMP) {
- const int width = tmu.surface.width;
- s0 *= width;
- s1 *= width;
- s2 *= width;
- }
- if (tmu.t_wrap == GGL_CLAMP) {
- const int height = tmu.surface.height;
- t0 *= height;
- t1 *= height;
- t2 *= height;
- }
- itt[6] = -lerp.iteratorsScale(itt+0, s0, s1, s2);
- itt[7] = -lerp.iteratorsScale(itt+3, t0, t1, t2);
- c->rasterizer.procs.texCoordGradScale8xv(c, i, itt);
- }
-}
-
-void lerp_texcoords_w(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- const compute_iterators_t& lerp = c->lerp;
- int32_t itt[8] __attribute__((aligned(16)));
- int32_t itw[3];
-
- // compute W's scale to 2.30
- int32_t w0 = v0->window.w;
- int32_t w1 = v1->window.w;
- int32_t w2 = v2->window.w;
- int wscale = 32 - gglClz(w0|w1|w2);
-
- // compute the jacobian using block floating-point
- int sc = lerp.iteratorsScale(itw, w0, w1, w2);
- sc += wscale - 16;
- c->rasterizer.procs.wGrad3xv(c, itw);
-
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- const texture_t& tmu = c->rasterizer.state.texture[i];
- if (!tmu.enable)
- continue;
-
- // compute the jacobians using block floating-point
- int32_t s0 = v0->texture[i].S;
- int32_t t0 = v0->texture[i].T;
- int32_t s1 = v1->texture[i].S;
- int32_t t1 = v1->texture[i].T;
- int32_t s2 = v2->texture[i].S;
- int32_t t2 = v2->texture[i].T;
-
- const GLenum min_filter = c->textures.tmu[i].texture->min_filter;
- if (ggl_unlikely(min_filter >= GL_NEAREST_MIPMAP_NEAREST)) {
- int lod = compute_lod(c, i, s0, t0, s1, t1, s2, t2);
- c->rasterizer.procs.bindTextureLod(c, i,
- &c->textures.tmu[i].texture->mip(lod));
- }
-
- // premultiply (s,t) when clampling
- if (tmu.s_wrap == GGL_CLAMP) {
- const int width = tmu.surface.width;
- s0 *= width;
- s1 *= width;
- s2 *= width;
- }
- if (tmu.t_wrap == GGL_CLAMP) {
- const int height = tmu.surface.height;
- t0 *= height;
- t1 *= height;
- t2 *= height;
- }
-
- s0 = gglMulx(s0, w0, wscale);
- t0 = gglMulx(t0, w0, wscale);
- s1 = gglMulx(s1, w1, wscale);
- t1 = gglMulx(t1, w1, wscale);
- s2 = gglMulx(s2, w2, wscale);
- t2 = gglMulx(t2, w2, wscale);
-
- itt[6] = sc - lerp.iteratorsScale(itt+0, s0, s1, s2);
- itt[7] = sc - lerp.iteratorsScale(itt+3, t0, t1, t2);
- c->rasterizer.procs.texCoordGradScale8xv(c, i, itt);
- }
-}
-
-
-static inline
-bool cull_triangle(ogles_context_t* c, vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- if (ggl_likely(c->cull.enable)) {
- const GLenum winding = (c->lerp.area() > 0) ? GL_CW : GL_CCW;
- const GLenum face = (winding == c->cull.frontFace) ? GL_FRONT : GL_BACK;
- if (face == c->cull.cullFace)
- return true; // culled!
- }
- return false;
-}
-
-static inline
-GLfixed frustumPlaneDist(int plane, const vec4_t& s)
-{
- const GLfixed d = s.v[ plane >> 1 ];
- return ((plane & 1) ? (s.w - d) : (s.w + d));
-}
-
-static inline
-int32_t clipDivide(GLfixed a, GLfixed b) {
- // returns a 4.28 fixed-point
- return gglMulDivi(1LU<<28, a, b);
-}
-
-void clip_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
-{
- uint32_t all_cc = (v0->flags | v1->flags | v2->flags) & vertex_t::CLIP_ALL;
-
- vertex_t *p0, *p1, *p2;
- const int MAX_CLIPPING_PLANES = 6 + OGLES_MAX_CLIP_PLANES;
- const int MAX_VERTICES = 3;
-
- // Temporary buffer to hold the new vertices. Each plane can add up to
- // two new vertices (because the polygon is convex).
- // We need one extra element, to handle an overflow case when
- // the polygon degenerates into something non convex.
- vertex_t buffer[MAX_CLIPPING_PLANES * 2 + 1]; // ~3KB
- vertex_t* buf = buffer;
-
- // original list of vertices (polygon to clip, in fact this
- // function works with an arbitrary polygon).
- vertex_t* in[3] = { v0, v1, v2 };
-
- // output lists (we need 2, which we use back and forth)
- // (maximum outpout list's size is MAX_CLIPPING_PLANES + MAX_VERTICES)
- // 2 more elements for overflow when non convex polygons.
- vertex_t* out[2][MAX_CLIPPING_PLANES + MAX_VERTICES + 2];
- unsigned int outi = 0;
-
- // current input list
- vertex_t** ivl = in;
-
- // 3 input vertices, 0 in the output list, first plane
- unsigned int ic = 3;
-
- // User clip-planes first, the clipping is always done in eye-coordinate
- // this is basically the same algorithm than for the view-volume
- // clipping, except for the computation of the distance (vertex, plane)
- // and the fact that we need to compute the eye-coordinates of each
- // new vertex we create.
-
- if (ggl_unlikely(all_cc & vertex_t::USER_CLIP_ALL))
- {
- unsigned int plane = 0;
- uint32_t cc = (all_cc & vertex_t::USER_CLIP_ALL) >> 8;
- do {
- if (cc & 1) {
- // pointers to our output list (head and current)
- vertex_t** const ovl = &out[outi][0];
- vertex_t** output = ovl;
- unsigned int oc = 0;
- unsigned int sentinel = 0;
- // previous vertex, compute distance to the plane
- vertex_t* s = ivl[ic-1];
- const vec4_t& equation = c->clipPlanes.plane[plane].equation;
- GLfixed sd = dot4(equation.v, s->eye.v);
- // clip each vertex against this plane...
- for (unsigned int i=0 ; i<ic ; i++) {
- vertex_t* p = ivl[i];
- const GLfixed pd = dot4(equation.v, p->eye.v);
- if (sd >= 0) {
- if (pd >= 0) {
- // both inside
- *output++ = p;
- oc++;
- } else {
- // s inside, p outside (exiting)
- const GLfixed t = clipDivide(sd, sd-pd);
- c->arrays.clipEye(c, buf, t, p, s);
- *output++ = buf++;
- oc++;
- if (++sentinel >= 3)
- return; // non-convex polygon!
- }
- } else {
- if (pd >= 0) {
- // s outside (entering)
- if (pd) {
- const GLfixed t = clipDivide(pd, pd-sd);
- c->arrays.clipEye(c, buf, t, s, p);
- *output++ = buf++;
- oc++;
- if (++sentinel >= 3)
- return; // non-convex polygon!
- }
- *output++ = p;
- oc++;
- } else {
- // both outside
- }
- }
- s = p;
- sd = pd;
- }
- // output list become the new input list
- if (oc<3)
- return; // less than 3 vertices left? we're done!
- ivl = ovl;
- ic = oc;
- outi = 1-outi;
- }
- cc >>= 1;
- plane++;
- } while (cc);
- }
-
- // frustum clip-planes
- if (all_cc & vertex_t::FRUSTUM_CLIP_ALL)
- {
- unsigned int plane = 0;
- uint32_t cc = all_cc & vertex_t::FRUSTUM_CLIP_ALL;
- do {
- if (cc & 1) {
- // pointers to our output list (head and current)
- vertex_t** const ovl = &out[outi][0];
- vertex_t** output = ovl;
- unsigned int oc = 0;
- unsigned int sentinel = 0;
- // previous vertex, compute distance to the plane
- vertex_t* s = ivl[ic-1];
- GLfixed sd = frustumPlaneDist(plane, s->clip);
- // clip each vertex against this plane...
- for (unsigned int i=0 ; i<ic ; i++) {
- vertex_t* p = ivl[i];
- const GLfixed pd = frustumPlaneDist(plane, p->clip);
- if (sd >= 0) {
- if (pd >= 0) {
- // both inside
- *output++ = p;
- oc++;
- } else {
- // s inside, p outside (exiting)
- const GLfixed t = clipDivide(sd, sd-pd);
- c->arrays.clipVertex(c, buf, t, p, s);
- *output++ = buf++;
- oc++;
- if (++sentinel >= 3)
- return; // non-convex polygon!
- }
- } else {
- if (pd >= 0) {
- // s outside (entering)
- if (pd) {
- const GLfixed t = clipDivide(pd, pd-sd);
- c->arrays.clipVertex(c, buf, t, s, p);
- *output++ = buf++;
- oc++;
- if (++sentinel >= 3)
- return; // non-convex polygon!
- }
- *output++ = p;
- oc++;
- } else {
- // both outside
- }
- }
- s = p;
- sd = pd;
- }
- // output list become the new input list
- if (oc<3)
- return; // less than 3 vertices left? we're done!
- ivl = ovl;
- ic = oc;
- outi = 1-outi;
- }
- cc >>= 1;
- plane++;
- } while (cc);
- }
-
- // finally we can render our triangles...
- p0 = ivl[0];
- p1 = ivl[1];
- for (unsigned int i=2 ; i<ic ; i++) {
- p2 = ivl[i];
- c->lerp.initTriangle(p0, p1, p2);
- if (cull_triangle(c, p0, p1, p2)) {
- p1 = p2;
- continue; // culled!
- }
- triangle(c, p0, p1, p2);
- p1 = p2;
- }
-}
-
-unsigned int clip_line(ogles_context_t* c, vertex_t* s, vertex_t* p)
-{
- const uint32_t all_cc = (s->flags | p->flags) & vertex_t::CLIP_ALL;
-
- if (ggl_unlikely(all_cc & vertex_t::USER_CLIP_ALL))
- {
- unsigned int plane = 0;
- uint32_t cc = (all_cc & vertex_t::USER_CLIP_ALL) >> 8;
- do {
- if (cc & 1) {
- const vec4_t& equation = c->clipPlanes.plane[plane].equation;
- const GLfixed sd = dot4(equation.v, s->eye.v);
- const GLfixed pd = dot4(equation.v, p->eye.v);
- if (sd >= 0) {
- if (pd >= 0) {
- // both inside
- } else {
- // s inside, p outside (exiting)
- const GLfixed t = clipDivide(sd, sd-pd);
- c->arrays.clipEye(c, p, t, p, s);
- }
- } else {
- if (pd >= 0) {
- // s outside (entering)
- if (pd) {
- const GLfixed t = clipDivide(pd, pd-sd);
- c->arrays.clipEye(c, s, t, s, p);
- }
- } else {
- // both outside
- return 0;
- }
- }
- }
- cc >>= 1;
- plane++;
- } while (cc);
- }
-
- // frustum clip-planes
- if (all_cc & vertex_t::FRUSTUM_CLIP_ALL)
- {
- unsigned int plane = 0;
- uint32_t cc = all_cc & vertex_t::FRUSTUM_CLIP_ALL;
- do {
- if (cc & 1) {
- const GLfixed sd = frustumPlaneDist(plane, s->clip);
- const GLfixed pd = frustumPlaneDist(plane, p->clip);
- if (sd >= 0) {
- if (pd >= 0) {
- // both inside
- } else {
- // s inside, p outside (exiting)
- const GLfixed t = clipDivide(sd, sd-pd);
- c->arrays.clipVertex(c, p, t, p, s);
- }
- } else {
- if (pd >= 0) {
- // s outside (entering)
- if (pd) {
- const GLfixed t = clipDivide(pd, pd-sd);
- c->arrays.clipVertex(c, s, t, s, p);
- }
- } else {
- // both outside
- return 0;
- }
- }
- }
- cc >>= 1;
- plane++;
- } while (cc);
- }
-
- return 2;
-}
-
-
-}; // namespace android
diff --git a/opengl/libagl/primitives.h b/opengl/libagl/primitives.h
deleted file mode 100644
index 1bef604..0000000
--- a/opengl/libagl/primitives.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* libs/opengles/primitives.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_PRIMITIVES_H
-#define ANDROID_OPENGLES_PRIMITIVES_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-
-namespace android {
-
-namespace gl {
-struct ogles_context_t;
-};
-
-void ogles_validate_primitives(ogles_context_t* c);
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_PRIMITIVES_H
-
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
deleted file mode 100644
index 90e9612..0000000
--- a/opengl/libagl/state.cpp
+++ /dev/null
@@ -1,597 +0,0 @@
-/* libs/opengles/state.cpp
-**
-** Copyright 2006, 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 "context.h"
-#include "fp.h"
-#include "state.h"
-#include "array.h"
-#include "matrix.h"
-#include "vertex.h"
-#include "light.h"
-#include "texture.h"
-#include "BufferObjectManager.h"
-#include "TextureObjectManager.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static char const * const gVendorString = "Android";
-static char const * const gRendererString = "Android PixelFlinger 1.4";
-static char const * const gVersionString = "OpenGL ES-CM 1.0";
-static char const * const gExtensionsString =
- "GL_OES_byte_coordinates " // OK
- "GL_OES_fixed_point " // OK
- "GL_OES_single_precision " // OK
- "GL_OES_read_format " // OK
- "GL_OES_compressed_paletted_texture " // OK
- "GL_OES_draw_texture " // OK
- "GL_OES_matrix_get " // OK
- "GL_OES_query_matrix " // OK
- // "GL_OES_point_size_array " // TODO
- // "GL_OES_point_sprite " // TODO
- "GL_OES_EGL_image " // OK
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- "GL_OES_compressed_ETC1_RGB8_texture " // OK
-#endif
- "GL_ARB_texture_compression " // OK
- "GL_ARB_texture_non_power_of_two " // OK
- "GL_ANDROID_user_clip_plane " // OK
- "GL_ANDROID_vertex_buffer_object " // OK
- "GL_ANDROID_generate_mipmap " // OK
- ;
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-ogles_context_t *ogles_init(size_t extra)
-{
- void* const base = malloc(extra + sizeof(ogles_context_t) + 32);
- if (!base) return 0;
-
- ogles_context_t *c =
- (ogles_context_t *)((ptrdiff_t(base) + extra + 31) & ~0x1FL);
- memset(c, 0, sizeof(ogles_context_t));
- ggl_init_context(&(c->rasterizer));
-
- // XXX: this should be passed as an argument
- sp<EGLSurfaceManager> smgr(new EGLSurfaceManager());
- c->surfaceManager = smgr.get();
- c->surfaceManager->incStrong(c);
-
- sp<EGLBufferObjectManager> bomgr(new EGLBufferObjectManager());
- c->bufferObjectManager = bomgr.get();
- c->bufferObjectManager->incStrong(c);
-
- ogles_init_array(c);
- ogles_init_matrix(c);
- ogles_init_vertex(c);
- ogles_init_light(c);
- ogles_init_texture(c);
-
- c->rasterizer.base = base;
- c->point.size = TRI_ONE;
- c->line.width = TRI_ONE;
-
- // in OpenGL, writing to the depth buffer is enabled by default.
- c->rasterizer.procs.depthMask(c, 1);
-
- // OpenGL enables dithering by default
- c->rasterizer.procs.enable(c, GL_DITHER);
-
- return c;
-}
-
-void ogles_uninit(ogles_context_t* c)
-{
- ogles_uninit_array(c);
- ogles_uninit_matrix(c);
- ogles_uninit_vertex(c);
- ogles_uninit_light(c);
- ogles_uninit_texture(c);
- c->surfaceManager->decStrong(c);
- c->bufferObjectManager->decStrong(c);
- ggl_uninit_context(&(c->rasterizer));
- free(c->rasterizer.base);
-}
-
-void _ogles_error(ogles_context_t* c, GLenum error)
-{
- if (c->error == GL_NO_ERROR)
- c->error = error;
-}
-
-static bool stencilop_valid(GLenum op) {
- switch (op) {
- case GL_KEEP:
- case GL_ZERO:
- case GL_REPLACE:
- case GL_INCR:
- case GL_DECR:
- case GL_INVERT:
- return true;
- }
- return false;
-}
-
-static void enable_disable(ogles_context_t* c, GLenum cap, int enabled)
-{
- if ((cap >= GL_LIGHT0) && (cap<GL_LIGHT0+OGLES_MAX_LIGHTS)) {
- c->lighting.lights[cap-GL_LIGHT0].enable = enabled;
- c->lighting.enabledLights &= ~(1<<(cap-GL_LIGHT0));
- c->lighting.enabledLights |= (enabled<<(cap-GL_LIGHT0));
- return;
- }
-
- switch (cap) {
- case GL_POINT_SMOOTH:
- c->point.smooth = enabled;
- break;
- case GL_LINE_SMOOTH:
- c->line.smooth = enabled;
- break;
- case GL_POLYGON_OFFSET_FILL:
- c->polygonOffset.enable = enabled;
- break;
- case GL_CULL_FACE:
- c->cull.enable = enabled;
- break;
- case GL_LIGHTING:
- c->lighting.enable = enabled;
- break;
- case GL_COLOR_MATERIAL:
- c->lighting.colorMaterial.enable = enabled;
- break;
- case GL_NORMALIZE:
- case GL_RESCALE_NORMAL:
- c->transforms.rescaleNormals = enabled ? cap : 0;
- // XXX: invalidate mvit
- break;
-
- case GL_CLIP_PLANE0:
- case GL_CLIP_PLANE1:
- case GL_CLIP_PLANE2:
- case GL_CLIP_PLANE3:
- case GL_CLIP_PLANE4:
- case GL_CLIP_PLANE5:
- c->clipPlanes.enable &= ~(1<<(cap-GL_CLIP_PLANE0));
- c->clipPlanes.enable |= (enabled<<(cap-GL_CLIP_PLANE0));
- ogles_invalidate_perspective(c);
- break;
-
- case GL_FOG:
- case GL_DEPTH_TEST:
- ogles_invalidate_perspective(c);
- // fall-through...
- case GL_BLEND:
- case GL_SCISSOR_TEST:
- case GL_ALPHA_TEST:
- case GL_COLOR_LOGIC_OP:
- case GL_DITHER:
- case GL_STENCIL_TEST:
- case GL_TEXTURE_2D:
- // these need to fall through into the rasterizer
- c->rasterizer.procs.enableDisable(c, cap, enabled);
- break;
- case GL_TEXTURE_EXTERNAL_OES:
- c->rasterizer.procs.enableDisable(c, GL_TEXTURE_2D, enabled);
- break;
-
- case GL_MULTISAMPLE:
- case GL_SAMPLE_ALPHA_TO_COVERAGE:
- case GL_SAMPLE_ALPHA_TO_ONE:
- case GL_SAMPLE_COVERAGE:
- // not supported in this implementation
- break;
-
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-using namespace android;
-
-#if 0
-#pragma mark -
-#endif
-
-// These ones are super-easy, we're not supporting those features!
-void glSampleCoverage(GLclampf value, GLboolean invert) {
-}
-void glSampleCoveragex(GLclampx value, GLboolean invert) {
-}
-void glStencilFunc(GLenum func, GLint ref, GLuint mask) {
- ogles_context_t* c = ogles_context_t::get();
- if (func < GL_NEVER || func > GL_ALWAYS) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- // from OpenGL|ES 1.0 sepcification:
- // If there is no stencil buffer, no stencil modification can occur
- // and it is as if the stencil test always passes.
-}
-
-void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
- ogles_context_t* c = ogles_context_t::get();
- if ((stencilop_valid(fail) &
- stencilop_valid(zfail) &
- stencilop_valid(zpass)) == 0) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-}
-
-// ----------------------------------------------------------------------------
-
-void glAlphaFunc(GLenum func, GLclampf ref)
-{
- glAlphaFuncx(func, gglFloatToFixed(ref));
-}
-
-void glCullFace(GLenum mode)
-{
- ogles_context_t* c = ogles_context_t::get();
- switch (mode) {
- case GL_FRONT:
- case GL_BACK:
- case GL_FRONT_AND_BACK:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- }
- c->cull.cullFace = mode;
-}
-
-void glFrontFace(GLenum mode)
-{
- ogles_context_t* c = ogles_context_t::get();
- switch (mode) {
- case GL_CW:
- case GL_CCW:
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->cull.frontFace = mode;
-}
-
-void glHint(GLenum target, GLenum mode)
-{
- ogles_context_t* c = ogles_context_t::get();
- switch (target) {
- case GL_FOG_HINT:
- case GL_GENERATE_MIPMAP_HINT:
- case GL_LINE_SMOOTH_HINT:
- break;
- case GL_POINT_SMOOTH_HINT:
- c->rasterizer.procs.enableDisable(c,
- GGL_POINT_SMOOTH_NICE, mode==GL_NICEST);
- break;
- case GL_PERSPECTIVE_CORRECTION_HINT:
- c->perspective = (mode == GL_NICEST) ? 1 : 0;
- break;
- default:
- ogles_error(c, GL_INVALID_ENUM);
- }
-}
-
-void glEnable(GLenum cap) {
- ogles_context_t* c = ogles_context_t::get();
- enable_disable(c, cap, 1);
-}
-void glDisable(GLenum cap) {
- ogles_context_t* c = ogles_context_t::get();
- enable_disable(c, cap, 0);
-}
-
-void glFinish()
-{ // nothing to do for our software implementation
-}
-
-void glFlush()
-{ // nothing to do for our software implementation
-}
-
-GLenum glGetError()
-{
- // From OpenGL|ES 1.0 specification:
- // If more than one flag has recorded an error, glGetError returns
- // and clears an arbitrary error flag value. Thus, glGetError should
- // always be called in a loop, until it returns GL_NO_ERROR,
- // if all error flags are to be reset.
-
- ogles_context_t* c = ogles_context_t::get();
- if (c->error) {
- const GLenum ret(c->error);
- c->error = 0;
- return ret;
- }
-
- if (c->rasterizer.error) {
- const GLenum ret(c->rasterizer.error);
- c->rasterizer.error = 0;
- return ret;
- }
-
- return GL_NO_ERROR;
-}
-
-const GLubyte* glGetString(GLenum string)
-{
- switch (string) {
- case GL_VENDOR: return (const GLubyte*)gVendorString;
- case GL_RENDERER: return (const GLubyte*)gRendererString;
- case GL_VERSION: return (const GLubyte*)gVersionString;
- case GL_EXTENSIONS: return (const GLubyte*)gExtensionsString;
- }
- ogles_context_t* c = ogles_context_t::get();
- ogles_error(c, GL_INVALID_ENUM);
- return 0;
-}
-
-void glGetIntegerv(GLenum pname, GLint *params)
-{
- int i;
- ogles_context_t* c = ogles_context_t::get();
- switch (pname) {
- case GL_ALIASED_POINT_SIZE_RANGE:
- params[0] = 0;
- params[1] = GGL_MAX_ALIASED_POINT_SIZE;
- break;
- case GL_ALIASED_LINE_WIDTH_RANGE:
- params[0] = 0;
- params[1] = GGL_MAX_ALIASED_POINT_SIZE;
- break;
- case GL_ALPHA_BITS: {
- int index = c->rasterizer.state.buffers.color.format;
- GGLFormat const * formats = gglGetPixelFormatTable();
- params[0] = formats[index].ah - formats[index].al;
- break;
- }
- case GL_RED_BITS: {
- int index = c->rasterizer.state.buffers.color.format;
- GGLFormat const * formats = gglGetPixelFormatTable();
- params[0] = formats[index].rh - formats[index].rl;
- break;
- }
- case GL_GREEN_BITS: {
- int index = c->rasterizer.state.buffers.color.format;
- GGLFormat const * formats = gglGetPixelFormatTable();
- params[0] = formats[index].gh - formats[index].gl;
- break;
- }
- case GL_BLUE_BITS: {
- int index = c->rasterizer.state.buffers.color.format;
- GGLFormat const * formats = gglGetPixelFormatTable();
- params[0] = formats[index].bh - formats[index].bl;
- break;
- }
- case GL_COMPRESSED_TEXTURE_FORMATS:
- params[ 0] = GL_PALETTE4_RGB8_OES;
- params[ 1] = GL_PALETTE4_RGBA8_OES;
- params[ 2] = GL_PALETTE4_R5_G6_B5_OES;
- params[ 3] = GL_PALETTE4_RGBA4_OES;
- params[ 4] = GL_PALETTE4_RGB5_A1_OES;
- params[ 5] = GL_PALETTE8_RGB8_OES;
- params[ 6] = GL_PALETTE8_RGBA8_OES;
- params[ 7] = GL_PALETTE8_R5_G6_B5_OES;
- params[ 8] = GL_PALETTE8_RGBA4_OES;
- params[ 9] = GL_PALETTE8_RGB5_A1_OES;
- i = 10;
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- params[i++] = GL_ETC1_RGB8_OES;
-#endif
- break;
- case GL_DEPTH_BITS:
- params[0] = c->rasterizer.state.buffers.depth.format ? 0 : 16;
- break;
- case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
- params[0] = GL_RGB;
- break;
- case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
- params[0] = GL_UNSIGNED_SHORT_5_6_5;
- break;
- case GL_MAX_LIGHTS:
- params[0] = OGLES_MAX_LIGHTS;
- break;
- case GL_MAX_CLIP_PLANES:
- params[0] = OGLES_MAX_CLIP_PLANES;
- break;
- case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = OGLES_MODELVIEW_STACK_DEPTH;
- break;
- case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = OGLES_PROJECTION_STACK_DEPTH;
- break;
- case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = OGLES_TEXTURE_STACK_DEPTH;
- break;
- case GL_MAX_TEXTURE_SIZE:
- params[0] = GGL_MAX_TEXTURE_SIZE;
- break;
- case GL_MAX_TEXTURE_UNITS:
- params[0] = GGL_TEXTURE_UNIT_COUNT;
- break;
- case GL_MAX_VIEWPORT_DIMS:
- params[0] = GGL_MAX_VIEWPORT_DIMS;
- params[1] = GGL_MAX_VIEWPORT_DIMS;
- break;
- case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
- params[0] = OGLES_NUM_COMPRESSED_TEXTURE_FORMATS;
- break;
- case GL_SMOOTH_LINE_WIDTH_RANGE:
- params[0] = 0;
- params[1] = GGL_MAX_SMOOTH_LINE_WIDTH;
- break;
- case GL_SMOOTH_POINT_SIZE_RANGE:
- params[0] = 0;
- params[1] = GGL_MAX_SMOOTH_POINT_SIZE;
- break;
- case GL_STENCIL_BITS:
- params[0] = 0;
- break;
- case GL_SUBPIXEL_BITS:
- params[0] = GGL_SUBPIXEL_BITS;
- break;
-
- case GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES:
- memcpy( params,
- c->transforms.modelview.top().elements(),
- 16*sizeof(GLint));
- break;
- case GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES:
- memcpy( params,
- c->transforms.projection.top().elements(),
- 16*sizeof(GLint));
- break;
- case GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES:
- memcpy( params,
- c->transforms.texture[c->textures.active].top().elements(),
- 16*sizeof(GLint));
- break;
-
- default:
- ogles_error(c, GL_INVALID_ENUM);
- break;
- }
-}
-
-// ----------------------------------------------------------------------------
-
-void glPointSize(GLfloat size)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (size <= 0) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->point.size = TRI_FROM_FIXED(gglFloatToFixed(size));
-}
-
-void glPointSizex(GLfixed size)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (size <= 0) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->point.size = TRI_FROM_FIXED(size);
-}
-
-// ----------------------------------------------------------------------------
-
-void glLineWidth(GLfloat width)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (width <= 0) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->line.width = TRI_FROM_FIXED(gglFloatToFixed(width));
-}
-
-void glLineWidthx(GLfixed width)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (width <= 0) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->line.width = TRI_FROM_FIXED(width);
-}
-
-// ----------------------------------------------------------------------------
-
-void glColorMask(GLboolean r, GLboolean g, GLboolean b, GLboolean a) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.colorMask(c, r, g, b, a);
-}
-
-void glDepthMask(GLboolean flag) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.depthMask(c, flag);
-}
-
-void glStencilMask(GLuint mask) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.stencilMask(c, mask);
-}
-
-void glDepthFunc(GLenum func) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.depthFunc(c, func);
-}
-
-void glLogicOp(GLenum opcode) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.logicOp(c, opcode);
-}
-
-void glAlphaFuncx(GLenum func, GLclampx ref) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.alphaFuncx(c, func, ref);
-}
-
-void glBlendFunc(GLenum sfactor, GLenum dfactor) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.blendFunc(c, sfactor, dfactor);
-}
-
-void glClear(GLbitfield mask) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.clear(c, mask);
-}
-
-void glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.clearColorx(c, red, green, blue, alpha);
-}
-
-void glClearColor(GLclampf r, GLclampf g, GLclampf b, GLclampf a)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.clearColorx(c,
- gglFloatToFixed(r),
- gglFloatToFixed(g),
- gglFloatToFixed(b),
- gglFloatToFixed(a));
-}
-
-void glClearDepthx(GLclampx depth) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.clearDepthx(c, depth);
-}
-
-void glClearDepthf(GLclampf depth)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.clearDepthx(c, gglFloatToFixed(depth));
-}
-
-void glClearStencil(GLint s) {
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.clearStencil(c, s);
-}
diff --git a/opengl/libagl/state.h b/opengl/libagl/state.h
deleted file mode 100644
index 55a5ccb..0000000
--- a/opengl/libagl/state.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* libs/opengles/state.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_STATE_H
-#define ANDROID_OPENGLES_STATE_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <private/pixelflinger/ggl_context.h>
-
-#include <GLES/gl.h>
-
-#include <stdio.h>
-
-namespace android {
-
-ogles_context_t *ogles_init(size_t extra);
-void ogles_uninit(ogles_context_t* c);
-void _ogles_error(ogles_context_t* c, GLenum error);
-
-#ifndef TRACE_GL_ERRORS
-#define TRACE_GL_ERRORS 0
-#endif
-
-#if TRACE_GL_ERRORS
-#define ogles_error(c, error) \
-do { \
- printf("ogles_error at file %s line %d\n", __FILE__, __LINE__); \
- _ogles_error(c, error); \
-} while (0)
-#else /* !TRACE_GL_ERRORS */
-#define ogles_error(c, error) _ogles_error((c), (error))
-#endif
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_STATE_H
-
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
deleted file mode 100644
index 08536df..0000000
--- a/opengl/libagl/texture.cpp
+++ /dev/null
@@ -1,1656 +0,0 @@
-/* libs/opengles/texture.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-#include <stdlib.h>
-#include "context.h"
-#include "fp.h"
-#include "state.h"
-#include "texture.h"
-#include "TextureObjectManager.h"
-
-#include <ETC1/etc1.h>
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static void bindTextureTmu(
- ogles_context_t* c, int tmu, GLuint texture, const sp<EGLTextureObject>& tex);
-
-static __attribute__((noinline))
-void generateMipmap(ogles_context_t* c, GLint level);
-
-// ----------------------------------------------------------------------------
-
-#if 0
-#pragma mark -
-#pragma mark Init
-#endif
-
-void ogles_init_texture(ogles_context_t* c)
-{
- c->textures.packAlignment = 4;
- c->textures.unpackAlignment = 4;
-
- // each context has a default named (0) texture (not shared)
- c->textures.defaultTexture = new EGLTextureObject();
- c->textures.defaultTexture->incStrong(c);
-
- // bind the default texture to each texture unit
- for (int i=0; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- bindTextureTmu(c, i, 0, c->textures.defaultTexture);
- memset(c->current.texture[i].v, 0, sizeof(vec4_t));
- c->current.texture[i].Q = 0x10000;
- }
-}
-
-void ogles_uninit_texture(ogles_context_t* c)
-{
- if (c->textures.ggl)
- gglUninit(c->textures.ggl);
- c->textures.defaultTexture->decStrong(c);
- for (int i=0; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (c->textures.tmu[i].texture)
- c->textures.tmu[i].texture->decStrong(c);
- }
-}
-
-static __attribute__((noinline))
-void validate_tmu(ogles_context_t* c, int i)
-{
- texture_unit_t& u(c->textures.tmu[i]);
- if (u.dirty) {
- u.dirty = 0;
- c->rasterizer.procs.activeTexture(c, i);
- c->rasterizer.procs.bindTexture(c, &(u.texture->surface));
- c->rasterizer.procs.texGeni(c, GGL_S,
- GGL_TEXTURE_GEN_MODE, GGL_AUTOMATIC);
- c->rasterizer.procs.texGeni(c, GGL_T,
- GGL_TEXTURE_GEN_MODE, GGL_AUTOMATIC);
- c->rasterizer.procs.texParameteri(c, GGL_TEXTURE_2D,
- GGL_TEXTURE_WRAP_S, u.texture->wraps);
- c->rasterizer.procs.texParameteri(c, GGL_TEXTURE_2D,
- GGL_TEXTURE_WRAP_T, u.texture->wrapt);
- c->rasterizer.procs.texParameteri(c, GGL_TEXTURE_2D,
- GGL_TEXTURE_MIN_FILTER, u.texture->min_filter);
- c->rasterizer.procs.texParameteri(c, GGL_TEXTURE_2D,
- GGL_TEXTURE_MAG_FILTER, u.texture->mag_filter);
-
- // disable this texture unit if it's not complete
- if (!u.texture->isComplete()) {
- c->rasterizer.procs.disable(c, GGL_TEXTURE_2D);
- }
- }
-}
-
-void ogles_validate_texture(ogles_context_t* c)
-{
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (c->rasterizer.state.texture[i].enable)
- validate_tmu(c, i);
- }
- c->rasterizer.procs.activeTexture(c, c->textures.active);
-}
-
-static
-void invalidate_texture(ogles_context_t* c, int tmu, uint8_t flags = 0xFF) {
- c->textures.tmu[tmu].dirty = flags;
-}
-
-/*
- * If the active textures are EGLImage, they need to be locked before
- * they can be used.
- *
- * FIXME: code below is far from being optimal
- *
- */
-
-void ogles_lock_textures(ogles_context_t* c)
-{
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (c->rasterizer.state.texture[i].enable) {
- texture_unit_t& u(c->textures.tmu[i]);
- ANativeWindowBuffer* native_buffer = u.texture->buffer;
- if (native_buffer) {
- c->rasterizer.procs.activeTexture(c, i);
- hw_module_t const* pModule;
- if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &pModule))
- continue;
-
- gralloc_module_t const* module =
- reinterpret_cast<gralloc_module_t const*>(pModule);
-
- void* vaddr;
- int err = module->lock(module, native_buffer->handle,
- GRALLOC_USAGE_SW_READ_OFTEN,
- 0, 0, native_buffer->width, native_buffer->height,
- &vaddr);
-
- u.texture->setImageBits(vaddr);
- c->rasterizer.procs.bindTexture(c, &(u.texture->surface));
- }
- }
- }
-}
-
-void ogles_unlock_textures(ogles_context_t* c)
-{
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (c->rasterizer.state.texture[i].enable) {
- texture_unit_t& u(c->textures.tmu[i]);
- ANativeWindowBuffer* native_buffer = u.texture->buffer;
- if (native_buffer) {
- c->rasterizer.procs.activeTexture(c, i);
- hw_module_t const* pModule;
- if (hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &pModule))
- continue;
-
- gralloc_module_t const* module =
- reinterpret_cast<gralloc_module_t const*>(pModule);
-
- module->unlock(module, native_buffer->handle);
- u.texture->setImageBits(NULL);
- c->rasterizer.procs.bindTexture(c, &(u.texture->surface));
- }
- }
- }
- c->rasterizer.procs.activeTexture(c, c->textures.active);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Format conversion
-#endif
-
-static uint32_t gl2format_table[6][4] = {
- // BYTE, 565, 4444, 5551
- { GGL_PIXEL_FORMAT_A_8,
- 0, 0, 0 }, // GL_ALPHA
- { GGL_PIXEL_FORMAT_RGB_888,
- GGL_PIXEL_FORMAT_RGB_565,
- 0, 0 }, // GL_RGB
- { GGL_PIXEL_FORMAT_RGBA_8888,
- 0,
- GGL_PIXEL_FORMAT_RGBA_4444,
- GGL_PIXEL_FORMAT_RGBA_5551 }, // GL_RGBA
- { GGL_PIXEL_FORMAT_L_8,
- 0, 0, 0 }, // GL_LUMINANCE
- { GGL_PIXEL_FORMAT_LA_88,
- 0, 0, 0 }, // GL_LUMINANCE_ALPHA
-};
-
-static int32_t convertGLPixelFormat(GLint format, GLenum type)
-{
- int32_t fi = -1;
- int32_t ti = -1;
- switch (format) {
- case GL_ALPHA: fi = 0; break;
- case GL_RGB: fi = 1; break;
- case GL_RGBA: fi = 2; break;
- case GL_LUMINANCE: fi = 3; break;
- case GL_LUMINANCE_ALPHA: fi = 4; break;
- }
- switch (type) {
- case GL_UNSIGNED_BYTE: ti = 0; break;
- case GL_UNSIGNED_SHORT_5_6_5: ti = 1; break;
- case GL_UNSIGNED_SHORT_4_4_4_4: ti = 2; break;
- case GL_UNSIGNED_SHORT_5_5_5_1: ti = 3; break;
- }
- if (fi==-1 || ti==-1)
- return 0;
- return gl2format_table[fi][ti];
-}
-
-// ----------------------------------------------------------------------------
-
-static GLenum validFormatType(ogles_context_t* c, GLenum format, GLenum type)
-{
- GLenum error = 0;
- if (format<GL_ALPHA || format>GL_LUMINANCE_ALPHA) {
- error = GL_INVALID_ENUM;
- }
- if (type != GL_UNSIGNED_BYTE && type != GL_UNSIGNED_SHORT_4_4_4_4 &&
- type != GL_UNSIGNED_SHORT_5_5_5_1 && type != GL_UNSIGNED_SHORT_5_6_5) {
- error = GL_INVALID_ENUM;
- }
- if (type == GL_UNSIGNED_SHORT_5_6_5 && format != GL_RGB) {
- error = GL_INVALID_OPERATION;
- }
- if ((type == GL_UNSIGNED_SHORT_4_4_4_4 ||
- type == GL_UNSIGNED_SHORT_5_5_5_1) && format != GL_RGBA) {
- error = GL_INVALID_OPERATION;
- }
- if (error) {
- ogles_error(c, error);
- }
- return error;
-}
-
-// ----------------------------------------------------------------------------
-
-GGLContext* getRasterizer(ogles_context_t* c)
-{
- GGLContext* ggl = c->textures.ggl;
- if (ggl_unlikely(!ggl)) {
- // this is quite heavy the first time...
- gglInit(&ggl);
- if (!ggl) {
- return 0;
- }
- GGLfixed colors[4] = { 0, 0, 0, 0x10000 };
- c->textures.ggl = ggl;
- ggl->activeTexture(ggl, 0);
- ggl->enable(ggl, GGL_TEXTURE_2D);
- ggl->texEnvi(ggl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE);
- ggl->disable(ggl, GGL_DITHER);
- ggl->shadeModel(ggl, GGL_FLAT);
- ggl->color4xv(ggl, colors);
- }
- return ggl;
-}
-
-static __attribute__((noinline))
-int copyPixels(
- ogles_context_t* c,
- const GGLSurface& dst,
- GLint xoffset, GLint yoffset,
- const GGLSurface& src,
- GLint x, GLint y, GLsizei w, GLsizei h)
-{
- if ((dst.format == src.format) &&
- (dst.stride == src.stride) &&
- (dst.width == src.width) &&
- (dst.height == src.height) &&
- (dst.stride > 0) &&
- ((x|y) == 0) &&
- ((xoffset|yoffset) == 0))
- {
- // this is a common case...
- const GGLFormat& pixelFormat(c->rasterizer.formats[src.format]);
- const size_t size = src.height * src.stride * pixelFormat.size;
- memcpy(dst.data, src.data, size);
- return 0;
- }
-
- // use pixel-flinger to handle all the conversions
- GGLContext* ggl = getRasterizer(c);
- if (!ggl) {
- // the only reason this would fail is because we ran out of memory
- return GL_OUT_OF_MEMORY;
- }
-
- ggl->colorBuffer(ggl, &dst);
- ggl->bindTexture(ggl, &src);
- ggl->texCoord2i(ggl, x-xoffset, y-yoffset);
- ggl->recti(ggl, xoffset, yoffset, xoffset+w, yoffset+h);
- return 0;
-}
-
-// ----------------------------------------------------------------------------
-
-static __attribute__((noinline))
-sp<EGLTextureObject> getAndBindActiveTextureObject(ogles_context_t* c)
-{
- sp<EGLTextureObject> tex;
- const int active = c->textures.active;
- const GLuint name = c->textures.tmu[active].name;
-
- // free the reference to the previously bound object
- texture_unit_t& u(c->textures.tmu[active]);
- if (u.texture)
- u.texture->decStrong(c);
-
- if (name == 0) {
- // 0 is our local texture object, not shared with anyone.
- // But it affects all bound TMUs immediately.
- // (we need to invalidate all units bound to this texture object)
- tex = c->textures.defaultTexture;
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (c->textures.tmu[i].texture == tex.get())
- invalidate_texture(c, i);
- }
- } else {
- // get a new texture object for that name
- tex = c->surfaceManager->replaceTexture(name);
- }
-
- // bind this texture to the current active texture unit
- // and add a reference to this texture object
- u.texture = tex.get();
- u.texture->incStrong(c);
- u.name = name;
- invalidate_texture(c, active);
- return tex;
-}
-
-void bindTextureTmu(
- ogles_context_t* c, int tmu, GLuint texture, const sp<EGLTextureObject>& tex)
-{
- if (tex.get() == c->textures.tmu[tmu].texture)
- return;
-
- // free the reference to the previously bound object
- texture_unit_t& u(c->textures.tmu[tmu]);
- if (u.texture)
- u.texture->decStrong(c);
-
- // bind this texture to the current active texture unit
- // and add a reference to this texture object
- u.texture = tex.get();
- u.texture->incStrong(c);
- u.name = texture;
- invalidate_texture(c, tmu);
-}
-
-int createTextureSurface(ogles_context_t* c,
- GGLSurface** outSurface, int32_t* outSize, GLint level,
- GLenum format, GLenum type, GLsizei width, GLsizei height,
- GLenum compressedFormat = 0)
-{
- // find out which texture is bound to the current unit
- const int active = c->textures.active;
- const GLuint name = c->textures.tmu[active].name;
-
- // convert the pixelformat to one we can handle
- const int32_t formatIdx = convertGLPixelFormat(format, type);
- if (formatIdx == 0) { // we don't know what to do with this
- return GL_INVALID_OPERATION;
- }
-
- // figure out the size we need as well as the stride
- const GGLFormat& pixelFormat(c->rasterizer.formats[formatIdx]);
- const int32_t align = c->textures.unpackAlignment-1;
- const int32_t bpr = ((width * pixelFormat.size) + align) & ~align;
- const size_t size = bpr * height;
- const int32_t stride = bpr / pixelFormat.size;
-
- if (level > 0) {
- const int active = c->textures.active;
- EGLTextureObject* tex = c->textures.tmu[active].texture;
- status_t err = tex->reallocate(level,
- width, height, stride, formatIdx, compressedFormat, bpr);
- if (err != NO_ERROR)
- return GL_OUT_OF_MEMORY;
- GGLSurface& surface = tex->editMip(level);
- *outSurface = &surface;
- *outSize = size;
- return 0;
- }
-
- sp<EGLTextureObject> tex = getAndBindActiveTextureObject(c);
- status_t err = tex->reallocate(level,
- width, height, stride, formatIdx, compressedFormat, bpr);
- if (err != NO_ERROR)
- return GL_OUT_OF_MEMORY;
-
- tex->internalformat = format;
- *outSurface = &tex->surface;
- *outSize = size;
- return 0;
-}
-
-static size_t dataSizePalette4(int numLevels, int width, int height, int format)
-{
- int indexBits = 8;
- int entrySize = 0;
- switch (format) {
- case GL_PALETTE4_RGB8_OES:
- indexBits = 4;
- /* FALLTHROUGH */
- case GL_PALETTE8_RGB8_OES:
- entrySize = 3;
- break;
-
- case GL_PALETTE4_RGBA8_OES:
- indexBits = 4;
- /* FALLTHROUGH */
- case GL_PALETTE8_RGBA8_OES:
- entrySize = 4;
- break;
-
- case GL_PALETTE4_R5_G6_B5_OES:
- case GL_PALETTE4_RGBA4_OES:
- case GL_PALETTE4_RGB5_A1_OES:
- indexBits = 4;
- /* FALLTHROUGH */
- case GL_PALETTE8_R5_G6_B5_OES:
- case GL_PALETTE8_RGBA4_OES:
- case GL_PALETTE8_RGB5_A1_OES:
- entrySize = 2;
- break;
- }
-
- size_t size = (1 << indexBits) * entrySize; // palette size
-
- for (int i=0 ; i< numLevels ; i++) {
- int w = (width >> i) ? : 1;
- int h = (height >> i) ? : 1;
- int levelSize = h * ((w * indexBits) / 8) ? : 1;
- size += levelSize;
- }
-
- return size;
-}
-
-static void decodePalette4(const GLvoid *data, int level, int width, int height,
- void *surface, int stride, int format)
-
-{
- int indexBits = 8;
- int entrySize = 0;
- switch (format) {
- case GL_PALETTE4_RGB8_OES:
- indexBits = 4;
- /* FALLTHROUGH */
- case GL_PALETTE8_RGB8_OES:
- entrySize = 3;
- break;
-
- case GL_PALETTE4_RGBA8_OES:
- indexBits = 4;
- /* FALLTHROUGH */
- case GL_PALETTE8_RGBA8_OES:
- entrySize = 4;
- break;
-
- case GL_PALETTE4_R5_G6_B5_OES:
- case GL_PALETTE4_RGBA4_OES:
- case GL_PALETTE4_RGB5_A1_OES:
- indexBits = 4;
- /* FALLTHROUGH */
- case GL_PALETTE8_R5_G6_B5_OES:
- case GL_PALETTE8_RGBA4_OES:
- case GL_PALETTE8_RGB5_A1_OES:
- entrySize = 2;
- break;
- }
-
- const int paletteSize = (1 << indexBits) * entrySize;
-
- uint8_t const* pixels = (uint8_t *)data + paletteSize;
- for (int i=0 ; i<level ; i++) {
- int w = (width >> i) ? : 1;
- int h = (height >> i) ? : 1;
- pixels += h * ((w * indexBits) / 8);
- }
- width = (width >> level) ? : 1;
- height = (height >> level) ? : 1;
-
- if (entrySize == 2) {
- uint8_t const* const palette = (uint8_t*)data;
- for (int y=0 ; y<height ; y++) {
- uint8_t* p = (uint8_t*)surface + y*stride*2;
- if (indexBits == 8) {
- for (int x=0 ; x<width ; x++) {
- int index = 2 * (*pixels++);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- }
- } else {
- for (int x=0 ; x<width ; x+=2) {
- int v = *pixels++;
- int index = 2 * (v >> 4);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- if (x+1 < width) {
- index = 2 * (v & 0xF);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- }
- }
- }
- }
- } else if (entrySize == 3) {
- uint8_t const* const palette = (uint8_t*)data;
- for (int y=0 ; y<height ; y++) {
- uint8_t* p = (uint8_t*)surface + y*stride*3;
- if (indexBits == 8) {
- for (int x=0 ; x<width ; x++) {
- int index = 3 * (*pixels++);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- *p++ = palette[index + 2];
- }
- } else {
- for (int x=0 ; x<width ; x+=2) {
- int v = *pixels++;
- int index = 3 * (v >> 4);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- *p++ = palette[index + 2];
- if (x+1 < width) {
- index = 3 * (v & 0xF);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- *p++ = palette[index + 2];
- }
- }
- }
- }
- } else if (entrySize == 4) {
- uint8_t const* const palette = (uint8_t*)data;
- for (int y=0 ; y<height ; y++) {
- uint8_t* p = (uint8_t*)surface + y*stride*4;
- if (indexBits == 8) {
- for (int x=0 ; x<width ; x++) {
- int index = 4 * (*pixels++);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- *p++ = palette[index + 2];
- *p++ = palette[index + 3];
- }
- } else {
- for (int x=0 ; x<width ; x+=2) {
- int v = *pixels++;
- int index = 4 * (v >> 4);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- *p++ = palette[index + 2];
- *p++ = palette[index + 3];
- if (x+1 < width) {
- index = 4 * (v & 0xF);
- *p++ = palette[index + 0];
- *p++ = palette[index + 1];
- *p++ = palette[index + 2];
- *p++ = palette[index + 3];
- }
- }
- }
- }
- }
-}
-
-
-
-static __attribute__((noinline))
-void set_depth_and_fog(ogles_context_t* c, GGLfixed z)
-{
- const uint32_t enables = c->rasterizer.state.enables;
- // we need to compute Zw
- int32_t iterators[3];
- iterators[1] = iterators[2] = 0;
- GGLfixed Zw;
- GGLfixed n = gglFloatToFixed(c->transforms.vpt.zNear);
- GGLfixed f = gglFloatToFixed(c->transforms.vpt.zFar);
- if (z<=0) Zw = n;
- else if (z>=0x10000) Zw = f;
- else Zw = gglMulAddx(z, (f-n), n);
- if (enables & GGL_ENABLE_FOG) {
- // set up fog if needed...
- iterators[0] = c->fog.fog(c, Zw);
- c->rasterizer.procs.fogGrad3xv(c, iterators);
- }
- if (enables & GGL_ENABLE_DEPTH_TEST) {
- // set up z-test if needed...
- int32_t z = (Zw & ~(Zw>>31));
- if (z >= 0x10000)
- z = 0xFFFF;
- iterators[0] = (z << 16) | z;
- c->rasterizer.procs.zGrad3xv(c, iterators);
- }
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark Generate mimaps
-#endif
-
-extern status_t buildAPyramid(ogles_context_t* c, EGLTextureObject* tex);
-
-void generateMipmap(ogles_context_t* c, GLint level)
-{
- if (level == 0) {
- const int active = c->textures.active;
- EGLTextureObject* tex = c->textures.tmu[active].texture;
- if (tex->generate_mipmap) {
- if (buildAPyramid(c, tex) != NO_ERROR) {
- ogles_error(c, GL_OUT_OF_MEMORY);
- return;
- }
- }
- }
-}
-
-
-static void texParameterx(
- GLenum target, GLenum pname, GLfixed param, ogles_context_t* c)
-{
- if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- EGLTextureObject* textureObject = c->textures.tmu[c->textures.active].texture;
- switch (pname) {
- case GL_TEXTURE_WRAP_S:
- if ((param == GL_REPEAT) ||
- (param == GL_CLAMP_TO_EDGE)) {
- textureObject->wraps = param;
- } else {
- goto invalid_enum;
- }
- break;
- case GL_TEXTURE_WRAP_T:
- if ((param == GL_REPEAT) ||
- (param == GL_CLAMP_TO_EDGE)) {
- textureObject->wrapt = param;
- } else {
- goto invalid_enum;
- }
- break;
- case GL_TEXTURE_MIN_FILTER:
- if ((param == GL_NEAREST) ||
- (param == GL_LINEAR) ||
- (param == GL_NEAREST_MIPMAP_NEAREST) ||
- (param == GL_LINEAR_MIPMAP_NEAREST) ||
- (param == GL_NEAREST_MIPMAP_LINEAR) ||
- (param == GL_LINEAR_MIPMAP_LINEAR)) {
- textureObject->min_filter = param;
- } else {
- goto invalid_enum;
- }
- break;
- case GL_TEXTURE_MAG_FILTER:
- if ((param == GL_NEAREST) ||
- (param == GL_LINEAR)) {
- textureObject->mag_filter = param;
- } else {
- goto invalid_enum;
- }
- break;
- case GL_GENERATE_MIPMAP:
- textureObject->generate_mipmap = param;
- break;
- default:
-invalid_enum:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- invalidate_texture(c, c->textures.active);
-}
-
-
-
-static void drawTexxOESImp(GLfixed x, GLfixed y, GLfixed z, GLfixed w, GLfixed h,
- ogles_context_t* c)
-{
- ogles_lock_textures(c);
-
- const GGLSurface& cbSurface = c->rasterizer.state.buffers.color.s;
- y = gglIntToFixed(cbSurface.height) - (y + h);
- w >>= FIXED_BITS;
- h >>= FIXED_BITS;
-
- // set up all texture units
- for (int i=0 ; i<GGL_TEXTURE_UNIT_COUNT ; i++) {
- if (!c->rasterizer.state.texture[i].enable)
- continue;
-
- int32_t texcoords[8];
- texture_unit_t& u(c->textures.tmu[i]);
-
- // validate this tmu (bind, wrap, filter)
- validate_tmu(c, i);
- // we CLAMP here, which works with premultiplied (s,t)
- c->rasterizer.procs.texParameteri(c,
- GGL_TEXTURE_2D, GGL_TEXTURE_WRAP_S, GGL_CLAMP);
- c->rasterizer.procs.texParameteri(c,
- GGL_TEXTURE_2D, GGL_TEXTURE_WRAP_T, GGL_CLAMP);
- u.dirty = 0xFF; // XXX: should be more subtle
-
- EGLTextureObject* textureObject = u.texture;
- const GLint Ucr = textureObject->crop_rect[0] << 16;
- const GLint Vcr = textureObject->crop_rect[1] << 16;
- const GLint Wcr = textureObject->crop_rect[2] << 16;
- const GLint Hcr = textureObject->crop_rect[3] << 16;
-
- // computes texture coordinates (pre-multiplied)
- int32_t dsdx = Wcr / w; // dsdx = ((Wcr/w)/Wt)*Wt
- int32_t dtdy =-Hcr / h; // dtdy = -((Hcr/h)/Ht)*Ht
- int32_t s0 = Ucr - gglMulx(dsdx, x); // s0 = Ucr - x * dsdx
- int32_t t0 = (Vcr+Hcr) - gglMulx(dtdy, y); // t0 = (Vcr+Hcr) - y*dtdy
- texcoords[0] = s0;
- texcoords[1] = dsdx;
- texcoords[2] = 0;
- texcoords[3] = t0;
- texcoords[4] = 0;
- texcoords[5] = dtdy;
- texcoords[6] = 0;
- texcoords[7] = 0;
- c->rasterizer.procs.texCoordGradScale8xv(c, i, texcoords);
- }
-
- const uint32_t enables = c->rasterizer.state.enables;
- if (ggl_unlikely(enables & (GGL_ENABLE_DEPTH_TEST|GGL_ENABLE_FOG)))
- set_depth_and_fog(c, z);
-
- c->rasterizer.procs.activeTexture(c, c->textures.active);
- c->rasterizer.procs.color4xv(c, c->currentColorClamped.v);
- c->rasterizer.procs.disable(c, GGL_W_LERP);
- c->rasterizer.procs.disable(c, GGL_AA);
- c->rasterizer.procs.shadeModel(c, GL_FLAT);
- c->rasterizer.procs.recti(c,
- gglFixedToIntRound(x),
- gglFixedToIntRound(y),
- gglFixedToIntRound(x)+w,
- gglFixedToIntRound(y)+h);
-
- ogles_unlock_textures(c);
-}
-
-static void drawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed w, GLfixed h,
- ogles_context_t* c)
-{
- // quickly reject empty rects
- if ((w|h) <= 0)
- return;
-
- drawTexxOESImp(x, y, z, w, h, c);
-}
-
-static void drawTexiOES(GLint x, GLint y, GLint z, GLint w, GLint h, ogles_context_t* c)
-{
- // All coordinates are integer, so if we have only one
- // texture unit active and no scaling is required
- // THEN, we can use our special 1:1 mapping
- // which is a lot faster.
-
- if (ggl_likely(c->rasterizer.state.enabled_tmu == 1)) {
- const int tmu = 0;
- texture_unit_t& u(c->textures.tmu[tmu]);
- EGLTextureObject* textureObject = u.texture;
- const GLint Wcr = textureObject->crop_rect[2];
- const GLint Hcr = textureObject->crop_rect[3];
-
- if ((w == Wcr) && (h == -Hcr)) {
- if ((w|h) <= 0) return; // quickly reject empty rects
-
- if (u.dirty) {
- c->rasterizer.procs.activeTexture(c, tmu);
- c->rasterizer.procs.bindTexture(c, &(u.texture->surface));
- c->rasterizer.procs.texParameteri(c, GGL_TEXTURE_2D,
- GGL_TEXTURE_MIN_FILTER, u.texture->min_filter);
- c->rasterizer.procs.texParameteri(c, GGL_TEXTURE_2D,
- GGL_TEXTURE_MAG_FILTER, u.texture->mag_filter);
- }
- c->rasterizer.procs.texGeni(c, GGL_S,
- GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
- c->rasterizer.procs.texGeni(c, GGL_T,
- GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
- u.dirty = 0xFF; // XXX: should be more subtle
- c->rasterizer.procs.activeTexture(c, c->textures.active);
-
- const GGLSurface& cbSurface = c->rasterizer.state.buffers.color.s;
- y = cbSurface.height - (y + h);
- const GLint Ucr = textureObject->crop_rect[0];
- const GLint Vcr = textureObject->crop_rect[1];
- const GLint s0 = Ucr - x;
- const GLint t0 = (Vcr + Hcr) - y;
-
- const GLuint tw = textureObject->surface.width;
- const GLuint th = textureObject->surface.height;
- if ((uint32_t(s0+x+w) > tw) || (uint32_t(t0+y+h) > th)) {
- // The GL spec is unclear about what should happen
- // in this case, so we just use the slow case, which
- // at least won't crash
- goto slow_case;
- }
-
- ogles_lock_textures(c);
-
- c->rasterizer.procs.texCoord2i(c, s0, t0);
- const uint32_t enables = c->rasterizer.state.enables;
- if (ggl_unlikely(enables & (GGL_ENABLE_DEPTH_TEST|GGL_ENABLE_FOG)))
- set_depth_and_fog(c, gglIntToFixed(z));
-
- c->rasterizer.procs.color4xv(c, c->currentColorClamped.v);
- c->rasterizer.procs.disable(c, GGL_W_LERP);
- c->rasterizer.procs.disable(c, GGL_AA);
- c->rasterizer.procs.shadeModel(c, GL_FLAT);
- c->rasterizer.procs.recti(c, x, y, x+w, y+h);
-
- ogles_unlock_textures(c);
-
- return;
- }
- }
-
-slow_case:
- drawTexxOESImp(
- gglIntToFixed(x), gglIntToFixed(y), gglIntToFixed(z),
- gglIntToFixed(w), gglIntToFixed(h),
- c);
-}
-
-
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-using namespace android;
-
-
-#if 0
-#pragma mark -
-#pragma mark Texture API
-#endif
-
-void glActiveTexture(GLenum texture)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (uint32_t(texture-GL_TEXTURE0) > uint32_t(GGL_TEXTURE_UNIT_COUNT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- c->textures.active = texture - GL_TEXTURE0;
- c->rasterizer.procs.activeTexture(c, c->textures.active);
-}
-
-void glBindTexture(GLenum target, GLuint texture)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- // Bind or create a texture
- sp<EGLTextureObject> tex;
- if (texture == 0) {
- // 0 is our local texture object
- tex = c->textures.defaultTexture;
- } else {
- tex = c->surfaceManager->texture(texture);
- if (ggl_unlikely(tex == 0)) {
- tex = c->surfaceManager->createTexture(texture);
- if (tex == 0) {
- ogles_error(c, GL_OUT_OF_MEMORY);
- return;
- }
- }
- }
- bindTextureTmu(c, c->textures.active, texture, tex);
-}
-
-void glGenTextures(GLsizei n, GLuint *textures)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (n<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- // generate unique (shared) texture names
- c->surfaceManager->getToken(n, textures);
-}
-
-void glDeleteTextures(GLsizei n, const GLuint *textures)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (n<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- // If deleting a bound texture, bind this unit to 0
- for (int t=0 ; t<GGL_TEXTURE_UNIT_COUNT ; t++) {
- if (c->textures.tmu[t].name == 0)
- continue;
- for (int i=0 ; i<n ; i++) {
- if (textures[i] && (textures[i] == c->textures.tmu[t].name)) {
- // bind this tmu to texture 0
- sp<EGLTextureObject> tex(c->textures.defaultTexture);
- bindTextureTmu(c, t, 0, tex);
- }
- }
- }
- c->surfaceManager->deleteTextures(n, textures);
- c->surfaceManager->recycleTokens(n, textures);
-}
-
-void glMultiTexCoord4f(
- GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (uint32_t(target-GL_TEXTURE0) > uint32_t(GGL_TEXTURE_UNIT_COUNT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- const int tmu = target-GL_TEXTURE0;
- c->current.texture[tmu].S = gglFloatToFixed(s);
- c->current.texture[tmu].T = gglFloatToFixed(t);
- c->current.texture[tmu].R = gglFloatToFixed(r);
- c->current.texture[tmu].Q = gglFloatToFixed(q);
-}
-
-void glMultiTexCoord4x(
- GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (uint32_t(target-GL_TEXTURE0) > uint32_t(GGL_TEXTURE_UNIT_COUNT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- const int tmu = target-GL_TEXTURE0;
- c->current.texture[tmu].S = s;
- c->current.texture[tmu].T = t;
- c->current.texture[tmu].R = r;
- c->current.texture[tmu].Q = q;
-}
-
-void glPixelStorei(GLenum pname, GLint param)
-{
- ogles_context_t* c = ogles_context_t::get();
- if ((pname != GL_PACK_ALIGNMENT) && (pname != GL_UNPACK_ALIGNMENT)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if ((param<=0 || param>8) || (param & (param-1))) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (pname == GL_PACK_ALIGNMENT)
- c->textures.packAlignment = param;
- if (pname == GL_UNPACK_ALIGNMENT)
- c->textures.unpackAlignment = param;
-}
-
-void glTexEnvf(GLenum target, GLenum pname, GLfloat param)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.texEnvi(c, target, pname, GLint(param));
-}
-
-void glTexEnvfv(
- GLenum target, GLenum pname, const GLfloat *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (pname == GL_TEXTURE_ENV_MODE) {
- c->rasterizer.procs.texEnvi(c, target, pname, GLint(*params));
- return;
- }
- if (pname == GL_TEXTURE_ENV_COLOR) {
- GGLfixed fixed[4];
- for (int i=0 ; i<4 ; i++)
- fixed[i] = gglFloatToFixed(params[i]);
- c->rasterizer.procs.texEnvxv(c, target, pname, fixed);
- return;
- }
- ogles_error(c, GL_INVALID_ENUM);
-}
-
-void glTexEnvx(GLenum target, GLenum pname, GLfixed param)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.texEnvi(c, target, pname, param);
-}
-
-void glTexEnvxv(
- GLenum target, GLenum pname, const GLfixed *params)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->rasterizer.procs.texEnvxv(c, target, pname, params);
-}
-
-void glTexParameteriv(
- GLenum target, GLenum pname, const GLint* params)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- EGLTextureObject* textureObject = c->textures.tmu[c->textures.active].texture;
- switch (pname) {
- case GL_TEXTURE_CROP_RECT_OES:
- memcpy(textureObject->crop_rect, params, 4*sizeof(GLint));
- break;
- default:
- texParameterx(target, pname, GLfixed(params[0]), c);
- return;
- }
-}
-
-void glTexParameterf(
- GLenum target, GLenum pname, GLfloat param)
-{
- ogles_context_t* c = ogles_context_t::get();
- texParameterx(target, pname, GLfixed(param), c);
-}
-
-void glTexParameterx(
- GLenum target, GLenum pname, GLfixed param)
-{
- ogles_context_t* c = ogles_context_t::get();
- texParameterx(target, pname, param, c);
-}
-
-void glTexParameteri(
- GLenum target, GLenum pname, GLint param)
-{
- ogles_context_t* c = ogles_context_t::get();
- texParameterx(target, pname, GLfixed(param), c);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#endif
-
-void glCompressedTexImage2D(
- GLenum target, GLint level, GLenum internalformat,
- GLsizei width, GLsizei height, GLint border,
- GLsizei imageSize, const GLvoid *data)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (width<0 || height<0 || border!=0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- // "uncompress" the texture since pixelflinger doesn't support
- // any compressed texture format natively.
- GLenum format;
- GLenum type;
- switch (internalformat) {
- case GL_PALETTE8_RGB8_OES:
- case GL_PALETTE4_RGB8_OES:
- format = GL_RGB;
- type = GL_UNSIGNED_BYTE;
- break;
- case GL_PALETTE8_RGBA8_OES:
- case GL_PALETTE4_RGBA8_OES:
- format = GL_RGBA;
- type = GL_UNSIGNED_BYTE;
- break;
- case GL_PALETTE8_R5_G6_B5_OES:
- case GL_PALETTE4_R5_G6_B5_OES:
- format = GL_RGB;
- type = GL_UNSIGNED_SHORT_5_6_5;
- break;
- case GL_PALETTE8_RGBA4_OES:
- case GL_PALETTE4_RGBA4_OES:
- format = GL_RGBA;
- type = GL_UNSIGNED_SHORT_4_4_4_4;
- break;
- case GL_PALETTE8_RGB5_A1_OES:
- case GL_PALETTE4_RGB5_A1_OES:
- format = GL_RGBA;
- type = GL_UNSIGNED_SHORT_5_5_5_1;
- break;
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- case GL_ETC1_RGB8_OES:
- format = GL_RGB;
- type = GL_UNSIGNED_BYTE;
- break;
-#endif
- default:
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- if (!data || !width || !height) {
- // unclear if this is an error or not...
- return;
- }
-
- int32_t size;
- GGLSurface* surface;
-
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- if (internalformat == GL_ETC1_RGB8_OES) {
- GLsizei compressedSize = etc1_get_encoded_data_size(width, height);
- if (compressedSize > imageSize) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- int error = createTextureSurface(c, &surface, &size,
- level, format, type, width, height);
- if (error) {
- ogles_error(c, error);
- return;
- }
- if (etc1_decode_image(
- (const etc1_byte*)data,
- (etc1_byte*)surface->data,
- width, height, 3, surface->stride*3) != 0) {
- ogles_error(c, GL_INVALID_OPERATION);
- }
- return;
- }
-#endif
-
- // all mipmap levels are specified at once.
- const int numLevels = level<0 ? -level : 1;
-
- if (dataSizePalette4(numLevels, width, height, format) > imageSize) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- for (int i=0 ; i<numLevels ; i++) {
- int lod_w = (width >> i) ? : 1;
- int lod_h = (height >> i) ? : 1;
- int error = createTextureSurface(c, &surface, &size,
- i, format, type, lod_w, lod_h);
- if (error) {
- ogles_error(c, error);
- return;
- }
- decodePalette4(data, i, width, height,
- surface->data, surface->stride, internalformat);
- }
-}
-
-
-void glTexImage2D(
- GLenum target, GLint level, GLint internalformat,
- GLsizei width, GLsizei height, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (width<0 || height<0 || border!=0 || level < 0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (format != (GLenum)internalformat) {
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
- if (validFormatType(c, format, type)) {
- return;
- }
-
- int32_t size = 0;
- GGLSurface* surface = 0;
- int error = createTextureSurface(c, &surface, &size,
- level, format, type, width, height);
- if (error) {
- ogles_error(c, error);
- return;
- }
-
- if (pixels) {
- const int32_t formatIdx = convertGLPixelFormat(format, type);
- const GGLFormat& pixelFormat(c->rasterizer.formats[formatIdx]);
- const int32_t align = c->textures.unpackAlignment-1;
- const int32_t bpr = ((width * pixelFormat.size) + align) & ~align;
- const size_t size = bpr * height;
- const int32_t stride = bpr / pixelFormat.size;
-
- GGLSurface userSurface;
- userSurface.version = sizeof(userSurface);
- userSurface.width = width;
- userSurface.height = height;
- userSurface.stride = stride;
- userSurface.format = formatIdx;
- userSurface.compressedFormat = 0;
- userSurface.data = (GLubyte*)pixels;
-
- int err = copyPixels(c, *surface, 0, 0, userSurface, 0, 0, width, height);
- if (err) {
- ogles_error(c, err);
- return;
- }
- generateMipmap(c, level);
- }
-}
-
-// ----------------------------------------------------------------------------
-
-void glCompressedTexSubImage2D(
- GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height,
- GLenum format, GLsizei imageSize,
- const GLvoid *data)
-{
- ogles_context_t* c = ogles_context_t::get();
- ogles_error(c, GL_INVALID_ENUM);
-}
-
-void glTexSubImage2D(
- GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height,
- GLenum format, GLenum type, const GLvoid *pixels)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (xoffset<0 || yoffset<0 || width<0 || height<0 || level<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (validFormatType(c, format, type)) {
- return;
- }
-
- // find out which texture is bound to the current unit
- const int active = c->textures.active;
- EGLTextureObject* tex = c->textures.tmu[active].texture;
- const GGLSurface& surface(tex->mip(level));
-
- if (!tex->internalformat || tex->direct) {
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
-
- if (format != tex->internalformat) {
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
- if ((xoffset + width > GLsizei(surface.width)) ||
- (yoffset + height > GLsizei(surface.height))) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (!width || !height) {
- return; // okay, but no-op.
- }
-
- // figure out the size we need as well as the stride
- const int32_t formatIdx = convertGLPixelFormat(format, type);
- if (formatIdx == 0) { // we don't know what to do with this
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
-
- const GGLFormat& pixelFormat(c->rasterizer.formats[formatIdx]);
- const int32_t align = c->textures.unpackAlignment-1;
- const int32_t bpr = ((width * pixelFormat.size) + align) & ~align;
- const size_t size = bpr * height;
- const int32_t stride = bpr / pixelFormat.size;
- GGLSurface userSurface;
- userSurface.version = sizeof(userSurface);
- userSurface.width = width;
- userSurface.height = height;
- userSurface.stride = stride;
- userSurface.format = formatIdx;
- userSurface.compressedFormat = 0;
- userSurface.data = (GLubyte*)pixels;
-
- int err = copyPixels(c,
- surface, xoffset, yoffset,
- userSurface, 0, 0, width, height);
- if (err) {
- ogles_error(c, err);
- return;
- }
-
- generateMipmap(c, level);
-
- // since we only changed the content of the texture, we don't need
- // to call bindTexture on the main rasterizer.
-}
-
-// ----------------------------------------------------------------------------
-
-void glCopyTexImage2D(
- GLenum target, GLint level, GLenum internalformat,
- GLint x, GLint y, GLsizei width, GLsizei height,
- GLint border)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (internalformat<GL_ALPHA || internalformat>GL_LUMINANCE_ALPHA) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (width<0 || height<0 || border!=0 || level<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- GLenum format = 0;
- GLenum type = GL_UNSIGNED_BYTE;
- const GGLSurface& cbSurface = c->rasterizer.state.buffers.color.s;
- const int cbFormatIdx = cbSurface.format;
- switch (cbFormatIdx) {
- case GGL_PIXEL_FORMAT_RGB_565:
- type = GL_UNSIGNED_SHORT_5_6_5;
- break;
- case GGL_PIXEL_FORMAT_RGBA_5551:
- type = GL_UNSIGNED_SHORT_5_5_5_1;
- break;
- case GGL_PIXEL_FORMAT_RGBA_4444:
- type = GL_UNSIGNED_SHORT_4_4_4_4;
- break;
- }
- switch (internalformat) {
- case GL_ALPHA:
- case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE:
- type = GL_UNSIGNED_BYTE;
- break;
- }
-
- // figure out the format to use for the new texture
- switch (cbFormatIdx) {
- case GGL_PIXEL_FORMAT_RGBA_8888:
- case GGL_PIXEL_FORMAT_A_8:
- case GGL_PIXEL_FORMAT_RGBA_5551:
- case GGL_PIXEL_FORMAT_RGBA_4444:
- format = internalformat;
- break;
- case GGL_PIXEL_FORMAT_RGBX_8888:
- case GGL_PIXEL_FORMAT_RGB_888:
- case GGL_PIXEL_FORMAT_RGB_565:
- case GGL_PIXEL_FORMAT_L_8:
- switch (internalformat) {
- case GL_LUMINANCE:
- case GL_RGB:
- format = internalformat;
- break;
- }
- break;
- }
-
- if (format == 0) {
- // invalid combination
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- // create the new texture...
- int32_t size;
- GGLSurface* surface;
- int error = createTextureSurface(c, &surface, &size,
- level, format, type, width, height);
- if (error) {
- ogles_error(c, error);
- return;
- }
-
- // The bottom row is stored first in textures
- GGLSurface txSurface(*surface);
- txSurface.stride = -txSurface.stride;
-
- // (x,y) is the lower-left corner of colorBuffer
- y = cbSurface.height - (y + height);
-
- /* The GLES spec says:
- * If any of the pixels within the specified rectangle are outside
- * the framebuffer associated with the current rendering context,
- * then the values obtained for those pixels are undefined.
- */
- if (x+width > GLint(cbSurface.width))
- width = cbSurface.width - x;
-
- if (y+height > GLint(cbSurface.height))
- height = cbSurface.height - y;
-
- int err = copyPixels(c,
- txSurface, 0, 0,
- cbSurface, x, y, width, height);
- if (err) {
- ogles_error(c, err);
- }
-
- generateMipmap(c, level);
-}
-
-void glCopyTexSubImage2D(
- GLenum target, GLint level, GLint xoffset, GLint yoffset,
- GLint x, GLint y, GLsizei width, GLsizei height)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (xoffset<0 || yoffset<0 || width<0 || height<0 || level<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (!width || !height) {
- return; // okay, but no-op.
- }
-
- // find out which texture is bound to the current unit
- const int active = c->textures.active;
- EGLTextureObject* tex = c->textures.tmu[active].texture;
- const GGLSurface& surface(tex->mip(level));
-
- if (!tex->internalformat) {
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
- if ((xoffset + width > GLsizei(surface.width)) ||
- (yoffset + height > GLsizei(surface.height))) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- // The bottom row is stored first in textures
- GGLSurface txSurface(surface);
- txSurface.stride = -txSurface.stride;
-
- // (x,y) is the lower-left corner of colorBuffer
- const GGLSurface& cbSurface = c->rasterizer.state.buffers.color.s;
- y = cbSurface.height - (y + height);
-
- /* The GLES spec says:
- * If any of the pixels within the specified rectangle are outside
- * the framebuffer associated with the current rendering context,
- * then the values obtained for those pixels are undefined.
- */
- if (x+width > GLint(cbSurface.width))
- width = cbSurface.width - x;
-
- if (y+height > GLint(cbSurface.height))
- height = cbSurface.height - y;
-
- int err = copyPixels(c,
- txSurface, xoffset, yoffset,
- cbSurface, x, y, width, height);
- if (err) {
- ogles_error(c, err);
- return;
- }
-
- generateMipmap(c, level);
-}
-
-void glReadPixels(
- GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type, GLvoid *pixels)
-{
- ogles_context_t* c = ogles_context_t::get();
- if ((format != GL_RGBA) && (format != GL_RGB)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if ((type != GL_UNSIGNED_BYTE) && (type != GL_UNSIGNED_SHORT_5_6_5)) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
- if (width<0 || height<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (x<0 || y<0) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- int32_t formatIdx = GGL_PIXEL_FORMAT_NONE;
- if ((format == GL_RGBA) && (type == GL_UNSIGNED_BYTE)) {
- formatIdx = GGL_PIXEL_FORMAT_RGBA_8888;
- } else if ((format == GL_RGB) && (type == GL_UNSIGNED_SHORT_5_6_5)) {
- formatIdx = GGL_PIXEL_FORMAT_RGB_565;
- } else {
- ogles_error(c, GL_INVALID_OPERATION);
- return;
- }
-
- const GGLSurface& readSurface = c->rasterizer.state.buffers.read.s;
- if ((x+width > GLint(readSurface.width)) ||
- (y+height > GLint(readSurface.height))) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- const GGLFormat& pixelFormat(c->rasterizer.formats[formatIdx]);
- const int32_t align = c->textures.packAlignment-1;
- const int32_t bpr = ((width * pixelFormat.size) + align) & ~align;
- const int32_t stride = bpr / pixelFormat.size;
-
- GGLSurface userSurface;
- userSurface.version = sizeof(userSurface);
- userSurface.width = width;
- userSurface.height = height;
- userSurface.stride = -stride; // bottom row is transfered first
- userSurface.format = formatIdx;
- userSurface.compressedFormat = 0;
- userSurface.data = (GLubyte*)pixels;
-
- // use pixel-flinger to handle all the conversions
- GGLContext* ggl = getRasterizer(c);
- if (!ggl) {
- // the only reason this would fail is because we ran out of memory
- ogles_error(c, GL_OUT_OF_MEMORY);
- return;
- }
-
- ggl->colorBuffer(ggl, &userSurface); // destination is user buffer
- ggl->bindTexture(ggl, &readSurface); // source is read-buffer
- ggl->texCoord2i(ggl, x, readSurface.height - (y + height));
- ggl->recti(ggl, 0, 0, width, height);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark DrawTexture Extension
-#endif
-
-void glDrawTexsvOES(const GLshort* coords) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexiOES(coords[0], coords[1], coords[2], coords[3], coords[4], c);
-}
-void glDrawTexivOES(const GLint* coords) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexiOES(coords[0], coords[1], coords[2], coords[3], coords[4], c);
-}
-void glDrawTexsOES(GLshort x , GLshort y, GLshort z, GLshort w, GLshort h) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexiOES(x, y, z, w, h, c);
-}
-void glDrawTexiOES(GLint x, GLint y, GLint z, GLint w, GLint h) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexiOES(x, y, z, w, h, c);
-}
-
-void glDrawTexfvOES(const GLfloat* coords) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexxOES(
- gglFloatToFixed(coords[0]),
- gglFloatToFixed(coords[1]),
- gglFloatToFixed(coords[2]),
- gglFloatToFixed(coords[3]),
- gglFloatToFixed(coords[4]),
- c);
-}
-void glDrawTexxvOES(const GLfixed* coords) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexxOES(coords[0], coords[1], coords[2], coords[3], coords[4], c);
-}
-void glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat w, GLfloat h){
- ogles_context_t* c = ogles_context_t::get();
- drawTexxOES(
- gglFloatToFixed(x), gglFloatToFixed(y), gglFloatToFixed(z),
- gglFloatToFixed(w), gglFloatToFixed(h),
- c);
-}
-void glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed w, GLfixed h) {
- ogles_context_t* c = ogles_context_t::get();
- drawTexxOES(x, y, z, w, h, c);
-}
-
-// ----------------------------------------------------------------------------
-#if 0
-#pragma mark -
-#pragma mark EGL Image Extension
-#endif
-
-void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- if (image == EGL_NO_IMAGE_KHR) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- ANativeWindowBuffer* native_buffer = (ANativeWindowBuffer*)image;
- if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (native_buffer->common.version != sizeof(ANativeWindowBuffer)) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- // bind it to the texture unit
- sp<EGLTextureObject> tex = getAndBindActiveTextureObject(c);
- tex->setImage(native_buffer);
-}
-
-void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
-{
- ogles_context_t* c = ogles_context_t::get();
- if (target != GL_RENDERBUFFER_OES) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- if (image == EGL_NO_IMAGE_KHR) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- ANativeWindowBuffer* native_buffer = (ANativeWindowBuffer*)image;
- if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
- if (native_buffer->common.version != sizeof(ANativeWindowBuffer)) {
- ogles_error(c, GL_INVALID_VALUE);
- return;
- }
-
- // well, we're not supporting this extension anyways
-}
diff --git a/opengl/libagl/texture.h b/opengl/libagl/texture.h
deleted file mode 100644
index 98f7550..0000000
--- a/opengl/libagl/texture.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* libs/opengles/texture.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_TEXTURE_H
-#define ANDROID_OPENGLES_TEXTURE_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <private/pixelflinger/ggl_context.h>
-
-#include <GLES/gl.h>
-
-#include "context.h"
-
-namespace android {
-
-void ogles_init_texture(ogles_context_t* c);
-void ogles_uninit_texture(ogles_context_t* c);
-void ogles_validate_texture(ogles_context_t* c);
-void ogles_lock_textures(ogles_context_t* c);
-void ogles_unlock_textures(ogles_context_t* c);
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_TEXTURE_H
diff --git a/opengl/libagl/vertex.cpp b/opengl/libagl/vertex.cpp
deleted file mode 100644
index dad04d6..0000000
--- a/opengl/libagl/vertex.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/* libs/opengles/vertex.cpp
-**
-** Copyright 2006, 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 <stdio.h>
-#include <stdlib.h>
-#include "context.h"
-#include "fp.h"
-#include "vertex.h"
-#include "state.h"
-#include "matrix.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-void ogles_init_vertex(ogles_context_t* c)
-{
- c->cull.enable = GL_FALSE;
- c->cull.cullFace = GL_BACK;
- c->cull.frontFace = GL_CCW;
-
- c->current.color.r = 0x10000;
- c->current.color.g = 0x10000;
- c->current.color.b = 0x10000;
- c->current.color.a = 0x10000;
-
- c->currentNormal.z = 0x10000;
-}
-
-void ogles_uninit_vertex(ogles_context_t* c)
-{
-}
-
-// ----------------------------------------------------------------------------
-// vertex processing
-// ----------------------------------------------------------------------------
-
-// Divides a vertex clip coordinates by W
-static inline
-void perspective(ogles_context_t* c, vertex_t* v, uint32_t enables)
-{
- // [x,y,z]window = vpt * ([x,y,z]clip / clip.w)
- // [w]window = 1/w
-
- // With a regular projection generated by glFrustum(),
- // we have w=-z, therefore, w is in [zNear, zFar].
- // Also, zNear and zFar are stricly positive,
- // and 1/w (window.w) is in [1/zFar, 1/zNear], usually this
- // means ]0, +inf[ -- however, it is always recommended
- // to use as large values as possible for zNear.
- // All in all, w is usually smaller than 1.0 (assuming
- // zNear is at least 1.0); and even if zNear is smaller than 1.0
- // values of w won't be too big.
-
- const int32_t rw = gglRecip28(v->clip.w);
- const GLfixed* const m = c->transforms.vpt.transform.matrix.m;
- v->window.w = rw;
- v->window.x = gglMulAddx(gglMulx(v->clip.x, rw, 16), m[ 0], m[12], 28);
- v->window.y = gglMulAddx(gglMulx(v->clip.y, rw, 16), m[ 5], m[13], 28);
- v->window.x = TRI_FROM_FIXED(v->window.x);
- v->window.y = TRI_FROM_FIXED(v->window.y);
- if (enables & GGL_ENABLE_DEPTH_TEST) {
- v->window.z = gglMulAddx(gglMulx(v->clip.z, rw, 16), m[10], m[14], 28);
- }
-}
-
-// frustum clipping and W-divide
-static inline
-void clipFrustumPerspective(ogles_context_t* c, vertex_t* v, uint32_t enables)
-{
- // ndc = clip / W
- // window = ncd * viewport
-
- // clip to the view-volume
- uint32_t clip = v->flags & vertex_t::CLIP_ALL;
- const GLfixed w = v->clip.w;
- if (v->clip.x < -w) clip |= vertex_t::CLIP_L;
- if (v->clip.x > w) clip |= vertex_t::CLIP_R;
- if (v->clip.y < -w) clip |= vertex_t::CLIP_B;
- if (v->clip.y > w) clip |= vertex_t::CLIP_T;
- if (v->clip.z < -w) clip |= vertex_t::CLIP_N;
- if (v->clip.z > w) clip |= vertex_t::CLIP_F;
-
- v->flags |= clip;
- c->arrays.cull &= clip;
-
- if (ggl_likely(!clip)) {
- // if the vertex is clipped, we don't do the perspective
- // divide, since we don't need its window coordinates.
- perspective(c, v, enables);
- }
-}
-
-// frustum clipping, user clipping and W-divide
-static inline
-void clipAllPerspective(ogles_context_t* c, vertex_t* v, uint32_t enables)
-{
- // compute eye coordinates
- c->arrays.mv_transform(
- &c->transforms.modelview.transform, &v->eye, &v->obj);
- v->flags |= vertex_t::EYE;
-
- // clip this vertex against each user clip plane
- uint32_t clip = 0;
- int planes = c->clipPlanes.enable;
- while (planes) {
- const int i = 31 - gglClz(planes);
- planes &= ~(1<<i);
- // XXX: we should have a special dot() for 2,3,4 coords vertices
- GLfixed d = dot4(c->clipPlanes.plane[i].equation.v, v->eye.v);
- if (d < 0) {
- clip |= 0x100<<i;
- }
- }
- v->flags |= clip;
-
- clipFrustumPerspective(c, v, enables);
-}
-
-// ----------------------------------------------------------------------------
-
-void ogles_vertex_project(ogles_context_t* c, vertex_t* v) {
- perspective(c, v, c->rasterizer.state.enables);
-}
-
-void ogles_vertex_perspective2D(ogles_context_t* c, vertex_t* v)
-{
- // here we assume w=1.0 and the viewport transformation
- // has been applied already.
- c->arrays.cull = 0;
- v->window.x = TRI_FROM_FIXED(v->clip.x);
- v->window.y = TRI_FROM_FIXED(v->clip.y);
- v->window.z = v->clip.z;
- v->window.w = v->clip.w << 12;
-}
-
-void ogles_vertex_perspective3DZ(ogles_context_t* c, vertex_t* v) {
- clipFrustumPerspective(c, v, GGL_ENABLE_DEPTH_TEST);
-}
-void ogles_vertex_perspective3D(ogles_context_t* c, vertex_t* v) {
- clipFrustumPerspective(c, v, 0);
-}
-void ogles_vertex_clipAllPerspective3DZ(ogles_context_t* c, vertex_t* v) {
- clipAllPerspective(c, v, GGL_ENABLE_DEPTH_TEST);
-}
-void ogles_vertex_clipAllPerspective3D(ogles_context_t* c, vertex_t* v) {
- clipAllPerspective(c, v, 0);
-}
-
-static void clipPlanex(GLenum plane, const GLfixed* equ, ogles_context_t* c)
-{
- const int p = plane - GL_CLIP_PLANE0;
- if (ggl_unlikely(uint32_t(p) > (GL_CLIP_PLANE5 - GL_CLIP_PLANE0))) {
- ogles_error(c, GL_INVALID_ENUM);
- return;
- }
-
- vec4_t& equation = c->clipPlanes.plane[p].equation;
- memcpy(equation.v, equ, sizeof(vec4_t));
-
- ogles_validate_transform(c, transform_state_t::MVIT);
- transform_t& mvit = c->transforms.mvit4;
- mvit.point4(&mvit, &equation, &equation);
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-using namespace android;
-
-
-void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->current.color.r = gglFloatToFixed(r);
- c->currentColorClamped.r = gglClampx(c->current.color.r);
- c->current.color.g = gglFloatToFixed(g);
- c->currentColorClamped.g = gglClampx(c->current.color.g);
- c->current.color.b = gglFloatToFixed(b);
- c->currentColorClamped.b = gglClampx(c->current.color.b);
- c->current.color.a = gglFloatToFixed(a);
- c->currentColorClamped.a = gglClampx(c->current.color.a);
-}
-
-void glColor4x(GLfixed r, GLfixed g, GLfixed b, GLfixed a)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->current.color.r = r;
- c->current.color.g = g;
- c->current.color.b = b;
- c->current.color.a = a;
- c->currentColorClamped.r = gglClampx(r);
- c->currentColorClamped.g = gglClampx(g);
- c->currentColorClamped.b = gglClampx(b);
- c->currentColorClamped.a = gglClampx(a);
-}
-
-void glNormal3f(GLfloat x, GLfloat y, GLfloat z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->currentNormal.x = gglFloatToFixed(x);
- c->currentNormal.y = gglFloatToFixed(y);
- c->currentNormal.z = gglFloatToFixed(z);
-}
-
-void glNormal3x(GLfixed x, GLfixed y, GLfixed z)
-{
- ogles_context_t* c = ogles_context_t::get();
- c->currentNormal.x = x;
- c->currentNormal.y = y;
- c->currentNormal.z = z;
-}
-
-// ----------------------------------------------------------------------------
-
-void glClipPlanef(GLenum plane, const GLfloat* equ)
-{
- const GLfixed equx[4] = {
- gglFloatToFixed(equ[0]),
- gglFloatToFixed(equ[1]),
- gglFloatToFixed(equ[2]),
- gglFloatToFixed(equ[3])
- };
- ogles_context_t* c = ogles_context_t::get();
- clipPlanex(plane, equx, c);
-}
-
-void glClipPlanex(GLenum plane, const GLfixed* equ)
-{
- ogles_context_t* c = ogles_context_t::get();
- clipPlanex(plane, equ, c);
-}
diff --git a/opengl/libagl/vertex.h b/opengl/libagl/vertex.h
deleted file mode 100644
index 55e6213..0000000
--- a/opengl/libagl/vertex.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* libs/opengles/vertex.h
-**
-** Copyright 2006, 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 ANDROID_OPENGLES_VERTEX_H
-#define ANDROID_OPENGLES_VERTEX_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-
-namespace android {
-
-namespace gl {
-struct vertex_t;
-struct ogles_context_t;
-};
-
-void ogles_init_vertex(ogles_context_t* c);
-void ogles_uninit_vertex(ogles_context_t* c);
-
-void ogles_vertex_perspective2D(ogles_context_t*, vertex_t*);
-
-void ogles_vertex_perspective3D(ogles_context_t*, vertex_t*);
-void ogles_vertex_perspective3DZ(ogles_context_t*, vertex_t*);
-void ogles_vertex_clipAllPerspective3D(ogles_context_t*, vertex_t*);
-void ogles_vertex_clipAllPerspective3DZ(ogles_context_t*, vertex_t*);
-
-
-void ogles_vertex_project(ogles_context_t* c, vertex_t*);
-
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_VERTEX_H
-
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
deleted file mode 100644
index 66bc64d..0000000
--- a/opengl/libs/Android.mk
+++ /dev/null
@@ -1,167 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-###############################################################################
-# Build META EGL library
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- EGL/egl_tls.cpp \
- EGL/egl_cache.cpp \
- EGL/egl_display.cpp \
- EGL/egl_object.cpp \
- EGL/egl.cpp \
- EGL/eglApi.cpp \
- EGL/trace.cpp \
- EGL/getProcAddress.cpp.arm \
- EGL/Loader.cpp \
-#
-
-LOCAL_SHARED_LIBRARIES += libcutils libutils libGLES_trace
-LOCAL_LDLIBS := -lpthread -ldl
-LOCAL_MODULE:= libEGL
-LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL
-LOCAL_SHARED_LIBRARIES += libdl
-# Bionic's private TLS header relies on the ARCH_ARM_HAVE_TLS_REGISTER to
-# select the appropriate TLS codepath
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-# we need to access the private Bionic header <bionic_tls.h>
-LOCAL_C_INCLUDES += bionic/libc/private
-
-LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\"
-LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-LOCAL_CFLAGS += -fvisibility=hidden
-LOCAL_CFLAGS += -DEGL_TRACE=1
-
-ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
-LOCAL_CFLAGS += -DADRENO130=1
-endif
-
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
-ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),)
- LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE)
-endif
-
-ifneq ($(MAX_EGL_CACHE_SIZE),)
- LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE)
-endif
-
-include $(BUILD_SHARED_LIBRARY)
-installed_libEGL := $(LOCAL_INSTALLED_MODULE)
-
-# OpenGL drivers config file
-ifneq ($(BOARD_EGL_CFG),)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := egl.cfg
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
-LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG)
-include $(BUILD_PREBUILT)
-
-# make sure we depend on egl.cfg, so it gets installed
-$(installed_libEGL): | egl.cfg
-
-endif
-
-###############################################################################
-# Build the wrapper OpenGL ES 1.x library
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- GLES_CM/gl.cpp.arm \
-#
-
-LOCAL_SHARED_LIBRARIES += libcutils libEGL
-LOCAL_LDLIBS := -lpthread -ldl
-LOCAL_MODULE:= libGLESv1_CM
-
-LOCAL_SHARED_LIBRARIES += libdl
-# we need to access the private Bionic header <bionic_tls.h>
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-LOCAL_C_INCLUDES += bionic/libc/private
-
-LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\"
-LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-LOCAL_CFLAGS += -fvisibility=hidden
-
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
-include $(BUILD_SHARED_LIBRARY)
-
-
-###############################################################################
-# Build the wrapper OpenGL ES 2.x library
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- GLES2/gl2.cpp.arm \
-#
-
-LOCAL_SHARED_LIBRARIES += libcutils libEGL
-LOCAL_LDLIBS := -lpthread -ldl
-LOCAL_MODULE:= libGLESv2
-
-LOCAL_SHARED_LIBRARIES += libdl
-# we need to access the private Bionic header <bionic_tls.h>
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-LOCAL_C_INCLUDES += bionic/libc/private
-
-LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\"
-LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-LOCAL_CFLAGS += -fvisibility=hidden
-
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
-include $(BUILD_SHARED_LIBRARY)
-
-###############################################################################
-# Build the ETC1 host static library
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- ETC1/etc1.cpp \
-#
-
-LOCAL_LDLIBS := -lpthread -ldl
-LOCAL_MODULE:= libETC1
-
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-###############################################################################
-# Build the ETC1 device library
-#
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- ETC1/etc1.cpp \
-#
-
-LOCAL_LDLIBS := -lpthread -ldl
-LOCAL_MODULE:= libETC1
-
-include $(BUILD_SHARED_LIBRARY)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
deleted file mode 100644
index 0b1016c..0000000
--- a/opengl/libs/EGL/Loader.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- ** Copyright 2007, 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 <ctype.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <dlfcn.h>
-#include <limits.h>
-
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
-#include <EGL/egl.h>
-
-#include "egldefs.h"
-#include "glestrace.h"
-#include "hooks.h"
-#include "Loader.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-
-/*
- * EGL drivers are called
- *
- * /system/lib/egl/lib{[EGL|GLESv1_CM|GLESv2] | GLES}_$TAG.so
- *
- */
-
-ANDROID_SINGLETON_STATIC_INSTANCE( Loader )
-
-/* This function is called to check whether we run inside the emulator,
- * and if this is the case whether GLES GPU emulation is supported.
- *
- * Returned values are:
- * -1 -> not running inside the emulator
- * 0 -> running inside the emulator, but GPU emulation not supported
- * 1 -> running inside the emulator, GPU emulation is supported
- * through the "emulation" config.
- */
-static int
-checkGlesEmulationStatus(void)
-{
- /* We're going to check for the following kernel parameters:
- *
- * qemu=1 -> tells us that we run inside the emulator
- * android.qemu.gles=<number> -> tells us the GLES GPU emulation status
- *
- * Note that we will return <number> if we find it. This let us support
- * more additionnal emulation modes in the future.
- */
- char prop[PROPERTY_VALUE_MAX];
- int result = -1;
-
- /* First, check for qemu=1 */
- property_get("ro.kernel.qemu",prop,"0");
- if (atoi(prop) != 1)
- return -1;
-
- /* We are in the emulator, get GPU status value */
- property_get("ro.kernel.qemu.gles",prop,"0");
- return atoi(prop);
-}
-
-// ----------------------------------------------------------------------------
-
-Loader::driver_t::driver_t(void* gles)
-{
- dso[0] = gles;
- for (size_t i=1 ; i<NELEM(dso) ; i++)
- dso[i] = 0;
-}
-
-Loader::driver_t::~driver_t()
-{
- for (size_t i=0 ; i<NELEM(dso) ; i++) {
- if (dso[i]) {
- dlclose(dso[i]);
- dso[i] = 0;
- }
- }
-}
-
-status_t Loader::driver_t::set(void* hnd, int32_t api)
-{
- switch (api) {
- case EGL:
- dso[0] = hnd;
- break;
- case GLESv1_CM:
- dso[1] = hnd;
- break;
- case GLESv2:
- dso[2] = hnd;
- break;
- default:
- return BAD_INDEX;
- }
- return NO_ERROR;
-}
-
-// ----------------------------------------------------------------------------
-
-Loader::Loader()
-{
- char line[256];
- char tag[256];
-
- /* Special case for GLES emulation */
- if (checkGlesEmulationStatus() == 0) {
- ALOGD("Emulator without GPU support detected. "
- "Fallback to software renderer.");
- mDriverTag.setTo("android");
- return;
- }
-
- /* Otherwise, use egl.cfg */
- FILE* cfg = fopen("/system/lib/egl/egl.cfg", "r");
- if (cfg == NULL) {
- // default config
- ALOGD("egl.cfg not found, using default config");
- mDriverTag.setTo("android");
- } else {
- while (fgets(line, 256, cfg)) {
- int dpy, impl;
- if (sscanf(line, "%u %u %s", &dpy, &impl, tag) == 3) {
- //ALOGD(">>> %u %u %s", dpy, impl, tag);
- // We only load the h/w accelerated implementation
- if (tag != String8("android")) {
- mDriverTag = tag;
- }
- }
- }
- fclose(cfg);
- }
-}
-
-Loader::~Loader()
-{
- GLTrace_stop();
-}
-
-void* Loader::open(egl_connection_t* cnx)
-{
- void* dso;
- driver_t* hnd = 0;
-
- char const* tag = mDriverTag.string();
- if (tag) {
- dso = load_driver("GLES", tag, cnx, EGL | GLESv1_CM | GLESv2);
- if (dso) {
- hnd = new driver_t(dso);
- } else {
- // Always load EGL first
- dso = load_driver("EGL", tag, cnx, EGL);
- if (dso) {
- hnd = new driver_t(dso);
- // TODO: make this more automated
- hnd->set( load_driver("GLESv1_CM", tag, cnx, GLESv1_CM), GLESv1_CM );
- hnd->set( load_driver("GLESv2", tag, cnx, GLESv2), GLESv2 );
- }
- }
- }
-
- LOG_FATAL_IF(!index && !hnd,
- "couldn't find the default OpenGL ES implementation "
- "for default display");
-
- return (void*)hnd;
-}
-
-status_t Loader::close(void* driver)
-{
- driver_t* hnd = (driver_t*)driver;
- delete hnd;
- return NO_ERROR;
-}
-
-void Loader::init_api(void* dso,
- char const * const * api,
- __eglMustCastToProperFunctionPointerType* curr,
- getProcAddressType getProcAddress)
-{
- const ssize_t SIZE = 256;
- char scrap[SIZE];
- while (*api) {
- char const * name = *api;
- __eglMustCastToProperFunctionPointerType f =
- (__eglMustCastToProperFunctionPointerType)dlsym(dso, name);
- if (f == NULL) {
- // couldn't find the entry-point, use eglGetProcAddress()
- f = getProcAddress(name);
- }
- if (f == NULL) {
- // Try without the OES postfix
- ssize_t index = ssize_t(strlen(name)) - 3;
- if ((index>0 && (index<SIZE-1)) && (!strcmp(name+index, "OES"))) {
- strncpy(scrap, name, index);
- scrap[index] = 0;
- f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
- //ALOGD_IF(f, "found <%s> instead", scrap);
- }
- }
- if (f == NULL) {
- // Try with the OES postfix
- ssize_t index = ssize_t(strlen(name)) - 3;
- if (index>0 && strcmp(name+index, "OES")) {
- snprintf(scrap, SIZE, "%sOES", name);
- f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap);
- //ALOGD_IF(f, "found <%s> instead", scrap);
- }
- }
- if (f == NULL) {
- //ALOGD("%s", name);
- f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented;
-
- /*
- * GL_EXT_debug_label is special, we always report it as
- * supported, it's handled by GLES_trace. If GLES_trace is not
- * enabled, then these are no-ops.
- */
- if (!strcmp(name, "glInsertEventMarkerEXT")) {
- f = (__eglMustCastToProperFunctionPointerType)gl_noop;
- } else if (!strcmp(name, "glPushGroupMarkerEXT")) {
- f = (__eglMustCastToProperFunctionPointerType)gl_noop;
- } else if (!strcmp(name, "glPopGroupMarkerEXT")) {
- f = (__eglMustCastToProperFunctionPointerType)gl_noop;
- }
- }
- *curr++ = f;
- api++;
- }
-}
-
-void *Loader::load_driver(const char* kind, const char *tag,
- egl_connection_t* cnx, uint32_t mask)
-{
- char driver_absolute_path[PATH_MAX];
- const char* const search1 = "/vendor/lib/egl/lib%s_%s.so";
- const char* const search2 = "/system/lib/egl/lib%s_%s.so";
-
- snprintf(driver_absolute_path, PATH_MAX, search1, kind, tag);
- if (access(driver_absolute_path, R_OK)) {
- snprintf(driver_absolute_path, PATH_MAX, search2, kind, tag);
- if (access(driver_absolute_path, R_OK)) {
- // this happens often, we don't want to log an error
- return 0;
- }
- }
-
- void* dso = dlopen(driver_absolute_path, RTLD_NOW | RTLD_LOCAL);
- if (dso == 0) {
- const char* err = dlerror();
- ALOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown");
- return 0;
- }
-
- ALOGD("loaded %s", driver_absolute_path);
-
- if (mask & EGL) {
- getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress");
-
- ALOGE_IF(!getProcAddress,
- "can't find eglGetProcAddress() in %s", driver_absolute_path);
-
- egl_t* egl = &cnx->egl;
- __eglMustCastToProperFunctionPointerType* curr =
- (__eglMustCastToProperFunctionPointerType*)egl;
- char const * const * api = egl_names;
- while (*api) {
- char const * name = *api;
- __eglMustCastToProperFunctionPointerType f =
- (__eglMustCastToProperFunctionPointerType)dlsym(dso, name);
- if (f == NULL) {
- // couldn't find the entry-point, use eglGetProcAddress()
- f = getProcAddress(name);
- if (f == NULL) {
- f = (__eglMustCastToProperFunctionPointerType)0;
- }
- }
- *curr++ = f;
- api++;
- }
- }
-
- if (mask & GLESv1_CM) {
- init_api(dso, gl_names,
- (__eglMustCastToProperFunctionPointerType*)
- &cnx->hooks[egl_connection_t::GLESv1_INDEX]->gl,
- getProcAddress);
- }
-
- if (mask & GLESv2) {
- init_api(dso, gl_names,
- (__eglMustCastToProperFunctionPointerType*)
- &cnx->hooks[egl_connection_t::GLESv2_INDEX]->gl,
- getProcAddress);
- }
-
- return dso;
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/Loader.h b/opengl/libs/EGL/Loader.h
deleted file mode 100644
index 30773cb..0000000
--- a/opengl/libs/EGL/Loader.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- ** Copyright 2009, 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 ANDROID_EGL_LOADER_H
-#define ANDROID_EGL_LOADER_H
-
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-
-#include <utils/Errors.h>
-#include <utils/Singleton.h>
-#include <utils/String8.h>
-
-#include <EGL/egl.h>
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-struct egl_connection_t;
-
-class Loader : public Singleton<Loader>
-{
- friend class Singleton<Loader>;
-
- typedef __eglMustCastToProperFunctionPointerType (*getProcAddressType)(
- const char*);
-
- enum {
- EGL = 0x01,
- GLESv1_CM = 0x02,
- GLESv2 = 0x04
- };
- struct driver_t {
- driver_t(void* gles);
- ~driver_t();
- status_t set(void* hnd, int32_t api);
- void* dso[3];
- };
-
- String8 mDriverTag;
- getProcAddressType getProcAddress;
-
-public:
- ~Loader();
-
- void* open(egl_connection_t* cnx);
- status_t close(void* driver);
-
-private:
- Loader();
- void *load_driver(const char* kind, const char *tag, egl_connection_t* cnx, uint32_t mask);
-
- static __attribute__((noinline))
- void init_api(void* dso,
- char const * const * api,
- __eglMustCastToProperFunctionPointerType* curr,
- getProcAddressType getProcAddress);
-};
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif /* ANDROID_EGL_LOADER_H */
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
deleted file mode 100644
index eec5ce1..0000000
--- a/opengl/libs/EGL/egl.cpp
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- ** Copyright 2007, 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 <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <hardware/gralloc.h>
-#include <system/window.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <cutils/log.h>
-#include <cutils/atomic.h>
-#include <cutils/properties.h>
-#include <cutils/memory.h>
-
-#include <utils/CallStack.h>
-#include <utils/String8.h>
-
-#include "egldefs.h"
-#include "egl_impl.h"
-#include "egl_tls.h"
-#include "glestrace.h"
-#include "hooks.h"
-#include "Loader.h"
-
-#include "egl_display.h"
-#include "egl_object.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-egl_connection_t gEGLImpl;
-gl_hooks_t gHooks[2];
-gl_hooks_t gHooksNoContext;
-pthread_key_t gGLWrapperKey = -1;
-
-// ----------------------------------------------------------------------------
-
-#if EGL_TRACE
-
-EGLAPI pthread_key_t gGLTraceKey = -1;
-
-// ----------------------------------------------------------------------------
-
-int gEGLDebugLevel;
-
-static int sEGLTraceLevel;
-static int sEGLApplicationTraceLevel;
-
-extern gl_hooks_t gHooksTrace;
-
-static inline void setGlTraceThreadSpecific(gl_hooks_t const *value) {
- pthread_setspecific(gGLTraceKey, value);
-}
-
-gl_hooks_t const* getGLTraceThreadSpecific() {
- return static_cast<gl_hooks_t*>(pthread_getspecific(gGLTraceKey));
-}
-
-void initEglTraceLevel() {
- char value[PROPERTY_VALUE_MAX];
- property_get("debug.egl.trace", value, "0");
- int propertyLevel = atoi(value);
- int applicationLevel = sEGLApplicationTraceLevel;
- sEGLTraceLevel = propertyLevel > applicationLevel ? propertyLevel : applicationLevel;
-
- property_get("debug.egl.debug_proc", value, "");
- if (strlen(value) == 0)
- return;
-
- long pid = getpid();
- char procPath[128] = {};
- sprintf(procPath, "/proc/%ld/cmdline", pid);
- FILE * file = fopen(procPath, "r");
- if (file) {
- char cmdline[256] = {};
- if (fgets(cmdline, sizeof(cmdline) - 1, file)) {
- if (!strncmp(value, cmdline, strlen(value))) {
- // set EGL debug if the "debug.egl.debug_proc" property
- // matches the prefix of this application's command line
- gEGLDebugLevel = 1;
- }
- }
- fclose(file);
- }
-
- if (gEGLDebugLevel > 0) {
- GLTrace_start();
- }
-}
-
-void setGLHooksThreadSpecific(gl_hooks_t const *value) {
- if (sEGLTraceLevel > 0) {
- setGlTraceThreadSpecific(value);
- setGlThreadSpecific(&gHooksTrace);
- } else if (gEGLDebugLevel > 0 && value != &gHooksNoContext) {
- setGlTraceThreadSpecific(value);
- setGlThreadSpecific(GLTrace_getGLHooks());
- } else {
- setGlThreadSpecific(value);
- }
-}
-
-/*
- * Global entry point to allow applications to modify their own trace level.
- * The effective trace level is the max of this level and the value of debug.egl.trace.
- */
-extern "C"
-void setGLTraceLevel(int level) {
- sEGLApplicationTraceLevel = level;
-}
-
-#else
-
-void setGLHooksThreadSpecific(gl_hooks_t const *value) {
- setGlThreadSpecific(value);
-}
-
-#endif
-
-/*****************************************************************************/
-
-static int gl_no_context() {
- if (egl_tls_t::logNoContextCall()) {
- ALOGE("call to OpenGL ES API with no current context "
- "(logged once per thread)");
- char value[PROPERTY_VALUE_MAX];
- property_get("debug.egl.callstack", value, "0");
- if (atoi(value)) {
- CallStack stack;
- stack.update();
- stack.dump();
- }
- }
- return 0;
-}
-
-static void early_egl_init(void)
-{
-#if !USE_FAST_TLS_KEY
- pthread_key_create(&gGLWrapperKey, NULL);
-#endif
-#if EGL_TRACE
- pthread_key_create(&gGLTraceKey, NULL);
- initEglTraceLevel();
-#endif
- uint32_t addr = (uint32_t)((void*)gl_no_context);
- android_memset32(
- (uint32_t*)(void*)&gHooksNoContext,
- addr,
- sizeof(gHooksNoContext));
-
- setGLHooksThreadSpecific(&gHooksNoContext);
-}
-
-static pthread_once_t once_control = PTHREAD_ONCE_INIT;
-static int sEarlyInitState = pthread_once(&once_control, &early_egl_init);
-
-// ----------------------------------------------------------------------------
-
-egl_display_t* validate_display(EGLDisplay dpy) {
- egl_display_t * const dp = get_display(dpy);
- if (!dp)
- return setError(EGL_BAD_DISPLAY, (egl_display_t*)NULL);
- if (!dp->isReady())
- return setError(EGL_NOT_INITIALIZED, (egl_display_t*)NULL);
-
- return dp;
-}
-
-egl_connection_t* validate_display_config(EGLDisplay dpy, EGLConfig,
- egl_display_t const*& dp) {
- dp = validate_display(dpy);
- if (!dp)
- return (egl_connection_t*) NULL;
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso == 0) {
- return setError(EGL_BAD_CONFIG, (egl_connection_t*)NULL);
- }
- return cnx;
-}
-
-// ----------------------------------------------------------------------------
-
-const GLubyte * egl_get_string_for_current_context(GLenum name) {
- // NOTE: returning NULL here will fall-back to the default
- // implementation.
-
- EGLContext context = egl_tls_t::getContext();
- if (context == EGL_NO_CONTEXT)
- return NULL;
-
- egl_context_t const * const c = get_context(context);
- if (c == NULL) // this should never happen, by construction
- return NULL;
-
- if (name != GL_EXTENSIONS)
- return NULL;
-
- return (const GLubyte *)c->gl_extensions.string();
-}
-
-// ----------------------------------------------------------------------------
-
-// this mutex protects:
-// d->disp[]
-// egl_init_drivers_locked()
-//
-static EGLBoolean egl_init_drivers_locked() {
- if (sEarlyInitState) {
- // initialized by static ctor. should be set here.
- return EGL_FALSE;
- }
-
- // get our driver loader
- Loader& loader(Loader::getInstance());
-
- // dynamically load our EGL implementation
- egl_connection_t* cnx = &gEGLImpl;
- if (cnx->dso == 0) {
- cnx->hooks[egl_connection_t::GLESv1_INDEX] =
- &gHooks[egl_connection_t::GLESv1_INDEX];
- cnx->hooks[egl_connection_t::GLESv2_INDEX] =
- &gHooks[egl_connection_t::GLESv2_INDEX];
- cnx->dso = loader.open(cnx);
- }
-
- return cnx->dso ? EGL_TRUE : EGL_FALSE;
-}
-
-static pthread_mutex_t sInitDriverMutex = PTHREAD_MUTEX_INITIALIZER;
-
-EGLBoolean egl_init_drivers() {
- EGLBoolean res;
- pthread_mutex_lock(&sInitDriverMutex);
- res = egl_init_drivers_locked();
- pthread_mutex_unlock(&sInitDriverMutex);
- return res;
-}
-
-void gl_unimplemented() {
- ALOGE("called unimplemented OpenGL ES API");
-}
-
-void gl_noop() {
-}
-
-// ----------------------------------------------------------------------------
-
-#if USE_FAST_TLS_KEY
-
-// We have a dedicated TLS slot in bionic
-static inline gl_hooks_t const * volatile * get_tls_hooks() {
- volatile void *tls_base = __get_tls();
- gl_hooks_t const * volatile * tls_hooks =
- reinterpret_cast<gl_hooks_t const * volatile *>(tls_base);
- return tls_hooks;
-}
-
-void setGlThreadSpecific(gl_hooks_t const *value) {
- gl_hooks_t const * volatile * tls_hooks = get_tls_hooks();
- tls_hooks[TLS_SLOT_OPENGL_API] = value;
-}
-
-gl_hooks_t const* getGlThreadSpecific() {
- gl_hooks_t const * volatile * tls_hooks = get_tls_hooks();
- gl_hooks_t const* hooks = tls_hooks[TLS_SLOT_OPENGL_API];
- if (hooks) return hooks;
- return &gHooksNoContext;
-}
-
-#else
-
-void setGlThreadSpecific(gl_hooks_t const *value) {
- pthread_setspecific(gGLWrapperKey, value);
-}
-
-gl_hooks_t const* getGlThreadSpecific() {
- gl_hooks_t const* hooks = static_cast<gl_hooks_t*>(pthread_getspecific(gGLWrapperKey));
- if (hooks) return hooks;
- return &gHooksNoContext;
-}
-
-#endif
-
-// ----------------------------------------------------------------------------
-// GL / EGL hooks
-// ----------------------------------------------------------------------------
-
-#undef GL_ENTRY
-#undef EGL_ENTRY
-#define GL_ENTRY(_r, _api, ...) #_api,
-#define EGL_ENTRY(_r, _api, ...) #_api,
-
-char const * const gl_names[] = {
- #include "entries.in"
- NULL
-};
-
-char const * const egl_names[] = {
- #include "egl_entries.in"
- NULL
-};
-
-#undef GL_ENTRY
-#undef EGL_ENTRY
-
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
deleted file mode 100644
index a1bd82d..0000000
--- a/opengl/libs/EGL/eglApi.cpp
+++ /dev/null
@@ -1,1139 +0,0 @@
-/*
- ** Copyright 2007, 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.
- */
-
-#define ATRACE_TAG ATRACE_TAG_GRAPHICS
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <hardware/gralloc.h>
-#include <system/window.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <cutils/log.h>
-#include <cutils/atomic.h>
-#include <cutils/properties.h>
-#include <cutils/memory.h>
-
-#include <utils/KeyedVector.h>
-#include <utils/SortedVector.h>
-#include <utils/String8.h>
-#include <utils/Trace.h>
-
-#include "egl_impl.h"
-#include "egl_tls.h"
-#include "glestrace.h"
-#include "hooks.h"
-
-#include "egl_display.h"
-#include "egl_impl.h"
-#include "egl_object.h"
-#include "egl_tls.h"
-#include "egldefs.h"
-
-using namespace android;
-
-// ----------------------------------------------------------------------------
-
-#define EGL_VERSION_HW_ANDROID 0x3143
-
-struct extention_map_t {
- const char* name;
- __eglMustCastToProperFunctionPointerType address;
-};
-
-static const extention_map_t sExtentionMap[] = {
- { "eglLockSurfaceKHR",
- (__eglMustCastToProperFunctionPointerType)&eglLockSurfaceKHR },
- { "eglUnlockSurfaceKHR",
- (__eglMustCastToProperFunctionPointerType)&eglUnlockSurfaceKHR },
- { "eglCreateImageKHR",
- (__eglMustCastToProperFunctionPointerType)&eglCreateImageKHR },
- { "eglDestroyImageKHR",
- (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR },
- { "eglGetSystemTimeFrequencyNV",
- (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeFrequencyNV },
- { "eglGetSystemTimeNV",
- (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeNV },
-};
-
-// accesses protected by sExtensionMapMutex
-static DefaultKeyedVector<String8, __eglMustCastToProperFunctionPointerType> sGLExtentionMap;
-static int sGLExtentionSlot = 0;
-static pthread_mutex_t sExtensionMapMutex = PTHREAD_MUTEX_INITIALIZER;
-
-static void(*findProcAddress(const char* name,
- const extention_map_t* map, size_t n))() {
- for (uint32_t i=0 ; i<n ; i++) {
- if (!strcmp(name, map[i].name)) {
- return map[i].address;
- }
- }
- return NULL;
-}
-
-// ----------------------------------------------------------------------------
-
-namespace android {
-extern void setGLHooksThreadSpecific(gl_hooks_t const *value);
-extern EGLBoolean egl_init_drivers();
-extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS];
-extern int gEGLDebugLevel;
-extern gl_hooks_t gHooksTrace;
-} // namespace android;
-
-// ----------------------------------------------------------------------------
-
-static inline void clearError() { egl_tls_t::clearError(); }
-static inline EGLContext getContext() { return egl_tls_t::getContext(); }
-
-// ----------------------------------------------------------------------------
-
-EGLDisplay eglGetDisplay(EGLNativeDisplayType display)
-{
- clearError();
-
- uint32_t index = uint32_t(display);
- if (index >= NUM_DISPLAYS) {
- return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY);
- }
-
- if (egl_init_drivers() == EGL_FALSE) {
- return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY);
- }
-
- EGLDisplay dpy = egl_display_t::getFromNativeDisplay(display);
- return dpy;
-}
-
-// ----------------------------------------------------------------------------
-// Initialization
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- clearError();
-
- egl_display_t * const dp = get_display(dpy);
- if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- EGLBoolean res = dp->initialize(major, minor);
-
- return res;
-}
-
-EGLBoolean eglTerminate(EGLDisplay dpy)
-{
- // NOTE: don't unload the drivers b/c some APIs can be called
- // after eglTerminate() has been called. eglTerminate() only
- // terminates an EGLDisplay, not a EGL itself.
-
- clearError();
-
- egl_display_t* const dp = get_display(dpy);
- if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- EGLBoolean res = dp->terminate();
-
- return res;
-}
-
-// ----------------------------------------------------------------------------
-// configuration
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglGetConfigs( EGLDisplay dpy,
- EGLConfig *configs,
- EGLint config_size, EGLint *num_config)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- if (num_config==0) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- EGLBoolean res = EGL_FALSE;
- *num_config = 0;
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso) {
- res = cnx->egl.eglGetConfigs(
- dp->disp.dpy, configs, config_size, num_config);
- }
-
- return res;
-}
-
-EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list,
- EGLConfig *configs, EGLint config_size,
- EGLint *num_config)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- if (num_config==0) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- EGLBoolean res = EGL_FALSE;
- *num_config = 0;
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso) {
- res = cnx->egl.eglChooseConfig(
- dp->disp.dpy, attrib_list, configs, config_size, num_config);
- }
- return res;
-}
-
-EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
- EGLint attribute, EGLint *value)
-{
- clearError();
-
- egl_display_t const* dp = 0;
- egl_connection_t* cnx = validate_display_config(dpy, config, dp);
- if (!cnx) return EGL_FALSE;
-
- return cnx->egl.eglGetConfigAttrib(
- dp->disp.dpy, config, attribute, value);
-}
-
-// ----------------------------------------------------------------------------
-// surfaces
-// ----------------------------------------------------------------------------
-
-EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
- NativeWindowType window,
- const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const* dp = 0;
- egl_connection_t* cnx = validate_display_config(dpy, config, dp);
- if (cnx) {
- EGLDisplay iDpy = dp->disp.dpy;
- EGLint format;
-
- if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
- ALOGE("EGLNativeWindowType %p already connected to another API",
- window);
- return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
- }
-
- // set the native window's buffers format to match this config
- if (cnx->egl.eglGetConfigAttrib(iDpy,
- config, EGL_NATIVE_VISUAL_ID, &format)) {
- if (format != 0) {
- int err = native_window_set_buffers_format(window, format);
- if (err != 0) {
- ALOGE("error setting native window pixel format: %s (%d)",
- strerror(-err), err);
- native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
- return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
- }
- }
- }
-
- // the EGL spec requires that a new EGLSurface default to swap interval
- // 1, so explicitly set that on the window here.
- ANativeWindow* anw = reinterpret_cast<ANativeWindow*>(window);
- anw->setSwapInterval(anw, 1);
-
- EGLSurface surface = cnx->egl.eglCreateWindowSurface(
- iDpy, config, window, attrib_list);
- if (surface != EGL_NO_SURFACE) {
- egl_surface_t* s = new egl_surface_t(dpy, config, window, surface, cnx);
- return s;
- }
-
- // EGLSurface creation failed
- native_window_set_buffers_format(window, 0);
- native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
- }
- return EGL_NO_SURFACE;
-}
-
-EGLSurface eglCreatePixmapSurface( EGLDisplay dpy, EGLConfig config,
- NativePixmapType pixmap,
- const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const* dp = 0;
- egl_connection_t* cnx = validate_display_config(dpy, config, dp);
- if (cnx) {
- EGLSurface surface = cnx->egl.eglCreatePixmapSurface(
- dp->disp.dpy, config, pixmap, attrib_list);
- if (surface != EGL_NO_SURFACE) {
- egl_surface_t* s = new egl_surface_t(dpy, config, NULL, surface, cnx);
- return s;
- }
- }
- return EGL_NO_SURFACE;
-}
-
-EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const* dp = 0;
- egl_connection_t* cnx = validate_display_config(dpy, config, dp);
- if (cnx) {
- EGLSurface surface = cnx->egl.eglCreatePbufferSurface(
- dp->disp.dpy, config, attrib_list);
- if (surface != EGL_NO_SURFACE) {
- egl_surface_t* s = new egl_surface_t(dpy, config, NULL, surface, cnx);
- return s;
- }
- }
- return EGL_NO_SURFACE;
-}
-
-EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t * const s = get_surface(surface);
- EGLBoolean result = s->cnx->egl.eglDestroySurface(dp->disp.dpy, s->surface);
- if (result == EGL_TRUE) {
- _s.terminate();
- }
- return result;
-}
-
-EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface,
- EGLint attribute, EGLint *value)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- return s->cnx->egl.eglQuerySurface(
- dp->disp.dpy, s->surface, attribute, value);
-}
-
-void EGLAPI eglBeginFrame(EGLDisplay dpy, EGLSurface surface) {
- ATRACE_CALL();
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) {
- return;
- }
-
- SurfaceRef _s(dp, surface);
- if (!_s.get()) {
- setError(EGL_BAD_SURFACE, EGL_FALSE);
- return;
- }
-
- int64_t timestamp = systemTime(SYSTEM_TIME_MONOTONIC);
-
- egl_surface_t const * const s = get_surface(surface);
- native_window_set_buffers_timestamp(s->win.get(), timestamp);
-}
-
-// ----------------------------------------------------------------------------
-// Contexts
-// ----------------------------------------------------------------------------
-
-EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_list, const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const* dp = 0;
- egl_connection_t* cnx = validate_display_config(dpy, config, dp);
- if (cnx) {
- if (share_list != EGL_NO_CONTEXT) {
- egl_context_t* const c = get_context(share_list);
- share_list = c->context;
- }
- EGLContext context = cnx->egl.eglCreateContext(
- dp->disp.dpy, config, share_list, attrib_list);
- if (context != EGL_NO_CONTEXT) {
- // figure out if it's a GLESv1 or GLESv2
- int version = 0;
- if (attrib_list) {
- while (*attrib_list != EGL_NONE) {
- GLint attr = *attrib_list++;
- GLint value = *attrib_list++;
- if (attr == EGL_CONTEXT_CLIENT_VERSION) {
- if (value == 1) {
- version = egl_connection_t::GLESv1_INDEX;
- } else if (value == 2) {
- version = egl_connection_t::GLESv2_INDEX;
- }
- }
- };
- }
- egl_context_t* c = new egl_context_t(dpy, context, config, cnx, version);
-#if EGL_TRACE
- if (gEGLDebugLevel > 0)
- GLTrace_eglCreateContext(version, c);
-#endif
- return c;
- }
- }
- return EGL_NO_CONTEXT;
-}
-
-EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp)
- return EGL_FALSE;
-
- ContextRef _c(dp, ctx);
- if (!_c.get())
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- egl_context_t * const c = get_context(ctx);
- EGLBoolean result = c->cnx->egl.eglDestroyContext(dp->disp.dpy, c->context);
- if (result == EGL_TRUE) {
- _c.terminate();
- }
- return result;
-}
-
-EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
- EGLSurface read, EGLContext ctx)
-{
- clearError();
-
- egl_display_t const * const dp = get_display(dpy);
- if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-
- // If ctx is not EGL_NO_CONTEXT, read is not EGL_NO_SURFACE, or draw is not
- // EGL_NO_SURFACE, then an EGL_NOT_INITIALIZED error is generated if dpy is
- // a valid but uninitialized display.
- if ( (ctx != EGL_NO_CONTEXT) || (read != EGL_NO_SURFACE) ||
- (draw != EGL_NO_SURFACE) ) {
- if (!dp->isReady()) return setError(EGL_NOT_INITIALIZED, EGL_FALSE);
- }
-
- // get a reference to the object passed in
- ContextRef _c(dp, ctx);
- SurfaceRef _d(dp, draw);
- SurfaceRef _r(dp, read);
-
- // validate the context (if not EGL_NO_CONTEXT)
- if ((ctx != EGL_NO_CONTEXT) && !_c.get()) {
- // EGL_NO_CONTEXT is valid
- return EGL_FALSE;
- }
-
- // these are the underlying implementation's object
- EGLContext impl_ctx = EGL_NO_CONTEXT;
- EGLSurface impl_draw = EGL_NO_SURFACE;
- EGLSurface impl_read = EGL_NO_SURFACE;
-
- // these are our objects structs passed in
- egl_context_t * c = NULL;
- egl_surface_t const * d = NULL;
- egl_surface_t const * r = NULL;
-
- // these are the current objects structs
- egl_context_t * cur_c = get_context(getContext());
-
- if (ctx != EGL_NO_CONTEXT) {
- c = get_context(ctx);
- impl_ctx = c->context;
- } else {
- // no context given, use the implementation of the current context
- if (cur_c == NULL) {
- // no current context
- if (draw != EGL_NO_SURFACE || read != EGL_NO_SURFACE) {
- // calling eglMakeCurrent( ..., !=0, !=0, EGL_NO_CONTEXT);
- return setError(EGL_BAD_MATCH, EGL_FALSE);
- }
- // not an error, there is just no current context.
- return EGL_TRUE;
- }
- }
-
- // retrieve the underlying implementation's draw EGLSurface
- if (draw != EGL_NO_SURFACE) {
- d = get_surface(draw);
- impl_draw = d->surface;
- }
-
- // retrieve the underlying implementation's read EGLSurface
- if (read != EGL_NO_SURFACE) {
- r = get_surface(read);
- impl_read = r->surface;
- }
-
-
- EGLBoolean result = const_cast<egl_display_t*>(dp)->makeCurrent(c, cur_c,
- draw, read, ctx,
- impl_draw, impl_read, impl_ctx);
-
- if (result == EGL_TRUE) {
- if (c) {
- setGLHooksThreadSpecific(c->cnx->hooks[c->version]);
- egl_tls_t::setContext(ctx);
-#if EGL_TRACE
- if (gEGLDebugLevel > 0)
- GLTrace_eglMakeCurrent(c->version, c->cnx->hooks[c->version], ctx);
-#endif
- _c.acquire();
- _r.acquire();
- _d.acquire();
- } else {
- setGLHooksThreadSpecific(&gHooksNoContext);
- egl_tls_t::setContext(EGL_NO_CONTEXT);
- }
- } else {
- // this will ALOGE the error
- result = setError(c->cnx->egl.eglGetError(), EGL_FALSE);
- }
- return result;
-}
-
-
-EGLBoolean eglQueryContext( EGLDisplay dpy, EGLContext ctx,
- EGLint attribute, EGLint *value)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- ContextRef _c(dp, ctx);
- if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- egl_context_t * const c = get_context(ctx);
- return c->cnx->egl.eglQueryContext(
- dp->disp.dpy, c->context, attribute, value);
-
-}
-
-EGLContext eglGetCurrentContext(void)
-{
- // could be called before eglInitialize(), but we wouldn't have a context
- // then, and this function would correctly return EGL_NO_CONTEXT.
-
- clearError();
-
- EGLContext ctx = getContext();
- return ctx;
-}
-
-EGLSurface eglGetCurrentSurface(EGLint readdraw)
-{
- // could be called before eglInitialize(), but we wouldn't have a context
- // then, and this function would correctly return EGL_NO_SURFACE.
-
- clearError();
-
- EGLContext ctx = getContext();
- if (ctx) {
- egl_context_t const * const c = get_context(ctx);
- if (!c) return setError(EGL_BAD_CONTEXT, EGL_NO_SURFACE);
- switch (readdraw) {
- case EGL_READ: return c->read;
- case EGL_DRAW: return c->draw;
- default: return setError(EGL_BAD_PARAMETER, EGL_NO_SURFACE);
- }
- }
- return EGL_NO_SURFACE;
-}
-
-EGLDisplay eglGetCurrentDisplay(void)
-{
- // could be called before eglInitialize(), but we wouldn't have a context
- // then, and this function would correctly return EGL_NO_DISPLAY.
-
- clearError();
-
- EGLContext ctx = getContext();
- if (ctx) {
- egl_context_t const * const c = get_context(ctx);
- if (!c) return setError(EGL_BAD_CONTEXT, EGL_NO_SURFACE);
- return c->dpy;
- }
- return EGL_NO_DISPLAY;
-}
-
-EGLBoolean eglWaitGL(void)
-{
- clearError();
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (!cnx->dso)
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- return cnx->egl.eglWaitGL();
-}
-
-EGLBoolean eglWaitNative(EGLint engine)
-{
- clearError();
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (!cnx->dso)
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- return cnx->egl.eglWaitNative(engine);
-}
-
-EGLint eglGetError(void)
-{
- EGLint err = EGL_SUCCESS;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso) {
- err = cnx->egl.eglGetError();
- }
- if (err == EGL_SUCCESS) {
- err = egl_tls_t::getError();
- }
- return err;
-}
-
-__eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
-{
- // eglGetProcAddress() could be the very first function called
- // in which case we must make sure we've initialized ourselves, this
- // happens the first time egl_get_display() is called.
-
- clearError();
-
- if (egl_init_drivers() == EGL_FALSE) {
- setError(EGL_BAD_PARAMETER, NULL);
- return NULL;
- }
-
- // The EGL_ANDROID_blob_cache extension should not be exposed to
- // applications. It is used internally by the Android EGL layer.
- if (!strcmp(procname, "eglSetBlobCacheFuncsANDROID")) {
- return NULL;
- }
-
- __eglMustCastToProperFunctionPointerType addr;
- addr = findProcAddress(procname, sExtentionMap, NELEM(sExtentionMap));
- if (addr) return addr;
-
-
- // this protects accesses to sGLExtentionMap and sGLExtentionSlot
- pthread_mutex_lock(&sExtensionMapMutex);
-
- /*
- * Since eglGetProcAddress() is not associated to anything, it needs
- * to return a function pointer that "works" regardless of what
- * the current context is.
- *
- * For this reason, we return a "forwarder", a small stub that takes
- * care of calling the function associated with the context
- * currently bound.
- *
- * We first look for extensions we've already resolved, if we're seeing
- * this extension for the first time, we go through all our
- * implementations and call eglGetProcAddress() and record the
- * result in the appropriate implementation hooks and return the
- * address of the forwarder corresponding to that hook set.
- *
- */
-
- const String8 name(procname);
- addr = sGLExtentionMap.valueFor(name);
- const int slot = sGLExtentionSlot;
-
- ALOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS,
- "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;
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglGetProcAddress) {
- found = true;
- // Extensions are independent of the bound context
- cnx->hooks[egl_connection_t::GLESv1_INDEX]->ext.extensions[slot] =
- cnx->hooks[egl_connection_t::GLESv2_INDEX]->ext.extensions[slot] =
-#if EGL_TRACE
- debugHooks->ext.extensions[slot] =
- gHooksTrace.ext.extensions[slot] =
-#endif
- cnx->egl.eglGetProcAddress(procname);
- }
-
- if (found) {
- addr = gExtensionForwarders[slot];
- sGLExtentionMap.add(name, addr);
- sGLExtentionSlot++;
- }
- }
-
- pthread_mutex_unlock(&sExtensionMapMutex);
- return addr;
-}
-
-EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
-{
- ATRACE_CALL();
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, 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.dpy, s->surface);
-}
-
-EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
- NativePixmapType target)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- return s->cnx->egl.eglCopyBuffers(dp->disp.dpy, s->surface, target);
-}
-
-const char* eglQueryString(EGLDisplay dpy, EGLint name)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return (const char *) NULL;
-
- switch (name) {
- case EGL_VENDOR:
- return dp->getVendorString();
- case EGL_VERSION:
- return dp->getVersionString();
- case EGL_EXTENSIONS:
- return dp->getExtensionString();
- case EGL_CLIENT_APIS:
- return dp->getClientApiString();
- case EGL_VERSION_HW_ANDROID:
- return dp->disp.queryString.version;
- }
- return setError(EGL_BAD_PARAMETER, (const char *)0);
-}
-
-
-// ----------------------------------------------------------------------------
-// EGL 1.1
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglSurfaceAttrib(
- EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- if (s->cnx->egl.eglSurfaceAttrib) {
- return s->cnx->egl.eglSurfaceAttrib(
- dp->disp.dpy, s->surface, attribute, value);
- }
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-}
-
-EGLBoolean eglBindTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- if (s->cnx->egl.eglBindTexImage) {
- return s->cnx->egl.eglBindTexImage(
- dp->disp.dpy, s->surface, buffer);
- }
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-}
-
-EGLBoolean eglReleaseTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- if (s->cnx->egl.eglReleaseTexImage) {
- return s->cnx->egl.eglReleaseTexImage(
- dp->disp.dpy, s->surface, buffer);
- }
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-}
-
-EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- EGLBoolean res = EGL_TRUE;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglSwapInterval) {
- res = cnx->egl.eglSwapInterval(dp->disp.dpy, interval);
- }
-
- return res;
-}
-
-
-// ----------------------------------------------------------------------------
-// EGL 1.2
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglWaitClient(void)
-{
- clearError();
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (!cnx->dso)
- return setError(EGL_BAD_CONTEXT, EGL_FALSE);
-
- EGLBoolean res;
- if (cnx->egl.eglWaitClient) {
- res = cnx->egl.eglWaitClient();
- } else {
- res = cnx->egl.eglWaitGL();
- }
- return res;
-}
-
-EGLBoolean eglBindAPI(EGLenum api)
-{
- clearError();
-
- if (egl_init_drivers() == EGL_FALSE) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- // bind this API on all EGLs
- EGLBoolean res = EGL_TRUE;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglBindAPI) {
- res = cnx->egl.eglBindAPI(api);
- }
- return res;
-}
-
-EGLenum eglQueryAPI(void)
-{
- clearError();
-
- if (egl_init_drivers() == EGL_FALSE) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglQueryAPI) {
- return cnx->egl.eglQueryAPI();
- }
-
- // or, it can only be OpenGL ES
- return EGL_OPENGL_ES_API;
-}
-
-EGLBoolean eglReleaseThread(void)
-{
- clearError();
-
- // If there is context bound to the thread, release it
- egl_display_t::loseCurrent(get_context(getContext()));
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglReleaseThread) {
- cnx->egl.eglReleaseThread();
- }
-
- egl_tls_t::clearTLS();
-#if EGL_TRACE
- if (gEGLDebugLevel > 0)
- GLTrace_eglReleaseThread();
-#endif
- return EGL_TRUE;
-}
-
-EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const* dp = 0;
- egl_connection_t* cnx = validate_display_config(dpy, config, dp);
- if (!cnx) return EGL_FALSE;
- if (cnx->egl.eglCreatePbufferFromClientBuffer) {
- return cnx->egl.eglCreatePbufferFromClientBuffer(
- dp->disp.dpy, buftype, buffer, config, attrib_list);
- }
- return setError(EGL_BAD_CONFIG, EGL_NO_SURFACE);
-}
-
-// ----------------------------------------------------------------------------
-// EGL_EGLEXT_VERSION 3
-// ----------------------------------------------------------------------------
-
-EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
- const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- if (s->cnx->egl.eglLockSurfaceKHR) {
- return s->cnx->egl.eglLockSurfaceKHR(
- dp->disp.dpy, s->surface, attrib_list);
- }
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-}
-
-EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- SurfaceRef _s(dp, surface);
- if (!_s.get())
- return setError(EGL_BAD_SURFACE, EGL_FALSE);
-
- egl_surface_t const * const s = get_surface(surface);
- if (s->cnx->egl.eglUnlockSurfaceKHR) {
- return s->cnx->egl.eglUnlockSurfaceKHR(dp->disp.dpy, s->surface);
- }
- return setError(EGL_BAD_DISPLAY, EGL_FALSE);
-}
-
-EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
- EGLClientBuffer buffer, const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_NO_IMAGE_KHR;
-
- ContextRef _c(dp, ctx);
- egl_context_t * const c = _c.get();
-
- EGLImageKHR result = EGL_NO_IMAGE_KHR;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglCreateImageKHR) {
- result = cnx->egl.eglCreateImageKHR(
- dp->disp.dpy,
- c ? c->context : EGL_NO_CONTEXT,
- target, buffer, attrib_list);
- }
- return result;
-}
-
-EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglDestroyImageKHR) {
- cnx->egl.eglDestroyImageKHR(dp->disp.dpy, img);
- }
- return EGL_TRUE;
-}
-
-// ----------------------------------------------------------------------------
-// EGL_EGLEXT_VERSION 5
-// ----------------------------------------------------------------------------
-
-
-EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_NO_SYNC_KHR;
-
- EGLSyncKHR result = EGL_NO_SYNC_KHR;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglCreateSyncKHR) {
- result = cnx->egl.eglCreateSyncKHR(dp->disp.dpy, type, attrib_list);
- }
- return result;
-}
-
-EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- EGLBoolean result = EGL_FALSE;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglDestroySyncKHR) {
- result = cnx->egl.eglDestroySyncKHR(dp->disp.dpy, sync);
- }
- return result;
-}
-
-EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync,
- EGLint flags, EGLTimeKHR timeout)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- EGLBoolean result = EGL_FALSE;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglClientWaitSyncKHR) {
- result = cnx->egl.eglClientWaitSyncKHR(
- dp->disp.dpy, sync, flags, timeout);
- }
- return result;
-}
-
-EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync,
- EGLint attribute, EGLint *value)
-{
- clearError();
-
- egl_display_t const * const dp = validate_display(dpy);
- if (!dp) return EGL_FALSE;
-
- EGLBoolean result = EGL_FALSE;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->egl.eglGetSyncAttribKHR) {
- result = cnx->egl.eglGetSyncAttribKHR(
- dp->disp.dpy, sync, attribute, value);
- }
- return result;
-}
-
-// ----------------------------------------------------------------------------
-// ANDROID extensions
-// ----------------------------------------------------------------------------
-
-/* ANDROID extensions entry-point go here */
-
-// ----------------------------------------------------------------------------
-// NVIDIA extensions
-// ----------------------------------------------------------------------------
-EGLuint64NV eglGetSystemTimeFrequencyNV()
-{
- clearError();
-
- if (egl_init_drivers() == EGL_FALSE) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- EGLuint64NV ret = 0;
- egl_connection_t* const cnx = &gEGLImpl;
-
- if (cnx->dso && cnx->egl.eglGetSystemTimeFrequencyNV) {
- return cnx->egl.eglGetSystemTimeFrequencyNV();
- }
-
- return setErrorQuiet(EGL_BAD_DISPLAY, 0);
-}
-
-EGLuint64NV eglGetSystemTimeNV()
-{
- clearError();
-
- if (egl_init_drivers() == EGL_FALSE) {
- return setError(EGL_BAD_PARAMETER, EGL_FALSE);
- }
-
- EGLuint64NV ret = 0;
- egl_connection_t* const cnx = &gEGLImpl;
-
- if (cnx->dso && cnx->egl.eglGetSystemTimeNV) {
- return cnx->egl.eglGetSystemTimeNV();
- }
-
- return setErrorQuiet(EGL_BAD_DISPLAY, 0);
-}
diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp
deleted file mode 100644
index c79fb5f..0000000
--- a/opengl/libs/EGL/egl_cache.cpp
+++ /dev/null
@@ -1,352 +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.
- */
-
-#include "egl_cache.h"
-#include "egl_display.h"
-#include "egl_impl.h"
-#include "egldefs.h"
-
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#ifndef MAX_EGL_CACHE_ENTRY_SIZE
-#define MAX_EGL_CACHE_ENTRY_SIZE (16 * 1024);
-#endif
-
-#ifndef MAX_EGL_CACHE_SIZE
-#define MAX_EGL_CACHE_SIZE (64 * 1024);
-#endif
-
-// Cache size limits.
-static const size_t maxKeySize = 1024;
-static const size_t maxValueSize = MAX_EGL_CACHE_ENTRY_SIZE;
-static const size_t maxTotalSize = MAX_EGL_CACHE_SIZE;
-
-// Cache file header
-static const char* cacheFileMagic = "EGL$";
-static const size_t cacheFileHeaderSize = 8;
-
-// The time in seconds to wait before saving newly inserted cache entries.
-static const unsigned int deferredSaveDelay = 4;
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-#define BC_EXT_STR "EGL_ANDROID_blob_cache"
-
-//
-// Callback functions passed to EGL.
-//
-static void setBlob(const void* key, EGLsizeiANDROID keySize,
- const void* value, EGLsizeiANDROID valueSize) {
- egl_cache_t::get()->setBlob(key, keySize, value, valueSize);
-}
-
-static EGLsizeiANDROID getBlob(const void* key, EGLsizeiANDROID keySize,
- void* value, EGLsizeiANDROID valueSize) {
- return egl_cache_t::get()->getBlob(key, keySize, value, valueSize);
-}
-
-//
-// egl_cache_t definition
-//
-egl_cache_t::egl_cache_t() :
- mInitialized(false),
- mBlobCache(NULL) {
-}
-
-egl_cache_t::~egl_cache_t() {
-}
-
-egl_cache_t egl_cache_t::sCache;
-
-egl_cache_t* egl_cache_t::get() {
- return &sCache;
-}
-
-void egl_cache_t::initialize(egl_display_t *display) {
- Mutex::Autolock lock(mMutex);
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && cnx->major >= 0 && cnx->minor >= 0) {
- const char* exts = display->disp.queryString.extensions;
- size_t bcExtLen = strlen(BC_EXT_STR);
- size_t extsLen = strlen(exts);
- bool equal = !strcmp(BC_EXT_STR, exts);
- bool atStart = !strncmp(BC_EXT_STR " ", exts, bcExtLen+1);
- bool atEnd = (bcExtLen+1) < extsLen &&
- !strcmp(" " BC_EXT_STR, exts + extsLen - (bcExtLen+1));
- bool inMiddle = strstr(exts, " " BC_EXT_STR " ");
- if (equal || atStart || atEnd || inMiddle) {
- PFNEGLSETBLOBCACHEFUNCSANDROIDPROC eglSetBlobCacheFuncsANDROID;
- eglSetBlobCacheFuncsANDROID =
- reinterpret_cast<PFNEGLSETBLOBCACHEFUNCSANDROIDPROC>(
- cnx->egl.eglGetProcAddress(
- "eglSetBlobCacheFuncsANDROID"));
- if (eglSetBlobCacheFuncsANDROID == NULL) {
- ALOGE("EGL_ANDROID_blob_cache advertised, "
- "but unable to get eglSetBlobCacheFuncsANDROID");
- return;
- }
-
- eglSetBlobCacheFuncsANDROID(display->disp.dpy,
- android::setBlob, android::getBlob);
- EGLint err = cnx->egl.eglGetError();
- if (err != EGL_SUCCESS) {
- ALOGE("eglSetBlobCacheFuncsANDROID resulted in an error: "
- "%#x", err);
- }
- }
- }
-
- mInitialized = true;
-}
-
-void egl_cache_t::terminate() {
- Mutex::Autolock lock(mMutex);
- if (mBlobCache != NULL) {
- saveBlobCacheLocked();
- mBlobCache = NULL;
- }
- mInitialized = false;
-}
-
-void egl_cache_t::setBlob(const void* key, EGLsizeiANDROID keySize,
- const void* value, EGLsizeiANDROID valueSize) {
- Mutex::Autolock lock(mMutex);
-
- if (keySize < 0 || valueSize < 0) {
- ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");
- return;
- }
-
- if (mInitialized) {
- sp<BlobCache> bc = getBlobCacheLocked();
- bc->set(key, keySize, value, valueSize);
-
- if (!mSavePending) {
- class DeferredSaveThread : public Thread {
- public:
- DeferredSaveThread() : Thread(false) {}
-
- virtual bool threadLoop() {
- sleep(deferredSaveDelay);
- egl_cache_t* c = egl_cache_t::get();
- Mutex::Autolock lock(c->mMutex);
- if (c->mInitialized) {
- c->saveBlobCacheLocked();
- }
- c->mSavePending = false;
- return false;
- }
- };
-
- // The thread will hold a strong ref to itself until it has finished
- // running, so there's no need to keep a ref around.
- sp<Thread> deferredSaveThread(new DeferredSaveThread());
- mSavePending = true;
- deferredSaveThread->run();
- }
- }
-}
-
-EGLsizeiANDROID egl_cache_t::getBlob(const void* key, EGLsizeiANDROID keySize,
- void* value, EGLsizeiANDROID valueSize) {
- Mutex::Autolock lock(mMutex);
-
- if (keySize < 0 || valueSize < 0) {
- ALOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed");
- return 0;
- }
-
- if (mInitialized) {
- sp<BlobCache> bc = getBlobCacheLocked();
- return bc->get(key, keySize, value, valueSize);
- }
- return 0;
-}
-
-void egl_cache_t::setCacheFilename(const char* filename) {
- Mutex::Autolock lock(mMutex);
- mFilename = filename;
-}
-
-sp<BlobCache> egl_cache_t::getBlobCacheLocked() {
- if (mBlobCache == NULL) {
- mBlobCache = new BlobCache(maxKeySize, maxValueSize, maxTotalSize);
- loadBlobCacheLocked();
- }
- return mBlobCache;
-}
-
-static uint32_t crc32c(const uint8_t* buf, size_t len) {
- const uint32_t polyBits = 0x82F63B78;
- uint32_t r = 0;
- for (size_t i = 0; i < len; i++) {
- r ^= buf[i];
- for (int j = 0; j < 8; j++) {
- if (r & 1) {
- r = (r >> 1) ^ polyBits;
- } else {
- r >>= 1;
- }
- }
- }
- return r;
-}
-
-void egl_cache_t::saveBlobCacheLocked() {
- if (mFilename.length() > 0) {
- size_t cacheSize = mBlobCache->getFlattenedSize();
- size_t headerSize = cacheFileHeaderSize;
- const char* fname = mFilename.string();
-
- // Try to create the file with no permissions so we can write it
- // without anyone trying to read it.
- int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
- if (fd == -1) {
- if (errno == EEXIST) {
- // The file exists, delete it and try again.
- if (unlink(fname) == -1) {
- // No point in retrying if the unlink failed.
- ALOGE("error unlinking cache file %s: %s (%d)", fname,
- strerror(errno), errno);
- return;
- }
- // Retry now that we've unlinked the file.
- fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
- }
- if (fd == -1) {
- ALOGE("error creating cache file %s: %s (%d)", fname,
- strerror(errno), errno);
- return;
- }
- }
-
- size_t fileSize = headerSize + cacheSize;
- if (ftruncate(fd, fileSize) == -1) {
- ALOGE("error setting cache file size: %s (%d)", strerror(errno),
- errno);
- close(fd);
- unlink(fname);
- return;
- }
-
- uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,
- PROT_WRITE, MAP_SHARED, fd, 0));
- if (buf == MAP_FAILED) {
- ALOGE("error mmaping cache file: %s (%d)", strerror(errno),
- errno);
- close(fd);
- unlink(fname);
- return;
- }
-
- status_t err = mBlobCache->flatten(buf + headerSize, cacheSize, NULL,
- 0);
- if (err != OK) {
- ALOGE("error writing cache contents: %s (%d)", strerror(-err),
- -err);
- munmap(buf, fileSize);
- close(fd);
- unlink(fname);
- return;
- }
-
- // Write the file magic and CRC
- memcpy(buf, cacheFileMagic, 4);
- uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4);
- *crc = crc32c(buf + headerSize, cacheSize);
-
- munmap(buf, fileSize);
- fchmod(fd, S_IRUSR);
- close(fd);
- }
-}
-
-void egl_cache_t::loadBlobCacheLocked() {
- if (mFilename.length() > 0) {
- size_t headerSize = cacheFileHeaderSize;
-
- int fd = open(mFilename.string(), O_RDONLY, 0);
- if (fd == -1) {
- if (errno != ENOENT) {
- ALOGE("error opening cache file %s: %s (%d)", mFilename.string(),
- strerror(errno), errno);
- }
- return;
- }
-
- struct stat statBuf;
- if (fstat(fd, &statBuf) == -1) {
- ALOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno);
- close(fd);
- return;
- }
-
- // Sanity check the size before trying to mmap it.
- size_t fileSize = statBuf.st_size;
- if (fileSize > maxTotalSize * 2) {
- ALOGE("cache file is too large: %#llx", statBuf.st_size);
- close(fd);
- return;
- }
-
- uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,
- PROT_READ, MAP_PRIVATE, fd, 0));
- if (buf == MAP_FAILED) {
- ALOGE("error mmaping cache file: %s (%d)", strerror(errno),
- errno);
- close(fd);
- return;
- }
-
- // Check the file magic and CRC
- size_t cacheSize = fileSize - headerSize;
- if (memcmp(buf, cacheFileMagic, 4) != 0) {
- ALOGE("cache file has bad mojo");
- close(fd);
- return;
- }
- uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4);
- if (crc32c(buf + headerSize, cacheSize) != *crc) {
- ALOGE("cache file failed CRC check");
- close(fd);
- return;
- }
-
- status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize, NULL,
- 0);
- if (err != OK) {
- ALOGE("error reading cache contents: %s (%d)", strerror(-err),
- -err);
- munmap(buf, fileSize);
- close(fd);
- return;
- }
-
- munmap(buf, fileSize);
- close(fd);
- }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/egl_cache.h b/opengl/libs/EGL/egl_cache.h
deleted file mode 100644
index 8760009..0000000
--- a/opengl/libs/EGL/egl_cache.h
+++ /dev/null
@@ -1,130 +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 ANDROID_EGL_CACHE_H
-#define ANDROID_EGL_CACHE_H
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include <utils/BlobCache.h>
-#include <utils/String8.h>
-#include <utils/StrongPointer.h>
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-class egl_display_t;
-
-class EGLAPI egl_cache_t {
-public:
-
- // get returns a pointer to the singleton egl_cache_t object. This
- // singleton object will never be destroyed.
- static egl_cache_t* get();
-
- // initialize puts the egl_cache_t into an initialized state, such that it
- // is able to insert and retrieve entries from the cache. This should be
- // called when EGL is initialized. When not in the initialized state the
- // getBlob and setBlob methods will return without performing any cache
- // operations.
- void initialize(egl_display_t* display);
-
- // terminate puts the egl_cache_t back into the uninitialized state. When
- // in this state the getBlob and setBlob methods will return without
- // performing any cache operations.
- void terminate();
-
- // setBlob attempts to insert a new key/value blob pair into the cache.
- // This will be called by the hardware vendor's EGL implementation via the
- // EGL_ANDROID_blob_cache extension.
- void setBlob(const void* key, EGLsizeiANDROID keySize, const void* value,
- EGLsizeiANDROID valueSize);
-
- // getBlob attempts to retrieve the value blob associated with a given key
- // blob from cache. This will be called by the hardware vendor's EGL
- // implementation via the EGL_ANDROID_blob_cache extension.
- EGLsizeiANDROID getBlob(const void* key, EGLsizeiANDROID keySize,
- void* value, EGLsizeiANDROID valueSize);
-
- // setCacheFilename sets the name of the file that should be used to store
- // cache contents from one program invocation to another.
- void setCacheFilename(const char* filename);
-
-private:
- // Creation and (the lack of) destruction is handled internally.
- egl_cache_t();
- ~egl_cache_t();
-
- // Copying is disallowed.
- egl_cache_t(const egl_cache_t&); // not implemented
- void operator=(const egl_cache_t&); // not implemented
-
- // getBlobCacheLocked returns the BlobCache object being used to store the
- // key/value blob pairs. If the BlobCache object has not yet been created,
- // this will do so, loading the serialized cache contents from disk if
- // possible.
- sp<BlobCache> getBlobCacheLocked();
-
- // saveBlobCache attempts to save the current contents of mBlobCache to
- // disk.
- void saveBlobCacheLocked();
-
- // loadBlobCache attempts to load the saved cache contents from disk into
- // mBlobCache.
- void loadBlobCacheLocked();
-
- // mInitialized indicates whether the egl_cache_t is in the initialized
- // state. It is initialized to false at construction time, and gets set to
- // true when initialize is called. It is set back to false when terminate
- // is called. When in this state, the cache behaves as normal. When not,
- // the getBlob and setBlob methods will return without performing any cache
- // operations.
- bool mInitialized;
-
- // mBlobCache is the cache in which the key/value blob pairs are stored. It
- // is initially NULL, and will be initialized by getBlobCacheLocked the
- // first time it's needed.
- sp<BlobCache> mBlobCache;
-
- // mFilename is the name of the file for storing cache contents in between
- // program invocations. It is initialized to an empty string at
- // construction time, and can be set with the setCacheFilename method. An
- // empty string indicates that the cache should not be saved to or restored
- // from disk.
- String8 mFilename;
-
- // mSavePending indicates whether or not a deferred save operation is
- // pending. Each time a key/value pair is inserted into the cache via
- // setBlob, a deferred save is initiated if one is not already pending.
- // This will wait some amount of time and then trigger a save of the cache
- // contents to disk.
- bool mSavePending;
-
- // mMutex is the mutex used to prevent concurrent access to the member
- // variables. It must be locked whenever the member variables are accessed.
- mutable Mutex mMutex;
-
- // sCache is the singleton egl_cache_t object.
- static egl_cache_t sCache;
-};
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif // ANDROID_EGL_CACHE_H
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
deleted file mode 100644
index c85b4ce..0000000
--- a/opengl/libs/EGL/egl_display.cpp
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- ** Copyright 2007, 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 <string.h>
-
-#include "egl_cache.h"
-#include "egl_display.h"
-#include "egl_object.h"
-#include "egl_tls.h"
-#include "egl_impl.h"
-#include "Loader.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-static char const * const sVendorString = "Android";
-static char const * const sVersionString = "1.4 Android META-EGL";
-static char const * const sClientApiString = "OpenGL ES";
-
-// this is the list of EGL extensions that are exposed to applications
-// some of them are mandatory because used by the ANDROID system.
-//
-// mandatory extensions are required per the CDD and not explicitly
-// checked during EGL initialization. the system *assumes* these extensions
-// are present. the system may not function properly if some mandatory
-// extensions are missing.
-//
-// NOTE: sExtensionString MUST be have a single space as the last character.
-//
-static char const * const sExtensionString =
- "EGL_KHR_image " // mandatory
- "EGL_KHR_image_base " // mandatory
- "EGL_KHR_image_pixmap "
- "EGL_KHR_gl_texture_2D_image "
- "EGL_KHR_gl_texture_cubemap_image "
- "EGL_KHR_gl_renderbuffer_image "
- "EGL_KHR_fence_sync "
- "EGL_NV_system_time "
- "EGL_ANDROID_image_native_buffer " // mandatory
- ;
-
-// extensions not exposed to applications but used by the ANDROID system
-// "EGL_ANDROID_recordable " // mandatory
-// "EGL_ANDROID_blob_cache " // strongly recommended
-
-extern void initEglTraceLevel();
-extern void setGLHooksThreadSpecific(gl_hooks_t const *value);
-
-// ----------------------------------------------------------------------------
-
-egl_display_t egl_display_t::sDisplay[NUM_DISPLAYS];
-
-egl_display_t::egl_display_t() :
- magic('_dpy'), refs(0) {
-}
-
-egl_display_t::~egl_display_t() {
- magic = 0;
- egl_cache_t::get()->terminate();
-}
-
-egl_display_t* egl_display_t::get(EGLDisplay dpy) {
- uintptr_t index = uintptr_t(dpy)-1U;
- return (index >= NUM_DISPLAYS) ? NULL : &sDisplay[index];
-}
-
-void egl_display_t::addObject(egl_object_t* object) {
- Mutex::Autolock _l(lock);
- objects.add(object);
-}
-
-void egl_display_t::removeObject(egl_object_t* object) {
- Mutex::Autolock _l(lock);
- objects.remove(object);
-}
-
-bool egl_display_t::getObject(egl_object_t* object) const {
- Mutex::Autolock _l(lock);
- if (objects.indexOf(object) >= 0) {
- if (object->getDisplay() == this) {
- object->incRef();
- return true;
- }
- }
- return false;
-}
-
-EGLDisplay egl_display_t::getFromNativeDisplay(EGLNativeDisplayType disp) {
- if (uintptr_t(disp) >= NUM_DISPLAYS)
- return NULL;
-
- return sDisplay[uintptr_t(disp)].getDisplay(disp);
-}
-
-EGLDisplay egl_display_t::getDisplay(EGLNativeDisplayType display) {
-
- Mutex::Autolock _l(lock);
-
- // get our driver loader
- Loader& loader(Loader::getInstance());
-
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && disp.dpy == EGL_NO_DISPLAY) {
- EGLDisplay dpy = cnx->egl.eglGetDisplay(display);
- disp.dpy = dpy;
- if (dpy == EGL_NO_DISPLAY) {
- loader.close(cnx->dso);
- cnx->dso = NULL;
- }
- }
-
- return EGLDisplay(uintptr_t(display) + 1U);
-}
-
-EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
-
- Mutex::Autolock _l(lock);
-
- if (refs > 0) {
- if (major != NULL)
- *major = VERSION_MAJOR;
- if (minor != NULL)
- *minor = VERSION_MINOR;
- refs++;
- return EGL_TRUE;
- }
-
-#if EGL_TRACE
-
- // Called both at early_init time and at this time. (Early_init is pre-zygote, so
- // the information from that call may be stale.)
- initEglTraceLevel();
-
-#endif
-
- setGLHooksThreadSpecific(&gHooksNoContext);
-
- // initialize each EGL and
- // build our own extension string first, based on the extension we know
- // and the extension supported by our client implementation
-
- egl_connection_t* const cnx = &gEGLImpl;
- cnx->major = -1;
- cnx->minor = -1;
- if (cnx->dso) {
-
-#if defined(ADRENO130)
-#warning "Adreno-130 eglInitialize() workaround"
- /*
- * The ADRENO 130 driver returns a different EGLDisplay each time
- * eglGetDisplay() is called, but also makes the EGLDisplay invalid
- * after eglTerminate() has been called, so that eglInitialize()
- * cannot be called again. Therefore, we need to make sure to call
- * eglGetDisplay() before calling eglInitialize();
- */
- if (i == IMPL_HARDWARE) {
- disp[i].dpy = cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY);
- }
-#endif
-
- EGLDisplay idpy = disp.dpy;
- if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
- //ALOGD("initialized dpy=%p, ver=%d.%d, cnx=%p",
- // idpy, cnx->major, cnx->minor, cnx);
-
- // display is now initialized
- disp.state = egl_display_t::INITIALIZED;
-
- // get the query-strings for this display for each implementation
- disp.queryString.vendor = cnx->egl.eglQueryString(idpy,
- EGL_VENDOR);
- disp.queryString.version = cnx->egl.eglQueryString(idpy,
- EGL_VERSION);
- disp.queryString.extensions = cnx->egl.eglQueryString(idpy,
- EGL_EXTENSIONS);
- disp.queryString.clientApi = cnx->egl.eglQueryString(idpy,
- EGL_CLIENT_APIS);
-
- } else {
- ALOGW("eglInitialize(%p) failed (%s)", idpy,
- egl_tls_t::egl_strerror(cnx->egl.eglGetError()));
- }
- }
-
- // the query strings are per-display
- mVendorString.setTo(sVendorString);
- mVersionString.setTo(sVersionString);
- mClientApiString.setTo(sClientApiString);
-
- // we only add extensions that exist in the implementation
- char const* start = sExtensionString;
- char const* end;
- do {
- // find the space separating this extension for the next one
- end = strchr(start, ' ');
- if (end) {
- // length of the extension string
- const size_t len = end - start;
- if (len) {
- // NOTE: we could avoid the copy if we had strnstr.
- const String8 ext(start, len);
- // now look for this extension
- if (disp.queryString.extensions) {
- // if we find it, add this extension string to our list
- // (and don't forget the space)
- const char* match = strstr(disp.queryString.extensions, ext.string());
- if (match && (match[len] == ' ' || match[len] == 0)) {
- mExtensionString.append(start, len+1);
- }
- }
- }
- // process the next extension string, and skip the space.
- start = end + 1;
- }
- } while (end);
-
- egl_cache_t::get()->initialize(this);
-
- refs++;
- if (major != NULL)
- *major = VERSION_MAJOR;
- if (minor != NULL)
- *minor = VERSION_MINOR;
- return EGL_TRUE;
-}
-
-EGLBoolean egl_display_t::terminate() {
-
- Mutex::Autolock _l(lock);
-
- if (refs == 0) {
- return setError(EGL_NOT_INITIALIZED, EGL_FALSE);
- }
-
- // this is specific to Android, display termination is ref-counted.
- if (refs > 1) {
- refs--;
- return EGL_TRUE;
- }
-
- EGLBoolean res = EGL_FALSE;
- egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->dso && disp.state == egl_display_t::INITIALIZED) {
- if (cnx->egl.eglTerminate(disp.dpy) == EGL_FALSE) {
- ALOGW("eglTerminate(%p) failed (%s)", disp.dpy,
- egl_tls_t::egl_strerror(cnx->egl.eglGetError()));
- }
- // REVISIT: it's unclear what to do if eglTerminate() fails
- disp.state = egl_display_t::TERMINATED;
- res = EGL_TRUE;
- }
-
- // Mark all objects remaining in the list as terminated, unless
- // there are no reference to them, it which case, we're free to
- // delete them.
- size_t count = objects.size();
- ALOGW_IF(count, "eglTerminate() called w/ %d objects remaining", count);
- for (size_t i=0 ; i<count ; i++) {
- egl_object_t* o = objects.itemAt(i);
- o->destroy();
- }
-
- // this marks all object handles are "terminated"
- objects.clear();
-
- refs--;
- return res;
-}
-
-void egl_display_t::loseCurrent(egl_context_t * cur_c)
-{
- if (cur_c) {
- egl_display_t* display = cur_c->getDisplay();
- if (display) {
- display->loseCurrentImpl(cur_c);
- }
- }
-}
-
-void egl_display_t::loseCurrentImpl(egl_context_t * cur_c)
-{
- // by construction, these are either 0 or valid (possibly terminated)
- // it should be impossible for these to be invalid
- ContextRef _cur_c(cur_c);
- SurfaceRef _cur_r(cur_c ? get_surface(cur_c->read) : NULL);
- SurfaceRef _cur_d(cur_c ? get_surface(cur_c->draw) : NULL);
-
- { // scope for the lock
- Mutex::Autolock _l(lock);
- cur_c->onLooseCurrent();
-
- }
-
- // This cannot be called with the lock held because it might end-up
- // calling back into EGL (in particular when a surface is destroyed
- // it calls ANativeWindow::disconnect
- _cur_c.release();
- _cur_r.release();
- _cur_d.release();
-}
-
-EGLBoolean egl_display_t::makeCurrent(egl_context_t* c, egl_context_t* cur_c,
- EGLSurface draw, EGLSurface read, EGLContext ctx,
- EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx)
-{
- EGLBoolean result;
-
- // by construction, these are either 0 or valid (possibly terminated)
- // it should be impossible for these to be invalid
- ContextRef _cur_c(cur_c);
- SurfaceRef _cur_r(cur_c ? get_surface(cur_c->read) : NULL);
- SurfaceRef _cur_d(cur_c ? get_surface(cur_c->draw) : NULL);
-
- { // scope for the lock
- Mutex::Autolock _l(lock);
- if (c) {
- result = c->cnx->egl.eglMakeCurrent(
- disp.dpy, impl_draw, impl_read, impl_ctx);
- if (result == EGL_TRUE) {
- c->onMakeCurrent(draw, read);
- }
- } else {
- result = cur_c->cnx->egl.eglMakeCurrent(
- disp.dpy, impl_draw, impl_read, impl_ctx);
- if (result == EGL_TRUE) {
- cur_c->onLooseCurrent();
- }
- }
- }
-
- if (result == EGL_TRUE) {
- // This cannot be called with the lock held because it might end-up
- // calling back into EGL (in particular when a surface is destroyed
- // it calls ANativeWindow::disconnect
- _cur_c.release();
- _cur_r.release();
- _cur_d.release();
- }
-
- return result;
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h
deleted file mode 100644
index 6348228..0000000
--- a/opengl/libs/EGL/egl_display.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- ** Copyright 2007, 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 ANDROID_EGL_DISPLAY_H
-#define ANDROID_EGL_DISPLAY_H
-
-
-#include <ctype.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/SortedVector.h>
-#include <utils/threads.h>
-#include <utils/String8.h>
-
-#include "egldefs.h"
-#include "hooks.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-class egl_object_t;
-class egl_context_t;
-class egl_connection_t;
-
-// ----------------------------------------------------------------------------
-
-class EGLAPI egl_display_t { // marked as EGLAPI for testing purposes
- static egl_display_t sDisplay[NUM_DISPLAYS];
- EGLDisplay getDisplay(EGLNativeDisplayType display);
- void loseCurrentImpl(egl_context_t * cur_c);
-
-public:
- enum {
- NOT_INITIALIZED = 0,
- INITIALIZED = 1,
- TERMINATED = 2
- };
-
- egl_display_t();
- ~egl_display_t();
-
- EGLBoolean initialize(EGLint *major, EGLint *minor);
- EGLBoolean terminate();
-
- // add object to this display's list
- void addObject(egl_object_t* object);
- // remove object from this display's list
- void removeObject(egl_object_t* object);
- // add reference to this object. returns true if this is a valid object.
- bool getObject(egl_object_t* object) const;
-
- static egl_display_t* get(EGLDisplay dpy);
- static EGLDisplay getFromNativeDisplay(EGLNativeDisplayType disp);
-
- EGLBoolean makeCurrent(egl_context_t* c, egl_context_t* cur_c,
- EGLSurface draw, EGLSurface read, EGLContext ctx,
- EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx);
- static void loseCurrent(egl_context_t * cur_c);
-
- inline bool isReady() const { return (refs > 0); }
- inline bool isValid() const { return magic == '_dpy'; }
- inline bool isAlive() const { return isValid(); }
-
- char const * getVendorString() const { return mVendorString.string(); }
- char const * getVersionString() const { return mVersionString.string(); }
- char const * getClientApiString() const { return mClientApiString.string(); }
- char const * getExtensionString() const { return mExtensionString.string(); }
-
- inline uint32_t getRefsCount() const { return refs; }
-
- struct strings_t {
- char const * vendor;
- char const * version;
- char const * clientApi;
- char const * extensions;
- };
-
- struct DisplayImpl {
- DisplayImpl() : dpy(EGL_NO_DISPLAY), state(NOT_INITIALIZED) { }
- EGLDisplay dpy;
- EGLint state;
- strings_t queryString;
- };
-
-private:
- uint32_t magic;
-
-public:
- DisplayImpl disp;
-
-private:
- uint32_t refs;
- mutable Mutex lock;
- SortedVector<egl_object_t*> objects;
- String8 mVendorString;
- String8 mVersionString;
- String8 mClientApiString;
- String8 mExtensionString;
-};
-
-// ----------------------------------------------------------------------------
-
-inline egl_display_t* get_display(EGLDisplay dpy) {
- return egl_display_t::get(dpy);
-}
-
-// ----------------------------------------------------------------------------
-
-egl_display_t* validate_display(EGLDisplay dpy);
-egl_connection_t* validate_display_config(EGLDisplay dpy,
- EGLConfig config, egl_display_t const*& dp);
-EGLBoolean validate_display_context(EGLDisplay dpy, EGLContext ctx);
-EGLBoolean validate_display_surface(EGLDisplay dpy, EGLSurface surface);
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif // ANDROID_EGL_DISPLAY_H
diff --git a/opengl/libs/EGL/egl_entries.in b/opengl/libs/EGL/egl_entries.in
deleted file mode 100644
index bdd2a7e..0000000
--- a/opengl/libs/EGL/egl_entries.in
+++ /dev/null
@@ -1,69 +0,0 @@
-EGL_ENTRY(EGLDisplay, eglGetDisplay, NativeDisplayType)
-EGL_ENTRY(EGLBoolean, eglInitialize, EGLDisplay, EGLint*, EGLint*)
-EGL_ENTRY(EGLBoolean, eglTerminate, EGLDisplay)
-EGL_ENTRY(EGLBoolean, eglGetConfigs, EGLDisplay, EGLConfig*, EGLint, EGLint*)
-EGL_ENTRY(EGLBoolean, eglChooseConfig, EGLDisplay, const EGLint *, EGLConfig *, EGLint, EGLint *)
-
-EGL_ENTRY(EGLBoolean, eglGetConfigAttrib, EGLDisplay, EGLConfig, EGLint, EGLint *)
-EGL_ENTRY(EGLSurface, eglCreateWindowSurface, EGLDisplay, EGLConfig, NativeWindowType, const EGLint *)
-EGL_ENTRY(EGLSurface, eglCreatePixmapSurface, EGLDisplay, EGLConfig, NativePixmapType, const EGLint *)
-EGL_ENTRY(EGLSurface, eglCreatePbufferSurface, EGLDisplay, EGLConfig, const EGLint *)
-EGL_ENTRY(EGLBoolean, eglDestroySurface, EGLDisplay, EGLSurface)
-EGL_ENTRY(EGLBoolean, eglQuerySurface, EGLDisplay, EGLSurface, EGLint, EGLint *)
-EGL_ENTRY(EGLContext, eglCreateContext, EGLDisplay, EGLConfig, EGLContext, const EGLint *)
-EGL_ENTRY(EGLBoolean, eglDestroyContext, EGLDisplay, EGLContext)
-EGL_ENTRY(EGLBoolean, eglMakeCurrent, EGLDisplay, EGLSurface, EGLSurface, EGLContext)
-EGL_ENTRY(EGLContext, eglGetCurrentContext, void)
-EGL_ENTRY(EGLSurface, eglGetCurrentSurface, EGLint)
-EGL_ENTRY(EGLDisplay, eglGetCurrentDisplay, void)
-EGL_ENTRY(EGLBoolean, eglQueryContext, EGLDisplay, EGLContext, EGLint, EGLint *)
-EGL_ENTRY(EGLBoolean, eglWaitGL, void)
-EGL_ENTRY(EGLBoolean, eglWaitNative, EGLint)
-EGL_ENTRY(EGLBoolean, eglSwapBuffers, EGLDisplay, EGLSurface)
-EGL_ENTRY(EGLBoolean, eglCopyBuffers, EGLDisplay, EGLSurface, NativePixmapType)
-EGL_ENTRY(EGLint, eglGetError, void)
-EGL_ENTRY(const char*, eglQueryString, EGLDisplay, EGLint)
-EGL_ENTRY(__eglMustCastToProperFunctionPointerType, eglGetProcAddress, const char *)
-
-/* EGL 1.1 */
-
-EGL_ENTRY(EGLBoolean, eglSurfaceAttrib, EGLDisplay, EGLSurface, EGLint, EGLint)
-EGL_ENTRY(EGLBoolean, eglBindTexImage, EGLDisplay, EGLSurface, EGLint)
-EGL_ENTRY(EGLBoolean, eglReleaseTexImage, EGLDisplay, EGLSurface, EGLint)
-EGL_ENTRY(EGLBoolean, eglSwapInterval, EGLDisplay, EGLint)
-
-/* EGL 1.2 */
-
-EGL_ENTRY(EGLBoolean, eglBindAPI, EGLenum)
-EGL_ENTRY(EGLenum, eglQueryAPI, void)
-EGL_ENTRY(EGLBoolean, eglWaitClient, void)
-EGL_ENTRY(EGLBoolean, eglReleaseThread, void)
-EGL_ENTRY(EGLSurface, eglCreatePbufferFromClientBuffer, EGLDisplay, EGLenum, EGLClientBuffer, EGLConfig, const EGLint *)
-
-/* EGL 1.3 */
-
-/* EGL 1.4 */
-
-/* EGL_EGLEXT_VERSION 3 */
-
-EGL_ENTRY(EGLBoolean, eglLockSurfaceKHR, EGLDisplay, EGLSurface, const EGLint *)
-EGL_ENTRY(EGLBoolean, eglUnlockSurfaceKHR, EGLDisplay, EGLSurface)
-EGL_ENTRY(EGLImageKHR, eglCreateImageKHR, EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLint *)
-EGL_ENTRY(EGLBoolean, eglDestroyImageKHR, EGLDisplay, EGLImageKHR)
-
-/* EGL_EGLEXT_VERSION 5 */
-
-EGL_ENTRY(EGLSyncKHR, eglCreateSyncKHR, EGLDisplay, EGLenum, const EGLint *)
-EGL_ENTRY(EGLBoolean, eglDestroySyncKHR, EGLDisplay, EGLSyncKHR)
-EGL_ENTRY(EGLint, eglClientWaitSyncKHR, EGLDisplay, EGLSyncKHR, EGLint, EGLTimeKHR)
-EGL_ENTRY(EGLBoolean, eglGetSyncAttribKHR, EGLDisplay, EGLSyncKHR, EGLint, EGLint *)
-
-/* ANDROID extensions */
-
-EGL_ENTRY(EGLBoolean, eglSetSwapRectangleANDROID, EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint)
-EGL_ENTRY(EGLClientBuffer, eglGetRenderBufferANDROID, EGLDisplay, EGLSurface)
-
-/* NVIDIA extensions */
-
-EGL_ENTRY(EGLuint64NV, eglGetSystemTimeFrequencyNV, void)
-EGL_ENTRY(EGLuint64NV, eglGetSystemTimeNV, void)
diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp
deleted file mode 100644
index d0cbb31..0000000
--- a/opengl/libs/EGL/egl_object.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- ** Copyright 2007, 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 <ctype.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/threads.h>
-
-#include "egl_object.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-egl_object_t::egl_object_t(egl_display_t* disp) :
- display(disp), count(1) {
- // NOTE: this does an implicit incRef
- display->addObject(this);
-}
-
-egl_object_t::~egl_object_t() {
-}
-
-void egl_object_t::terminate() {
- // this marks the object as "terminated"
- display->removeObject(this);
- if (decRef() == 1) {
- // shouldn't happen because this is called from LocalRef
- ALOGE("egl_object_t::terminate() removed the last reference!");
- }
-}
-
-void egl_object_t::destroy() {
- if (decRef() == 1) {
- delete this;
- }
-}
-
-bool egl_object_t::get(egl_display_t const* display, egl_object_t* object) {
- // used by LocalRef, this does an incRef() atomically with
- // checking that the object is valid.
- return display->getObject(object);
-}
-
-// ----------------------------------------------------------------------------
-
-egl_context_t::egl_context_t(EGLDisplay dpy, EGLContext context, EGLConfig config,
- egl_connection_t const* cnx, int version) :
- egl_object_t(get_display(dpy)), dpy(dpy), context(context),
- config(config), read(0), draw(0), cnx(cnx),
- version(version)
-{
-}
-
-void egl_context_t::onLooseCurrent() {
- read = NULL;
- draw = NULL;
-}
-
-void egl_context_t::onMakeCurrent(EGLSurface draw, EGLSurface read) {
- this->read = read;
- this->draw = draw;
-
- /*
- * Here we cache the GL_EXTENSIONS string for this context and we
- * add the extensions always handled by the wrapper
- */
-
- if (gl_extensions.isEmpty()) {
- // call the implementation's glGetString(GL_EXTENSIONS)
- const char* exts = (const char *)gEGLImpl.hooks[version]->gl.glGetString(GL_EXTENSIONS);
- gl_extensions.setTo(exts);
- if (gl_extensions.find("GL_EXT_debug_marker") < 0) {
- String8 temp("GL_EXT_debug_marker ");
- temp.append(gl_extensions);
- gl_extensions.setTo(temp);
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h
deleted file mode 100644
index 4d91f54..0000000
--- a/opengl/libs/EGL/egl_object.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- ** Copyright 2007, 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 ANDROID_EGL_OBJECT_H
-#define ANDROID_EGL_OBJECT_H
-
-
-#include <ctype.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/threads.h>
-#include <utils/String8.h>
-
-#include <system/window.h>
-
-#include "egl_display.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-struct egl_display_t;
-
-class egl_object_t {
- egl_display_t *display;
- mutable volatile int32_t count;
-
-protected:
- virtual ~egl_object_t();
-
-public:
- egl_object_t(egl_display_t* display);
- void destroy();
-
- inline int32_t incRef() { return android_atomic_inc(&count); }
- inline int32_t decRef() { return android_atomic_dec(&count); }
- inline egl_display_t* getDisplay() const { return display; }
-
-private:
- void terminate();
- static bool get(egl_display_t const* display, egl_object_t* object);
-
-public:
- template <typename N, typename T>
- class LocalRef {
- egl_object_t* ref;
- LocalRef();
- LocalRef(const LocalRef* rhs);
- public:
- ~LocalRef();
- explicit LocalRef(egl_object_t* rhs);
- explicit LocalRef(egl_display_t const* display, T o) : ref(0) {
- egl_object_t* native = reinterpret_cast<N*>(o);
- if (o && egl_object_t::get(display, native)) {
- ref = native;
- }
- }
- inline N* get() {
- return static_cast<N*>(ref);
- }
- void acquire() const;
- void release() const;
- void terminate();
- };
- template <typename N, typename T>
- friend class LocalRef;
-};
-
-template<typename N, typename T>
-egl_object_t::LocalRef<N, T>::LocalRef(egl_object_t* rhs) : ref(rhs) {
- if (ref) {
- ref->incRef();
- }
-}
-
-template <typename N, typename T>
-egl_object_t::LocalRef<N,T>::~LocalRef() {
- if (ref) {
- ref->destroy();
- }
-}
-
-template <typename N, typename T>
-void egl_object_t::LocalRef<N,T>::acquire() const {
- if (ref) {
- ref->incRef();
- }
-}
-
-template <typename N, typename T>
-void egl_object_t::LocalRef<N,T>::release() const {
- if (ref) {
- if (ref->decRef() == 1) {
- // shouldn't happen because this is called from LocalRef
- ALOGE("LocalRef::release() removed the last reference!");
- }
- }
-}
-
-template <typename N, typename T>
-void egl_object_t::LocalRef<N,T>::terminate() {
- if (ref) {
- ref->terminate();
- }
-}
-
-// ----------------------------------------------------------------------------
-
-class egl_surface_t : public egl_object_t {
-protected:
- ~egl_surface_t() {
- ANativeWindow* const window = win.get();
- if (window != NULL) {
- native_window_set_buffers_format(window, 0);
- if (native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL)) {
- ALOGW("EGLNativeWindowType %p disconnect failed", window);
- }
- }
- }
-public:
- typedef egl_object_t::LocalRef<egl_surface_t, EGLSurface> Ref;
-
- egl_surface_t(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win,
- EGLSurface surface, egl_connection_t const* cnx) :
- egl_object_t(get_display(dpy)), dpy(dpy), surface(surface),
- config(config), win(win), cnx(cnx) {
- }
- EGLDisplay dpy;
- EGLSurface surface;
- EGLConfig config;
- sp<ANativeWindow> win;
- egl_connection_t const* cnx;
-};
-
-class egl_context_t: public egl_object_t {
-protected:
- ~egl_context_t() {}
-public:
- typedef egl_object_t::LocalRef<egl_context_t, EGLContext> Ref;
-
- egl_context_t(EGLDisplay dpy, EGLContext context, EGLConfig config,
- egl_connection_t const* cnx, int version);
-
- void onLooseCurrent();
- void onMakeCurrent(EGLSurface draw, EGLSurface read);
-
- EGLDisplay dpy;
- EGLContext context;
- EGLConfig config;
- EGLSurface read;
- EGLSurface draw;
- egl_connection_t const* cnx;
- int version;
- String8 gl_extensions;
-};
-
-// ----------------------------------------------------------------------------
-
-typedef egl_surface_t::Ref SurfaceRef;
-typedef egl_context_t::Ref ContextRef;
-
-// ----------------------------------------------------------------------------
-
-template<typename NATIVE, typename EGL>
-static inline NATIVE* egl_to_native_cast(EGL arg) {
- return reinterpret_cast<NATIVE*>(arg);
-}
-
-static inline
-egl_surface_t* get_surface(EGLSurface surface) {
- return egl_to_native_cast<egl_surface_t>(surface);
-}
-
-static inline
-egl_context_t* get_context(EGLContext context) {
- return egl_to_native_cast<egl_context_t>(context);
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif // ANDROID_EGL_OBJECT_H
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
deleted file mode 100644
index 41cfae1..0000000
--- a/opengl/libs/EGL/egl_tls.cpp
+++ /dev/null
@@ -1,148 +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.
- */
-
-#include <stdlib.h>
-#include <pthread.h>
-
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
-#include <utils/CallStack.h>
-
-#include <EGL/egl.h>
-
-#include "egl_tls.h"
-
-
-namespace android {
-
-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) {
-}
-
-const char *egl_tls_t::egl_strerror(EGLint err) {
- switch (err) {
- case EGL_SUCCESS: return "EGL_SUCCESS";
- case EGL_NOT_INITIALIZED: return "EGL_NOT_INITIALIZED";
- case EGL_BAD_ACCESS: return "EGL_BAD_ACCESS";
- case EGL_BAD_ALLOC: return "EGL_BAD_ALLOC";
- case EGL_BAD_ATTRIBUTE: return "EGL_BAD_ATTRIBUTE";
- case EGL_BAD_CONFIG: return "EGL_BAD_CONFIG";
- case EGL_BAD_CONTEXT: return "EGL_BAD_CONTEXT";
- case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE";
- case EGL_BAD_DISPLAY: return "EGL_BAD_DISPLAY";
- case EGL_BAD_MATCH: return "EGL_BAD_MATCH";
- case EGL_BAD_NATIVE_PIXMAP: return "EGL_BAD_NATIVE_PIXMAP";
- case EGL_BAD_NATIVE_WINDOW: return "EGL_BAD_NATIVE_WINDOW";
- case EGL_BAD_PARAMETER: return "EGL_BAD_PARAMETER";
- case EGL_BAD_SURFACE: return "EGL_BAD_SURFACE";
- case EGL_CONTEXT_LOST: return "EGL_CONTEXT_LOST";
- default: return "UNKNOWN";
- }
-}
-
-void egl_tls_t::validateTLSKey()
-{
- if (sKey == -1) {
- pthread_mutex_lock(&sLockKey);
- if (sKey == -1)
- pthread_key_create(&sKey, NULL);
- pthread_mutex_unlock(&sLockKey);
- }
-}
-
-void egl_tls_t::setErrorEtcImpl(
- const char* caller, int line, EGLint error, bool quiet) {
- validateTLSKey();
- egl_tls_t* tls = getTLS();
- if (tls->error != error) {
- if (!quiet) {
- ALOGE("%s:%d error %x (%s)",
- caller, line, error, egl_strerror(error));
- char value[PROPERTY_VALUE_MAX];
- property_get("debug.egl.callstack", value, "0");
- if (atoi(value)) {
- CallStack stack;
- stack.update();
- stack.dump();
- }
- }
- tls->error = error;
- }
-}
-
-bool egl_tls_t::logNoContextCall() {
- egl_tls_t* tls = getTLS();
- if (tls->logCallWithNoContext == true) {
- tls->logCallWithNoContext = false;
- return true;
- }
- return false;
-}
-
-egl_tls_t* egl_tls_t::getTLS() {
- egl_tls_t* tls = (egl_tls_t*)pthread_getspecific(sKey);
- if (tls == 0) {
- tls = new egl_tls_t;
- pthread_setspecific(sKey, tls);
- }
- return tls;
-}
-
-void egl_tls_t::clearTLS() {
- if (sKey != -1) {
- egl_tls_t* tls = (egl_tls_t*)pthread_getspecific(sKey);
- if (tls) {
- delete tls;
- pthread_setspecific(sKey, 0);
- }
- }
-}
-
-void egl_tls_t::clearError() {
- // This must clear the error from all the underlying EGL implementations as
- // well as the EGL wrapper layer.
- eglGetError();
-}
-
-EGLint egl_tls_t::getError() {
- if (sKey == -1)
- return EGL_SUCCESS;
- egl_tls_t* tls = (egl_tls_t*)pthread_getspecific(sKey);
- if (!tls) return EGL_SUCCESS;
- EGLint error = tls->error;
- tls->error = EGL_SUCCESS;
- return error;
-}
-
-void egl_tls_t::setContext(EGLContext ctx) {
- validateTLSKey();
- getTLS()->ctx = ctx;
-}
-
-EGLContext egl_tls_t::getContext() {
- if (sKey == -1)
- return EGL_NO_CONTEXT;
- egl_tls_t* tls = (egl_tls_t *)pthread_getspecific(sKey);
- if (!tls) return EGL_NO_CONTEXT;
- return tls->ctx;
-}
-
-
-} // namespace android
diff --git a/opengl/libs/EGL/egl_tls.h b/opengl/libs/EGL/egl_tls.h
deleted file mode 100644
index 2442ca0..0000000
--- a/opengl/libs/EGL/egl_tls.h
+++ /dev/null
@@ -1,82 +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 ANDROID_EGL_TLS_H
-#define ANDROID_EGL_TLS_H
-
-#include <pthread.h>
-
-#include <EGL/egl.h>
-
-#include "egldefs.h"
-#include "hooks.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-class DbgContext;
-
-class egl_tls_t {
- static pthread_key_t sKey;
- static pthread_mutex_t sLockKey;
-
- EGLint error;
- EGLContext ctx;
- EGLBoolean logCallWithNoContext;
-
- egl_tls_t();
- static void validateTLSKey();
- static void setErrorEtcImpl(
- const char* caller, int line, EGLint error, bool quiet);
-
-public:
- static egl_tls_t* getTLS();
- static void clearTLS();
- static void clearError();
- static EGLint getError();
- static void setContext(EGLContext ctx);
- static EGLContext getContext();
- static bool logNoContextCall();
- static const char *egl_strerror(EGLint err);
-
- template<typename T>
- static T setErrorEtc(const char* caller,
- int line, EGLint error, T returnValue, bool quiet = false) {
- setErrorEtcImpl(caller, line, error, quiet);
- return returnValue;
- }
-};
-
-#define setError(_e, _r) \
- egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r)
-
-#define setErrorQuiet(_e, _r) \
- egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r, true)
-
-// ----------------------------------------------------------------------------
-
-#if EGL_TRACE
-
-extern gl_hooks_t const* getGLTraceThreadSpecific();
-
-#endif
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif // ANDROID_EGL_TLS_H
diff --git a/opengl/libs/EGL/egldefs.h b/opengl/libs/EGL/egldefs.h
deleted file mode 100644
index c900c1c..0000000
--- a/opengl/libs/EGL/egldefs.h
+++ /dev/null
@@ -1,65 +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 ANDROID_EGLDEFS_H
-#define ANDROID_EGLDEFS_H
-
-#include "hooks.h"
-
-#define VERSION_MAJOR 1
-#define VERSION_MINOR 4
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-// EGLDisplay are global, not attached to a given thread
-const unsigned int NUM_DISPLAYS = 1;
-
-// ----------------------------------------------------------------------------
-
-struct egl_connection_t {
- enum {
- GLESv1_INDEX = 0,
- GLESv2_INDEX = 1
- };
-
- inline egl_connection_t() : dso(0) { }
- void * dso;
- gl_hooks_t * hooks[2];
- EGLint major;
- EGLint minor;
- egl_t egl;
-};
-
-// ----------------------------------------------------------------------------
-
-extern gl_hooks_t gHooks[2];
-extern gl_hooks_t gHooksNoContext;
-extern pthread_key_t gGLWrapperKey;
-extern "C" void gl_unimplemented();
-extern "C" void gl_noop();
-
-extern char const * const gl_names[];
-extern char const * const egl_names[];
-
-extern egl_connection_t gEGLImpl;
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif /* ANDROID_EGLDEFS_H */
diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp
deleted file mode 100644
index 8dcf38d..0000000
--- a/opengl/libs/EGL/getProcAddress.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- ** Copyright 2009, 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 <ctype.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include <cutils/log.h>
-
-#include "egldefs.h"
-#include "hooks.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-#undef API_ENTRY
-#undef CALL_GL_EXTENSION_API
-#undef GL_EXTENSION
-#undef GL_EXTENSION_NAME
-#undef GL_EXTENSION_ARRAY
-#undef GL_EXTENSION_LIST
-#undef GET_TLS
-
-#if USE_FAST_TLS_KEY
-
- #ifdef HAVE_ARM_TLS_REGISTER
- #define GET_TLS(reg) \
- "mrc p15, 0, " #reg ", c13, c0, 3 \n"
- #else
- #define GET_TLS(reg) \
- "mov " #reg ", #0xFFFF0FFF \n" \
- "ldr " #reg ", [" #reg ", #-15] \n"
- #endif
-
- #define API_ENTRY(_api) __attribute__((naked)) _api
-
- #define CALL_GL_EXTENSION_API(_api) \
- asm volatile( \
- GET_TLS(r12) \
- "ldr r12, [r12, %[tls]] \n" \
- "cmp r12, #0 \n" \
- "ldrne r12, [r12, %[api]] \n" \
- "cmpne r12, #0 \n" \
- "bxne r12 \n" \
- "bx lr \n" \
- : \
- : [tls] "J"(TLS_SLOT_OPENGL_API*4), \
- [api] "J"(__builtin_offsetof(gl_hooks_t, \
- ext.extensions[_api])) \
- : \
- );
-
- #define GL_EXTENSION_NAME(_n) __glExtFwd##_n
-
- #define GL_EXTENSION(_n) \
- void API_ENTRY(GL_EXTENSION_NAME(_n))() { \
- CALL_GL_EXTENSION_API(_n); \
- }
-
-
-#else
-
- #define GL_EXTENSION_NAME(_n) NULL
-
- #define GL_EXTENSION(_n)
-
- #warning "eglGetProcAddress() partially supported"
-
-#endif
-
-
-#define GL_EXTENSION_LIST(name) \
- name(0) name(1) name(2) name(3) name(4) name(5) name(6) name(7) \
- name(8) name(9) name(10) name(11) name(12) name(13) name(14) name(15) \
- name(16) name(17) name(18) name(19) name(20) name(21) name(22) name(23) \
- name(24) name(25) name(26) name(27) name(28) name(29) name(30) name(31) \
- name(32) name(33) name(34) name(35) name(36) name(37) name(38) name(39) \
- name(40) name(41) name(42) name(43) name(44) name(45) name(46) name(47) \
- name(48) name(49) name(50) name(51) name(52) name(53) name(54) name(55) \
- name(56) name(57) name(58) name(59) name(60) name(61) name(62) name(63) \
- name(64) name(65) name(66) name(67) name(68) name(69) name(70) name(71) \
- name(72) name(73) name(74) name(75) name(76) name(77) name(78) name(79) \
- name(80) name(81) name(82) name(83) name(84) name(85) name(86) name(87) \
- name(88) name(89) name(90) name(91) name(92) name(93) name(94) name(95) \
- name(96) name(97) name(98) name(99) \
- name(100) name(101) name(102) name(103) name(104) name(105) name(106) name(107) \
- name(108) name(109) name(110) name(111) name(112) name(113) name(114) name(115) \
- name(116) name(117) name(118) name(119) name(120) name(121) name(122) name(123) \
- name(124) name(125) name(126) name(127) name(128) name(129) name(130) name(131) \
- name(132) name(133) name(134) name(135) name(136) name(137) name(138) name(139) \
- name(140) name(141) name(142) name(143) name(144) name(145) name(146) name(147) \
- name(148) name(149) name(150) name(151) name(152) name(153) name(154) name(155) \
- name(156) name(157) name(158) name(159) name(160) name(161) name(162) name(163) \
- name(164) name(165) name(166) name(167) name(168) name(169) name(170) name(171) \
- name(172) name(173) name(174) name(175) name(176) name(177) name(178) name(179) \
- name(180) name(181) name(182) name(183) name(184) name(185) name(186) name(187) \
- name(188) name(189) name(190) name(191) name(192) name(193) name(194) name(195) \
- name(196) name(197) name(198) name(199) \
- name(200) name(201) name(202) name(203) name(204) name(205) name(206) name(207) \
- name(208) name(209) name(210) name(211) name(212) name(213) name(214) name(215) \
- name(216) name(217) name(218) name(219) name(220) name(221) name(222) name(223) \
- name(224) name(225) name(226) name(227) name(228) name(229) name(230) name(231) \
- name(232) name(233) name(234) name(235) name(236) name(237) name(238) name(239) \
- name(240) name(241) name(242) name(243) name(244) name(245) name(246) name(247) \
- name(248) name(249) name(250) name(251) name(252) name(253) name(254) name(255)
-
-
-GL_EXTENSION_LIST( GL_EXTENSION )
-
-#define GL_EXTENSION_ARRAY(_n) GL_EXTENSION_NAME(_n),
-
-extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS] = {
- GL_EXTENSION_LIST( GL_EXTENSION_ARRAY )
- };
-
-#undef GET_TLS
-#undef GL_EXTENSION_LIST
-#undef GL_EXTENSION_ARRAY
-#undef GL_EXTENSION_NAME
-#undef GL_EXTENSION
-#undef API_ENTRY
-#undef CALL_GL_EXTENSION_API
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
deleted file mode 100644
index 52907c1..0000000
--- a/opengl/libs/EGL/trace.cpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- ** Copyright 2010, 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.
- */
-
-#if EGL_TRACE
-
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <cutils/log.h>
-
-#include "egl_tls.h"
-#include "hooks.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-struct GLenumString {
- GLenum e;
- const char* s;
-};
-
-#undef GL_ENUM
-#define GL_ENUM(VAL,NAME) {VAL, #NAME},
-
-static GLenumString g_enumnames[] = {
-#include "enums.in"
-};
-#undef GL_ENUM
-
-static int compareGLEnum(const void* a, const void* b) {
- return ((const GLenumString*) a)->e - ((const GLenumString*) b)->e;
-}
-
-static const char* GLEnumToString(GLenum e) {
- GLenumString key = {e, ""};
- const GLenumString* result = (const GLenumString*) bsearch(
- &key, g_enumnames,
- sizeof(g_enumnames) / sizeof(g_enumnames[0]),
- sizeof(g_enumnames[0]), compareGLEnum);
- if (result) {
- return result->s;
- }
- return NULL;
-}
-
-static const char* GLbooleanToString(GLboolean arg) {
- return arg ? "GL_TRUE" : "GL_FALSE";
-}
-
-static GLenumString g_bitfieldNames[] = {
- {0x00004000, "GL_COLOR_BUFFER_BIT"},
- {0x00000400, "GL_STENCIL_BUFFER_BIT"},
- {0x00000100, "GL_DEPTH_BUFFER_BIT"}
-};
-
-class StringBuilder {
- static const int lineSize = 500;
- char line[lineSize];
- int line_index;
-public:
- StringBuilder() {
- line_index = 0;
- line[0] = '\0';
- }
- void append(const char* fmt, ...) {
- va_list argp;
- va_start(argp, fmt);
- line_index += vsnprintf(line + line_index, lineSize-line_index, fmt, argp);
- va_end(argp);
- }
- const char* getString() {
- line_index = 0;
- line[lineSize-1] = '\0';
- return line;
- }
-};
-
-
-static void TraceGLShaderSource(GLuint shader, GLsizei count,
- const GLchar** string, const GLint* length) {
- ALOGD("const char* shaderSrc[] = {");
- for (GLsizei i = 0; i < count; i++) {
- const char* comma = i < count-1 ? "," : "";
- const GLchar* s = string[i];
- if (length) {
- GLint len = length[i];
- ALOGD(" \"%*s\"%s", len, s, comma);
- } else {
- ALOGD(" \"%s\"%s", s, comma);
- }
- }
- ALOGD("};");
- if (length) {
- ALOGD("const GLint* shaderLength[] = {");
- for (GLsizei i = 0; i < count; i++) {
- const char* comma = i < count-1 ? "," : "";
- GLint len = length[i];
- ALOGD(" \"%d\"%s", len, comma);
- }
- ALOGD("};");
- ALOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);",
- shader, count);
- } else {
- ALOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);",
- shader, count);
- }
-}
-
-static void TraceValue(int elementCount, char type,
- GLsizei chunkCount, GLsizei chunkSize, const void* value) {
- StringBuilder stringBuilder;
- GLsizei count = chunkCount * chunkSize;
- bool isFloat = type == 'f';
- const char* typeString = isFloat ? "GLfloat" : "GLint";
- ALOGD("const %s value[] = {", typeString);
- for (GLsizei i = 0; i < count; i++) {
- StringBuilder builder;
- builder.append(" ");
- for (int e = 0; e < elementCount; e++) {
- const char* comma = ", ";
- if (e == elementCount-1) {
- if (i == count - 1) {
- comma = "";
- } else {
- comma = ",";
- }
- }
- if (isFloat) {
- builder.append("%g%s", * (GLfloat*) value, comma);
- value = (void*) (((GLfloat*) value) + 1);
- } else {
- builder.append("%d%s", * (GLint*) value, comma);
- value = (void*) (((GLint*) value) + 1);
- }
- }
- ALOGD("%s", builder.getString());
- if (chunkSize > 1 && i < count-1
- && (i % chunkSize) == (chunkSize-1)) {
- ALOGD("%s", ""); // Print a blank line.
- }
- }
- ALOGD("};");
-}
-
-static void TraceUniformv(int elementCount, char type,
- GLuint location, GLsizei count, const void* value) {
- TraceValue(elementCount, type, count, 1, value);
- ALOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count);
-}
-
-static void TraceUniformMatrix(int matrixSideLength,
- GLuint location, GLsizei count, GLboolean transpose, const void* value) {
- TraceValue(matrixSideLength, 'f', count, matrixSideLength, value);
- ALOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count,
- GLbooleanToString(transpose));
-}
-
-static void TraceGL(const char* name, int numArgs, ...) {
- va_list argp;
- va_start(argp, numArgs);
- int nameLen = strlen(name);
-
- // glShaderSource
- if (nameLen == 14 && strcmp(name, "glShaderSource") == 0) {
- va_arg(argp, const char*);
- GLuint shader = va_arg(argp, GLuint);
- va_arg(argp, const char*);
- GLsizei count = va_arg(argp, GLsizei);
- va_arg(argp, const char*);
- const GLchar** string = (const GLchar**) va_arg(argp, void*);
- va_arg(argp, const char*);
- const GLint* length = (const GLint*) va_arg(argp, void*);
- va_end(argp);
- TraceGLShaderSource(shader, count, string, length);
- return;
- }
-
- // glUniformXXv
-
- if (nameLen == 12 && strncmp(name, "glUniform", 9) == 0 && name[11] == 'v') {
- int elementCount = name[9] - '0'; // 1..4
- char type = name[10]; // 'f' or 'i'
- va_arg(argp, const char*);
- GLuint location = va_arg(argp, GLuint);
- va_arg(argp, const char*);
- GLsizei count = va_arg(argp, GLsizei);
- va_arg(argp, const char*);
- const void* value = (const void*) va_arg(argp, void*);
- va_end(argp);
- TraceUniformv(elementCount, type, location, count, value);
- return;
- }
-
- // glUniformMatrixXfv
-
- if (nameLen == 18 && strncmp(name, "glUniformMatrix", 15) == 0
- && name[16] == 'f' && name[17] == 'v') {
- int matrixSideLength = name[15] - '0'; // 2..4
- va_arg(argp, const char*);
- GLuint location = va_arg(argp, GLuint);
- va_arg(argp, const char*);
- GLsizei count = va_arg(argp, GLsizei);
- va_arg(argp, const char*);
- GLboolean transpose = (GLboolean) va_arg(argp, int);
- va_arg(argp, const char*);
- const void* value = (const void*) va_arg(argp, void*);
- va_end(argp);
- TraceUniformMatrix(matrixSideLength, location, count, transpose, value);
- return;
- }
-
- StringBuilder builder;
- builder.append("%s(", name);
- for (int i = 0; i < numArgs; i++) {
- if (i > 0) {
- builder.append(", ");
- }
- const char* type = va_arg(argp, const char*);
- bool isPtr = type[strlen(type)-1] == '*'
- || strcmp(type, "GLeglImageOES") == 0;
- if (isPtr) {
- const void* arg = va_arg(argp, const void*);
- builder.append("(%s) 0x%08x", type, (size_t) arg);
- } else if (strcmp(type, "GLbitfield") == 0) {
- size_t arg = va_arg(argp, size_t);
- bool first = true;
- for (size_t i = 0; i < sizeof(g_bitfieldNames) / sizeof(g_bitfieldNames[0]); i++) {
- const GLenumString* b = &g_bitfieldNames[i];
- if (b->e & arg) {
- if (first) {
- first = false;
- } else {
- builder.append(" | ");
- }
- builder.append("%s", b->s);
- arg &= ~b->e;
- }
- }
- if (first || arg != 0) {
- if (!first) {
- builder.append(" | ");
- }
- builder.append("0x%08x", arg);
- }
- } else if (strcmp(type, "GLboolean") == 0) {
- GLboolean arg = va_arg(argp, int);
- builder.append("%s", GLbooleanToString(arg));
- } else if (strcmp(type, "GLclampf") == 0) {
- double arg = va_arg(argp, double);
- builder.append("%g", arg);
- } else if (strcmp(type, "GLenum") == 0) {
- GLenum arg = va_arg(argp, int);
- const char* s = GLEnumToString(arg);
- if (s) {
- builder.append("%s", s);
- } else {
- builder.append("0x%x", arg);
- }
- } else if (strcmp(type, "GLfixed") == 0) {
- int arg = va_arg(argp, int);
- builder.append("0x%08x", arg);
- } else if (strcmp(type, "GLfloat") == 0) {
- double arg = va_arg(argp, double);
- builder.append("%g", arg);
- } else if (strcmp(type, "GLint") == 0) {
- int arg = va_arg(argp, int);
- const char* s = NULL;
- if (strcmp(name, "glTexParameteri") == 0) {
- s = GLEnumToString(arg);
- }
- if (s) {
- builder.append("%s", s);
- } else {
- builder.append("%d", arg);
- }
- } else if (strcmp(type, "GLintptr") == 0) {
- int arg = va_arg(argp, unsigned int);
- builder.append("%u", arg);
- } else if (strcmp(type, "GLsizei") == 0) {
- int arg = va_arg(argp, size_t);
- builder.append("%u", arg);
- } else if (strcmp(type, "GLsizeiptr") == 0) {
- int arg = va_arg(argp, size_t);
- builder.append("%u", arg);
- } else if (strcmp(type, "GLuint") == 0) {
- int arg = va_arg(argp, unsigned int);
- builder.append("%u", arg);
- } else {
- builder.append("/* ??? %s */", type);
- break;
- }
- }
- builder.append(");");
- ALOGD("%s", builder.getString());
- va_end(argp);
-}
-
-#undef TRACE_GL_VOID
-#undef TRACE_GL
-
-#define TRACE_GL_VOID(_api, _args, _argList, ...) \
-static void Tracing_ ## _api _args { \
- TraceGL(#_api, __VA_ARGS__); \
- gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
- _c->_api _argList; \
-}
-
-#define TRACE_GL(_type, _api, _args, _argList, ...) \
-static _type Tracing_ ## _api _args { \
- TraceGL(#_api, __VA_ARGS__); \
- gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
- return _c->_api _argList; \
-}
-
-extern "C" {
-#include "../trace.in"
-}
-
-#undef TRACE_GL_VOID
-#undef TRACE_GL
-
-#define GL_ENTRY(_r, _api, ...) Tracing_ ## _api,
-EGLAPI gl_hooks_t gHooksTrace = {
- {
- #include "entries.in"
- },
- {
- {0}
- }
-};
-#undef GL_ENTRY
-
-
-#undef TRACE_GL_VOID
-#undef TRACE_GL
-
-// define the ES 1.0 Debug_gl* functions as Tracing_gl functions
-#define TRACE_GL_VOID(_api, _args, _argList, ...) \
-static void Debug_ ## _api _args { \
- TraceGL(#_api, __VA_ARGS__); \
- gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
- _c->_api _argList; \
-}
-
-#define TRACE_GL(_type, _api, _args, _argList, ...) \
-static _type Debug_ ## _api _args { \
- TraceGL(#_api, __VA_ARGS__); \
- gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
- return _c->_api _argList; \
-}
-
-extern "C" {
-#include "../debug.in"
-}
-
-#undef TRACE_GL_VOID
-#undef TRACE_GL
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif // EGL_TRACE
diff --git a/opengl/libs/ETC1/etc1.cpp b/opengl/libs/ETC1/etc1.cpp
deleted file mode 100644
index 97d1085..0000000
--- a/opengl/libs/ETC1/etc1.cpp
+++ /dev/null
@@ -1,670 +0,0 @@
-// Copyright 2009 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.
-
-#include <ETC1/etc1.h>
-
-#include <string.h>
-
-/* From http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt
-
- The number of bits that represent a 4x4 texel block is 64 bits if
- <internalformat> is given by ETC1_RGB8_OES.
-
- The data for a block is a number of bytes,
-
- {q0, q1, q2, q3, q4, q5, q6, q7}
-
- where byte q0 is located at the lowest memory address and q7 at
- the highest. The 64 bits specifying the block is then represented
- by the following 64 bit integer:
-
- int64bit = 256*(256*(256*(256*(256*(256*(256*q0+q1)+q2)+q3)+q4)+q5)+q6)+q7;
-
- ETC1_RGB8_OES:
-
- a) bit layout in bits 63 through 32 if diffbit = 0
-
- 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
- -----------------------------------------------
- | base col1 | base col2 | base col1 | base col2 |
- | R1 (4bits)| R2 (4bits)| G1 (4bits)| G2 (4bits)|
- -----------------------------------------------
-
- 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
- ---------------------------------------------------
- | base col1 | base col2 | table | table |diff|flip|
- | B1 (4bits)| B2 (4bits)| cw 1 | cw 2 |bit |bit |
- ---------------------------------------------------
-
-
- b) bit layout in bits 63 through 32 if diffbit = 1
-
- 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
- -----------------------------------------------
- | base col1 | dcol 2 | base col1 | dcol 2 |
- | R1' (5 bits) | dR2 | G1' (5 bits) | dG2 |
- -----------------------------------------------
-
- 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
- ---------------------------------------------------
- | base col 1 | dcol 2 | table | table |diff|flip|
- | B1' (5 bits) | dB2 | cw 1 | cw 2 |bit |bit |
- ---------------------------------------------------
-
-
- c) bit layout in bits 31 through 0 (in both cases)
-
- 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
- -----------------------------------------------
- | most significant pixel index bits |
- | p| o| n| m| l| k| j| i| h| g| f| e| d| c| b| a|
- -----------------------------------------------
-
- 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
- --------------------------------------------------
- | least significant pixel index bits |
- | p| o| n| m| l| k| j| i| h| g| f| e| d| c | b | a |
- --------------------------------------------------
-
-
- Add table 3.17.2: Intensity modifier sets for ETC1 compressed textures:
-
- table codeword modifier table
- ------------------ ----------------------
- 0 -8 -2 2 8
- 1 -17 -5 5 17
- 2 -29 -9 9 29
- 3 -42 -13 13 42
- 4 -60 -18 18 60
- 5 -80 -24 24 80
- 6 -106 -33 33 106
- 7 -183 -47 47 183
-
-
- Add table 3.17.3 Mapping from pixel index values to modifier values for
- ETC1 compressed textures:
-
- pixel index value
- ---------------
- msb lsb resulting modifier value
- ----- ----- -------------------------
- 1 1 -b (large negative value)
- 1 0 -a (small negative value)
- 0 0 a (small positive value)
- 0 1 b (large positive value)
-
-
- */
-
-static const int kModifierTable[] = {
-/* 0 */2, 8, -2, -8,
-/* 1 */5, 17, -5, -17,
-/* 2 */9, 29, -9, -29,
-/* 3 */13, 42, -13, -42,
-/* 4 */18, 60, -18, -60,
-/* 5 */24, 80, -24, -80,
-/* 6 */33, 106, -33, -106,
-/* 7 */47, 183, -47, -183 };
-
-static const int kLookup[8] = { 0, 1, 2, 3, -4, -3, -2, -1 };
-
-static inline etc1_byte clamp(int x) {
- return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0);
-}
-
-static
-inline int convert4To8(int b) {
- int c = b & 0xf;
- return (c << 4) | c;
-}
-
-static
-inline int convert5To8(int b) {
- int c = b & 0x1f;
- return (c << 3) | (c >> 2);
-}
-
-static
-inline int convert6To8(int b) {
- int c = b & 0x3f;
- return (c << 2) | (c >> 4);
-}
-
-static
-inline int divideBy255(int d) {
- return (d + 128 + (d >> 8)) >> 8;
-}
-
-static
-inline int convert8To4(int b) {
- int c = b & 0xff;
- return divideBy255(c * 15);
-}
-
-static
-inline int convert8To5(int b) {
- int c = b & 0xff;
- return divideBy255(c * 31);
-}
-
-static
-inline int convertDiff(int base, int diff) {
- return convert5To8((0x1f & base) + kLookup[0x7 & diff]);
-}
-
-static
-void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table,
- etc1_uint32 low, bool second, bool flipped) {
- int baseX = 0;
- int baseY = 0;
- if (second) {
- if (flipped) {
- baseY = 2;
- } else {
- baseX = 2;
- }
- }
- for (int i = 0; i < 8; i++) {
- int x, y;
- if (flipped) {
- x = baseX + (i >> 1);
- y = baseY + (i & 1);
- } else {
- x = baseX + (i >> 2);
- y = baseY + (i & 3);
- }
- int k = y + (x * 4);
- int offset = ((low >> k) & 1) | ((low >> (k + 15)) & 2);
- int delta = table[offset];
- etc1_byte* q = pOut + 3 * (x + 4 * y);
- *q++ = clamp(r + delta);
- *q++ = clamp(g + delta);
- *q++ = clamp(b + delta);
- }
-}
-
-// Input is an ETC1 compressed version of the data.
-// Output is a 4 x 4 square of 3-byte pixels in form R, G, B
-
-void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) {
- etc1_uint32 high = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3];
- etc1_uint32 low = (pIn[4] << 24) | (pIn[5] << 16) | (pIn[6] << 8) | pIn[7];
- int r1, r2, g1, g2, b1, b2;
- if (high & 2) {
- // differential
- int rBase = high >> 27;
- int gBase = high >> 19;
- int bBase = high >> 11;
- r1 = convert5To8(rBase);
- r2 = convertDiff(rBase, high >> 24);
- g1 = convert5To8(gBase);
- g2 = convertDiff(gBase, high >> 16);
- b1 = convert5To8(bBase);
- b2 = convertDiff(bBase, high >> 8);
- } else {
- // not differential
- r1 = convert4To8(high >> 28);
- r2 = convert4To8(high >> 24);
- g1 = convert4To8(high >> 20);
- g2 = convert4To8(high >> 16);
- b1 = convert4To8(high >> 12);
- b2 = convert4To8(high >> 8);
- }
- int tableIndexA = 7 & (high >> 5);
- int tableIndexB = 7 & (high >> 2);
- const int* tableA = kModifierTable + tableIndexA * 4;
- const int* tableB = kModifierTable + tableIndexB * 4;
- bool flipped = (high & 1) != 0;
- decode_subblock(pOut, r1, g1, b1, tableA, low, false, flipped);
- decode_subblock(pOut, r2, g2, b2, tableB, low, true, flipped);
-}
-
-typedef struct {
- etc1_uint32 high;
- etc1_uint32 low;
- etc1_uint32 score; // Lower is more accurate
-} etc_compressed;
-
-static
-inline void take_best(etc_compressed* a, const etc_compressed* b) {
- if (a->score > b->score) {
- *a = *b;
- }
-}
-
-static
-void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask,
- etc1_byte* pColors, bool flipped, bool second) {
- int r = 0;
- int g = 0;
- int b = 0;
-
- if (flipped) {
- int by = 0;
- if (second) {
- by = 2;
- }
- for (int y = 0; y < 2; y++) {
- int yy = by + y;
- for (int x = 0; x < 4; x++) {
- int i = x + 4 * yy;
- if (inMask & (1 << i)) {
- const etc1_byte* p = pIn + i * 3;
- r += *(p++);
- g += *(p++);
- b += *(p++);
- }
- }
- }
- } else {
- int bx = 0;
- if (second) {
- bx = 2;
- }
- for (int y = 0; y < 4; y++) {
- for (int x = 0; x < 2; x++) {
- int xx = bx + x;
- int i = xx + 4 * y;
- if (inMask & (1 << i)) {
- const etc1_byte* p = pIn + i * 3;
- r += *(p++);
- g += *(p++);
- b += *(p++);
- }
- }
- }
- }
- pColors[0] = (etc1_byte)((r + 4) >> 3);
- pColors[1] = (etc1_byte)((g + 4) >> 3);
- pColors[2] = (etc1_byte)((b + 4) >> 3);
-}
-
-static
-inline int square(int x) {
- return x * x;
-}
-
-static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors,
- const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex,
- const int* pModifierTable) {
- etc1_uint32 bestScore = ~0;
- int bestIndex = 0;
- int pixelR = pIn[0];
- int pixelG = pIn[1];
- int pixelB = pIn[2];
- int r = pBaseColors[0];
- int g = pBaseColors[1];
- int b = pBaseColors[2];
- for (int i = 0; i < 4; i++) {
- int modifier = pModifierTable[i];
- int decodedG = clamp(g + modifier);
- etc1_uint32 score = (etc1_uint32) (6 * square(decodedG - pixelG));
- if (score >= bestScore) {
- continue;
- }
- int decodedR = clamp(r + modifier);
- score += (etc1_uint32) (3 * square(decodedR - pixelR));
- if (score >= bestScore) {
- continue;
- }
- int decodedB = clamp(b + modifier);
- score += (etc1_uint32) square(decodedB - pixelB);
- if (score < bestScore) {
- bestScore = score;
- bestIndex = i;
- }
- }
- etc1_uint32 lowMask = (((bestIndex >> 1) << 16) | (bestIndex & 1))
- << bitIndex;
- *pLow |= lowMask;
- return bestScore;
-}
-
-static
-void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask,
- etc_compressed* pCompressed, bool flipped, bool second,
- const etc1_byte* pBaseColors, const int* pModifierTable) {
- int score = pCompressed->score;
- if (flipped) {
- int by = 0;
- if (second) {
- by = 2;
- }
- for (int y = 0; y < 2; y++) {
- int yy = by + y;
- for (int x = 0; x < 4; x++) {
- int i = x + 4 * yy;
- if (inMask & (1 << i)) {
- score += chooseModifier(pBaseColors, pIn + i * 3,
- &pCompressed->low, yy + x * 4, pModifierTable);
- }
- }
- }
- } else {
- int bx = 0;
- if (second) {
- bx = 2;
- }
- for (int y = 0; y < 4; y++) {
- for (int x = 0; x < 2; x++) {
- int xx = bx + x;
- int i = xx + 4 * y;
- if (inMask & (1 << i)) {
- score += chooseModifier(pBaseColors, pIn + i * 3,
- &pCompressed->low, y + xx * 4, pModifierTable);
- }
- }
- }
- }
- pCompressed->score = score;
-}
-
-static bool inRange4bitSigned(int color) {
- return color >= -4 && color <= 3;
-}
-
-static void etc_encodeBaseColors(etc1_byte* pBaseColors,
- const etc1_byte* pColors, etc_compressed* pCompressed) {
- int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks
- bool differential;
- {
- int r51 = convert8To5(pColors[0]);
- int g51 = convert8To5(pColors[1]);
- int b51 = convert8To5(pColors[2]);
- int r52 = convert8To5(pColors[3]);
- int g52 = convert8To5(pColors[4]);
- int b52 = convert8To5(pColors[5]);
-
- r1 = convert5To8(r51);
- g1 = convert5To8(g51);
- b1 = convert5To8(b51);
-
- int dr = r52 - r51;
- int dg = g52 - g51;
- int db = b52 - b51;
-
- differential = inRange4bitSigned(dr) && inRange4bitSigned(dg)
- && inRange4bitSigned(db);
- if (differential) {
- r2 = convert5To8(r51 + dr);
- g2 = convert5To8(g51 + dg);
- b2 = convert5To8(b51 + db);
- pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19)
- | ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2;
- }
- }
-
- if (!differential) {
- int r41 = convert8To4(pColors[0]);
- int g41 = convert8To4(pColors[1]);
- int b41 = convert8To4(pColors[2]);
- int r42 = convert8To4(pColors[3]);
- int g42 = convert8To4(pColors[4]);
- int b42 = convert8To4(pColors[5]);
- r1 = convert4To8(r41);
- g1 = convert4To8(g41);
- b1 = convert4To8(b41);
- r2 = convert4To8(r42);
- g2 = convert4To8(g42);
- b2 = convert4To8(b42);
- pCompressed->high |= (r41 << 28) | (r42 << 24) | (g41 << 20) | (g42
- << 16) | (b41 << 12) | (b42 << 8);
- }
- pBaseColors[0] = r1;
- pBaseColors[1] = g1;
- pBaseColors[2] = b1;
- pBaseColors[3] = r2;
- pBaseColors[4] = g2;
- pBaseColors[5] = b2;
-}
-
-static
-void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask,
- const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) {
- pCompressed->score = ~0;
- pCompressed->high = (flipped ? 1 : 0);
- pCompressed->low = 0;
-
- etc1_byte pBaseColors[6];
-
- etc_encodeBaseColors(pBaseColors, pColors, pCompressed);
-
- int originalHigh = pCompressed->high;
-
- const int* pModifierTable = kModifierTable;
- for (int i = 0; i < 8; i++, pModifierTable += 4) {
- etc_compressed temp;
- temp.score = 0;
- temp.high = originalHigh | (i << 5);
- temp.low = 0;
- etc_encode_subblock_helper(pIn, inMask, &temp, flipped, false,
- pBaseColors, pModifierTable);
- take_best(pCompressed, &temp);
- }
- pModifierTable = kModifierTable;
- etc_compressed firstHalf = *pCompressed;
- for (int i = 0; i < 8; i++, pModifierTable += 4) {
- etc_compressed temp;
- temp.score = firstHalf.score;
- temp.high = firstHalf.high | (i << 2);
- temp.low = firstHalf.low;
- etc_encode_subblock_helper(pIn, inMask, &temp, flipped, true,
- pBaseColors + 3, pModifierTable);
- if (i == 0) {
- *pCompressed = temp;
- } else {
- take_best(pCompressed, &temp);
- }
- }
-}
-
-static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) {
- pOut[0] = (etc1_byte)(d >> 24);
- pOut[1] = (etc1_byte)(d >> 16);
- pOut[2] = (etc1_byte)(d >> 8);
- pOut[3] = (etc1_byte) d;
-}
-
-// Input is a 4 x 4 square of 3-byte pixels in form R, G, B
-// inmask is a 16-bit mask where bit (1 << (x + y * 4)) tells whether the corresponding (x,y)
-// pixel is valid or not. Invalid pixel color values are ignored when compressing.
-// Output is an ETC1 compressed version of the data.
-
-void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask,
- etc1_byte* pOut) {
- etc1_byte colors[6];
- etc1_byte flippedColors[6];
- etc_average_colors_subblock(pIn, inMask, colors, false, false);
- etc_average_colors_subblock(pIn, inMask, colors + 3, false, true);
- etc_average_colors_subblock(pIn, inMask, flippedColors, true, false);
- etc_average_colors_subblock(pIn, inMask, flippedColors + 3, true, true);
-
- etc_compressed a, b;
- etc_encode_block_helper(pIn, inMask, colors, &a, false);
- etc_encode_block_helper(pIn, inMask, flippedColors, &b, true);
- take_best(&a, &b);
- writeBigEndian(pOut, a.high);
- writeBigEndian(pOut + 4, a.low);
-}
-
-// Return the size of the encoded image data (does not include size of PKM header).
-
-etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height) {
- return (((width + 3) & ~3) * ((height + 3) & ~3)) >> 1;
-}
-
-// Encode an entire image.
-// pIn - pointer to the image data. Formatted such that the Red component of
-// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset;
-// pOut - pointer to encoded data. Must be large enough to store entire encoded image.
-
-int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height,
- etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) {
- if (pixelSize < 2 || pixelSize > 3) {
- return -1;
- }
- static const unsigned short kYMask[] = { 0x0, 0xf, 0xff, 0xfff, 0xffff };
- static const unsigned short kXMask[] = { 0x0, 0x1111, 0x3333, 0x7777,
- 0xffff };
- etc1_byte block[ETC1_DECODED_BLOCK_SIZE];
- etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE];
-
- etc1_uint32 encodedWidth = (width + 3) & ~3;
- etc1_uint32 encodedHeight = (height + 3) & ~3;
-
- for (etc1_uint32 y = 0; y < encodedHeight; y += 4) {
- etc1_uint32 yEnd = height - y;
- if (yEnd > 4) {
- yEnd = 4;
- }
- int ymask = kYMask[yEnd];
- for (etc1_uint32 x = 0; x < encodedWidth; x += 4) {
- etc1_uint32 xEnd = width - x;
- if (xEnd > 4) {
- xEnd = 4;
- }
- int mask = ymask & kXMask[xEnd];
- for (etc1_uint32 cy = 0; cy < yEnd; cy++) {
- etc1_byte* q = block + (cy * 4) * 3;
- const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy);
- if (pixelSize == 3) {
- memcpy(q, p, xEnd * 3);
- } else {
- for (etc1_uint32 cx = 0; cx < xEnd; cx++) {
- int pixel = (p[1] << 8) | p[0];
- *q++ = convert5To8(pixel >> 11);
- *q++ = convert6To8(pixel >> 5);
- *q++ = convert5To8(pixel);
- p += pixelSize;
- }
- }
- }
- etc1_encode_block(block, mask, encoded);
- memcpy(pOut, encoded, sizeof(encoded));
- pOut += sizeof(encoded);
- }
- }
- return 0;
-}
-
-// Decode an entire image.
-// pIn - pointer to encoded data.
-// pOut - pointer to the image data. Will be written such that the Red component of
-// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset. Must be
-// large enough to store entire image.
-
-
-int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut,
- etc1_uint32 width, etc1_uint32 height,
- etc1_uint32 pixelSize, etc1_uint32 stride) {
- if (pixelSize < 2 || pixelSize > 3) {
- return -1;
- }
- etc1_byte block[ETC1_DECODED_BLOCK_SIZE];
-
- etc1_uint32 encodedWidth = (width + 3) & ~3;
- etc1_uint32 encodedHeight = (height + 3) & ~3;
-
- for (etc1_uint32 y = 0; y < encodedHeight; y += 4) {
- etc1_uint32 yEnd = height - y;
- if (yEnd > 4) {
- yEnd = 4;
- }
- for (etc1_uint32 x = 0; x < encodedWidth; x += 4) {
- etc1_uint32 xEnd = width - x;
- if (xEnd > 4) {
- xEnd = 4;
- }
- etc1_decode_block(pIn, block);
- pIn += ETC1_ENCODED_BLOCK_SIZE;
- for (etc1_uint32 cy = 0; cy < yEnd; cy++) {
- const etc1_byte* q = block + (cy * 4) * 3;
- etc1_byte* p = pOut + pixelSize * x + stride * (y + cy);
- if (pixelSize == 3) {
- memcpy(p, q, xEnd * 3);
- } else {
- for (etc1_uint32 cx = 0; cx < xEnd; cx++) {
- etc1_byte r = *q++;
- etc1_byte g = *q++;
- etc1_byte b = *q++;
- etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
- *p++ = (etc1_byte) pixel;
- *p++ = (etc1_byte) (pixel >> 8);
- }
- }
- }
- }
- }
- return 0;
-}
-
-static const char kMagic[] = { 'P', 'K', 'M', ' ', '1', '0' };
-
-static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
-static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
-static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10;
-static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
-static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
-
-static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0;
-
-static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) {
- pOut[0] = (etc1_byte) (data >> 8);
- pOut[1] = (etc1_byte) data;
-}
-
-static etc1_uint32 readBEUint16(const etc1_byte* pIn) {
- return (pIn[0] << 8) | pIn[1];
-}
-
-// Format a PKM header
-
-void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) {
- memcpy(pHeader, kMagic, sizeof(kMagic));
- etc1_uint32 encodedWidth = (width + 3) & ~3;
- etc1_uint32 encodedHeight = (height + 3) & ~3;
- writeBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET, ETC1_RGB_NO_MIPMAPS);
- writeBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET, encodedWidth);
- writeBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET, encodedHeight);
- writeBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET, width);
- writeBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET, height);
-}
-
-// Check if a PKM header is correctly formatted.
-
-etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) {
- if (memcmp(pHeader, kMagic, sizeof(kMagic))) {
- return false;
- }
- etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET);
- etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET);
- etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET);
- etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
- etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
- return format == ETC1_RGB_NO_MIPMAPS &&
- encodedWidth >= width && encodedWidth - width < 4 &&
- encodedHeight >= height && encodedHeight - height < 4;
-}
-
-// Read the image width from a PKM header
-
-etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) {
- return readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
-}
-
-// Read the image height from a PKM header
-
-etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){
- return readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
-}
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
deleted file mode 100644
index 4345c2b..0000000
--- a/opengl/libs/GLES2/gl2.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- ** Copyright 2007, 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 <ctype.h>
-#include <string.h>
-#include <errno.h>
-
-#include <sys/ioctl.h>
-
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
-#include "hooks.h"
-#include "egl_impl.h"
-
-using namespace android;
-
-// ----------------------------------------------------------------------------
-// Actual GL entry-points
-// ----------------------------------------------------------------------------
-
-#undef API_ENTRY
-#undef CALL_GL_API
-#undef CALL_GL_API_RETURN
-
-#define DEBUG_CALL_GL_API 0
-
-#if USE_FAST_TLS_KEY
-
- #ifdef HAVE_ARM_TLS_REGISTER
- #define GET_TLS(reg) \
- "mrc p15, 0, " #reg ", c13, c0, 3 \n"
- #else
- #define GET_TLS(reg) \
- "mov " #reg ", #0xFFFF0FFF \n" \
- "ldr " #reg ", [" #reg ", #-15] \n"
- #endif
-
- #define API_ENTRY(_api) __attribute__((naked)) _api
-
- #define CALL_GL_API(_api, ...) \
- asm volatile( \
- GET_TLS(r12) \
- "ldr r12, [r12, %[tls]] \n" \
- "cmp r12, #0 \n" \
- "ldrne pc, [r12, %[api]] \n" \
- "mov r0, #0 \n" \
- "bx lr \n" \
- : \
- : [tls] "J"(TLS_SLOT_OPENGL_API*4), \
- [api] "J"(__builtin_offsetof(gl_hooks_t, gl._api)) \
- : \
- );
-
- #define CALL_GL_API_RETURN(_api, ...) \
- CALL_GL_API(_api, __VA_ARGS__) \
- return 0; // placate gcc's warnings. never reached.
-
-#else
-
- #define API_ENTRY(_api) _api
-
-#if DEBUG_CALL_GL_API
-
- #define CALL_GL_API(_api, ...) \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- _c->_api(__VA_ARGS__); \
- GLenum status = GL_NO_ERROR; \
- while ((status = glGetError()) != GL_NO_ERROR) { \
- ALOGD("[" #_api "] 0x%x", status); \
- }
-
-#else
-
- #define CALL_GL_API(_api, ...) \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- _c->_api(__VA_ARGS__);
-
-#endif
-
- #define CALL_GL_API_RETURN(_api, ...) \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- return _c->_api(__VA_ARGS__)
-
-#endif
-
-
-extern "C" {
-#include "gl2_api.in"
-#include "gl2ext_api.in"
-}
-
-#undef API_ENTRY
-#undef CALL_GL_API
-#undef CALL_GL_API_RETURN
-
-/*
- * glGetString() is special because we expose some extensions in the wrapper
- */
-
-extern "C" const GLubyte * __glGetString(GLenum name);
-
-const GLubyte * glGetString(GLenum name)
-{
- const GLubyte * ret = egl_get_string_for_current_context(name);
- if (ret == NULL) {
- ret = __glGetString(name);
- }
- return ret;
-}
diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in
deleted file mode 100644
index 9a89a52..0000000
--- a/opengl/libs/GLES2/gl2_api.in
+++ /dev/null
@@ -1,426 +0,0 @@
-void API_ENTRY(glActiveTexture)(GLenum texture) {
- CALL_GL_API(glActiveTexture, texture);
-}
-void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) {
- CALL_GL_API(glAttachShader, program, shader);
-}
-void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) {
- CALL_GL_API(glBindAttribLocation, program, index, name);
-}
-void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
- CALL_GL_API(glBindBuffer, target, buffer);
-}
-void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) {
- CALL_GL_API(glBindFramebuffer, target, framebuffer);
-}
-void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) {
- CALL_GL_API(glBindRenderbuffer, target, renderbuffer);
-}
-void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) {
- CALL_GL_API(glBindTexture, target, texture);
-}
-void API_ENTRY(glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- CALL_GL_API(glBlendColor, red, green, blue, alpha);
-}
-void API_ENTRY(glBlendEquation)( GLenum mode ) {
- CALL_GL_API(glBlendEquation, mode);
-}
-void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) {
- CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha);
-}
-void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) {
- CALL_GL_API(glBlendFunc, sfactor, dfactor);
-}
-void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
- CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha);
-}
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
- CALL_GL_API(glBufferData, target, size, data, usage);
-}
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
- CALL_GL_API(glBufferSubData, target, offset, size, data);
-}
-GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) {
- CALL_GL_API_RETURN(glCheckFramebufferStatus, target);
-}
-void API_ENTRY(glClear)(GLbitfield mask) {
- CALL_GL_API(glClear, mask);
-}
-void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- CALL_GL_API(glClearColor, red, green, blue, alpha);
-}
-void API_ENTRY(glClearDepthf)(GLclampf depth) {
- CALL_GL_API(glClearDepthf, depth);
-}
-void API_ENTRY(glClearStencil)(GLint s) {
- CALL_GL_API(glClearStencil, s);
-}
-void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
- CALL_GL_API(glColorMask, red, green, blue, alpha);
-}
-void API_ENTRY(glCompileShader)(GLuint shader) {
- CALL_GL_API(glCompileShader, shader);
-}
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
- CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
-}
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
- CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
-}
-void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
- CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border);
-}
-void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height);
-}
-GLuint API_ENTRY(glCreateProgram)(void) {
- CALL_GL_API_RETURN(glCreateProgram);
-}
-GLuint API_ENTRY(glCreateShader)(GLenum type) {
- CALL_GL_API_RETURN(glCreateShader, type);
-}
-void API_ENTRY(glCullFace)(GLenum mode) {
- CALL_GL_API(glCullFace, mode);
-}
-void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint* buffers) {
- CALL_GL_API(glDeleteBuffers, n, buffers);
-}
-void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) {
- CALL_GL_API(glDeleteFramebuffers, n, framebuffers);
-}
-void API_ENTRY(glDeleteProgram)(GLuint program) {
- CALL_GL_API(glDeleteProgram, program);
-}
-void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) {
- CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers);
-}
-void API_ENTRY(glDeleteShader)(GLuint shader) {
- CALL_GL_API(glDeleteShader, shader);
-}
-void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint* textures) {
- CALL_GL_API(glDeleteTextures, n, textures);
-}
-void API_ENTRY(glDepthFunc)(GLenum func) {
- CALL_GL_API(glDepthFunc, func);
-}
-void API_ENTRY(glDepthMask)(GLboolean flag) {
- CALL_GL_API(glDepthMask, flag);
-}
-void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) {
- CALL_GL_API(glDepthRangef, zNear, zFar);
-}
-void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) {
- CALL_GL_API(glDetachShader, program, shader);
-}
-void API_ENTRY(glDisable)(GLenum cap) {
- CALL_GL_API(glDisable, cap);
-}
-void API_ENTRY(glDisableVertexAttribArray)(GLuint index) {
- CALL_GL_API(glDisableVertexAttribArray, index);
-}
-void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
- CALL_GL_API(glDrawArrays, mode, first, count);
-}
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
- CALL_GL_API(glDrawElements, mode, count, type, indices);
-}
-void API_ENTRY(glEnable)(GLenum cap) {
- CALL_GL_API(glEnable, cap);
-}
-void API_ENTRY(glEnableVertexAttribArray)(GLuint index) {
- CALL_GL_API(glEnableVertexAttribArray, index);
-}
-void API_ENTRY(glFinish)(void) {
- CALL_GL_API(glFinish);
-}
-void API_ENTRY(glFlush)(void) {
- CALL_GL_API(glFlush);
-}
-void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
- CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer);
-}
-void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
- CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level);
-}
-void API_ENTRY(glFrontFace)(GLenum mode) {
- CALL_GL_API(glFrontFace, mode);
-}
-void API_ENTRY(glGenBuffers)(GLsizei n, GLuint* buffers) {
- CALL_GL_API(glGenBuffers, n, buffers);
-}
-void API_ENTRY(glGenerateMipmap)(GLenum target) {
- CALL_GL_API(glGenerateMipmap, target);
-}
-void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint* framebuffers) {
- CALL_GL_API(glGenFramebuffers, n, framebuffers);
-}
-void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) {
- CALL_GL_API(glGenRenderbuffers, n, renderbuffers);
-}
-void API_ENTRY(glGenTextures)(GLsizei n, GLuint* textures) {
- CALL_GL_API(glGenTextures, n, textures);
-}
-void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
- CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name);
-}
-void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
- CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name);
-}
-void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
- CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders);
-}
-int API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar* name) {
- CALL_GL_API_RETURN(glGetAttribLocation, program, name);
-}
-void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) {
- CALL_GL_API(glGetBooleanv, pname, params);
-}
-void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetBufferParameteriv, target, pname, params);
-}
-GLenum API_ENTRY(glGetError)(void) {
- CALL_GL_API_RETURN(glGetError);
-}
-void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) {
- CALL_GL_API(glGetFloatv, pname, params);
-}
-void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
- CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params);
-}
-void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) {
- CALL_GL_API(glGetIntegerv, pname, params);
-}
-void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint* params) {
- CALL_GL_API(glGetProgramiv, program, pname, params);
-}
-void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
- CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog);
-}
-void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) {
- CALL_GL_API(glGetShaderiv, shader, pname, params);
-}
-void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
- CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog);
-}
-void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
- CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision);
-}
-void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
- CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
-}
-const GLubyte* API_ENTRY(__glGetString)(GLenum name) {
- CALL_GL_API_RETURN(glGetString, name);
-}
-void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) {
- CALL_GL_API(glGetTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) {
- CALL_GL_API(glGetUniformfv, program, location, params);
-}
-void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) {
- CALL_GL_API(glGetUniformiv, program, location, params);
-}
-int API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar* name) {
- CALL_GL_API_RETURN(glGetUniformLocation, program, name);
-}
-void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) {
- CALL_GL_API(glGetVertexAttribfv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) {
- CALL_GL_API(glGetVertexAttribiv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) {
- CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer);
-}
-void API_ENTRY(glHint)(GLenum target, GLenum mode) {
- CALL_GL_API(glHint, target, mode);
-}
-GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) {
- CALL_GL_API_RETURN(glIsBuffer, buffer);
-}
-GLboolean API_ENTRY(glIsEnabled)(GLenum cap) {
- CALL_GL_API_RETURN(glIsEnabled, cap);
-}
-GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) {
- CALL_GL_API_RETURN(glIsFramebuffer, framebuffer);
-}
-GLboolean API_ENTRY(glIsProgram)(GLuint program) {
- CALL_GL_API_RETURN(glIsProgram, program);
-}
-GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) {
- CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer);
-}
-GLboolean API_ENTRY(glIsShader)(GLuint shader) {
- CALL_GL_API_RETURN(glIsShader, shader);
-}
-GLboolean API_ENTRY(glIsTexture)(GLuint texture) {
- CALL_GL_API_RETURN(glIsTexture, texture);
-}
-void API_ENTRY(glLineWidth)(GLfloat width) {
- CALL_GL_API(glLineWidth, width);
-}
-void API_ENTRY(glLinkProgram)(GLuint program) {
- CALL_GL_API(glLinkProgram, program);
-}
-void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) {
- CALL_GL_API(glPixelStorei, pname, param);
-}
-void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) {
- CALL_GL_API(glPolygonOffset, factor, units);
-}
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
- CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
-}
-void API_ENTRY(glReleaseShaderCompiler)(void) {
- CALL_GL_API(glReleaseShaderCompiler);
-}
-void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height);
-}
-void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) {
- CALL_GL_API(glSampleCoverage, value, invert);
-}
-void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glScissor, x, y, width, height);
-}
-void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
- CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length);
-}
-void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) {
- CALL_GL_API(glShaderSource, shader, count, string, length);
-}
-void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {
- CALL_GL_API(glStencilFunc, func, ref, mask);
-}
-void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) {
- CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask);
-}
-void API_ENTRY(glStencilMask)(GLuint mask) {
- CALL_GL_API(glStencilMask, mask);
-}
-void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) {
- CALL_GL_API(glStencilMaskSeparate, face, mask);
-}
-void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) {
- CALL_GL_API(glStencilOp, fail, zfail, zpass);
-}
-void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
- CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass);
-}
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
- CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
-}
-void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
- CALL_GL_API(glTexParameterf, target, pname, param);
-}
-void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) {
- CALL_GL_API(glTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) {
- CALL_GL_API(glTexParameteri, target, pname, param);
-}
-void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) {
- CALL_GL_API(glTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
- CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
-}
-void API_ENTRY(glUniform1f)(GLint location, GLfloat x) {
- CALL_GL_API(glUniform1f, location, x);
-}
-void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) {
- CALL_GL_API(glUniform1fv, location, count, v);
-}
-void API_ENTRY(glUniform1i)(GLint location, GLint x) {
- CALL_GL_API(glUniform1i, location, x);
-}
-void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint* v) {
- CALL_GL_API(glUniform1iv, location, count, v);
-}
-void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) {
- CALL_GL_API(glUniform2f, location, x, y);
-}
-void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) {
- CALL_GL_API(glUniform2fv, location, count, v);
-}
-void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) {
- CALL_GL_API(glUniform2i, location, x, y);
-}
-void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint* v) {
- CALL_GL_API(glUniform2iv, location, count, v);
-}
-void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glUniform3f, location, x, y, z);
-}
-void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) {
- CALL_GL_API(glUniform3fv, location, count, v);
-}
-void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) {
- CALL_GL_API(glUniform3i, location, x, y, z);
-}
-void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint* v) {
- CALL_GL_API(glUniform3iv, location, count, v);
-}
-void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- CALL_GL_API(glUniform4f, location, x, y, z, w);
-}
-void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) {
- CALL_GL_API(glUniform4fv, location, count, v);
-}
-void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) {
- CALL_GL_API(glUniform4i, location, x, y, z, w);
-}
-void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint* v) {
- CALL_GL_API(glUniform4iv, location, count, v);
-}
-void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
- CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
- CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
- CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value);
-}
-void API_ENTRY(glUseProgram)(GLuint program) {
- CALL_GL_API(glUseProgram, program);
-}
-void API_ENTRY(glValidateProgram)(GLuint program) {
- CALL_GL_API(glValidateProgram, program);
-}
-void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) {
- CALL_GL_API(glVertexAttrib1f, indx, x);
-}
-void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat* values) {
- CALL_GL_API(glVertexAttrib1fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) {
- CALL_GL_API(glVertexAttrib2f, indx, x, y);
-}
-void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat* values) {
- CALL_GL_API(glVertexAttrib2fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glVertexAttrib3f, indx, x, y, z);
-}
-void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat* values) {
- CALL_GL_API(glVertexAttrib3fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w);
-}
-void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat* values) {
- CALL_GL_API(glVertexAttrib4fv, indx, values);
-}
-void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
- CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr);
-}
-void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glViewport, x, y, width, height);
-}
diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in
deleted file mode 100644
index c381075..0000000
--- a/opengl/libs/GLES2/gl2ext_api.in
+++ /dev/null
@@ -1,363 +0,0 @@
-void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
- CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
-}
-void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
- CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
-}
-void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
- CALL_GL_API(glGetProgramBinaryOES, program, bufSize, length, binaryFormat, binary);
-}
-void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
- CALL_GL_API(glProgramBinaryOES, program, binaryFormat, binary, length);
-}
-void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
- CALL_GL_API_RETURN(glMapBufferOES, target, access);
-}
-GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) {
- CALL_GL_API_RETURN(glUnmapBufferOES, target);
-}
-void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid** params) {
- CALL_GL_API(glGetBufferPointervOES, target, pname, params);
-}
-void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
- CALL_GL_API(glTexImage3DOES, target, level, internalformat, width, height, depth, border, format, type, pixels);
-}
-void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
- CALL_GL_API(glTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
-}
-void API_ENTRY(glCopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glCopyTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, x, y, width, height);
-}
-void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
- CALL_GL_API(glCompressedTexImage3DOES, target, level, internalformat, width, height, depth, border, imageSize, data);
-}
-void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
- CALL_GL_API(glCompressedTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
-}
-void API_ENTRY(glFramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
- CALL_GL_API(glFramebufferTexture3DOES, target, attachment, textarget, texture, level, zoffset);
-}
-void API_ENTRY(glBindVertexArrayOES)(GLuint array) {
- CALL_GL_API(glBindVertexArrayOES, array);
-}
-void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) {
- CALL_GL_API(glDeleteVertexArraysOES, n, arrays);
-}
-void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
- CALL_GL_API(glGenVertexArraysOES, n, arrays);
-}
-GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
- CALL_GL_API_RETURN(glIsVertexArrayOES, array);
-}
-void API_ENTRY(glGetPerfMonitorGroupsAMD)(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
- CALL_GL_API(glGetPerfMonitorGroupsAMD, numGroups, groupsSize, groups);
-}
-void API_ENTRY(glGetPerfMonitorCountersAMD)(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
- CALL_GL_API(glGetPerfMonitorCountersAMD, group, numCounters, maxActiveCounters, counterSize, counters);
-}
-void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
- CALL_GL_API(glGetPerfMonitorGroupStringAMD, group, bufSize, length, groupString);
-}
-void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
- CALL_GL_API(glGetPerfMonitorCounterStringAMD, group, counter, bufSize, length, counterString);
-}
-void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
- CALL_GL_API(glGetPerfMonitorCounterInfoAMD, group, counter, pname, data);
-}
-void API_ENTRY(glGenPerfMonitorsAMD)(GLsizei n, GLuint *monitors) {
- CALL_GL_API(glGenPerfMonitorsAMD, n, monitors);
-}
-void API_ENTRY(glDeletePerfMonitorsAMD)(GLsizei n, GLuint *monitors) {
- CALL_GL_API(glDeletePerfMonitorsAMD, n, monitors);
-}
-void API_ENTRY(glSelectPerfMonitorCountersAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
- CALL_GL_API(glSelectPerfMonitorCountersAMD, monitor, enable, group, numCounters, countersList);
-}
-void API_ENTRY(glBeginPerfMonitorAMD)(GLuint monitor) {
- CALL_GL_API(glBeginPerfMonitorAMD, monitor);
-}
-void API_ENTRY(glEndPerfMonitorAMD)(GLuint monitor) {
- CALL_GL_API(glEndPerfMonitorAMD, monitor);
-}
-void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
- CALL_GL_API(glGetPerfMonitorCounterDataAMD, monitor, pname, dataSize, data, bytesWritten);
-}
-void API_ENTRY(glBlitFramebufferANGLE)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
- CALL_GL_API(glBlitFramebufferANGLE, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleANGLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleANGLE, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleAPPLE, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glResolveMultisampleFramebufferAPPLE)(void) {
- CALL_GL_API(glResolveMultisampleFramebufferAPPLE);
-}
-void API_ENTRY(glLabelObjectEXT)(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
- CALL_GL_API(glLabelObjectEXT, type, object, length, label);
-}
-void API_ENTRY(glGetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
- CALL_GL_API(glGetObjectLabelEXT, type, object, bufSize, length, label);
-}
-void API_ENTRY(glInsertEventMarkerEXT)(GLsizei length, const GLchar *marker) {
- CALL_GL_API(glInsertEventMarkerEXT, length, marker);
-}
-void API_ENTRY(glPushGroupMarkerEXT)(GLsizei length, const GLchar *marker) {
- CALL_GL_API(glPushGroupMarkerEXT, length, marker);
-}
-void API_ENTRY(glPopGroupMarkerEXT)(void) {
- CALL_GL_API(glPopGroupMarkerEXT);
-}
-void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
- CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
- CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
-}
-void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
- CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
-}
-void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
- CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
-}
-void API_ENTRY(glGenQueriesEXT)(GLsizei n, GLuint *ids) {
- CALL_GL_API(glGenQueriesEXT, n, ids);
-}
-void API_ENTRY(glDeleteQueriesEXT)(GLsizei n, const GLuint *ids) {
- CALL_GL_API(glDeleteQueriesEXT, n, ids);
-}
-GLboolean API_ENTRY(glIsQueryEXT)(GLuint id) {
- CALL_GL_API_RETURN(glIsQueryEXT, id);
-}
-void API_ENTRY(glBeginQueryEXT)(GLenum target, GLuint id) {
- CALL_GL_API(glBeginQueryEXT, target, id);
-}
-void API_ENTRY(glEndQueryEXT)(GLenum target) {
- CALL_GL_API(glEndQueryEXT, target);
-}
-void API_ENTRY(glGetQueryivEXT)(GLenum target, GLenum pname, GLint *params) {
- CALL_GL_API(glGetQueryivEXT, target, pname, params);
-}
-void API_ENTRY(glGetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint *params) {
- CALL_GL_API(glGetQueryObjectuivEXT, id, pname, params);
-}
-GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) {
- CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT);
-}
-void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
- CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data);
-}
-void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float *params) {
- CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params);
-}
-void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
- CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params);
-}
-void API_ENTRY(glUseProgramStagesEXT)(GLuint pipeline, GLbitfield stages, GLuint program) {
- CALL_GL_API(glUseProgramStagesEXT, pipeline, stages, program);
-}
-void API_ENTRY(glActiveShaderProgramEXT)(GLuint pipeline, GLuint program) {
- CALL_GL_API(glActiveShaderProgramEXT, pipeline, program);
-}
-GLuint API_ENTRY(glCreateShaderProgramvEXT)(GLenum type, GLsizei count, const GLchar **strings) {
- CALL_GL_API_RETURN(glCreateShaderProgramvEXT, type, count, strings);
-}
-void API_ENTRY(glBindProgramPipelineEXT)(GLuint pipeline) {
- CALL_GL_API(glBindProgramPipelineEXT, pipeline);
-}
-void API_ENTRY(glDeleteProgramPipelinesEXT)(GLsizei n, const GLuint *pipelines) {
- CALL_GL_API(glDeleteProgramPipelinesEXT, n, pipelines);
-}
-void API_ENTRY(glGenProgramPipelinesEXT)(GLsizei n, GLuint *pipelines) {
- CALL_GL_API(glGenProgramPipelinesEXT, n, pipelines);
-}
-GLboolean API_ENTRY(glIsProgramPipelineEXT)(GLuint pipeline) {
- CALL_GL_API_RETURN(glIsProgramPipelineEXT, pipeline);
-}
-void API_ENTRY(glProgramParameteriEXT)(GLuint program, GLenum pname, GLint value) {
- CALL_GL_API(glProgramParameteriEXT, program, pname, value);
-}
-void API_ENTRY(glGetProgramPipelineivEXT)(GLuint pipeline, GLenum pname, GLint *params) {
- CALL_GL_API(glGetProgramPipelineivEXT, pipeline, pname, params);
-}
-void API_ENTRY(glProgramUniform1iEXT)(GLuint program, GLint location, GLint x) {
- CALL_GL_API(glProgramUniform1iEXT, program, location, x);
-}
-void API_ENTRY(glProgramUniform2iEXT)(GLuint program, GLint location, GLint x, GLint y) {
- CALL_GL_API(glProgramUniform2iEXT, program, location, x, y);
-}
-void API_ENTRY(glProgramUniform3iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z) {
- CALL_GL_API(glProgramUniform3iEXT, program, location, x, y, z);
-}
-void API_ENTRY(glProgramUniform4iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
- CALL_GL_API(glProgramUniform4iEXT, program, location, x, y, z, w);
-}
-void API_ENTRY(glProgramUniform1fEXT)(GLuint program, GLint location, GLfloat x) {
- CALL_GL_API(glProgramUniform1fEXT, program, location, x);
-}
-void API_ENTRY(glProgramUniform2fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y) {
- CALL_GL_API(glProgramUniform2fEXT, program, location, x, y);
-}
-void API_ENTRY(glProgramUniform3fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glProgramUniform3fEXT, program, location, x, y, z);
-}
-void API_ENTRY(glProgramUniform4fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- CALL_GL_API(glProgramUniform4fEXT, program, location, x, y, z, w);
-}
-void API_ENTRY(glProgramUniform1ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
- CALL_GL_API(glProgramUniform1ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform2ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
- CALL_GL_API(glProgramUniform2ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform3ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
- CALL_GL_API(glProgramUniform3ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform4ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
- CALL_GL_API(glProgramUniform4ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform1fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- CALL_GL_API(glProgramUniform1fvEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform2fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- CALL_GL_API(glProgramUniform2fvEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform3fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- CALL_GL_API(glProgramUniform3fvEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform4fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- CALL_GL_API(glProgramUniform4fvEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniformMatrix2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
- CALL_GL_API(glProgramUniformMatrix2fvEXT, program, location, count, transpose, value);
-}
-void API_ENTRY(glProgramUniformMatrix3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
- CALL_GL_API(glProgramUniformMatrix3fvEXT, program, location, count, transpose, value);
-}
-void API_ENTRY(glProgramUniformMatrix4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
- CALL_GL_API(glProgramUniformMatrix4fvEXT, program, location, count, transpose, value);
-}
-void API_ENTRY(glValidateProgramPipelineEXT)(GLuint pipeline) {
- CALL_GL_API(glValidateProgramPipelineEXT, pipeline);
-}
-void API_ENTRY(glGetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
- CALL_GL_API(glGetProgramPipelineInfoLogEXT, pipeline, bufSize, length, infoLog);
-}
-void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
- CALL_GL_API(glTexStorage1DEXT, target, levels, internalformat, width);
-}
-void API_ENTRY(glTexStorage2DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glTexStorage2DEXT, target, levels, internalformat, width, height);
-}
-void API_ENTRY(glTexStorage3DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
- CALL_GL_API(glTexStorage3DEXT, target, levels, internalformat, width, height, depth);
-}
-void API_ENTRY(glTextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
- CALL_GL_API(glTextureStorage1DEXT, texture, target, levels, internalformat, width);
-}
-void API_ENTRY(glTextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glTextureStorage2DEXT, texture, target, levels, internalformat, width, height);
-}
-void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
- CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
- CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
-}
-void API_ENTRY(glCoverageMaskNV)(GLboolean mask) {
- CALL_GL_API(glCoverageMaskNV, mask);
-}
-void API_ENTRY(glCoverageOperationNV)(GLenum operation) {
- CALL_GL_API(glCoverageOperationNV, operation);
-}
-void API_ENTRY(glDrawBuffersNV)(GLsizei n, const GLenum *bufs) {
- CALL_GL_API(glDrawBuffersNV, n, bufs);
-}
-void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
- CALL_GL_API(glDeleteFencesNV, n, fences);
-}
-void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) {
- CALL_GL_API(glGenFencesNV, n, fences);
-}
-GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) {
- CALL_GL_API_RETURN(glIsFenceNV, fence);
-}
-GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) {
- CALL_GL_API_RETURN(glTestFenceNV, fence);
-}
-void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) {
- CALL_GL_API(glGetFenceivNV, fence, pname, params);
-}
-void API_ENTRY(glFinishFenceNV)(GLuint fence) {
- CALL_GL_API(glFinishFenceNV, fence);
-}
-void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
- CALL_GL_API(glSetFenceNV, fence, condition);
-}
-void API_ENTRY(glReadBufferNV)(GLenum mode) {
- CALL_GL_API(glReadBufferNV, mode);
-}
-void API_ENTRY(glAlphaFuncQCOM)(GLenum func, GLclampf ref) {
- CALL_GL_API(glAlphaFuncQCOM, func, ref);
-}
-void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
- CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
-}
-void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
- CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString);
-}
-void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) {
- CALL_GL_API(glEnableDriverControlQCOM, driverControl);
-}
-void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
- CALL_GL_API(glDisableDriverControlQCOM, driverControl);
-}
-void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) {
- CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures);
-}
-void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
- CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers);
-}
-void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
- CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers);
-}
-void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
- CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers);
-}
-void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
- CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params);
-}
-void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) {
- CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param);
-}
-void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
- CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
-}
-void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) {
- CALL_GL_API(glExtGetBufferPointervQCOM, target, params);
-}
-void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
- CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders);
-}
-void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
- CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms);
-}
-GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) {
- CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program);
-}
-void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
- CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length);
-}
-void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
- CALL_GL_API(glStartTilingQCOM, x, y, width, height, preserveMask);
-}
-void API_ENTRY(glEndTilingQCOM)(GLbitfield preserveMask) {
- CALL_GL_API(glEndTilingQCOM, preserveMask);
-}
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
deleted file mode 100644
index adcb60d..0000000
--- a/opengl/libs/GLES_CM/gl.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- ** Copyright 2007, 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 <ctype.h>
-#include <string.h>
-#include <errno.h>
-
-#include <sys/ioctl.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
-#include "hooks.h"
-#include "egl_impl.h"
-
-using namespace android;
-
-// set this to 1 for crude GL debugging
-#define CHECK_FOR_GL_ERRORS 0
-
-// ----------------------------------------------------------------------------
-// extensions for the framework
-// ----------------------------------------------------------------------------
-
-extern "C" {
-GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-}
-
-void glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count) {
- glColorPointer(size, type, stride, ptr);
-}
-void glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count) {
- glNormalPointer(type, stride, pointer);
-}
-void glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
- glTexCoordPointer(size, type, stride, pointer);
-}
-void glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
- glVertexPointer(size, type, stride, pointer);
-}
-
-void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
- glPointSizePointerOES(type, stride, pointer);
-}
-
-GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
- glMatrixIndexPointerOES(size, type, stride, pointer);
-}
-
-GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
- glWeightPointerOES(size, type, stride, pointer);
-}
-
-// ----------------------------------------------------------------------------
-// Actual GL entry-points
-// ----------------------------------------------------------------------------
-
-#undef API_ENTRY
-#undef CALL_GL_API
-#undef CALL_GL_API_RETURN
-
-#if USE_FAST_TLS_KEY && !CHECK_FOR_GL_ERRORS
-
- #ifdef HAVE_ARM_TLS_REGISTER
- #define GET_TLS(reg) \
- "mrc p15, 0, " #reg ", c13, c0, 3 \n"
- #else
- #define GET_TLS(reg) \
- "mov " #reg ", #0xFFFF0FFF \n" \
- "ldr " #reg ", [" #reg ", #-15] \n"
- #endif
-
- #define API_ENTRY(_api) __attribute__((naked)) _api
-
- #define CALL_GL_API(_api, ...) \
- asm volatile( \
- GET_TLS(r12) \
- "ldr r12, [r12, %[tls]] \n" \
- "cmp r12, #0 \n" \
- "ldrne pc, [r12, %[api]] \n" \
- "mov r0, #0 \n" \
- "bx lr \n" \
- : \
- : [tls] "J"(TLS_SLOT_OPENGL_API*4), \
- [api] "J"(__builtin_offsetof(gl_hooks_t, gl._api)) \
- : \
- );
-
- #define CALL_GL_API_RETURN(_api, ...) \
- CALL_GL_API(_api, __VA_ARGS__) \
- return 0; // placate gcc's warnings. never reached.
-
-#else
-
- #if CHECK_FOR_GL_ERRORS
-
- #define CHECK_GL_ERRORS(_api) \
- do { GLint err = glGetError(); \
- ALOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \
- } while(false);
-
- #else
-
- #define CHECK_GL_ERRORS(_api) do { } while(false);
-
- #endif
-
-
- #define API_ENTRY(_api) _api
-
- #define CALL_GL_API(_api, ...) \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- _c->_api(__VA_ARGS__); \
- CHECK_GL_ERRORS(_api)
-
- #define CALL_GL_API_RETURN(_api, ...) \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- return _c->_api(__VA_ARGS__)
-
-#endif
-
-
-extern "C" {
-#include "gl_api.in"
-#include "glext_api.in"
-}
-
-#undef API_ENTRY
-#undef CALL_GL_API
-#undef CALL_GL_API_RETURN
-
-/*
- * glGetString() is special because we expose some extensions in the wrapper
- */
-
-extern "C" const GLubyte * __glGetString(GLenum name);
-
-const GLubyte * glGetString(GLenum name)
-{
- const GLubyte * ret = egl_get_string_for_current_context(name);
- if (ret == NULL) {
- ret = __glGetString(name);
- }
- return ret;
-}
diff --git a/opengl/libs/GLES_CM/gl_api.in b/opengl/libs/GLES_CM/gl_api.in
deleted file mode 100644
index c8f6b0c..0000000
--- a/opengl/libs/GLES_CM/gl_api.in
+++ /dev/null
@@ -1,435 +0,0 @@
-void API_ENTRY(glAlphaFunc)(GLenum func, GLclampf ref) {
- CALL_GL_API(glAlphaFunc, func, ref);
-}
-void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- CALL_GL_API(glClearColor, red, green, blue, alpha);
-}
-void API_ENTRY(glClearDepthf)(GLclampf depth) {
- CALL_GL_API(glClearDepthf, depth);
-}
-void API_ENTRY(glClipPlanef)(GLenum plane, const GLfloat *equation) {
- CALL_GL_API(glClipPlanef, plane, equation);
-}
-void API_ENTRY(glColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
- CALL_GL_API(glColor4f, red, green, blue, alpha);
-}
-void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) {
- CALL_GL_API(glDepthRangef, zNear, zFar);
-}
-void API_ENTRY(glFogf)(GLenum pname, GLfloat param) {
- CALL_GL_API(glFogf, pname, param);
-}
-void API_ENTRY(glFogfv)(GLenum pname, const GLfloat *params) {
- CALL_GL_API(glFogfv, pname, params);
-}
-void API_ENTRY(glFrustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- CALL_GL_API(glFrustumf, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glGetClipPlanef)(GLenum pname, GLfloat eqn[4]) {
- CALL_GL_API(glGetClipPlanef, pname, eqn);
-}
-void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat *params) {
- CALL_GL_API(glGetFloatv, pname, params);
-}
-void API_ENTRY(glGetLightfv)(GLenum light, GLenum pname, GLfloat *params) {
- CALL_GL_API(glGetLightfv, light, pname, params);
-}
-void API_ENTRY(glGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) {
- CALL_GL_API(glGetMaterialfv, face, pname, params);
-}
-void API_ENTRY(glGetTexEnvfv)(GLenum env, GLenum pname, GLfloat *params) {
- CALL_GL_API(glGetTexEnvfv, env, pname, params);
-}
-void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) {
- CALL_GL_API(glGetTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glLightModelf)(GLenum pname, GLfloat param) {
- CALL_GL_API(glLightModelf, pname, param);
-}
-void API_ENTRY(glLightModelfv)(GLenum pname, const GLfloat *params) {
- CALL_GL_API(glLightModelfv, pname, params);
-}
-void API_ENTRY(glLightf)(GLenum light, GLenum pname, GLfloat param) {
- CALL_GL_API(glLightf, light, pname, param);
-}
-void API_ENTRY(glLightfv)(GLenum light, GLenum pname, const GLfloat *params) {
- CALL_GL_API(glLightfv, light, pname, params);
-}
-void API_ENTRY(glLineWidth)(GLfloat width) {
- CALL_GL_API(glLineWidth, width);
-}
-void API_ENTRY(glLoadMatrixf)(const GLfloat *m) {
- CALL_GL_API(glLoadMatrixf, m);
-}
-void API_ENTRY(glMaterialf)(GLenum face, GLenum pname, GLfloat param) {
- CALL_GL_API(glMaterialf, face, pname, param);
-}
-void API_ENTRY(glMaterialfv)(GLenum face, GLenum pname, const GLfloat *params) {
- CALL_GL_API(glMaterialfv, face, pname, params);
-}
-void API_ENTRY(glMultMatrixf)(const GLfloat *m) {
- CALL_GL_API(glMultMatrixf, m);
-}
-void API_ENTRY(glMultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
- CALL_GL_API(glMultiTexCoord4f, target, s, t, r, q);
-}
-void API_ENTRY(glNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz) {
- CALL_GL_API(glNormal3f, nx, ny, nz);
-}
-void API_ENTRY(glOrthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- CALL_GL_API(glOrthof, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glPointParameterf)(GLenum pname, GLfloat param) {
- CALL_GL_API(glPointParameterf, pname, param);
-}
-void API_ENTRY(glPointParameterfv)(GLenum pname, const GLfloat *params) {
- CALL_GL_API(glPointParameterfv, pname, params);
-}
-void API_ENTRY(glPointSize)(GLfloat size) {
- CALL_GL_API(glPointSize, size);
-}
-void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) {
- CALL_GL_API(glPolygonOffset, factor, units);
-}
-void API_ENTRY(glRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glRotatef, angle, x, y, z);
-}
-void API_ENTRY(glScalef)(GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glScalef, x, y, z);
-}
-void API_ENTRY(glTexEnvf)(GLenum target, GLenum pname, GLfloat param) {
- CALL_GL_API(glTexEnvf, target, pname, param);
-}
-void API_ENTRY(glTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) {
- CALL_GL_API(glTexEnvfv, target, pname, params);
-}
-void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
- CALL_GL_API(glTexParameterf, target, pname, param);
-}
-void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) {
- CALL_GL_API(glTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glTranslatef)(GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glTranslatef, x, y, z);
-}
-void API_ENTRY(glActiveTexture)(GLenum texture) {
- CALL_GL_API(glActiveTexture, texture);
-}
-void API_ENTRY(glAlphaFuncx)(GLenum func, GLclampx ref) {
- CALL_GL_API(glAlphaFuncx, func, ref);
-}
-void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
- CALL_GL_API(glBindBuffer, target, buffer);
-}
-void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) {
- CALL_GL_API(glBindTexture, target, texture);
-}
-void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) {
- CALL_GL_API(glBlendFunc, sfactor, dfactor);
-}
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) {
- CALL_GL_API(glBufferData, target, size, data, usage);
-}
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) {
- CALL_GL_API(glBufferSubData, target, offset, size, data);
-}
-void API_ENTRY(glClear)(GLbitfield mask) {
- CALL_GL_API(glClear, mask);
-}
-void API_ENTRY(glClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
- CALL_GL_API(glClearColorx, red, green, blue, alpha);
-}
-void API_ENTRY(glClearDepthx)(GLclampx depth) {
- CALL_GL_API(glClearDepthx, depth);
-}
-void API_ENTRY(glClearStencil)(GLint s) {
- CALL_GL_API(glClearStencil, s);
-}
-void API_ENTRY(glClientActiveTexture)(GLenum texture) {
- CALL_GL_API(glClientActiveTexture, texture);
-}
-void API_ENTRY(glClipPlanex)(GLenum plane, const GLfixed *equation) {
- CALL_GL_API(glClipPlanex, plane, equation);
-}
-void API_ENTRY(glColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
- CALL_GL_API(glColor4ub, red, green, blue, alpha);
-}
-void API_ENTRY(glColor4x)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
- CALL_GL_API(glColor4x, red, green, blue, alpha);
-}
-void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
- CALL_GL_API(glColorMask, red, green, blue, alpha);
-}
-void API_ENTRY(glColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glColorPointer, size, type, stride, pointer);
-}
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) {
- CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
-}
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) {
- CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
-}
-void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
- CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border);
-}
-void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height);
-}
-void API_ENTRY(glCullFace)(GLenum mode) {
- CALL_GL_API(glCullFace, mode);
-}
-void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint *buffers) {
- CALL_GL_API(glDeleteBuffers, n, buffers);
-}
-void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint *textures) {
- CALL_GL_API(glDeleteTextures, n, textures);
-}
-void API_ENTRY(glDepthFunc)(GLenum func) {
- CALL_GL_API(glDepthFunc, func);
-}
-void API_ENTRY(glDepthMask)(GLboolean flag) {
- CALL_GL_API(glDepthMask, flag);
-}
-void API_ENTRY(glDepthRangex)(GLclampx zNear, GLclampx zFar) {
- CALL_GL_API(glDepthRangex, zNear, zFar);
-}
-void API_ENTRY(glDisable)(GLenum cap) {
- CALL_GL_API(glDisable, cap);
-}
-void API_ENTRY(glDisableClientState)(GLenum array) {
- CALL_GL_API(glDisableClientState, array);
-}
-void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
- CALL_GL_API(glDrawArrays, mode, first, count);
-}
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) {
- CALL_GL_API(glDrawElements, mode, count, type, indices);
-}
-void API_ENTRY(glEnable)(GLenum cap) {
- CALL_GL_API(glEnable, cap);
-}
-void API_ENTRY(glEnableClientState)(GLenum array) {
- CALL_GL_API(glEnableClientState, array);
-}
-void API_ENTRY(glFinish)(void) {
- CALL_GL_API(glFinish);
-}
-void API_ENTRY(glFlush)(void) {
- CALL_GL_API(glFlush);
-}
-void API_ENTRY(glFogx)(GLenum pname, GLfixed param) {
- CALL_GL_API(glFogx, pname, param);
-}
-void API_ENTRY(glFogxv)(GLenum pname, const GLfixed *params) {
- CALL_GL_API(glFogxv, pname, params);
-}
-void API_ENTRY(glFrontFace)(GLenum mode) {
- CALL_GL_API(glFrontFace, mode);
-}
-void API_ENTRY(glFrustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- CALL_GL_API(glFrustumx, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean *params) {
- CALL_GL_API(glGetBooleanv, pname, params);
-}
-void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint *params) {
- CALL_GL_API(glGetBufferParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetClipPlanex)(GLenum pname, GLfixed eqn[4]) {
- CALL_GL_API(glGetClipPlanex, pname, eqn);
-}
-void API_ENTRY(glGenBuffers)(GLsizei n, GLuint *buffers) {
- CALL_GL_API(glGenBuffers, n, buffers);
-}
-void API_ENTRY(glGenTextures)(GLsizei n, GLuint *textures) {
- CALL_GL_API(glGenTextures, n, textures);
-}
-GLenum API_ENTRY(glGetError)(void) {
- CALL_GL_API_RETURN(glGetError);
-}
-void API_ENTRY(glGetFixedv)(GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetFixedv, pname, params);
-}
-void API_ENTRY(glGetIntegerv)(GLenum pname, GLint *params) {
- CALL_GL_API(glGetIntegerv, pname, params);
-}
-void API_ENTRY(glGetLightxv)(GLenum light, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetLightxv, light, pname, params);
-}
-void API_ENTRY(glGetMaterialxv)(GLenum face, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetMaterialxv, face, pname, params);
-}
-void API_ENTRY(glGetPointerv)(GLenum pname, GLvoid **params) {
- CALL_GL_API(glGetPointerv, pname, params);
-}
-const GLubyte * API_ENTRY(__glGetString)(GLenum name) {
- CALL_GL_API_RETURN(glGetString, name);
-}
-void API_ENTRY(glGetTexEnviv)(GLenum env, GLenum pname, GLint *params) {
- CALL_GL_API(glGetTexEnviv, env, pname, params);
-}
-void API_ENTRY(glGetTexEnvxv)(GLenum env, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetTexEnvxv, env, pname, params);
-}
-void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) {
- CALL_GL_API(glGetTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetTexParameterxv)(GLenum target, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetTexParameterxv, target, pname, params);
-}
-void API_ENTRY(glHint)(GLenum target, GLenum mode) {
- CALL_GL_API(glHint, target, mode);
-}
-GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) {
- CALL_GL_API_RETURN(glIsBuffer, buffer);
-}
-GLboolean API_ENTRY(glIsEnabled)(GLenum cap) {
- CALL_GL_API_RETURN(glIsEnabled, cap);
-}
-GLboolean API_ENTRY(glIsTexture)(GLuint texture) {
- CALL_GL_API_RETURN(glIsTexture, texture);
-}
-void API_ENTRY(glLightModelx)(GLenum pname, GLfixed param) {
- CALL_GL_API(glLightModelx, pname, param);
-}
-void API_ENTRY(glLightModelxv)(GLenum pname, const GLfixed *params) {
- CALL_GL_API(glLightModelxv, pname, params);
-}
-void API_ENTRY(glLightx)(GLenum light, GLenum pname, GLfixed param) {
- CALL_GL_API(glLightx, light, pname, param);
-}
-void API_ENTRY(glLightxv)(GLenum light, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glLightxv, light, pname, params);
-}
-void API_ENTRY(glLineWidthx)(GLfixed width) {
- CALL_GL_API(glLineWidthx, width);
-}
-void API_ENTRY(glLoadIdentity)(void) {
- CALL_GL_API(glLoadIdentity);
-}
-void API_ENTRY(glLoadMatrixx)(const GLfixed *m) {
- CALL_GL_API(glLoadMatrixx, m);
-}
-void API_ENTRY(glLogicOp)(GLenum opcode) {
- CALL_GL_API(glLogicOp, opcode);
-}
-void API_ENTRY(glMaterialx)(GLenum face, GLenum pname, GLfixed param) {
- CALL_GL_API(glMaterialx, face, pname, param);
-}
-void API_ENTRY(glMaterialxv)(GLenum face, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glMaterialxv, face, pname, params);
-}
-void API_ENTRY(glMatrixMode)(GLenum mode) {
- CALL_GL_API(glMatrixMode, mode);
-}
-void API_ENTRY(glMultMatrixx)(const GLfixed *m) {
- CALL_GL_API(glMultMatrixx, m);
-}
-void API_ENTRY(glMultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
- CALL_GL_API(glMultiTexCoord4x, target, s, t, r, q);
-}
-void API_ENTRY(glNormal3x)(GLfixed nx, GLfixed ny, GLfixed nz) {
- CALL_GL_API(glNormal3x, nx, ny, nz);
-}
-void API_ENTRY(glNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glNormalPointer, type, stride, pointer);
-}
-void API_ENTRY(glOrthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- CALL_GL_API(glOrthox, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) {
- CALL_GL_API(glPixelStorei, pname, param);
-}
-void API_ENTRY(glPointParameterx)(GLenum pname, GLfixed param) {
- CALL_GL_API(glPointParameterx, pname, param);
-}
-void API_ENTRY(glPointParameterxv)(GLenum pname, const GLfixed *params) {
- CALL_GL_API(glPointParameterxv, pname, params);
-}
-void API_ENTRY(glPointSizex)(GLfixed size) {
- CALL_GL_API(glPointSizex, size);
-}
-void API_ENTRY(glPolygonOffsetx)(GLfixed factor, GLfixed units) {
- CALL_GL_API(glPolygonOffsetx, factor, units);
-}
-void API_ENTRY(glPopMatrix)(void) {
- CALL_GL_API(glPopMatrix);
-}
-void API_ENTRY(glPushMatrix)(void) {
- CALL_GL_API(glPushMatrix);
-}
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) {
- CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
-}
-void API_ENTRY(glRotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
- CALL_GL_API(glRotatex, angle, x, y, z);
-}
-void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) {
- CALL_GL_API(glSampleCoverage, value, invert);
-}
-void API_ENTRY(glSampleCoveragex)(GLclampx value, GLboolean invert) {
- CALL_GL_API(glSampleCoveragex, value, invert);
-}
-void API_ENTRY(glScalex)(GLfixed x, GLfixed y, GLfixed z) {
- CALL_GL_API(glScalex, x, y, z);
-}
-void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glScissor, x, y, width, height);
-}
-void API_ENTRY(glShadeModel)(GLenum mode) {
- CALL_GL_API(glShadeModel, mode);
-}
-void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {
- CALL_GL_API(glStencilFunc, func, ref, mask);
-}
-void API_ENTRY(glStencilMask)(GLuint mask) {
- CALL_GL_API(glStencilMask, mask);
-}
-void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) {
- CALL_GL_API(glStencilOp, fail, zfail, zpass);
-}
-void API_ENTRY(glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glTexCoordPointer, size, type, stride, pointer);
-}
-void API_ENTRY(glTexEnvi)(GLenum target, GLenum pname, GLint param) {
- CALL_GL_API(glTexEnvi, target, pname, param);
-}
-void API_ENTRY(glTexEnvx)(GLenum target, GLenum pname, GLfixed param) {
- CALL_GL_API(glTexEnvx, target, pname, param);
-}
-void API_ENTRY(glTexEnviv)(GLenum target, GLenum pname, const GLint *params) {
- CALL_GL_API(glTexEnviv, target, pname, params);
-}
-void API_ENTRY(glTexEnvxv)(GLenum target, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glTexEnvxv, target, pname, params);
-}
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
- CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
-}
-void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) {
- CALL_GL_API(glTexParameteri, target, pname, param);
-}
-void API_ENTRY(glTexParameterx)(GLenum target, GLenum pname, GLfixed param) {
- CALL_GL_API(glTexParameterx, target, pname, param);
-}
-void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint *params) {
- CALL_GL_API(glTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glTexParameterxv)(GLenum target, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glTexParameterxv, target, pname, params);
-}
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) {
- CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
-}
-void API_ENTRY(glTranslatex)(GLfixed x, GLfixed y, GLfixed z) {
- CALL_GL_API(glTranslatex, x, y, z);
-}
-void API_ENTRY(glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glVertexPointer, size, type, stride, pointer);
-}
-void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glViewport, x, y, width, height);
-}
-void API_ENTRY(glPointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glPointSizePointerOES, type, stride, pointer);
-}
diff --git a/opengl/libs/GLES_CM/glext_api.in b/opengl/libs/GLES_CM/glext_api.in
deleted file mode 100644
index 7cd6cb5..0000000
--- a/opengl/libs/GLES_CM/glext_api.in
+++ /dev/null
@@ -1,420 +0,0 @@
-void API_ENTRY(glBlendEquationSeparateOES)(GLenum modeRGB, GLenum modeAlpha) {
- CALL_GL_API(glBlendEquationSeparateOES, modeRGB, modeAlpha);
-}
-void API_ENTRY(glBlendFuncSeparateOES)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
- CALL_GL_API(glBlendFuncSeparateOES, srcRGB, dstRGB, srcAlpha, dstAlpha);
-}
-void API_ENTRY(glBlendEquationOES)(GLenum mode) {
- CALL_GL_API(glBlendEquationOES, mode);
-}
-void API_ENTRY(glDrawTexsOES)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
- CALL_GL_API(glDrawTexsOES, x, y, z, width, height);
-}
-void API_ENTRY(glDrawTexiOES)(GLint x, GLint y, GLint z, GLint width, GLint height) {
- CALL_GL_API(glDrawTexiOES, x, y, z, width, height);
-}
-void API_ENTRY(glDrawTexxOES)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) {
- CALL_GL_API(glDrawTexxOES, x, y, z, width, height);
-}
-void API_ENTRY(glDrawTexsvOES)(const GLshort *coords) {
- CALL_GL_API(glDrawTexsvOES, coords);
-}
-void API_ENTRY(glDrawTexivOES)(const GLint *coords) {
- CALL_GL_API(glDrawTexivOES, coords);
-}
-void API_ENTRY(glDrawTexxvOES)(const GLfixed *coords) {
- CALL_GL_API(glDrawTexxvOES, coords);
-}
-void API_ENTRY(glDrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
- CALL_GL_API(glDrawTexfOES, x, y, z, width, height);
-}
-void API_ENTRY(glDrawTexfvOES)(const GLfloat *coords) {
- CALL_GL_API(glDrawTexfvOES, coords);
-}
-void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
- CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
-}
-void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
- CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
-}
-void API_ENTRY(glAlphaFuncxOES)(GLenum func, GLclampx ref) {
- CALL_GL_API(glAlphaFuncxOES, func, ref);
-}
-void API_ENTRY(glClearColorxOES)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
- CALL_GL_API(glClearColorxOES, red, green, blue, alpha);
-}
-void API_ENTRY(glClearDepthxOES)(GLclampx depth) {
- CALL_GL_API(glClearDepthxOES, depth);
-}
-void API_ENTRY(glClipPlanexOES)(GLenum plane, const GLfixed *equation) {
- CALL_GL_API(glClipPlanexOES, plane, equation);
-}
-void API_ENTRY(glColor4xOES)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
- CALL_GL_API(glColor4xOES, red, green, blue, alpha);
-}
-void API_ENTRY(glDepthRangexOES)(GLclampx zNear, GLclampx zFar) {
- CALL_GL_API(glDepthRangexOES, zNear, zFar);
-}
-void API_ENTRY(glFogxOES)(GLenum pname, GLfixed param) {
- CALL_GL_API(glFogxOES, pname, param);
-}
-void API_ENTRY(glFogxvOES)(GLenum pname, const GLfixed *params) {
- CALL_GL_API(glFogxvOES, pname, params);
-}
-void API_ENTRY(glFrustumxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- CALL_GL_API(glFrustumxOES, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glGetClipPlanexOES)(GLenum pname, GLfixed eqn[4]) {
- CALL_GL_API(glGetClipPlanexOES, pname, eqn);
-}
-void API_ENTRY(glGetFixedvOES)(GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetFixedvOES, pname, params);
-}
-void API_ENTRY(glGetLightxvOES)(GLenum light, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetLightxvOES, light, pname, params);
-}
-void API_ENTRY(glGetMaterialxvOES)(GLenum face, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetMaterialxvOES, face, pname, params);
-}
-void API_ENTRY(glGetTexEnvxvOES)(GLenum env, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetTexEnvxvOES, env, pname, params);
-}
-void API_ENTRY(glGetTexParameterxvOES)(GLenum target, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetTexParameterxvOES, target, pname, params);
-}
-void API_ENTRY(glLightModelxOES)(GLenum pname, GLfixed param) {
- CALL_GL_API(glLightModelxOES, pname, param);
-}
-void API_ENTRY(glLightModelxvOES)(GLenum pname, const GLfixed *params) {
- CALL_GL_API(glLightModelxvOES, pname, params);
-}
-void API_ENTRY(glLightxOES)(GLenum light, GLenum pname, GLfixed param) {
- CALL_GL_API(glLightxOES, light, pname, param);
-}
-void API_ENTRY(glLightxvOES)(GLenum light, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glLightxvOES, light, pname, params);
-}
-void API_ENTRY(glLineWidthxOES)(GLfixed width) {
- CALL_GL_API(glLineWidthxOES, width);
-}
-void API_ENTRY(glLoadMatrixxOES)(const GLfixed *m) {
- CALL_GL_API(glLoadMatrixxOES, m);
-}
-void API_ENTRY(glMaterialxOES)(GLenum face, GLenum pname, GLfixed param) {
- CALL_GL_API(glMaterialxOES, face, pname, param);
-}
-void API_ENTRY(glMaterialxvOES)(GLenum face, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glMaterialxvOES, face, pname, params);
-}
-void API_ENTRY(glMultMatrixxOES)(const GLfixed *m) {
- CALL_GL_API(glMultMatrixxOES, m);
-}
-void API_ENTRY(glMultiTexCoord4xOES)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
- CALL_GL_API(glMultiTexCoord4xOES, target, s, t, r, q);
-}
-void API_ENTRY(glNormal3xOES)(GLfixed nx, GLfixed ny, GLfixed nz) {
- CALL_GL_API(glNormal3xOES, nx, ny, nz);
-}
-void API_ENTRY(glOrthoxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- CALL_GL_API(glOrthoxOES, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glPointParameterxOES)(GLenum pname, GLfixed param) {
- CALL_GL_API(glPointParameterxOES, pname, param);
-}
-void API_ENTRY(glPointParameterxvOES)(GLenum pname, const GLfixed *params) {
- CALL_GL_API(glPointParameterxvOES, pname, params);
-}
-void API_ENTRY(glPointSizexOES)(GLfixed size) {
- CALL_GL_API(glPointSizexOES, size);
-}
-void API_ENTRY(glPolygonOffsetxOES)(GLfixed factor, GLfixed units) {
- CALL_GL_API(glPolygonOffsetxOES, factor, units);
-}
-void API_ENTRY(glRotatexOES)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
- CALL_GL_API(glRotatexOES, angle, x, y, z);
-}
-void API_ENTRY(glSampleCoveragexOES)(GLclampx value, GLboolean invert) {
- CALL_GL_API(glSampleCoveragexOES, value, invert);
-}
-void API_ENTRY(glScalexOES)(GLfixed x, GLfixed y, GLfixed z) {
- CALL_GL_API(glScalexOES, x, y, z);
-}
-void API_ENTRY(glTexEnvxOES)(GLenum target, GLenum pname, GLfixed param) {
- CALL_GL_API(glTexEnvxOES, target, pname, param);
-}
-void API_ENTRY(glTexEnvxvOES)(GLenum target, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glTexEnvxvOES, target, pname, params);
-}
-void API_ENTRY(glTexParameterxOES)(GLenum target, GLenum pname, GLfixed param) {
- CALL_GL_API(glTexParameterxOES, target, pname, param);
-}
-void API_ENTRY(glTexParameterxvOES)(GLenum target, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glTexParameterxvOES, target, pname, params);
-}
-void API_ENTRY(glTranslatexOES)(GLfixed x, GLfixed y, GLfixed z) {
- CALL_GL_API(glTranslatexOES, x, y, z);
-}
-GLboolean API_ENTRY(glIsRenderbufferOES)(GLuint renderbuffer) {
- CALL_GL_API_RETURN(glIsRenderbufferOES, renderbuffer);
-}
-void API_ENTRY(glBindRenderbufferOES)(GLenum target, GLuint renderbuffer) {
- CALL_GL_API(glBindRenderbufferOES, target, renderbuffer);
-}
-void API_ENTRY(glDeleteRenderbuffersOES)(GLsizei n, const GLuint* renderbuffers) {
- CALL_GL_API(glDeleteRenderbuffersOES, n, renderbuffers);
-}
-void API_ENTRY(glGenRenderbuffersOES)(GLsizei n, GLuint* renderbuffers) {
- CALL_GL_API(glGenRenderbuffersOES, n, renderbuffers);
-}
-void API_ENTRY(glRenderbufferStorageOES)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageOES, target, internalformat, width, height);
-}
-void API_ENTRY(glGetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetRenderbufferParameterivOES, target, pname, params);
-}
-GLboolean API_ENTRY(glIsFramebufferOES)(GLuint framebuffer) {
- CALL_GL_API_RETURN(glIsFramebufferOES, framebuffer);
-}
-void API_ENTRY(glBindFramebufferOES)(GLenum target, GLuint framebuffer) {
- CALL_GL_API(glBindFramebufferOES, target, framebuffer);
-}
-void API_ENTRY(glDeleteFramebuffersOES)(GLsizei n, const GLuint* framebuffers) {
- CALL_GL_API(glDeleteFramebuffersOES, n, framebuffers);
-}
-void API_ENTRY(glGenFramebuffersOES)(GLsizei n, GLuint* framebuffers) {
- CALL_GL_API(glGenFramebuffersOES, n, framebuffers);
-}
-GLenum API_ENTRY(glCheckFramebufferStatusOES)(GLenum target) {
- CALL_GL_API_RETURN(glCheckFramebufferStatusOES, target);
-}
-void API_ENTRY(glFramebufferRenderbufferOES)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
- CALL_GL_API(glFramebufferRenderbufferOES, target, attachment, renderbuffertarget, renderbuffer);
-}
-void API_ENTRY(glFramebufferTexture2DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
- CALL_GL_API(glFramebufferTexture2DOES, target, attachment, textarget, texture, level);
-}
-void API_ENTRY(glGetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
- CALL_GL_API(glGetFramebufferAttachmentParameterivOES, target, attachment, pname, params);
-}
-void API_ENTRY(glGenerateMipmapOES)(GLenum target) {
- CALL_GL_API(glGenerateMipmapOES, target);
-}
-void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
- CALL_GL_API_RETURN(glMapBufferOES, target, access);
-}
-GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) {
- CALL_GL_API_RETURN(glUnmapBufferOES, target);
-}
-void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params) {
- CALL_GL_API(glGetBufferPointervOES, target, pname, params);
-}
-void API_ENTRY(glCurrentPaletteMatrixOES)(GLuint matrixpaletteindex) {
- CALL_GL_API(glCurrentPaletteMatrixOES, matrixpaletteindex);
-}
-void API_ENTRY(glLoadPaletteFromModelViewMatrixOES)(void) {
- CALL_GL_API(glLoadPaletteFromModelViewMatrixOES);
-}
-void API_ENTRY(glMatrixIndexPointerOES)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glMatrixIndexPointerOES, size, type, stride, pointer);
-}
-void API_ENTRY(glWeightPointerOES)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- CALL_GL_API(glWeightPointerOES, size, type, stride, pointer);
-}
-GLbitfield API_ENTRY(glQueryMatrixxOES)(GLfixed mantissa[16], GLint exponent[16]) {
- CALL_GL_API_RETURN(glQueryMatrixxOES, mantissa, exponent);
-}
-void API_ENTRY(glDepthRangefOES)(GLclampf zNear, GLclampf zFar) {
- CALL_GL_API(glDepthRangefOES, zNear, zFar);
-}
-void API_ENTRY(glFrustumfOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- CALL_GL_API(glFrustumfOES, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glOrthofOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- CALL_GL_API(glOrthofOES, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glClipPlanefOES)(GLenum plane, const GLfloat *equation) {
- CALL_GL_API(glClipPlanefOES, plane, equation);
-}
-void API_ENTRY(glGetClipPlanefOES)(GLenum pname, GLfloat eqn[4]) {
- CALL_GL_API(glGetClipPlanefOES, pname, eqn);
-}
-void API_ENTRY(glClearDepthfOES)(GLclampf depth) {
- CALL_GL_API(glClearDepthfOES, depth);
-}
-void API_ENTRY(glTexGenfOES)(GLenum coord, GLenum pname, GLfloat param) {
- CALL_GL_API(glTexGenfOES, coord, pname, param);
-}
-void API_ENTRY(glTexGenfvOES)(GLenum coord, GLenum pname, const GLfloat *params) {
- CALL_GL_API(glTexGenfvOES, coord, pname, params);
-}
-void API_ENTRY(glTexGeniOES)(GLenum coord, GLenum pname, GLint param) {
- CALL_GL_API(glTexGeniOES, coord, pname, param);
-}
-void API_ENTRY(glTexGenivOES)(GLenum coord, GLenum pname, const GLint *params) {
- CALL_GL_API(glTexGenivOES, coord, pname, params);
-}
-void API_ENTRY(glTexGenxOES)(GLenum coord, GLenum pname, GLfixed param) {
- CALL_GL_API(glTexGenxOES, coord, pname, param);
-}
-void API_ENTRY(glTexGenxvOES)(GLenum coord, GLenum pname, const GLfixed *params) {
- CALL_GL_API(glTexGenxvOES, coord, pname, params);
-}
-void API_ENTRY(glGetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat *params) {
- CALL_GL_API(glGetTexGenfvOES, coord, pname, params);
-}
-void API_ENTRY(glGetTexGenivOES)(GLenum coord, GLenum pname, GLint *params) {
- CALL_GL_API(glGetTexGenivOES, coord, pname, params);
-}
-void API_ENTRY(glGetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed *params) {
- CALL_GL_API(glGetTexGenxvOES, coord, pname, params);
-}
-void API_ENTRY(glBindVertexArrayOES)(GLuint array) {
- CALL_GL_API(glBindVertexArrayOES, array);
-}
-void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) {
- CALL_GL_API(glDeleteVertexArraysOES, n, arrays);
-}
-void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
- CALL_GL_API(glGenVertexArraysOES, n, arrays);
-}
-GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
- CALL_GL_API_RETURN(glIsVertexArrayOES, array);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleAPPLE, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glResolveMultisampleFramebufferAPPLE)(void) {
- CALL_GL_API(glResolveMultisampleFramebufferAPPLE);
-}
-void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
- CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
- CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
-}
-void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
- CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
-}
-void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
- CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
-}
-GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) {
- CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT);
-}
-void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
- CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data);
-}
-void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float *params) {
- CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params);
-}
-void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
- CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params);
-}
-void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
- CALL_GL_API(glTexStorage1DEXT, target, levels, internalformat, width);
-}
-void API_ENTRY(glTexStorage2DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glTexStorage2DEXT, target, levels, internalformat, width, height);
-}
-void API_ENTRY(glTexStorage3DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
- CALL_GL_API(glTexStorage3DEXT, target, levels, internalformat, width, height, depth);
-}
-void API_ENTRY(glTextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
- CALL_GL_API(glTextureStorage1DEXT, texture, target, levels, internalformat, width);
-}
-void API_ENTRY(glTextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glTextureStorage2DEXT, texture, target, levels, internalformat, width, height);
-}
-void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
- CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth);
-}
-void API_ENTRY(glClipPlanefIMG)(GLenum p, const GLfloat *eqn) {
- CALL_GL_API(glClipPlanefIMG, p, eqn);
-}
-void API_ENTRY(glClipPlanexIMG)(GLenum p, const GLfixed *eqn) {
- CALL_GL_API(glClipPlanexIMG, p, eqn);
-}
-void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
- CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
-}
-void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
- CALL_GL_API(glDeleteFencesNV, n, fences);
-}
-void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) {
- CALL_GL_API(glGenFencesNV, n, fences);
-}
-GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) {
- CALL_GL_API_RETURN(glIsFenceNV, fence);
-}
-GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) {
- CALL_GL_API_RETURN(glTestFenceNV, fence);
-}
-void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) {
- CALL_GL_API(glGetFenceivNV, fence, pname, params);
-}
-void API_ENTRY(glFinishFenceNV)(GLuint fence) {
- CALL_GL_API(glFinishFenceNV, fence);
-}
-void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
- CALL_GL_API(glSetFenceNV, fence, condition);
-}
-void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
- CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
-}
-void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
- CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString);
-}
-void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) {
- CALL_GL_API(glEnableDriverControlQCOM, driverControl);
-}
-void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
- CALL_GL_API(glDisableDriverControlQCOM, driverControl);
-}
-void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) {
- CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures);
-}
-void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
- CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers);
-}
-void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
- CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers);
-}
-void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
- CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers);
-}
-void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
- CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params);
-}
-void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) {
- CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param);
-}
-void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
- CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
-}
-void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) {
- CALL_GL_API(glExtGetBufferPointervQCOM, target, params);
-}
-void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
- CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders);
-}
-void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
- CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms);
-}
-GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) {
- CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program);
-}
-void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
- CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length);
-}
-void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
- CALL_GL_API(glStartTilingQCOM, x, y, width, height, preserveMask);
-}
-void API_ENTRY(glEndTilingQCOM)(GLbitfield preserveMask) {
- CALL_GL_API(glEndTilingQCOM, preserveMask);
-}
diff --git a/opengl/libs/GLES_trace/.gitignore b/opengl/libs/GLES_trace/.gitignore
deleted file mode 100644
index 8df825e..0000000
--- a/opengl/libs/GLES_trace/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-java
-*.pyc
-*.swp
-pyratemp.py
diff --git a/opengl/libs/GLES_trace/Android.mk b/opengl/libs/GLES_trace/Android.mk
deleted file mode 100644
index 465b6b2..0000000
--- a/opengl/libs/GLES_trace/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- 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) \
- $(LOCAL_PATH)/../ \
- external/stlport/stlport \
- external/protobuf/src \
- external \
- bionic
-
-LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI
-LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-2.3.0-lite liblzf
-LOCAL_SHARED_LIBRARIES := libcutils libutils libstlport
-
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
-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
-# behavior from the bionic Android.mk file
-ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-LOCAL_C_INCLUDES += bionic/libc/private
-
-LOCAL_MODULE:= libGLES_trace
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/libs/GLES_trace/DESIGN.txt b/opengl/libs/GLES_trace/DESIGN.txt
deleted file mode 100644
index a189e1d..0000000
--- a/opengl/libs/GLES_trace/DESIGN.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-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.
diff --git a/opengl/libs/GLES_trace/dev.make b/opengl/libs/GLES_trace/dev.make
deleted file mode 100644
index a46260c..0000000
--- a/opengl/libs/GLES_trace/dev.make
+++ /dev/null
@@ -1,14 +0,0 @@
-## 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
-
-sync:
- adb root
- adb remount
- adb shell stop
- adb sync
- adb shell start
diff --git a/opengl/libs/GLES_trace/gltrace.proto b/opengl/libs/GLES_trace/gltrace.proto
deleted file mode 100644
index bbf3554..0000000
--- a/opengl/libs/GLES_trace/gltrace.proto
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * 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;
-
- glActiveShaderProgramEXT = 502;
- glAlphaFuncQCOM = 503;
- glBeginQueryEXT = 504;
- glBindProgramPipelineEXT = 505;
- glBlitFramebufferANGLE = 506;
- glCreateShaderProgramvEXT = 507;
- glDeleteProgramPipelinesEXT = 508;
- glDeleteQueriesEXT = 509;
- glDrawBuffersNV = 510;
- glEndQueryEXT = 511;
- glFramebufferTexture2DMultisampleEXT = 512;
- glGenProgramPipelinesEXT = 513;
- glGenQueriesEXT = 514;
- glGetGraphicsResetStatusEXT = 515;
- glGetObjectLabelEXT = 516;
- glGetProgramPipelineInfoLogEXT = 517;
- glGetProgramPipelineivEXT = 518;
- glGetQueryObjectuivEXT = 519;
- glGetQueryivEXT = 520;
- glGetnUniformfvEXT = 521;
- glGetnUniformivEXT = 521;
- glInsertEventMarkerEXT = 522;
- glIsProgramPipelineEXT = 523;
- glIsQueryEXT = 524;
- glLabelObjectEXT = 525;
- glPopGroupMarkerEXT = 526;
- glProgramParameteriEXT = 527;
- glProgramUniform1fEXT = 528;
- glProgramUniform1fvEXT = 529;
- glProgramUniform1iEXT = 530;
- glProgramUniform1ivEXT = 531;
- glProgramUniform2fEXT = 532;
- glProgramUniform2fvEXT = 533;
- glProgramUniform2iEXT = 534;
- glProgramUniform2ivEXT = 535;
- glProgramUniform3fEXT = 536;
- glProgramUniform3fvEXT = 537;
- glProgramUniform3iEXT = 538;
- glProgramUniform3ivEXT = 539;
- glProgramUniform4fEXT = 540;
- glProgramUniform4fvEXT = 541;
- glProgramUniform4iEXT = 542;
- glProgramUniform4ivEXT = 543;
- glProgramUniformMatrix2fvEXT = 544;
- glProgramUniformMatrix3fvEXT = 545;
- glProgramUniformMatrix4fvEXT = 546;
- glPushGroupMarkerEXT = 547;
- glReadBufferNV = 548;
- glReadnPixelsEXT = 549;
- glRenderbufferStorageMultisampleANGLE = 550;
- glRenderbufferStorageMultisampleAPPLE = 551;
- glRenderbufferStorageMultisampleEXT = 552;
- glResolveMultisampleFramebufferAPPLE = 553;
- glTexStorage1DEXT = 554;
- glTexStorage2DEXT = 555;
- glTexStorage3DEXT = 556;
- glTextureStorage1DEXT = 557;
- glTextureStorage2DEXT = 558;
- glTextureStorage3DEXT = 559;
- glUseProgramStagesEXT = 560;
- glValidateProgramPipelineEXT = 561;
-
- 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;
- glVertexAttribPointerData = 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;
- }
-
- message FrameBuffer {
- required int32 width = 1;
- required int32 height = 2;
- repeated bytes contents = 3;
- }
-
- required int32 context_id = 1; // GL context ID
- required int64 start_time = 2; // time when call was invoked
- required int32 duration = 3; // duration of the call (MONOTONIC TIME)
-
- required Function function = 4 [default = invalid]; // GL function called
- repeated DataType args = 5; // GL function's arguments
- optional DataType returnValue = 6; // GL function's return value
-
- optional FrameBuffer fb = 7; // contents of the framebuffer
-
- optional int32 threadtime = 8; // duration of the call (THREAD TIME)
-};
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.cpp b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
deleted file mode 100644
index d587c49..0000000
--- a/opengl/libs/GLES_trace/src/gltrace.pb.cpp
+++ /dev/null
@@ -1,2081 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-
-#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
-#include "gltrace.pb.h"
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-// @@protoc_insertion_point(includes)
-
-namespace android {
-namespace gltrace {
-
-void protobuf_ShutdownFile_gltrace_2eproto() {
- delete GLMessage::default_instance_;
- delete GLMessage_DataType::default_instance_;
- delete GLMessage_FrameBuffer::default_instance_;
-}
-
-void protobuf_AddDesc_gltrace_2eproto() {
- static bool already_here = false;
- if (already_here) return;
- already_here = true;
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- GLMessage::default_instance_ = new GLMessage();
- GLMessage_DataType::default_instance_ = new GLMessage_DataType();
- GLMessage_FrameBuffer::default_instance_ = new GLMessage_FrameBuffer();
- GLMessage::default_instance_->InitAsDefaultInstance();
- GLMessage_DataType::default_instance_->InitAsDefaultInstance();
- GLMessage_FrameBuffer::default_instance_->InitAsDefaultInstance();
- ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_gltrace_2eproto);
-}
-
-// Force AddDescriptors() to be called at static initialization time.
-struct StaticDescriptorInitializer_gltrace_2eproto {
- StaticDescriptorInitializer_gltrace_2eproto() {
- protobuf_AddDesc_gltrace_2eproto();
- }
-} static_descriptor_initializer_gltrace_2eproto_;
-
-
-// ===================================================================
-
-bool GLMessage_Function_IsValid(int value) {
- switch(value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- case 25:
- case 26:
- case 27:
- case 28:
- case 29:
- case 30:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case 37:
- case 38:
- case 39:
- case 40:
- case 41:
- case 42:
- case 43:
- case 44:
- case 45:
- case 46:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- case 58:
- case 59:
- case 60:
- case 61:
- case 62:
- case 63:
- case 64:
- case 65:
- case 66:
- case 67:
- case 68:
- case 69:
- case 70:
- case 71:
- case 72:
- case 73:
- case 74:
- case 75:
- case 76:
- case 77:
- case 78:
- case 79:
- case 80:
- case 81:
- case 82:
- case 83:
- case 84:
- case 85:
- case 86:
- case 87:
- case 88:
- case 89:
- case 90:
- case 91:
- case 92:
- case 93:
- case 94:
- case 95:
- case 96:
- case 97:
- case 98:
- case 99:
- case 100:
- case 101:
- case 102:
- case 103:
- case 104:
- case 105:
- case 106:
- case 107:
- case 108:
- case 109:
- case 110:
- case 111:
- case 112:
- case 113:
- case 114:
- case 115:
- case 116:
- case 117:
- case 118:
- case 119:
- case 120:
- case 121:
- case 122:
- case 123:
- case 124:
- case 125:
- case 126:
- case 127:
- case 128:
- case 129:
- case 130:
- case 131:
- case 132:
- case 133:
- case 134:
- case 135:
- case 136:
- case 137:
- case 138:
- case 139:
- case 140:
- case 141:
- case 142:
- case 143:
- case 144:
- case 145:
- case 146:
- case 147:
- case 148:
- case 149:
- case 150:
- case 151:
- case 152:
- case 153:
- case 154:
- case 155:
- case 156:
- case 157:
- case 158:
- case 159:
- case 160:
- case 161:
- case 162:
- case 163:
- case 164:
- case 165:
- case 166:
- case 167:
- case 168:
- case 169:
- case 170:
- case 171:
- case 172:
- case 173:
- case 174:
- case 175:
- case 176:
- case 177:
- case 178:
- case 179:
- case 180:
- case 181:
- case 182:
- case 183:
- case 184:
- case 185:
- case 186:
- case 187:
- case 188:
- case 189:
- case 190:
- case 191:
- case 192:
- case 193:
- case 194:
- case 195:
- case 196:
- case 197:
- case 198:
- case 199:
- case 200:
- case 201:
- case 202:
- case 203:
- case 204:
- case 205:
- case 206:
- case 207:
- case 208:
- case 209:
- case 210:
- case 211:
- case 212:
- case 213:
- case 214:
- case 215:
- case 216:
- case 217:
- case 218:
- case 219:
- case 220:
- case 221:
- case 222:
- case 223:
- case 224:
- case 225:
- case 226:
- case 227:
- case 228:
- case 229:
- case 230:
- case 231:
- case 232:
- case 233:
- case 234:
- case 235:
- case 236:
- case 237:
- case 238:
- case 239:
- case 240:
- case 241:
- case 242:
- case 243:
- case 244:
- case 245:
- case 246:
- case 247:
- case 248:
- case 249:
- case 250:
- case 251:
- case 252:
- case 253:
- case 254:
- case 255:
- case 256:
- case 257:
- case 258:
- case 259:
- case 260:
- case 261:
- case 262:
- case 263:
- case 264:
- case 265:
- case 266:
- case 267:
- case 268:
- case 269:
- case 270:
- case 271:
- case 272:
- case 273:
- case 274:
- case 275:
- case 276:
- case 277:
- case 278:
- case 279:
- case 280:
- case 281:
- case 282:
- case 283:
- case 284:
- case 285:
- case 286:
- case 287:
- case 288:
- case 289:
- case 290:
- case 291:
- case 292:
- case 293:
- case 294:
- case 295:
- case 296:
- case 297:
- case 298:
- case 299:
- case 300:
- case 301:
- case 302:
- case 303:
- case 304:
- case 305:
- case 306:
- case 307:
- case 308:
- case 309:
- case 310:
- case 311:
- case 312:
- case 313:
- case 314:
- case 315:
- case 316:
- case 317:
- case 318:
- case 319:
- case 320:
- case 321:
- case 322:
- case 323:
- case 324:
- case 325:
- case 326:
- case 327:
- case 328:
- case 329:
- case 330:
- case 331:
- case 332:
- case 333:
- case 334:
- case 335:
- case 336:
- case 337:
- case 338:
- case 339:
- case 340:
- case 341:
- case 342:
- case 343:
- case 344:
- case 345:
- case 346:
- case 347:
- case 348:
- case 349:
- case 350:
- case 351:
- case 352:
- case 353:
- case 354:
- case 355:
- case 356:
- case 357:
- case 358:
- case 359:
- case 360:
- case 361:
- case 362:
- case 363:
- case 364:
- case 365:
- case 366:
- case 367:
- case 368:
- case 369:
- case 370:
- case 371:
- case 372:
- case 373:
- case 374:
- case 375:
- case 502:
- case 503:
- case 504:
- case 505:
- case 506:
- case 507:
- case 508:
- case 509:
- case 510:
- case 511:
- case 512:
- case 513:
- case 514:
- case 515:
- case 516:
- case 517:
- case 518:
- case 519:
- case 520:
- case 521:
- case 522:
- case 523:
- case 524:
- case 525:
- case 526:
- case 527:
- case 528:
- case 529:
- case 530:
- case 531:
- case 532:
- case 533:
- case 534:
- case 535:
- case 536:
- case 537:
- case 538:
- case 539:
- case 540:
- case 541:
- case 542:
- case 543:
- case 544:
- case 545:
- case 546:
- case 547:
- case 548:
- case 549:
- case 550:
- case 551:
- case 552:
- case 553:
- case 554:
- case 555:
- case 556:
- case 557:
- case 558:
- case 559:
- case 560:
- case 561:
- case 2000:
- case 2001:
- case 2002:
- case 2003:
- case 2004:
- case 2005:
- case 2006:
- case 2007:
- case 2008:
- case 2009:
- case 2010:
- case 2011:
- case 2012:
- case 2013:
- case 2014:
- case 2015:
- case 2016:
- case 2017:
- case 2018:
- case 2019:
- case 2020:
- case 2021:
- case 2022:
- case 2023:
- case 2024:
- case 2025:
- case 2026:
- case 2027:
- case 2028:
- case 2029:
- case 2030:
- case 2031:
- case 2032:
- case 2033:
- case 2034:
- case 2035:
- case 2036:
- case 2037:
- case 2038:
- case 2039:
- case 2040:
- case 2041:
- case 2042:
- case 2043:
- case 2044:
- case 2045:
- case 3000:
- case 3001:
- return true;
- default:
- return false;
- }
-}
-
-#ifndef _MSC_VER
-const GLMessage_Function GLMessage::glActiveTexture;
-const GLMessage_Function GLMessage::glAlphaFunc;
-const GLMessage_Function GLMessage::glAlphaFuncx;
-const GLMessage_Function GLMessage::glAlphaFuncxOES;
-const GLMessage_Function GLMessage::glAttachShader;
-const GLMessage_Function GLMessage::glBeginPerfMonitorAMD;
-const GLMessage_Function GLMessage::glBindAttribLocation;
-const GLMessage_Function GLMessage::glBindBuffer;
-const GLMessage_Function GLMessage::glBindFramebuffer;
-const GLMessage_Function GLMessage::glBindFramebufferOES;
-const GLMessage_Function GLMessage::glBindRenderbuffer;
-const GLMessage_Function GLMessage::glBindRenderbufferOES;
-const GLMessage_Function GLMessage::glBindTexture;
-const GLMessage_Function GLMessage::glBindVertexArrayOES;
-const GLMessage_Function GLMessage::glBlendColor;
-const GLMessage_Function GLMessage::glBlendEquation;
-const GLMessage_Function GLMessage::glBlendEquationOES;
-const GLMessage_Function GLMessage::glBlendEquationSeparate;
-const GLMessage_Function GLMessage::glBlendEquationSeparateOES;
-const GLMessage_Function GLMessage::glBlendFunc;
-const GLMessage_Function GLMessage::glBlendFuncSeparate;
-const GLMessage_Function GLMessage::glBlendFuncSeparateOES;
-const GLMessage_Function GLMessage::glBufferData;
-const GLMessage_Function GLMessage::glBufferSubData;
-const GLMessage_Function GLMessage::glCheckFramebufferStatus;
-const GLMessage_Function GLMessage::glCheckFramebufferStatusOES;
-const GLMessage_Function GLMessage::glClearColor;
-const GLMessage_Function GLMessage::glClearColorx;
-const GLMessage_Function GLMessage::glClearColorxOES;
-const GLMessage_Function GLMessage::glClearDepthf;
-const GLMessage_Function GLMessage::glClearDepthfOES;
-const GLMessage_Function GLMessage::glClearDepthx;
-const GLMessage_Function GLMessage::glClearDepthxOES;
-const GLMessage_Function GLMessage::glClear;
-const GLMessage_Function GLMessage::glClearStencil;
-const GLMessage_Function GLMessage::glClientActiveTexture;
-const GLMessage_Function GLMessage::glClipPlanef;
-const GLMessage_Function GLMessage::glClipPlanefIMG;
-const GLMessage_Function GLMessage::glClipPlanefOES;
-const GLMessage_Function GLMessage::glClipPlanex;
-const GLMessage_Function GLMessage::glClipPlanexIMG;
-const GLMessage_Function GLMessage::glClipPlanexOES;
-const GLMessage_Function GLMessage::glColor4f;
-const GLMessage_Function GLMessage::glColor4ub;
-const GLMessage_Function GLMessage::glColor4x;
-const GLMessage_Function GLMessage::glColor4xOES;
-const GLMessage_Function GLMessage::glColorMask;
-const GLMessage_Function GLMessage::glColorPointer;
-const GLMessage_Function GLMessage::glCompileShader;
-const GLMessage_Function GLMessage::glCompressedTexImage2D;
-const GLMessage_Function GLMessage::glCompressedTexImage3DOES;
-const GLMessage_Function GLMessage::glCompressedTexSubImage2D;
-const GLMessage_Function GLMessage::glCompressedTexSubImage3DOES;
-const GLMessage_Function GLMessage::glCopyTexImage2D;
-const GLMessage_Function GLMessage::glCopyTexSubImage2D;
-const GLMessage_Function GLMessage::glCopyTexSubImage3DOES;
-const GLMessage_Function GLMessage::glCoverageMaskNV;
-const GLMessage_Function GLMessage::glCoverageOperationNV;
-const GLMessage_Function GLMessage::glCreateProgram;
-const GLMessage_Function GLMessage::glCreateShader;
-const GLMessage_Function GLMessage::glCullFace;
-const GLMessage_Function GLMessage::glCurrentPaletteMatrixOES;
-const GLMessage_Function GLMessage::glDeleteBuffers;
-const GLMessage_Function GLMessage::glDeleteFencesNV;
-const GLMessage_Function GLMessage::glDeleteFramebuffers;
-const GLMessage_Function GLMessage::glDeleteFramebuffersOES;
-const GLMessage_Function GLMessage::glDeletePerfMonitorsAMD;
-const GLMessage_Function GLMessage::glDeleteProgram;
-const GLMessage_Function GLMessage::glDeleteRenderbuffers;
-const GLMessage_Function GLMessage::glDeleteRenderbuffersOES;
-const GLMessage_Function GLMessage::glDeleteShader;
-const GLMessage_Function GLMessage::glDeleteTextures;
-const GLMessage_Function GLMessage::glDeleteVertexArraysOES;
-const GLMessage_Function GLMessage::glDepthFunc;
-const GLMessage_Function GLMessage::glDepthMask;
-const GLMessage_Function GLMessage::glDepthRangef;
-const GLMessage_Function GLMessage::glDepthRangefOES;
-const GLMessage_Function GLMessage::glDepthRangex;
-const GLMessage_Function GLMessage::glDepthRangexOES;
-const GLMessage_Function GLMessage::glDetachShader;
-const GLMessage_Function GLMessage::glDisableClientState;
-const GLMessage_Function GLMessage::glDisableDriverControlQCOM;
-const GLMessage_Function GLMessage::glDisable;
-const GLMessage_Function GLMessage::glDisableVertexAttribArray;
-const GLMessage_Function GLMessage::glDiscardFramebufferEXT;
-const GLMessage_Function GLMessage::glDrawArrays;
-const GLMessage_Function GLMessage::glDrawElements;
-const GLMessage_Function GLMessage::glDrawTexfOES;
-const GLMessage_Function GLMessage::glDrawTexfvOES;
-const GLMessage_Function GLMessage::glDrawTexiOES;
-const GLMessage_Function GLMessage::glDrawTexivOES;
-const GLMessage_Function GLMessage::glDrawTexsOES;
-const GLMessage_Function GLMessage::glDrawTexsvOES;
-const GLMessage_Function GLMessage::glDrawTexxOES;
-const GLMessage_Function GLMessage::glDrawTexxvOES;
-const GLMessage_Function GLMessage::glEGLImageTargetRenderbufferStorageOES;
-const GLMessage_Function GLMessage::glEGLImageTargetTexture2DOES;
-const GLMessage_Function GLMessage::glEnableClientState;
-const GLMessage_Function GLMessage::glEnableDriverControlQCOM;
-const GLMessage_Function GLMessage::glEnable;
-const GLMessage_Function GLMessage::glEnableVertexAttribArray;
-const GLMessage_Function GLMessage::glEndPerfMonitorAMD;
-const GLMessage_Function GLMessage::glEndTilingQCOM;
-const GLMessage_Function GLMessage::glExtGetBufferPointervQCOM;
-const GLMessage_Function GLMessage::glExtGetBuffersQCOM;
-const GLMessage_Function GLMessage::glExtGetFramebuffersQCOM;
-const GLMessage_Function GLMessage::glExtGetProgramBinarySourceQCOM;
-const GLMessage_Function GLMessage::glExtGetProgramsQCOM;
-const GLMessage_Function GLMessage::glExtGetRenderbuffersQCOM;
-const GLMessage_Function GLMessage::glExtGetShadersQCOM;
-const GLMessage_Function GLMessage::glExtGetTexLevelParameterivQCOM;
-const GLMessage_Function GLMessage::glExtGetTexSubImageQCOM;
-const GLMessage_Function GLMessage::glExtGetTexturesQCOM;
-const GLMessage_Function GLMessage::glExtIsProgramBinaryQCOM;
-const GLMessage_Function GLMessage::glExtTexObjectStateOverrideiQCOM;
-const GLMessage_Function GLMessage::glFinishFenceNV;
-const GLMessage_Function GLMessage::glFinish;
-const GLMessage_Function GLMessage::glFlush;
-const GLMessage_Function GLMessage::glFogf;
-const GLMessage_Function GLMessage::glFogfv;
-const GLMessage_Function GLMessage::glFogx;
-const GLMessage_Function GLMessage::glFogxOES;
-const GLMessage_Function GLMessage::glFogxv;
-const GLMessage_Function GLMessage::glFogxvOES;
-const GLMessage_Function GLMessage::glFramebufferRenderbuffer;
-const GLMessage_Function GLMessage::glFramebufferRenderbufferOES;
-const GLMessage_Function GLMessage::glFramebufferTexture2D;
-const GLMessage_Function GLMessage::glFramebufferTexture2DMultisampleIMG;
-const GLMessage_Function GLMessage::glFramebufferTexture2DOES;
-const GLMessage_Function GLMessage::glFramebufferTexture3DOES;
-const GLMessage_Function GLMessage::glFrontFace;
-const GLMessage_Function GLMessage::glFrustumf;
-const GLMessage_Function GLMessage::glFrustumfOES;
-const GLMessage_Function GLMessage::glFrustumx;
-const GLMessage_Function GLMessage::glFrustumxOES;
-const GLMessage_Function GLMessage::glGenBuffers;
-const GLMessage_Function GLMessage::glGenerateMipmap;
-const GLMessage_Function GLMessage::glGenerateMipmapOES;
-const GLMessage_Function GLMessage::glGenFencesNV;
-const GLMessage_Function GLMessage::glGenFramebuffers;
-const GLMessage_Function GLMessage::glGenFramebuffersOES;
-const GLMessage_Function GLMessage::glGenPerfMonitorsAMD;
-const GLMessage_Function GLMessage::glGenRenderbuffers;
-const GLMessage_Function GLMessage::glGenRenderbuffersOES;
-const GLMessage_Function GLMessage::glGenTextures;
-const GLMessage_Function GLMessage::glGenVertexArraysOES;
-const GLMessage_Function GLMessage::glGetActiveAttrib;
-const GLMessage_Function GLMessage::glGetActiveUniform;
-const GLMessage_Function GLMessage::glGetAttachedShaders;
-const GLMessage_Function GLMessage::glGetAttribLocation;
-const GLMessage_Function GLMessage::glGetBooleanv;
-const GLMessage_Function GLMessage::glGetBufferParameteriv;
-const GLMessage_Function GLMessage::glGetBufferPointervOES;
-const GLMessage_Function GLMessage::glGetClipPlanef;
-const GLMessage_Function GLMessage::glGetClipPlanefOES;
-const GLMessage_Function GLMessage::glGetClipPlanex;
-const GLMessage_Function GLMessage::glGetClipPlanexOES;
-const GLMessage_Function GLMessage::glGetDriverControlsQCOM;
-const GLMessage_Function GLMessage::glGetDriverControlStringQCOM;
-const GLMessage_Function GLMessage::glGetError;
-const GLMessage_Function GLMessage::glGetFenceivNV;
-const GLMessage_Function GLMessage::glGetFixedv;
-const GLMessage_Function GLMessage::glGetFixedvOES;
-const GLMessage_Function GLMessage::glGetFloatv;
-const GLMessage_Function GLMessage::glGetFramebufferAttachmentParameteriv;
-const GLMessage_Function GLMessage::glGetFramebufferAttachmentParameterivOES;
-const GLMessage_Function GLMessage::glGetIntegerv;
-const GLMessage_Function GLMessage::glGetLightfv;
-const GLMessage_Function GLMessage::glGetLightxv;
-const GLMessage_Function GLMessage::glGetLightxvOES;
-const GLMessage_Function GLMessage::glGetMaterialfv;
-const GLMessage_Function GLMessage::glGetMaterialxv;
-const GLMessage_Function GLMessage::glGetMaterialxvOES;
-const GLMessage_Function GLMessage::glGetPerfMonitorCounterDataAMD;
-const GLMessage_Function GLMessage::glGetPerfMonitorCounterInfoAMD;
-const GLMessage_Function GLMessage::glGetPerfMonitorCountersAMD;
-const GLMessage_Function GLMessage::glGetPerfMonitorCounterStringAMD;
-const GLMessage_Function GLMessage::glGetPerfMonitorGroupsAMD;
-const GLMessage_Function GLMessage::glGetPerfMonitorGroupStringAMD;
-const GLMessage_Function GLMessage::glGetPointerv;
-const GLMessage_Function GLMessage::glGetProgramBinaryOES;
-const GLMessage_Function GLMessage::glGetProgramInfoLog;
-const GLMessage_Function GLMessage::glGetProgramiv;
-const GLMessage_Function GLMessage::glGetRenderbufferParameteriv;
-const GLMessage_Function GLMessage::glGetRenderbufferParameterivOES;
-const GLMessage_Function GLMessage::glGetShaderInfoLog;
-const GLMessage_Function GLMessage::glGetShaderiv;
-const GLMessage_Function GLMessage::glGetShaderPrecisionFormat;
-const GLMessage_Function GLMessage::glGetShaderSource;
-const GLMessage_Function GLMessage::glGetString;
-const GLMessage_Function GLMessage::glGetTexEnvfv;
-const GLMessage_Function GLMessage::glGetTexEnviv;
-const GLMessage_Function GLMessage::glGetTexEnvxv;
-const GLMessage_Function GLMessage::glGetTexEnvxvOES;
-const GLMessage_Function GLMessage::glGetTexGenfvOES;
-const GLMessage_Function GLMessage::glGetTexGenivOES;
-const GLMessage_Function GLMessage::glGetTexGenxvOES;
-const GLMessage_Function GLMessage::glGetTexParameterfv;
-const GLMessage_Function GLMessage::glGetTexParameteriv;
-const GLMessage_Function GLMessage::glGetTexParameterxv;
-const GLMessage_Function GLMessage::glGetTexParameterxvOES;
-const GLMessage_Function GLMessage::glGetUniformfv;
-const GLMessage_Function GLMessage::glGetUniformiv;
-const GLMessage_Function GLMessage::glGetUniformLocation;
-const GLMessage_Function GLMessage::glGetVertexAttribfv;
-const GLMessage_Function GLMessage::glGetVertexAttribiv;
-const GLMessage_Function GLMessage::glGetVertexAttribPointerv;
-const GLMessage_Function GLMessage::glHint;
-const GLMessage_Function GLMessage::glIsBuffer;
-const GLMessage_Function GLMessage::glIsEnabled;
-const GLMessage_Function GLMessage::glIsFenceNV;
-const GLMessage_Function GLMessage::glIsFramebuffer;
-const GLMessage_Function GLMessage::glIsFramebufferOES;
-const GLMessage_Function GLMessage::glIsProgram;
-const GLMessage_Function GLMessage::glIsRenderbuffer;
-const GLMessage_Function GLMessage::glIsRenderbufferOES;
-const GLMessage_Function GLMessage::glIsShader;
-const GLMessage_Function GLMessage::glIsTexture;
-const GLMessage_Function GLMessage::glIsVertexArrayOES;
-const GLMessage_Function GLMessage::glLightf;
-const GLMessage_Function GLMessage::glLightfv;
-const GLMessage_Function GLMessage::glLightModelf;
-const GLMessage_Function GLMessage::glLightModelfv;
-const GLMessage_Function GLMessage::glLightModelx;
-const GLMessage_Function GLMessage::glLightModelxOES;
-const GLMessage_Function GLMessage::glLightModelxv;
-const GLMessage_Function GLMessage::glLightModelxvOES;
-const GLMessage_Function GLMessage::glLightx;
-const GLMessage_Function GLMessage::glLightxOES;
-const GLMessage_Function GLMessage::glLightxv;
-const GLMessage_Function GLMessage::glLightxvOES;
-const GLMessage_Function GLMessage::glLineWidth;
-const GLMessage_Function GLMessage::glLineWidthx;
-const GLMessage_Function GLMessage::glLineWidthxOES;
-const GLMessage_Function GLMessage::glLinkProgram;
-const GLMessage_Function GLMessage::glLoadIdentity;
-const GLMessage_Function GLMessage::glLoadMatrixf;
-const GLMessage_Function GLMessage::glLoadMatrixx;
-const GLMessage_Function GLMessage::glLoadMatrixxOES;
-const GLMessage_Function GLMessage::glLoadPaletteFromModelViewMatrixOES;
-const GLMessage_Function GLMessage::glLogicOp;
-const GLMessage_Function GLMessage::glMapBufferOES;
-const GLMessage_Function GLMessage::glMaterialf;
-const GLMessage_Function GLMessage::glMaterialfv;
-const GLMessage_Function GLMessage::glMaterialx;
-const GLMessage_Function GLMessage::glMaterialxOES;
-const GLMessage_Function GLMessage::glMaterialxv;
-const GLMessage_Function GLMessage::glMaterialxvOES;
-const GLMessage_Function GLMessage::glMatrixIndexPointerOES;
-const GLMessage_Function GLMessage::glMatrixMode;
-const GLMessage_Function GLMessage::glMultiDrawArraysEXT;
-const GLMessage_Function GLMessage::glMultiDrawElementsEXT;
-const GLMessage_Function GLMessage::glMultiTexCoord4f;
-const GLMessage_Function GLMessage::glMultiTexCoord4x;
-const GLMessage_Function GLMessage::glMultiTexCoord4xOES;
-const GLMessage_Function GLMessage::glMultMatrixf;
-const GLMessage_Function GLMessage::glMultMatrixx;
-const GLMessage_Function GLMessage::glMultMatrixxOES;
-const GLMessage_Function GLMessage::glNormal3f;
-const GLMessage_Function GLMessage::glNormal3x;
-const GLMessage_Function GLMessage::glNormal3xOES;
-const GLMessage_Function GLMessage::glNormalPointer;
-const GLMessage_Function GLMessage::glOrthof;
-const GLMessage_Function GLMessage::glOrthofOES;
-const GLMessage_Function GLMessage::glOrthox;
-const GLMessage_Function GLMessage::glOrthoxOES;
-const GLMessage_Function GLMessage::glPixelStorei;
-const GLMessage_Function GLMessage::glPointParameterf;
-const GLMessage_Function GLMessage::glPointParameterfv;
-const GLMessage_Function GLMessage::glPointParameterx;
-const GLMessage_Function GLMessage::glPointParameterxOES;
-const GLMessage_Function GLMessage::glPointParameterxv;
-const GLMessage_Function GLMessage::glPointParameterxvOES;
-const GLMessage_Function GLMessage::glPointSize;
-const GLMessage_Function GLMessage::glPointSizePointerOES;
-const GLMessage_Function GLMessage::glPointSizex;
-const GLMessage_Function GLMessage::glPointSizexOES;
-const GLMessage_Function GLMessage::glPolygonOffset;
-const GLMessage_Function GLMessage::glPolygonOffsetx;
-const GLMessage_Function GLMessage::glPolygonOffsetxOES;
-const GLMessage_Function GLMessage::glPopMatrix;
-const GLMessage_Function GLMessage::glProgramBinaryOES;
-const GLMessage_Function GLMessage::glPushMatrix;
-const GLMessage_Function GLMessage::glQueryMatrixxOES;
-const GLMessage_Function GLMessage::glReadPixels;
-const GLMessage_Function GLMessage::glReleaseShaderCompiler;
-const GLMessage_Function GLMessage::glRenderbufferStorage;
-const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleIMG;
-const GLMessage_Function GLMessage::glRenderbufferStorageOES;
-const GLMessage_Function GLMessage::glRotatef;
-const GLMessage_Function GLMessage::glRotatex;
-const GLMessage_Function GLMessage::glRotatexOES;
-const GLMessage_Function GLMessage::glSampleCoverage;
-const GLMessage_Function GLMessage::glSampleCoveragex;
-const GLMessage_Function GLMessage::glSampleCoveragexOES;
-const GLMessage_Function GLMessage::glScalef;
-const GLMessage_Function GLMessage::glScalex;
-const GLMessage_Function GLMessage::glScalexOES;
-const GLMessage_Function GLMessage::glScissor;
-const GLMessage_Function GLMessage::glSelectPerfMonitorCountersAMD;
-const GLMessage_Function GLMessage::glSetFenceNV;
-const GLMessage_Function GLMessage::glShadeModel;
-const GLMessage_Function GLMessage::glShaderBinary;
-const GLMessage_Function GLMessage::glShaderSource;
-const GLMessage_Function GLMessage::glStartTilingQCOM;
-const GLMessage_Function GLMessage::glStencilFunc;
-const GLMessage_Function GLMessage::glStencilFuncSeparate;
-const GLMessage_Function GLMessage::glStencilMask;
-const GLMessage_Function GLMessage::glStencilMaskSeparate;
-const GLMessage_Function GLMessage::glStencilOp;
-const GLMessage_Function GLMessage::glStencilOpSeparate;
-const GLMessage_Function GLMessage::glTestFenceNV;
-const GLMessage_Function GLMessage::glTexCoordPointer;
-const GLMessage_Function GLMessage::glTexEnvf;
-const GLMessage_Function GLMessage::glTexEnvfv;
-const GLMessage_Function GLMessage::glTexEnvi;
-const GLMessage_Function GLMessage::glTexEnviv;
-const GLMessage_Function GLMessage::glTexEnvx;
-const GLMessage_Function GLMessage::glTexEnvxOES;
-const GLMessage_Function GLMessage::glTexEnvxv;
-const GLMessage_Function GLMessage::glTexEnvxvOES;
-const GLMessage_Function GLMessage::glTexGenfOES;
-const GLMessage_Function GLMessage::glTexGenfvOES;
-const GLMessage_Function GLMessage::glTexGeniOES;
-const GLMessage_Function GLMessage::glTexGenivOES;
-const GLMessage_Function GLMessage::glTexGenxOES;
-const GLMessage_Function GLMessage::glTexGenxvOES;
-const GLMessage_Function GLMessage::glTexImage2D;
-const GLMessage_Function GLMessage::glTexImage3DOES;
-const GLMessage_Function GLMessage::glTexParameterf;
-const GLMessage_Function GLMessage::glTexParameterfv;
-const GLMessage_Function GLMessage::glTexParameteri;
-const GLMessage_Function GLMessage::glTexParameteriv;
-const GLMessage_Function GLMessage::glTexParameterx;
-const GLMessage_Function GLMessage::glTexParameterxOES;
-const GLMessage_Function GLMessage::glTexParameterxv;
-const GLMessage_Function GLMessage::glTexParameterxvOES;
-const GLMessage_Function GLMessage::glTexSubImage2D;
-const GLMessage_Function GLMessage::glTexSubImage3DOES;
-const GLMessage_Function GLMessage::glTranslatef;
-const GLMessage_Function GLMessage::glTranslatex;
-const GLMessage_Function GLMessage::glTranslatexOES;
-const GLMessage_Function GLMessage::glUniform1f;
-const GLMessage_Function GLMessage::glUniform1fv;
-const GLMessage_Function GLMessage::glUniform1i;
-const GLMessage_Function GLMessage::glUniform1iv;
-const GLMessage_Function GLMessage::glUniform2f;
-const GLMessage_Function GLMessage::glUniform2fv;
-const GLMessage_Function GLMessage::glUniform2i;
-const GLMessage_Function GLMessage::glUniform2iv;
-const GLMessage_Function GLMessage::glUniform3f;
-const GLMessage_Function GLMessage::glUniform3fv;
-const GLMessage_Function GLMessage::glUniform3i;
-const GLMessage_Function GLMessage::glUniform3iv;
-const GLMessage_Function GLMessage::glUniform4f;
-const GLMessage_Function GLMessage::glUniform4fv;
-const GLMessage_Function GLMessage::glUniform4i;
-const GLMessage_Function GLMessage::glUniform4iv;
-const GLMessage_Function GLMessage::glUniformMatrix2fv;
-const GLMessage_Function GLMessage::glUniformMatrix3fv;
-const GLMessage_Function GLMessage::glUniformMatrix4fv;
-const GLMessage_Function GLMessage::glUnmapBufferOES;
-const GLMessage_Function GLMessage::glUseProgram;
-const GLMessage_Function GLMessage::glValidateProgram;
-const GLMessage_Function GLMessage::glVertexAttrib1f;
-const GLMessage_Function GLMessage::glVertexAttrib1fv;
-const GLMessage_Function GLMessage::glVertexAttrib2f;
-const GLMessage_Function GLMessage::glVertexAttrib2fv;
-const GLMessage_Function GLMessage::glVertexAttrib3f;
-const GLMessage_Function GLMessage::glVertexAttrib3fv;
-const GLMessage_Function GLMessage::glVertexAttrib4f;
-const GLMessage_Function GLMessage::glVertexAttrib4fv;
-const GLMessage_Function GLMessage::glVertexAttribPointer;
-const GLMessage_Function GLMessage::glVertexPointer;
-const GLMessage_Function GLMessage::glViewport;
-const GLMessage_Function GLMessage::glWeightPointerOES;
-const GLMessage_Function GLMessage::glActiveShaderProgramEXT;
-const GLMessage_Function GLMessage::glAlphaFuncQCOM;
-const GLMessage_Function GLMessage::glBeginQueryEXT;
-const GLMessage_Function GLMessage::glBindProgramPipelineEXT;
-const GLMessage_Function GLMessage::glBlitFramebufferANGLE;
-const GLMessage_Function GLMessage::glCreateShaderProgramvEXT;
-const GLMessage_Function GLMessage::glDeleteProgramPipelinesEXT;
-const GLMessage_Function GLMessage::glDeleteQueriesEXT;
-const GLMessage_Function GLMessage::glDrawBuffersNV;
-const GLMessage_Function GLMessage::glEndQueryEXT;
-const GLMessage_Function GLMessage::glFramebufferTexture2DMultisampleEXT;
-const GLMessage_Function GLMessage::glGenProgramPipelinesEXT;
-const GLMessage_Function GLMessage::glGenQueriesEXT;
-const GLMessage_Function GLMessage::glGetGraphicsResetStatusEXT;
-const GLMessage_Function GLMessage::glGetObjectLabelEXT;
-const GLMessage_Function GLMessage::glGetProgramPipelineInfoLogEXT;
-const GLMessage_Function GLMessage::glGetProgramPipelineivEXT;
-const GLMessage_Function GLMessage::glGetQueryObjectuivEXT;
-const GLMessage_Function GLMessage::glGetQueryivEXT;
-const GLMessage_Function GLMessage::glGetnUniformfvEXT;
-const GLMessage_Function GLMessage::glGetnUniformivEXT;
-const GLMessage_Function GLMessage::glInsertEventMarkerEXT;
-const GLMessage_Function GLMessage::glIsProgramPipelineEXT;
-const GLMessage_Function GLMessage::glIsQueryEXT;
-const GLMessage_Function GLMessage::glLabelObjectEXT;
-const GLMessage_Function GLMessage::glPopGroupMarkerEXT;
-const GLMessage_Function GLMessage::glProgramParameteriEXT;
-const GLMessage_Function GLMessage::glProgramUniform1fEXT;
-const GLMessage_Function GLMessage::glProgramUniform1fvEXT;
-const GLMessage_Function GLMessage::glProgramUniform1iEXT;
-const GLMessage_Function GLMessage::glProgramUniform1ivEXT;
-const GLMessage_Function GLMessage::glProgramUniform2fEXT;
-const GLMessage_Function GLMessage::glProgramUniform2fvEXT;
-const GLMessage_Function GLMessage::glProgramUniform2iEXT;
-const GLMessage_Function GLMessage::glProgramUniform2ivEXT;
-const GLMessage_Function GLMessage::glProgramUniform3fEXT;
-const GLMessage_Function GLMessage::glProgramUniform3fvEXT;
-const GLMessage_Function GLMessage::glProgramUniform3iEXT;
-const GLMessage_Function GLMessage::glProgramUniform3ivEXT;
-const GLMessage_Function GLMessage::glProgramUniform4fEXT;
-const GLMessage_Function GLMessage::glProgramUniform4fvEXT;
-const GLMessage_Function GLMessage::glProgramUniform4iEXT;
-const GLMessage_Function GLMessage::glProgramUniform4ivEXT;
-const GLMessage_Function GLMessage::glProgramUniformMatrix2fvEXT;
-const GLMessage_Function GLMessage::glProgramUniformMatrix3fvEXT;
-const GLMessage_Function GLMessage::glProgramUniformMatrix4fvEXT;
-const GLMessage_Function GLMessage::glPushGroupMarkerEXT;
-const GLMessage_Function GLMessage::glReadBufferNV;
-const GLMessage_Function GLMessage::glReadnPixelsEXT;
-const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleANGLE;
-const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleAPPLE;
-const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleEXT;
-const GLMessage_Function GLMessage::glResolveMultisampleFramebufferAPPLE;
-const GLMessage_Function GLMessage::glTexStorage1DEXT;
-const GLMessage_Function GLMessage::glTexStorage2DEXT;
-const GLMessage_Function GLMessage::glTexStorage3DEXT;
-const GLMessage_Function GLMessage::glTextureStorage1DEXT;
-const GLMessage_Function GLMessage::glTextureStorage2DEXT;
-const GLMessage_Function GLMessage::glTextureStorage3DEXT;
-const GLMessage_Function GLMessage::glUseProgramStagesEXT;
-const GLMessage_Function GLMessage::glValidateProgramPipelineEXT;
-const GLMessage_Function GLMessage::eglGetDisplay;
-const GLMessage_Function GLMessage::eglInitialize;
-const GLMessage_Function GLMessage::eglTerminate;
-const GLMessage_Function GLMessage::eglGetConfigs;
-const GLMessage_Function GLMessage::eglChooseConfig;
-const GLMessage_Function GLMessage::eglGetConfigAttrib;
-const GLMessage_Function GLMessage::eglCreateWindowSurface;
-const GLMessage_Function GLMessage::eglCreatePixmapSurface;
-const GLMessage_Function GLMessage::eglCreatePbufferSurface;
-const GLMessage_Function GLMessage::eglDestroySurface;
-const GLMessage_Function GLMessage::eglQuerySurface;
-const GLMessage_Function GLMessage::eglCreateContext;
-const GLMessage_Function GLMessage::eglDestroyContext;
-const GLMessage_Function GLMessage::eglMakeCurrent;
-const GLMessage_Function GLMessage::eglGetCurrentContext;
-const GLMessage_Function GLMessage::eglGetCurrentSurface;
-const GLMessage_Function GLMessage::eglGetCurrentDisplay;
-const GLMessage_Function GLMessage::eglQueryContext;
-const GLMessage_Function GLMessage::eglWaitGL;
-const GLMessage_Function GLMessage::eglWaitNative;
-const GLMessage_Function GLMessage::eglSwapBuffers;
-const GLMessage_Function GLMessage::eglCopyBuffers;
-const GLMessage_Function GLMessage::eglGetError;
-const GLMessage_Function GLMessage::eglQueryString;
-const GLMessage_Function GLMessage::eglGetProcAddress;
-const GLMessage_Function GLMessage::eglSurfaceAttrib;
-const GLMessage_Function GLMessage::eglBindTexImage;
-const GLMessage_Function GLMessage::eglReleaseTexImage;
-const GLMessage_Function GLMessage::eglSwapInterval;
-const GLMessage_Function GLMessage::eglBindAPI;
-const GLMessage_Function GLMessage::eglQueryAPI;
-const GLMessage_Function GLMessage::eglWaitClient;
-const GLMessage_Function GLMessage::eglReleaseThread;
-const GLMessage_Function GLMessage::eglCreatePbufferFromClientBuffer;
-const GLMessage_Function GLMessage::eglLockSurfaceKHR;
-const GLMessage_Function GLMessage::eglUnlockSurfaceKHR;
-const GLMessage_Function GLMessage::eglCreateImageKHR;
-const GLMessage_Function GLMessage::eglDestroyImageKHR;
-const GLMessage_Function GLMessage::eglCreateSyncKHR;
-const GLMessage_Function GLMessage::eglDestroySyncKHR;
-const GLMessage_Function GLMessage::eglClientWaitSyncKHR;
-const GLMessage_Function GLMessage::eglGetSyncAttribKHR;
-const GLMessage_Function GLMessage::eglSetSwapRectangleANDROID;
-const GLMessage_Function GLMessage::eglGetRenderBufferANDROID;
-const GLMessage_Function GLMessage::eglGetSystemTimeFrequencyNV;
-const GLMessage_Function GLMessage::eglGetSystemTimeNV;
-const GLMessage_Function GLMessage::invalid;
-const GLMessage_Function GLMessage::glVertexAttribPointerData;
-const GLMessage_Function GLMessage::Function_MIN;
-const GLMessage_Function GLMessage::Function_MAX;
-const int GLMessage::Function_ARRAYSIZE;
-#endif // _MSC_VER
-bool GLMessage_DataType_Type_IsValid(int value) {
- switch(value) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- return true;
- default:
- return false;
- }
-}
-
-#ifndef _MSC_VER
-const GLMessage_DataType_Type GLMessage_DataType::VOID;
-const GLMessage_DataType_Type GLMessage_DataType::CHAR;
-const GLMessage_DataType_Type GLMessage_DataType::BYTE;
-const GLMessage_DataType_Type GLMessage_DataType::INT;
-const GLMessage_DataType_Type GLMessage_DataType::FLOAT;
-const GLMessage_DataType_Type GLMessage_DataType::BOOL;
-const GLMessage_DataType_Type GLMessage_DataType::ENUM;
-const GLMessage_DataType_Type GLMessage_DataType::Type_MIN;
-const GLMessage_DataType_Type GLMessage_DataType::Type_MAX;
-const int GLMessage_DataType::Type_ARRAYSIZE;
-#endif // _MSC_VER
-#ifndef _MSC_VER
-const int GLMessage_DataType::kTypeFieldNumber;
-const int GLMessage_DataType::kIsArrayFieldNumber;
-const int GLMessage_DataType::kIntValueFieldNumber;
-const int GLMessage_DataType::kFloatValueFieldNumber;
-const int GLMessage_DataType::kCharValueFieldNumber;
-const int GLMessage_DataType::kRawBytesFieldNumber;
-const int GLMessage_DataType::kBoolValueFieldNumber;
-#endif // !_MSC_VER
-
-GLMessage_DataType::GLMessage_DataType()
- : ::google::protobuf::MessageLite() {
- SharedCtor();
-}
-
-void GLMessage_DataType::InitAsDefaultInstance() {
-}
-
-GLMessage_DataType::GLMessage_DataType(const GLMessage_DataType& from)
- : ::google::protobuf::MessageLite() {
- SharedCtor();
- MergeFrom(from);
-}
-
-void GLMessage_DataType::SharedCtor() {
- _cached_size_ = 0;
- type_ = 1;
- isarray_ = false;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-GLMessage_DataType::~GLMessage_DataType() {
- SharedDtor();
-}
-
-void GLMessage_DataType::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void GLMessage_DataType::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const GLMessage_DataType& GLMessage_DataType::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_gltrace_2eproto(); return *default_instance_;
-}
-
-GLMessage_DataType* GLMessage_DataType::default_instance_ = NULL;
-
-GLMessage_DataType* GLMessage_DataType::New() const {
- return new GLMessage_DataType;
-}
-
-void GLMessage_DataType::Clear() {
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- type_ = 1;
- isarray_ = false;
- }
- intvalue_.Clear();
- floatvalue_.Clear();
- charvalue_.Clear();
- rawbytes_.Clear();
- boolvalue_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-bool GLMessage_DataType::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
- ::google::protobuf::uint32 tag;
- while ((tag = input->ReadTag()) != 0) {
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
- case 1: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::android::gltrace::GLMessage_DataType_Type_IsValid(value)) {
- set_type(static_cast< ::android::gltrace::GLMessage_DataType_Type >(value));
- }
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(16)) goto parse_isArray;
- break;
- }
-
- // required bool isArray = 2 [default = false];
- case 2: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_isArray:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &isarray_)));
- _set_bit(1);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(24)) goto parse_intValue;
- break;
- }
-
- // repeated int32 intValue = 3;
- case 3: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_intValue:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 24, input, this->mutable_intvalue())));
- } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
- == ::google::protobuf::internal::WireFormatLite::
- WIRETYPE_LENGTH_DELIMITED) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_intvalue())));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(24)) goto parse_intValue;
- if (input->ExpectTag(37)) goto parse_floatValue;
- break;
- }
-
- // repeated float floatValue = 4;
- case 4: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
- parse_floatValue:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- 1, 37, input, this->mutable_floatvalue())));
- } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
- == ::google::protobuf::internal::WireFormatLite::
- WIRETYPE_LENGTH_DELIMITED) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, this->mutable_floatvalue())));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(37)) goto parse_floatValue;
- if (input->ExpectTag(42)) goto parse_charValue;
- break;
- }
-
- // repeated bytes charValue = 5;
- case 5: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_charValue:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_charvalue()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(42)) goto parse_charValue;
- if (input->ExpectTag(50)) goto parse_rawBytes;
- break;
- }
-
- // repeated bytes rawBytes = 6;
- case 6: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_rawBytes:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_rawbytes()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(50)) goto parse_rawBytes;
- if (input->ExpectTag(56)) goto parse_boolValue;
- break;
- }
-
- // repeated bool boolValue = 7;
- case 7: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_boolValue:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- 1, 56, input, this->mutable_boolvalue())));
- } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
- == ::google::protobuf::internal::WireFormatLite::
- WIRETYPE_LENGTH_DELIMITED) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, this->mutable_boolvalue())));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(56)) goto parse_boolValue;
- if (input->ExpectAtEnd()) return true;
- break;
- }
-
- default: {
- handle_uninterpreted:
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- return true;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
- return true;
-#undef DO_
-}
-
-void GLMessage_DataType::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
- if (_has_bit(0)) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 1, this->type(), output);
- }
-
- // required bool isArray = 2 [default = false];
- if (_has_bit(1)) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->isarray(), output);
- }
-
- // repeated int32 intValue = 3;
- for (int i = 0; i < this->intvalue_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 3, this->intvalue(i), output);
- }
-
- // repeated float floatValue = 4;
- for (int i = 0; i < this->floatvalue_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(
- 4, this->floatvalue(i), output);
- }
-
- // repeated bytes charValue = 5;
- for (int i = 0; i < this->charvalue_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 5, this->charvalue(i), output);
- }
-
- // repeated bytes rawBytes = 6;
- for (int i = 0; i < this->rawbytes_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 6, this->rawbytes(i), output);
- }
-
- // repeated bool boolValue = 7;
- for (int i = 0; i < this->boolvalue_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(
- 7, this->boolvalue(i), output);
- }
-
-}
-
-int GLMessage_DataType::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
- if (has_type()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
- }
-
- // required bool isArray = 2 [default = false];
- if (has_isarray()) {
- total_size += 1 + 1;
- }
-
- }
- // repeated int32 intValue = 3;
- {
- int data_size = 0;
- for (int i = 0; i < this->intvalue_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->intvalue(i));
- }
- total_size += 1 * this->intvalue_size() + data_size;
- }
-
- // repeated float floatValue = 4;
- {
- int data_size = 0;
- data_size = 4 * this->floatvalue_size();
- total_size += 1 * this->floatvalue_size() + data_size;
- }
-
- // repeated bytes charValue = 5;
- total_size += 1 * this->charvalue_size();
- for (int i = 0; i < this->charvalue_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->charvalue(i));
- }
-
- // repeated bytes rawBytes = 6;
- total_size += 1 * this->rawbytes_size();
- for (int i = 0; i < this->rawbytes_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->rawbytes(i));
- }
-
- // repeated bool boolValue = 7;
- {
- int data_size = 0;
- data_size = 1 * this->boolvalue_size();
- total_size += 1 * this->boolvalue_size() + data_size;
- }
-
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void GLMessage_DataType::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const GLMessage_DataType*>(&from));
-}
-
-void GLMessage_DataType::MergeFrom(const GLMessage_DataType& from) {
- GOOGLE_CHECK_NE(&from, this);
- intvalue_.MergeFrom(from.intvalue_);
- floatvalue_.MergeFrom(from.floatvalue_);
- charvalue_.MergeFrom(from.charvalue_);
- rawbytes_.MergeFrom(from.rawbytes_);
- boolvalue_.MergeFrom(from.boolvalue_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from._has_bit(0)) {
- set_type(from.type());
- }
- if (from._has_bit(1)) {
- set_isarray(from.isarray());
- }
- }
-}
-
-void GLMessage_DataType::CopyFrom(const GLMessage_DataType& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool GLMessage_DataType::IsInitialized() const {
- if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
-
- return true;
-}
-
-void GLMessage_DataType::Swap(GLMessage_DataType* other) {
- if (other != this) {
- std::swap(type_, other->type_);
- std::swap(isarray_, other->isarray_);
- intvalue_.Swap(&other->intvalue_);
- floatvalue_.Swap(&other->floatvalue_);
- charvalue_.Swap(&other->charvalue_);
- rawbytes_.Swap(&other->rawbytes_);
- boolvalue_.Swap(&other->boolvalue_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::std::string GLMessage_DataType::GetTypeName() const {
- return "android.gltrace.GLMessage.DataType";
-}
-
-
-// -------------------------------------------------------------------
-
-#ifndef _MSC_VER
-const int GLMessage_FrameBuffer::kWidthFieldNumber;
-const int GLMessage_FrameBuffer::kHeightFieldNumber;
-const int GLMessage_FrameBuffer::kContentsFieldNumber;
-#endif // !_MSC_VER
-
-GLMessage_FrameBuffer::GLMessage_FrameBuffer()
- : ::google::protobuf::MessageLite() {
- SharedCtor();
-}
-
-void GLMessage_FrameBuffer::InitAsDefaultInstance() {
-}
-
-GLMessage_FrameBuffer::GLMessage_FrameBuffer(const GLMessage_FrameBuffer& from)
- : ::google::protobuf::MessageLite() {
- SharedCtor();
- MergeFrom(from);
-}
-
-void GLMessage_FrameBuffer::SharedCtor() {
- _cached_size_ = 0;
- width_ = 0;
- height_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-GLMessage_FrameBuffer::~GLMessage_FrameBuffer() {
- SharedDtor();
-}
-
-void GLMessage_FrameBuffer::SharedDtor() {
- if (this != default_instance_) {
- }
-}
-
-void GLMessage_FrameBuffer::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const GLMessage_FrameBuffer& GLMessage_FrameBuffer::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_gltrace_2eproto(); return *default_instance_;
-}
-
-GLMessage_FrameBuffer* GLMessage_FrameBuffer::default_instance_ = NULL;
-
-GLMessage_FrameBuffer* GLMessage_FrameBuffer::New() const {
- return new GLMessage_FrameBuffer;
-}
-
-void GLMessage_FrameBuffer::Clear() {
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- width_ = 0;
- height_ = 0;
- }
- contents_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-bool GLMessage_FrameBuffer::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
- ::google::protobuf::uint32 tag;
- while ((tag = input->ReadTag()) != 0) {
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required int32 width = 1;
- case 1: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &width_)));
- _set_bit(0);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(16)) goto parse_height;
- break;
- }
-
- // required int32 height = 2;
- case 2: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_height:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &height_)));
- _set_bit(1);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(26)) goto parse_contents;
- break;
- }
-
- // repeated bytes contents = 3;
- case 3: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_contents:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->add_contents()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(26)) goto parse_contents;
- if (input->ExpectAtEnd()) return true;
- break;
- }
-
- default: {
- handle_uninterpreted:
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- return true;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
- return true;
-#undef DO_
-}
-
-void GLMessage_FrameBuffer::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // required int32 width = 1;
- if (_has_bit(0)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->width(), output);
- }
-
- // required int32 height = 2;
- if (_has_bit(1)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->height(), output);
- }
-
- // repeated bytes contents = 3;
- for (int i = 0; i < this->contents_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 3, this->contents(i), output);
- }
-
-}
-
-int GLMessage_FrameBuffer::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required int32 width = 1;
- if (has_width()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->width());
- }
-
- // required int32 height = 2;
- if (has_height()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->height());
- }
-
- }
- // repeated bytes contents = 3;
- total_size += 1 * this->contents_size();
- for (int i = 0; i < this->contents_size(); i++) {
- total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->contents(i));
- }
-
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void GLMessage_FrameBuffer::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const GLMessage_FrameBuffer*>(&from));
-}
-
-void GLMessage_FrameBuffer::MergeFrom(const GLMessage_FrameBuffer& from) {
- GOOGLE_CHECK_NE(&from, this);
- contents_.MergeFrom(from.contents_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from._has_bit(0)) {
- set_width(from.width());
- }
- if (from._has_bit(1)) {
- set_height(from.height());
- }
- }
-}
-
-void GLMessage_FrameBuffer::CopyFrom(const GLMessage_FrameBuffer& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool GLMessage_FrameBuffer::IsInitialized() const {
- if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
-
- return true;
-}
-
-void GLMessage_FrameBuffer::Swap(GLMessage_FrameBuffer* other) {
- if (other != this) {
- std::swap(width_, other->width_);
- std::swap(height_, other->height_);
- contents_.Swap(&other->contents_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::std::string GLMessage_FrameBuffer::GetTypeName() const {
- return "android.gltrace.GLMessage.FrameBuffer";
-}
-
-
-// -------------------------------------------------------------------
-
-#ifndef _MSC_VER
-const int GLMessage::kContextIdFieldNumber;
-const int GLMessage::kStartTimeFieldNumber;
-const int GLMessage::kDurationFieldNumber;
-const int GLMessage::kFunctionFieldNumber;
-const int GLMessage::kArgsFieldNumber;
-const int GLMessage::kReturnValueFieldNumber;
-const int GLMessage::kFbFieldNumber;
-const int GLMessage::kThreadtimeFieldNumber;
-#endif // !_MSC_VER
-
-GLMessage::GLMessage()
- : ::google::protobuf::MessageLite() {
- SharedCtor();
-}
-
-void GLMessage::InitAsDefaultInstance() {
- returnvalue_ = const_cast< ::android::gltrace::GLMessage_DataType*>(&::android::gltrace::GLMessage_DataType::default_instance());
- fb_ = const_cast< ::android::gltrace::GLMessage_FrameBuffer*>(&::android::gltrace::GLMessage_FrameBuffer::default_instance());
-}
-
-GLMessage::GLMessage(const GLMessage& from)
- : ::google::protobuf::MessageLite() {
- SharedCtor();
- MergeFrom(from);
-}
-
-void GLMessage::SharedCtor() {
- _cached_size_ = 0;
- context_id_ = 0;
- start_time_ = GOOGLE_LONGLONG(0);
- duration_ = 0;
- function_ = 3000;
- returnvalue_ = NULL;
- fb_ = NULL;
- threadtime_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-GLMessage::~GLMessage() {
- SharedDtor();
-}
-
-void GLMessage::SharedDtor() {
- if (this != default_instance_) {
- delete returnvalue_;
- delete fb_;
- }
-}
-
-void GLMessage::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const GLMessage& GLMessage::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_gltrace_2eproto(); return *default_instance_;
-}
-
-GLMessage* GLMessage::default_instance_ = NULL;
-
-GLMessage* GLMessage::New() const {
- return new GLMessage;
-}
-
-void GLMessage::Clear() {
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- context_id_ = 0;
- start_time_ = GOOGLE_LONGLONG(0);
- duration_ = 0;
- function_ = 3000;
- if (_has_bit(5)) {
- if (returnvalue_ != NULL) returnvalue_->::android::gltrace::GLMessage_DataType::Clear();
- }
- if (_has_bit(6)) {
- if (fb_ != NULL) fb_->::android::gltrace::GLMessage_FrameBuffer::Clear();
- }
- threadtime_ = 0;
- }
- args_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-bool GLMessage::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
- ::google::protobuf::uint32 tag;
- while ((tag = input->ReadTag()) != 0) {
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required int32 context_id = 1;
- case 1: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &context_id_)));
- _set_bit(0);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(16)) goto parse_start_time;
- break;
- }
-
- // required int64 start_time = 2;
- case 2: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_start_time:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &start_time_)));
- _set_bit(1);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(24)) goto parse_duration;
- break;
- }
-
- // required int32 duration = 3;
- case 3: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_duration:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &duration_)));
- _set_bit(2);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(32)) goto parse_function;
- break;
- }
-
- // required .android.gltrace.GLMessage.Function function = 4 [default = invalid];
- case 4: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_function:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::android::gltrace::GLMessage_Function_IsValid(value)) {
- set_function(static_cast< ::android::gltrace::GLMessage_Function >(value));
- }
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(42)) goto parse_args;
- break;
- }
-
- // repeated .android.gltrace.GLMessage.DataType args = 5;
- case 5: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_args:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, add_args()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(42)) goto parse_args;
- if (input->ExpectTag(50)) goto parse_returnValue;
- break;
- }
-
- // optional .android.gltrace.GLMessage.DataType returnValue = 6;
- case 6: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_returnValue:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_returnvalue()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(58)) goto parse_fb;
- break;
- }
-
- // optional .android.gltrace.GLMessage.FrameBuffer fb = 7;
- case 7: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_fb:
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_fb()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(64)) goto parse_threadtime;
- break;
- }
-
- // optional int32 threadtime = 8;
- case 8: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_threadtime:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &threadtime_)));
- _set_bit(7);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectAtEnd()) return true;
- break;
- }
-
- default: {
- handle_uninterpreted:
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- return true;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
- return true;
-#undef DO_
-}
-
-void GLMessage::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // required int32 context_id = 1;
- if (_has_bit(0)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->context_id(), output);
- }
-
- // required int64 start_time = 2;
- if (_has_bit(1)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->start_time(), output);
- }
-
- // required int32 duration = 3;
- if (_has_bit(2)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->duration(), output);
- }
-
- // required .android.gltrace.GLMessage.Function function = 4 [default = invalid];
- if (_has_bit(3)) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 4, this->function(), output);
- }
-
- // repeated .android.gltrace.GLMessage.DataType args = 5;
- for (int i = 0; i < this->args_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 5, this->args(i), output);
- }
-
- // optional .android.gltrace.GLMessage.DataType returnValue = 6;
- if (_has_bit(5)) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 6, this->returnvalue(), output);
- }
-
- // optional .android.gltrace.GLMessage.FrameBuffer fb = 7;
- if (_has_bit(6)) {
- ::google::protobuf::internal::WireFormatLite::WriteMessage(
- 7, this->fb(), output);
- }
-
- // optional int32 threadtime = 8;
- if (_has_bit(7)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->threadtime(), output);
- }
-
-}
-
-int GLMessage::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required int32 context_id = 1;
- if (has_context_id()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->context_id());
- }
-
- // required int64 start_time = 2;
- if (has_start_time()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->start_time());
- }
-
- // required int32 duration = 3;
- if (has_duration()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->duration());
- }
-
- // required .android.gltrace.GLMessage.Function function = 4 [default = invalid];
- if (has_function()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->function());
- }
-
- // optional .android.gltrace.GLMessage.DataType returnValue = 6;
- if (has_returnvalue()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->returnvalue());
- }
-
- // optional .android.gltrace.GLMessage.FrameBuffer fb = 7;
- if (has_fb()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->fb());
- }
-
- // optional int32 threadtime = 8;
- if (has_threadtime()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->threadtime());
- }
-
- }
- // repeated .android.gltrace.GLMessage.DataType args = 5;
- total_size += 1 * this->args_size();
- for (int i = 0; i < this->args_size(); i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->args(i));
- }
-
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void GLMessage::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const GLMessage*>(&from));
-}
-
-void GLMessage::MergeFrom(const GLMessage& from) {
- GOOGLE_CHECK_NE(&from, this);
- args_.MergeFrom(from.args_);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from._has_bit(0)) {
- set_context_id(from.context_id());
- }
- if (from._has_bit(1)) {
- set_start_time(from.start_time());
- }
- if (from._has_bit(2)) {
- set_duration(from.duration());
- }
- if (from._has_bit(3)) {
- set_function(from.function());
- }
- if (from._has_bit(5)) {
- mutable_returnvalue()->::android::gltrace::GLMessage_DataType::MergeFrom(from.returnvalue());
- }
- if (from._has_bit(6)) {
- mutable_fb()->::android::gltrace::GLMessage_FrameBuffer::MergeFrom(from.fb());
- }
- if (from._has_bit(7)) {
- set_threadtime(from.threadtime());
- }
- }
-}
-
-void GLMessage::CopyFrom(const GLMessage& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool GLMessage::IsInitialized() const {
- if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
-
- for (int i = 0; i < args_size(); i++) {
- if (!this->args(i).IsInitialized()) return false;
- }
- if (has_returnvalue()) {
- if (!this->returnvalue().IsInitialized()) return false;
- }
- if (has_fb()) {
- if (!this->fb().IsInitialized()) return false;
- }
- return true;
-}
-
-void GLMessage::Swap(GLMessage* other) {
- if (other != this) {
- std::swap(context_id_, other->context_id_);
- std::swap(start_time_, other->start_time_);
- std::swap(duration_, other->duration_);
- std::swap(function_, other->function_);
- args_.Swap(&other->args_);
- std::swap(returnvalue_, other->returnvalue_);
- std::swap(fb_, other->fb_);
- std::swap(threadtime_, other->threadtime_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::std::string GLMessage::GetTypeName() const {
- return "android.gltrace.GLMessage";
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace gltrace
-} // namespace android
-
-// @@protoc_insertion_point(global_scope)
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.h b/opengl/libs/GLES_trace/src/gltrace.pb.h
deleted file mode 100644
index 0901be7..0000000
--- a/opengl/libs/GLES_trace/src/gltrace.pb.h
+++ /dev/null
@@ -1,1895 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: gltrace.proto
-
-#ifndef PROTOBUF_gltrace_2eproto__INCLUDED
-#define PROTOBUF_gltrace_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 2003000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/repeated_field.h>
-#include <google/protobuf/extension_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace android {
-namespace gltrace {
-
-// Internal implementation detail -- do not call these.
-void protobuf_AddDesc_gltrace_2eproto();
-void protobuf_AssignDesc_gltrace_2eproto();
-void protobuf_ShutdownFile_gltrace_2eproto();
-
-class GLMessage;
-class GLMessage_DataType;
-class GLMessage_FrameBuffer;
-
-enum GLMessage_DataType_Type {
- GLMessage_DataType_Type_VOID = 1,
- GLMessage_DataType_Type_CHAR = 2,
- GLMessage_DataType_Type_BYTE = 3,
- GLMessage_DataType_Type_INT = 4,
- GLMessage_DataType_Type_FLOAT = 5,
- GLMessage_DataType_Type_BOOL = 6,
- GLMessage_DataType_Type_ENUM = 7
-};
-bool GLMessage_DataType_Type_IsValid(int value);
-const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MIN = GLMessage_DataType_Type_VOID;
-const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MAX = GLMessage_DataType_Type_ENUM;
-const int GLMessage_DataType_Type_Type_ARRAYSIZE = GLMessage_DataType_Type_Type_MAX + 1;
-
-enum GLMessage_Function {
- GLMessage_Function_glActiveTexture = 0,
- GLMessage_Function_glAlphaFunc = 1,
- GLMessage_Function_glAlphaFuncx = 2,
- GLMessage_Function_glAlphaFuncxOES = 3,
- GLMessage_Function_glAttachShader = 4,
- GLMessage_Function_glBeginPerfMonitorAMD = 5,
- GLMessage_Function_glBindAttribLocation = 6,
- GLMessage_Function_glBindBuffer = 7,
- GLMessage_Function_glBindFramebuffer = 8,
- GLMessage_Function_glBindFramebufferOES = 9,
- GLMessage_Function_glBindRenderbuffer = 10,
- GLMessage_Function_glBindRenderbufferOES = 11,
- GLMessage_Function_glBindTexture = 12,
- GLMessage_Function_glBindVertexArrayOES = 13,
- GLMessage_Function_glBlendColor = 14,
- GLMessage_Function_glBlendEquation = 15,
- GLMessage_Function_glBlendEquationOES = 16,
- GLMessage_Function_glBlendEquationSeparate = 17,
- GLMessage_Function_glBlendEquationSeparateOES = 18,
- GLMessage_Function_glBlendFunc = 19,
- GLMessage_Function_glBlendFuncSeparate = 20,
- GLMessage_Function_glBlendFuncSeparateOES = 21,
- GLMessage_Function_glBufferData = 22,
- GLMessage_Function_glBufferSubData = 23,
- GLMessage_Function_glCheckFramebufferStatus = 24,
- GLMessage_Function_glCheckFramebufferStatusOES = 25,
- GLMessage_Function_glClearColor = 26,
- GLMessage_Function_glClearColorx = 27,
- GLMessage_Function_glClearColorxOES = 28,
- GLMessage_Function_glClearDepthf = 29,
- GLMessage_Function_glClearDepthfOES = 30,
- GLMessage_Function_glClearDepthx = 31,
- GLMessage_Function_glClearDepthxOES = 32,
- GLMessage_Function_glClear = 33,
- GLMessage_Function_glClearStencil = 34,
- GLMessage_Function_glClientActiveTexture = 35,
- GLMessage_Function_glClipPlanef = 36,
- GLMessage_Function_glClipPlanefIMG = 37,
- GLMessage_Function_glClipPlanefOES = 38,
- GLMessage_Function_glClipPlanex = 39,
- GLMessage_Function_glClipPlanexIMG = 40,
- GLMessage_Function_glClipPlanexOES = 41,
- GLMessage_Function_glColor4f = 42,
- GLMessage_Function_glColor4ub = 43,
- GLMessage_Function_glColor4x = 44,
- GLMessage_Function_glColor4xOES = 45,
- GLMessage_Function_glColorMask = 46,
- GLMessage_Function_glColorPointer = 47,
- GLMessage_Function_glCompileShader = 48,
- GLMessage_Function_glCompressedTexImage2D = 49,
- GLMessage_Function_glCompressedTexImage3DOES = 50,
- GLMessage_Function_glCompressedTexSubImage2D = 51,
- GLMessage_Function_glCompressedTexSubImage3DOES = 52,
- GLMessage_Function_glCopyTexImage2D = 53,
- GLMessage_Function_glCopyTexSubImage2D = 54,
- GLMessage_Function_glCopyTexSubImage3DOES = 55,
- GLMessage_Function_glCoverageMaskNV = 56,
- GLMessage_Function_glCoverageOperationNV = 57,
- GLMessage_Function_glCreateProgram = 58,
- GLMessage_Function_glCreateShader = 59,
- GLMessage_Function_glCullFace = 60,
- GLMessage_Function_glCurrentPaletteMatrixOES = 61,
- GLMessage_Function_glDeleteBuffers = 62,
- GLMessage_Function_glDeleteFencesNV = 63,
- GLMessage_Function_glDeleteFramebuffers = 64,
- GLMessage_Function_glDeleteFramebuffersOES = 65,
- GLMessage_Function_glDeletePerfMonitorsAMD = 66,
- GLMessage_Function_glDeleteProgram = 67,
- GLMessage_Function_glDeleteRenderbuffers = 68,
- GLMessage_Function_glDeleteRenderbuffersOES = 69,
- GLMessage_Function_glDeleteShader = 70,
- GLMessage_Function_glDeleteTextures = 71,
- GLMessage_Function_glDeleteVertexArraysOES = 72,
- GLMessage_Function_glDepthFunc = 73,
- GLMessage_Function_glDepthMask = 74,
- GLMessage_Function_glDepthRangef = 75,
- GLMessage_Function_glDepthRangefOES = 76,
- GLMessage_Function_glDepthRangex = 77,
- GLMessage_Function_glDepthRangexOES = 78,
- GLMessage_Function_glDetachShader = 79,
- GLMessage_Function_glDisableClientState = 80,
- GLMessage_Function_glDisableDriverControlQCOM = 81,
- GLMessage_Function_glDisable = 82,
- GLMessage_Function_glDisableVertexAttribArray = 83,
- GLMessage_Function_glDiscardFramebufferEXT = 84,
- GLMessage_Function_glDrawArrays = 85,
- GLMessage_Function_glDrawElements = 86,
- GLMessage_Function_glDrawTexfOES = 87,
- GLMessage_Function_glDrawTexfvOES = 88,
- GLMessage_Function_glDrawTexiOES = 89,
- GLMessage_Function_glDrawTexivOES = 90,
- GLMessage_Function_glDrawTexsOES = 91,
- GLMessage_Function_glDrawTexsvOES = 92,
- GLMessage_Function_glDrawTexxOES = 93,
- GLMessage_Function_glDrawTexxvOES = 94,
- GLMessage_Function_glEGLImageTargetRenderbufferStorageOES = 95,
- GLMessage_Function_glEGLImageTargetTexture2DOES = 96,
- GLMessage_Function_glEnableClientState = 97,
- GLMessage_Function_glEnableDriverControlQCOM = 98,
- GLMessage_Function_glEnable = 99,
- GLMessage_Function_glEnableVertexAttribArray = 100,
- GLMessage_Function_glEndPerfMonitorAMD = 101,
- GLMessage_Function_glEndTilingQCOM = 102,
- GLMessage_Function_glExtGetBufferPointervQCOM = 103,
- GLMessage_Function_glExtGetBuffersQCOM = 104,
- GLMessage_Function_glExtGetFramebuffersQCOM = 105,
- GLMessage_Function_glExtGetProgramBinarySourceQCOM = 106,
- GLMessage_Function_glExtGetProgramsQCOM = 107,
- GLMessage_Function_glExtGetRenderbuffersQCOM = 108,
- GLMessage_Function_glExtGetShadersQCOM = 109,
- GLMessage_Function_glExtGetTexLevelParameterivQCOM = 110,
- GLMessage_Function_glExtGetTexSubImageQCOM = 111,
- GLMessage_Function_glExtGetTexturesQCOM = 112,
- GLMessage_Function_glExtIsProgramBinaryQCOM = 113,
- GLMessage_Function_glExtTexObjectStateOverrideiQCOM = 114,
- GLMessage_Function_glFinishFenceNV = 115,
- GLMessage_Function_glFinish = 116,
- GLMessage_Function_glFlush = 117,
- GLMessage_Function_glFogf = 118,
- GLMessage_Function_glFogfv = 119,
- GLMessage_Function_glFogx = 120,
- GLMessage_Function_glFogxOES = 121,
- GLMessage_Function_glFogxv = 122,
- GLMessage_Function_glFogxvOES = 123,
- GLMessage_Function_glFramebufferRenderbuffer = 124,
- GLMessage_Function_glFramebufferRenderbufferOES = 125,
- GLMessage_Function_glFramebufferTexture2D = 126,
- GLMessage_Function_glFramebufferTexture2DMultisampleIMG = 127,
- GLMessage_Function_glFramebufferTexture2DOES = 128,
- GLMessage_Function_glFramebufferTexture3DOES = 129,
- GLMessage_Function_glFrontFace = 130,
- GLMessage_Function_glFrustumf = 131,
- GLMessage_Function_glFrustumfOES = 132,
- GLMessage_Function_glFrustumx = 133,
- GLMessage_Function_glFrustumxOES = 134,
- GLMessage_Function_glGenBuffers = 135,
- GLMessage_Function_glGenerateMipmap = 136,
- GLMessage_Function_glGenerateMipmapOES = 137,
- GLMessage_Function_glGenFencesNV = 138,
- GLMessage_Function_glGenFramebuffers = 139,
- GLMessage_Function_glGenFramebuffersOES = 140,
- GLMessage_Function_glGenPerfMonitorsAMD = 141,
- GLMessage_Function_glGenRenderbuffers = 142,
- GLMessage_Function_glGenRenderbuffersOES = 143,
- GLMessage_Function_glGenTextures = 144,
- GLMessage_Function_glGenVertexArraysOES = 145,
- GLMessage_Function_glGetActiveAttrib = 146,
- GLMessage_Function_glGetActiveUniform = 147,
- GLMessage_Function_glGetAttachedShaders = 148,
- GLMessage_Function_glGetAttribLocation = 149,
- GLMessage_Function_glGetBooleanv = 150,
- GLMessage_Function_glGetBufferParameteriv = 151,
- GLMessage_Function_glGetBufferPointervOES = 152,
- GLMessage_Function_glGetClipPlanef = 153,
- GLMessage_Function_glGetClipPlanefOES = 154,
- GLMessage_Function_glGetClipPlanex = 155,
- GLMessage_Function_glGetClipPlanexOES = 156,
- GLMessage_Function_glGetDriverControlsQCOM = 157,
- GLMessage_Function_glGetDriverControlStringQCOM = 158,
- GLMessage_Function_glGetError = 159,
- GLMessage_Function_glGetFenceivNV = 160,
- GLMessage_Function_glGetFixedv = 161,
- GLMessage_Function_glGetFixedvOES = 162,
- GLMessage_Function_glGetFloatv = 163,
- GLMessage_Function_glGetFramebufferAttachmentParameteriv = 164,
- GLMessage_Function_glGetFramebufferAttachmentParameterivOES = 165,
- GLMessage_Function_glGetIntegerv = 166,
- GLMessage_Function_glGetLightfv = 167,
- GLMessage_Function_glGetLightxv = 168,
- GLMessage_Function_glGetLightxvOES = 169,
- GLMessage_Function_glGetMaterialfv = 170,
- GLMessage_Function_glGetMaterialxv = 171,
- GLMessage_Function_glGetMaterialxvOES = 172,
- GLMessage_Function_glGetPerfMonitorCounterDataAMD = 173,
- GLMessage_Function_glGetPerfMonitorCounterInfoAMD = 174,
- GLMessage_Function_glGetPerfMonitorCountersAMD = 175,
- GLMessage_Function_glGetPerfMonitorCounterStringAMD = 176,
- GLMessage_Function_glGetPerfMonitorGroupsAMD = 177,
- GLMessage_Function_glGetPerfMonitorGroupStringAMD = 178,
- GLMessage_Function_glGetPointerv = 179,
- GLMessage_Function_glGetProgramBinaryOES = 180,
- GLMessage_Function_glGetProgramInfoLog = 181,
- GLMessage_Function_glGetProgramiv = 182,
- GLMessage_Function_glGetRenderbufferParameteriv = 183,
- GLMessage_Function_glGetRenderbufferParameterivOES = 184,
- GLMessage_Function_glGetShaderInfoLog = 185,
- GLMessage_Function_glGetShaderiv = 186,
- GLMessage_Function_glGetShaderPrecisionFormat = 187,
- GLMessage_Function_glGetShaderSource = 188,
- GLMessage_Function_glGetString = 189,
- GLMessage_Function_glGetTexEnvfv = 190,
- GLMessage_Function_glGetTexEnviv = 191,
- GLMessage_Function_glGetTexEnvxv = 192,
- GLMessage_Function_glGetTexEnvxvOES = 193,
- GLMessage_Function_glGetTexGenfvOES = 194,
- GLMessage_Function_glGetTexGenivOES = 195,
- GLMessage_Function_glGetTexGenxvOES = 196,
- GLMessage_Function_glGetTexParameterfv = 197,
- GLMessage_Function_glGetTexParameteriv = 198,
- GLMessage_Function_glGetTexParameterxv = 199,
- GLMessage_Function_glGetTexParameterxvOES = 200,
- GLMessage_Function_glGetUniformfv = 201,
- GLMessage_Function_glGetUniformiv = 202,
- GLMessage_Function_glGetUniformLocation = 203,
- GLMessage_Function_glGetVertexAttribfv = 204,
- GLMessage_Function_glGetVertexAttribiv = 205,
- GLMessage_Function_glGetVertexAttribPointerv = 206,
- GLMessage_Function_glHint = 207,
- GLMessage_Function_glIsBuffer = 208,
- GLMessage_Function_glIsEnabled = 209,
- GLMessage_Function_glIsFenceNV = 210,
- GLMessage_Function_glIsFramebuffer = 211,
- GLMessage_Function_glIsFramebufferOES = 212,
- GLMessage_Function_glIsProgram = 213,
- GLMessage_Function_glIsRenderbuffer = 214,
- GLMessage_Function_glIsRenderbufferOES = 215,
- GLMessage_Function_glIsShader = 216,
- GLMessage_Function_glIsTexture = 217,
- GLMessage_Function_glIsVertexArrayOES = 218,
- GLMessage_Function_glLightf = 219,
- GLMessage_Function_glLightfv = 220,
- GLMessage_Function_glLightModelf = 221,
- GLMessage_Function_glLightModelfv = 222,
- GLMessage_Function_glLightModelx = 223,
- GLMessage_Function_glLightModelxOES = 224,
- GLMessage_Function_glLightModelxv = 225,
- GLMessage_Function_glLightModelxvOES = 226,
- GLMessage_Function_glLightx = 227,
- GLMessage_Function_glLightxOES = 228,
- GLMessage_Function_glLightxv = 229,
- GLMessage_Function_glLightxvOES = 230,
- GLMessage_Function_glLineWidth = 231,
- GLMessage_Function_glLineWidthx = 232,
- GLMessage_Function_glLineWidthxOES = 233,
- GLMessage_Function_glLinkProgram = 234,
- GLMessage_Function_glLoadIdentity = 235,
- GLMessage_Function_glLoadMatrixf = 236,
- GLMessage_Function_glLoadMatrixx = 237,
- GLMessage_Function_glLoadMatrixxOES = 238,
- GLMessage_Function_glLoadPaletteFromModelViewMatrixOES = 239,
- GLMessage_Function_glLogicOp = 240,
- GLMessage_Function_glMapBufferOES = 241,
- GLMessage_Function_glMaterialf = 242,
- GLMessage_Function_glMaterialfv = 243,
- GLMessage_Function_glMaterialx = 244,
- GLMessage_Function_glMaterialxOES = 245,
- GLMessage_Function_glMaterialxv = 246,
- GLMessage_Function_glMaterialxvOES = 247,
- GLMessage_Function_glMatrixIndexPointerOES = 248,
- GLMessage_Function_glMatrixMode = 249,
- GLMessage_Function_glMultiDrawArraysEXT = 250,
- GLMessage_Function_glMultiDrawElementsEXT = 251,
- GLMessage_Function_glMultiTexCoord4f = 252,
- GLMessage_Function_glMultiTexCoord4x = 253,
- GLMessage_Function_glMultiTexCoord4xOES = 254,
- GLMessage_Function_glMultMatrixf = 255,
- GLMessage_Function_glMultMatrixx = 256,
- GLMessage_Function_glMultMatrixxOES = 257,
- GLMessage_Function_glNormal3f = 258,
- GLMessage_Function_glNormal3x = 259,
- GLMessage_Function_glNormal3xOES = 260,
- GLMessage_Function_glNormalPointer = 261,
- GLMessage_Function_glOrthof = 262,
- GLMessage_Function_glOrthofOES = 263,
- GLMessage_Function_glOrthox = 264,
- GLMessage_Function_glOrthoxOES = 265,
- GLMessage_Function_glPixelStorei = 266,
- GLMessage_Function_glPointParameterf = 267,
- GLMessage_Function_glPointParameterfv = 268,
- GLMessage_Function_glPointParameterx = 269,
- GLMessage_Function_glPointParameterxOES = 270,
- GLMessage_Function_glPointParameterxv = 271,
- GLMessage_Function_glPointParameterxvOES = 272,
- GLMessage_Function_glPointSize = 273,
- GLMessage_Function_glPointSizePointerOES = 274,
- GLMessage_Function_glPointSizex = 275,
- GLMessage_Function_glPointSizexOES = 276,
- GLMessage_Function_glPolygonOffset = 277,
- GLMessage_Function_glPolygonOffsetx = 278,
- GLMessage_Function_glPolygonOffsetxOES = 279,
- GLMessage_Function_glPopMatrix = 280,
- GLMessage_Function_glProgramBinaryOES = 281,
- GLMessage_Function_glPushMatrix = 282,
- GLMessage_Function_glQueryMatrixxOES = 283,
- GLMessage_Function_glReadPixels = 284,
- GLMessage_Function_glReleaseShaderCompiler = 285,
- GLMessage_Function_glRenderbufferStorage = 286,
- GLMessage_Function_glRenderbufferStorageMultisampleIMG = 287,
- GLMessage_Function_glRenderbufferStorageOES = 288,
- GLMessage_Function_glRotatef = 289,
- GLMessage_Function_glRotatex = 290,
- GLMessage_Function_glRotatexOES = 291,
- GLMessage_Function_glSampleCoverage = 292,
- GLMessage_Function_glSampleCoveragex = 293,
- GLMessage_Function_glSampleCoveragexOES = 294,
- GLMessage_Function_glScalef = 295,
- GLMessage_Function_glScalex = 296,
- GLMessage_Function_glScalexOES = 297,
- GLMessage_Function_glScissor = 298,
- GLMessage_Function_glSelectPerfMonitorCountersAMD = 299,
- GLMessage_Function_glSetFenceNV = 300,
- GLMessage_Function_glShadeModel = 301,
- GLMessage_Function_glShaderBinary = 302,
- GLMessage_Function_glShaderSource = 303,
- GLMessage_Function_glStartTilingQCOM = 304,
- GLMessage_Function_glStencilFunc = 305,
- GLMessage_Function_glStencilFuncSeparate = 306,
- GLMessage_Function_glStencilMask = 307,
- GLMessage_Function_glStencilMaskSeparate = 308,
- GLMessage_Function_glStencilOp = 309,
- GLMessage_Function_glStencilOpSeparate = 310,
- GLMessage_Function_glTestFenceNV = 311,
- GLMessage_Function_glTexCoordPointer = 312,
- GLMessage_Function_glTexEnvf = 313,
- GLMessage_Function_glTexEnvfv = 314,
- GLMessage_Function_glTexEnvi = 315,
- GLMessage_Function_glTexEnviv = 316,
- GLMessage_Function_glTexEnvx = 317,
- GLMessage_Function_glTexEnvxOES = 318,
- GLMessage_Function_glTexEnvxv = 319,
- GLMessage_Function_glTexEnvxvOES = 320,
- GLMessage_Function_glTexGenfOES = 321,
- GLMessage_Function_glTexGenfvOES = 322,
- GLMessage_Function_glTexGeniOES = 323,
- GLMessage_Function_glTexGenivOES = 324,
- GLMessage_Function_glTexGenxOES = 325,
- GLMessage_Function_glTexGenxvOES = 326,
- GLMessage_Function_glTexImage2D = 327,
- GLMessage_Function_glTexImage3DOES = 328,
- GLMessage_Function_glTexParameterf = 329,
- GLMessage_Function_glTexParameterfv = 330,
- GLMessage_Function_glTexParameteri = 331,
- GLMessage_Function_glTexParameteriv = 332,
- GLMessage_Function_glTexParameterx = 333,
- GLMessage_Function_glTexParameterxOES = 334,
- GLMessage_Function_glTexParameterxv = 335,
- GLMessage_Function_glTexParameterxvOES = 336,
- GLMessage_Function_glTexSubImage2D = 337,
- GLMessage_Function_glTexSubImage3DOES = 338,
- GLMessage_Function_glTranslatef = 339,
- GLMessage_Function_glTranslatex = 340,
- GLMessage_Function_glTranslatexOES = 341,
- GLMessage_Function_glUniform1f = 342,
- GLMessage_Function_glUniform1fv = 343,
- GLMessage_Function_glUniform1i = 344,
- GLMessage_Function_glUniform1iv = 345,
- GLMessage_Function_glUniform2f = 346,
- GLMessage_Function_glUniform2fv = 347,
- GLMessage_Function_glUniform2i = 348,
- GLMessage_Function_glUniform2iv = 349,
- GLMessage_Function_glUniform3f = 350,
- GLMessage_Function_glUniform3fv = 351,
- GLMessage_Function_glUniform3i = 352,
- GLMessage_Function_glUniform3iv = 353,
- GLMessage_Function_glUniform4f = 354,
- GLMessage_Function_glUniform4fv = 355,
- GLMessage_Function_glUniform4i = 356,
- GLMessage_Function_glUniform4iv = 357,
- GLMessage_Function_glUniformMatrix2fv = 358,
- GLMessage_Function_glUniformMatrix3fv = 359,
- GLMessage_Function_glUniformMatrix4fv = 360,
- GLMessage_Function_glUnmapBufferOES = 361,
- GLMessage_Function_glUseProgram = 362,
- GLMessage_Function_glValidateProgram = 363,
- GLMessage_Function_glVertexAttrib1f = 364,
- GLMessage_Function_glVertexAttrib1fv = 365,
- GLMessage_Function_glVertexAttrib2f = 366,
- GLMessage_Function_glVertexAttrib2fv = 367,
- GLMessage_Function_glVertexAttrib3f = 368,
- GLMessage_Function_glVertexAttrib3fv = 369,
- GLMessage_Function_glVertexAttrib4f = 370,
- GLMessage_Function_glVertexAttrib4fv = 371,
- GLMessage_Function_glVertexAttribPointer = 372,
- GLMessage_Function_glVertexPointer = 373,
- GLMessage_Function_glViewport = 374,
- GLMessage_Function_glWeightPointerOES = 375,
- GLMessage_Function_glActiveShaderProgramEXT = 502,
- GLMessage_Function_glAlphaFuncQCOM = 503,
- GLMessage_Function_glBeginQueryEXT = 504,
- GLMessage_Function_glBindProgramPipelineEXT = 505,
- GLMessage_Function_glBlitFramebufferANGLE = 506,
- GLMessage_Function_glCreateShaderProgramvEXT = 507,
- GLMessage_Function_glDeleteProgramPipelinesEXT = 508,
- GLMessage_Function_glDeleteQueriesEXT = 509,
- GLMessage_Function_glDrawBuffersNV = 510,
- GLMessage_Function_glEndQueryEXT = 511,
- GLMessage_Function_glFramebufferTexture2DMultisampleEXT = 512,
- GLMessage_Function_glGenProgramPipelinesEXT = 513,
- GLMessage_Function_glGenQueriesEXT = 514,
- GLMessage_Function_glGetGraphicsResetStatusEXT = 515,
- GLMessage_Function_glGetObjectLabelEXT = 516,
- GLMessage_Function_glGetProgramPipelineInfoLogEXT = 517,
- GLMessage_Function_glGetProgramPipelineivEXT = 518,
- GLMessage_Function_glGetQueryObjectuivEXT = 519,
- GLMessage_Function_glGetQueryivEXT = 520,
- GLMessage_Function_glGetnUniformfvEXT = 521,
- GLMessage_Function_glGetnUniformivEXT = 521,
- GLMessage_Function_glInsertEventMarkerEXT = 522,
- GLMessage_Function_glIsProgramPipelineEXT = 523,
- GLMessage_Function_glIsQueryEXT = 524,
- GLMessage_Function_glLabelObjectEXT = 525,
- GLMessage_Function_glPopGroupMarkerEXT = 526,
- GLMessage_Function_glProgramParameteriEXT = 527,
- GLMessage_Function_glProgramUniform1fEXT = 528,
- GLMessage_Function_glProgramUniform1fvEXT = 529,
- GLMessage_Function_glProgramUniform1iEXT = 530,
- GLMessage_Function_glProgramUniform1ivEXT = 531,
- GLMessage_Function_glProgramUniform2fEXT = 532,
- GLMessage_Function_glProgramUniform2fvEXT = 533,
- GLMessage_Function_glProgramUniform2iEXT = 534,
- GLMessage_Function_glProgramUniform2ivEXT = 535,
- GLMessage_Function_glProgramUniform3fEXT = 536,
- GLMessage_Function_glProgramUniform3fvEXT = 537,
- GLMessage_Function_glProgramUniform3iEXT = 538,
- GLMessage_Function_glProgramUniform3ivEXT = 539,
- GLMessage_Function_glProgramUniform4fEXT = 540,
- GLMessage_Function_glProgramUniform4fvEXT = 541,
- GLMessage_Function_glProgramUniform4iEXT = 542,
- GLMessage_Function_glProgramUniform4ivEXT = 543,
- GLMessage_Function_glProgramUniformMatrix2fvEXT = 544,
- GLMessage_Function_glProgramUniformMatrix3fvEXT = 545,
- GLMessage_Function_glProgramUniformMatrix4fvEXT = 546,
- GLMessage_Function_glPushGroupMarkerEXT = 547,
- GLMessage_Function_glReadBufferNV = 548,
- GLMessage_Function_glReadnPixelsEXT = 549,
- GLMessage_Function_glRenderbufferStorageMultisampleANGLE = 550,
- GLMessage_Function_glRenderbufferStorageMultisampleAPPLE = 551,
- GLMessage_Function_glRenderbufferStorageMultisampleEXT = 552,
- GLMessage_Function_glResolveMultisampleFramebufferAPPLE = 553,
- GLMessage_Function_glTexStorage1DEXT = 554,
- GLMessage_Function_glTexStorage2DEXT = 555,
- GLMessage_Function_glTexStorage3DEXT = 556,
- GLMessage_Function_glTextureStorage1DEXT = 557,
- GLMessage_Function_glTextureStorage2DEXT = 558,
- GLMessage_Function_glTextureStorage3DEXT = 559,
- GLMessage_Function_glUseProgramStagesEXT = 560,
- GLMessage_Function_glValidateProgramPipelineEXT = 561,
- GLMessage_Function_eglGetDisplay = 2000,
- GLMessage_Function_eglInitialize = 2001,
- GLMessage_Function_eglTerminate = 2002,
- GLMessage_Function_eglGetConfigs = 2003,
- GLMessage_Function_eglChooseConfig = 2004,
- GLMessage_Function_eglGetConfigAttrib = 2005,
- GLMessage_Function_eglCreateWindowSurface = 2006,
- GLMessage_Function_eglCreatePixmapSurface = 2007,
- GLMessage_Function_eglCreatePbufferSurface = 2008,
- GLMessage_Function_eglDestroySurface = 2009,
- GLMessage_Function_eglQuerySurface = 2010,
- GLMessage_Function_eglCreateContext = 2011,
- GLMessage_Function_eglDestroyContext = 2012,
- GLMessage_Function_eglMakeCurrent = 2013,
- GLMessage_Function_eglGetCurrentContext = 2014,
- GLMessage_Function_eglGetCurrentSurface = 2015,
- GLMessage_Function_eglGetCurrentDisplay = 2016,
- GLMessage_Function_eglQueryContext = 2017,
- GLMessage_Function_eglWaitGL = 2018,
- GLMessage_Function_eglWaitNative = 2019,
- GLMessage_Function_eglSwapBuffers = 2020,
- GLMessage_Function_eglCopyBuffers = 2021,
- GLMessage_Function_eglGetError = 2022,
- GLMessage_Function_eglQueryString = 2023,
- GLMessage_Function_eglGetProcAddress = 2024,
- GLMessage_Function_eglSurfaceAttrib = 2025,
- GLMessage_Function_eglBindTexImage = 2026,
- GLMessage_Function_eglReleaseTexImage = 2027,
- GLMessage_Function_eglSwapInterval = 2028,
- GLMessage_Function_eglBindAPI = 2029,
- GLMessage_Function_eglQueryAPI = 2030,
- GLMessage_Function_eglWaitClient = 2031,
- GLMessage_Function_eglReleaseThread = 2032,
- GLMessage_Function_eglCreatePbufferFromClientBuffer = 2033,
- GLMessage_Function_eglLockSurfaceKHR = 2034,
- GLMessage_Function_eglUnlockSurfaceKHR = 2035,
- GLMessage_Function_eglCreateImageKHR = 2036,
- GLMessage_Function_eglDestroyImageKHR = 2037,
- GLMessage_Function_eglCreateSyncKHR = 2038,
- GLMessage_Function_eglDestroySyncKHR = 2039,
- GLMessage_Function_eglClientWaitSyncKHR = 2040,
- GLMessage_Function_eglGetSyncAttribKHR = 2041,
- GLMessage_Function_eglSetSwapRectangleANDROID = 2042,
- GLMessage_Function_eglGetRenderBufferANDROID = 2043,
- GLMessage_Function_eglGetSystemTimeFrequencyNV = 2044,
- GLMessage_Function_eglGetSystemTimeNV = 2045,
- GLMessage_Function_invalid = 3000,
- GLMessage_Function_glVertexAttribPointerData = 3001
-};
-bool GLMessage_Function_IsValid(int value);
-const GLMessage_Function GLMessage_Function_Function_MIN = GLMessage_Function_glActiveTexture;
-const GLMessage_Function GLMessage_Function_Function_MAX = GLMessage_Function_glVertexAttribPointerData;
-const int GLMessage_Function_Function_ARRAYSIZE = GLMessage_Function_Function_MAX + 1;
-
-// ===================================================================
-
-class GLMessage_DataType : public ::google::protobuf::MessageLite {
- public:
- GLMessage_DataType();
- virtual ~GLMessage_DataType();
-
- GLMessage_DataType(const GLMessage_DataType& from);
-
- inline GLMessage_DataType& operator=(const GLMessage_DataType& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const GLMessage_DataType& default_instance();
-
- void Swap(GLMessage_DataType* other);
-
- // implements Message ----------------------------------------------
-
- GLMessage_DataType* New() const;
- void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
- void CopyFrom(const GLMessage_DataType& from);
- void MergeFrom(const GLMessage_DataType& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
-
- ::std::string GetTypeName() const;
-
- // nested types ----------------------------------------------------
-
- typedef GLMessage_DataType_Type Type;
- static const Type VOID = GLMessage_DataType_Type_VOID;
- static const Type CHAR = GLMessage_DataType_Type_CHAR;
- static const Type BYTE = GLMessage_DataType_Type_BYTE;
- static const Type INT = GLMessage_DataType_Type_INT;
- static const Type FLOAT = GLMessage_DataType_Type_FLOAT;
- static const Type BOOL = GLMessage_DataType_Type_BOOL;
- static const Type ENUM = GLMessage_DataType_Type_ENUM;
- static inline bool Type_IsValid(int value) {
- return GLMessage_DataType_Type_IsValid(value);
- }
- static const Type Type_MIN =
- GLMessage_DataType_Type_Type_MIN;
- static const Type Type_MAX =
- GLMessage_DataType_Type_Type_MAX;
- static const int Type_ARRAYSIZE =
- GLMessage_DataType_Type_Type_ARRAYSIZE;
-
- // accessors -------------------------------------------------------
-
- // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
- inline bool has_type() const;
- inline void clear_type();
- static const int kTypeFieldNumber = 1;
- inline ::android::gltrace::GLMessage_DataType_Type type() const;
- inline void set_type(::android::gltrace::GLMessage_DataType_Type value);
-
- // required bool isArray = 2 [default = false];
- inline bool has_isarray() const;
- inline void clear_isarray();
- static const int kIsArrayFieldNumber = 2;
- inline bool isarray() const;
- inline void set_isarray(bool value);
-
- // repeated int32 intValue = 3;
- inline int intvalue_size() const;
- inline void clear_intvalue();
- static const int kIntValueFieldNumber = 3;
- inline ::google::protobuf::int32 intvalue(int index) const;
- inline void set_intvalue(int index, ::google::protobuf::int32 value);
- inline void add_intvalue(::google::protobuf::int32 value);
- inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
- intvalue() const;
- inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
- mutable_intvalue();
-
- // repeated float floatValue = 4;
- inline int floatvalue_size() const;
- inline void clear_floatvalue();
- static const int kFloatValueFieldNumber = 4;
- inline float floatvalue(int index) const;
- inline void set_floatvalue(int index, float value);
- inline void add_floatvalue(float value);
- inline const ::google::protobuf::RepeatedField< float >&
- floatvalue() const;
- inline ::google::protobuf::RepeatedField< float >*
- mutable_floatvalue();
-
- // repeated bytes charValue = 5;
- inline int charvalue_size() const;
- inline void clear_charvalue();
- static const int kCharValueFieldNumber = 5;
- inline const ::std::string& charvalue(int index) const;
- inline ::std::string* mutable_charvalue(int index);
- inline void set_charvalue(int index, const ::std::string& value);
- inline void set_charvalue(int index, const char* value);
- inline void set_charvalue(int index, const void* value, size_t size);
- inline ::std::string* add_charvalue();
- inline void add_charvalue(const ::std::string& value);
- inline void add_charvalue(const char* value);
- inline void add_charvalue(const void* value, size_t size);
- inline const ::google::protobuf::RepeatedPtrField< ::std::string>& charvalue() const;
- inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_charvalue();
-
- // repeated bytes rawBytes = 6;
- inline int rawbytes_size() const;
- inline void clear_rawbytes();
- static const int kRawBytesFieldNumber = 6;
- inline const ::std::string& rawbytes(int index) const;
- inline ::std::string* mutable_rawbytes(int index);
- inline void set_rawbytes(int index, const ::std::string& value);
- inline void set_rawbytes(int index, const char* value);
- inline void set_rawbytes(int index, const void* value, size_t size);
- inline ::std::string* add_rawbytes();
- inline void add_rawbytes(const ::std::string& value);
- inline void add_rawbytes(const char* value);
- inline void add_rawbytes(const void* value, size_t size);
- inline const ::google::protobuf::RepeatedPtrField< ::std::string>& rawbytes() const;
- inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_rawbytes();
-
- // repeated bool boolValue = 7;
- inline int boolvalue_size() const;
- inline void clear_boolvalue();
- static const int kBoolValueFieldNumber = 7;
- inline bool boolvalue(int index) const;
- inline void set_boolvalue(int index, bool value);
- inline void add_boolvalue(bool value);
- inline const ::google::protobuf::RepeatedField< bool >&
- boolvalue() const;
- inline ::google::protobuf::RepeatedField< bool >*
- mutable_boolvalue();
-
- // @@protoc_insertion_point(class_scope:android.gltrace.GLMessage.DataType)
- private:
- mutable int _cached_size_;
-
- int type_;
- bool isarray_;
- ::google::protobuf::RepeatedField< ::google::protobuf::int32 > intvalue_;
- ::google::protobuf::RepeatedField< float > floatvalue_;
- ::google::protobuf::RepeatedPtrField< ::std::string> charvalue_;
- ::google::protobuf::RepeatedPtrField< ::std::string> rawbytes_;
- ::google::protobuf::RepeatedField< bool > boolvalue_;
- friend void protobuf_AddDesc_gltrace_2eproto();
- friend void protobuf_AssignDesc_gltrace_2eproto();
- friend void protobuf_ShutdownFile_gltrace_2eproto();
-
- ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
-
- // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
- inline bool _has_bit(int index) const {
- return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
- }
- inline void _set_bit(int index) {
- _has_bits_[index / 32] |= (1u << (index % 32));
- }
- inline void _clear_bit(int index) {
- _has_bits_[index / 32] &= ~(1u << (index % 32));
- }
-
- void InitAsDefaultInstance();
- static GLMessage_DataType* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class GLMessage_FrameBuffer : public ::google::protobuf::MessageLite {
- public:
- GLMessage_FrameBuffer();
- virtual ~GLMessage_FrameBuffer();
-
- GLMessage_FrameBuffer(const GLMessage_FrameBuffer& from);
-
- inline GLMessage_FrameBuffer& operator=(const GLMessage_FrameBuffer& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const GLMessage_FrameBuffer& default_instance();
-
- void Swap(GLMessage_FrameBuffer* other);
-
- // implements Message ----------------------------------------------
-
- GLMessage_FrameBuffer* New() const;
- void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
- void CopyFrom(const GLMessage_FrameBuffer& from);
- void MergeFrom(const GLMessage_FrameBuffer& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
-
- ::std::string GetTypeName() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // required int32 width = 1;
- inline bool has_width() const;
- inline void clear_width();
- static const int kWidthFieldNumber = 1;
- inline ::google::protobuf::int32 width() const;
- inline void set_width(::google::protobuf::int32 value);
-
- // required int32 height = 2;
- inline bool has_height() const;
- inline void clear_height();
- static const int kHeightFieldNumber = 2;
- inline ::google::protobuf::int32 height() const;
- inline void set_height(::google::protobuf::int32 value);
-
- // repeated bytes contents = 3;
- inline int contents_size() const;
- inline void clear_contents();
- static const int kContentsFieldNumber = 3;
- inline const ::std::string& contents(int index) const;
- inline ::std::string* mutable_contents(int index);
- inline void set_contents(int index, const ::std::string& value);
- inline void set_contents(int index, const char* value);
- inline void set_contents(int index, const void* value, size_t size);
- inline ::std::string* add_contents();
- inline void add_contents(const ::std::string& value);
- inline void add_contents(const char* value);
- inline void add_contents(const void* value, size_t size);
- inline const ::google::protobuf::RepeatedPtrField< ::std::string>& contents() const;
- inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_contents();
-
- // @@protoc_insertion_point(class_scope:android.gltrace.GLMessage.FrameBuffer)
- private:
- mutable int _cached_size_;
-
- ::google::protobuf::int32 width_;
- ::google::protobuf::int32 height_;
- ::google::protobuf::RepeatedPtrField< ::std::string> contents_;
- friend void protobuf_AddDesc_gltrace_2eproto();
- friend void protobuf_AssignDesc_gltrace_2eproto();
- friend void protobuf_ShutdownFile_gltrace_2eproto();
-
- ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
-
- // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
- inline bool _has_bit(int index) const {
- return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
- }
- inline void _set_bit(int index) {
- _has_bits_[index / 32] |= (1u << (index % 32));
- }
- inline void _clear_bit(int index) {
- _has_bits_[index / 32] &= ~(1u << (index % 32));
- }
-
- void InitAsDefaultInstance();
- static GLMessage_FrameBuffer* default_instance_;
-};
-// -------------------------------------------------------------------
-
-class GLMessage : public ::google::protobuf::MessageLite {
- public:
- GLMessage();
- virtual ~GLMessage();
-
- GLMessage(const GLMessage& from);
-
- inline GLMessage& operator=(const GLMessage& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const GLMessage& default_instance();
-
- void Swap(GLMessage* other);
-
- // implements Message ----------------------------------------------
-
- GLMessage* New() const;
- void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
- void CopyFrom(const GLMessage& from);
- void MergeFrom(const GLMessage& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
-
- ::std::string GetTypeName() const;
-
- // nested types ----------------------------------------------------
-
- typedef GLMessage_DataType DataType;
- typedef GLMessage_FrameBuffer FrameBuffer;
-
- typedef GLMessage_Function Function;
- static const Function glActiveTexture = GLMessage_Function_glActiveTexture;
- static const Function glAlphaFunc = GLMessage_Function_glAlphaFunc;
- static const Function glAlphaFuncx = GLMessage_Function_glAlphaFuncx;
- static const Function glAlphaFuncxOES = GLMessage_Function_glAlphaFuncxOES;
- static const Function glAttachShader = GLMessage_Function_glAttachShader;
- static const Function glBeginPerfMonitorAMD = GLMessage_Function_glBeginPerfMonitorAMD;
- static const Function glBindAttribLocation = GLMessage_Function_glBindAttribLocation;
- static const Function glBindBuffer = GLMessage_Function_glBindBuffer;
- static const Function glBindFramebuffer = GLMessage_Function_glBindFramebuffer;
- static const Function glBindFramebufferOES = GLMessage_Function_glBindFramebufferOES;
- static const Function glBindRenderbuffer = GLMessage_Function_glBindRenderbuffer;
- static const Function glBindRenderbufferOES = GLMessage_Function_glBindRenderbufferOES;
- static const Function glBindTexture = GLMessage_Function_glBindTexture;
- static const Function glBindVertexArrayOES = GLMessage_Function_glBindVertexArrayOES;
- static const Function glBlendColor = GLMessage_Function_glBlendColor;
- static const Function glBlendEquation = GLMessage_Function_glBlendEquation;
- static const Function glBlendEquationOES = GLMessage_Function_glBlendEquationOES;
- static const Function glBlendEquationSeparate = GLMessage_Function_glBlendEquationSeparate;
- static const Function glBlendEquationSeparateOES = GLMessage_Function_glBlendEquationSeparateOES;
- static const Function glBlendFunc = GLMessage_Function_glBlendFunc;
- static const Function glBlendFuncSeparate = GLMessage_Function_glBlendFuncSeparate;
- static const Function glBlendFuncSeparateOES = GLMessage_Function_glBlendFuncSeparateOES;
- static const Function glBufferData = GLMessage_Function_glBufferData;
- static const Function glBufferSubData = GLMessage_Function_glBufferSubData;
- static const Function glCheckFramebufferStatus = GLMessage_Function_glCheckFramebufferStatus;
- static const Function glCheckFramebufferStatusOES = GLMessage_Function_glCheckFramebufferStatusOES;
- static const Function glClearColor = GLMessage_Function_glClearColor;
- static const Function glClearColorx = GLMessage_Function_glClearColorx;
- static const Function glClearColorxOES = GLMessage_Function_glClearColorxOES;
- static const Function glClearDepthf = GLMessage_Function_glClearDepthf;
- static const Function glClearDepthfOES = GLMessage_Function_glClearDepthfOES;
- static const Function glClearDepthx = GLMessage_Function_glClearDepthx;
- static const Function glClearDepthxOES = GLMessage_Function_glClearDepthxOES;
- static const Function glClear = GLMessage_Function_glClear;
- static const Function glClearStencil = GLMessage_Function_glClearStencil;
- static const Function glClientActiveTexture = GLMessage_Function_glClientActiveTexture;
- static const Function glClipPlanef = GLMessage_Function_glClipPlanef;
- static const Function glClipPlanefIMG = GLMessage_Function_glClipPlanefIMG;
- static const Function glClipPlanefOES = GLMessage_Function_glClipPlanefOES;
- static const Function glClipPlanex = GLMessage_Function_glClipPlanex;
- static const Function glClipPlanexIMG = GLMessage_Function_glClipPlanexIMG;
- static const Function glClipPlanexOES = GLMessage_Function_glClipPlanexOES;
- static const Function glColor4f = GLMessage_Function_glColor4f;
- static const Function glColor4ub = GLMessage_Function_glColor4ub;
- static const Function glColor4x = GLMessage_Function_glColor4x;
- static const Function glColor4xOES = GLMessage_Function_glColor4xOES;
- static const Function glColorMask = GLMessage_Function_glColorMask;
- static const Function glColorPointer = GLMessage_Function_glColorPointer;
- static const Function glCompileShader = GLMessage_Function_glCompileShader;
- static const Function glCompressedTexImage2D = GLMessage_Function_glCompressedTexImage2D;
- static const Function glCompressedTexImage3DOES = GLMessage_Function_glCompressedTexImage3DOES;
- static const Function glCompressedTexSubImage2D = GLMessage_Function_glCompressedTexSubImage2D;
- static const Function glCompressedTexSubImage3DOES = GLMessage_Function_glCompressedTexSubImage3DOES;
- static const Function glCopyTexImage2D = GLMessage_Function_glCopyTexImage2D;
- static const Function glCopyTexSubImage2D = GLMessage_Function_glCopyTexSubImage2D;
- static const Function glCopyTexSubImage3DOES = GLMessage_Function_glCopyTexSubImage3DOES;
- static const Function glCoverageMaskNV = GLMessage_Function_glCoverageMaskNV;
- static const Function glCoverageOperationNV = GLMessage_Function_glCoverageOperationNV;
- static const Function glCreateProgram = GLMessage_Function_glCreateProgram;
- static const Function glCreateShader = GLMessage_Function_glCreateShader;
- static const Function glCullFace = GLMessage_Function_glCullFace;
- static const Function glCurrentPaletteMatrixOES = GLMessage_Function_glCurrentPaletteMatrixOES;
- static const Function glDeleteBuffers = GLMessage_Function_glDeleteBuffers;
- static const Function glDeleteFencesNV = GLMessage_Function_glDeleteFencesNV;
- static const Function glDeleteFramebuffers = GLMessage_Function_glDeleteFramebuffers;
- static const Function glDeleteFramebuffersOES = GLMessage_Function_glDeleteFramebuffersOES;
- static const Function glDeletePerfMonitorsAMD = GLMessage_Function_glDeletePerfMonitorsAMD;
- static const Function glDeleteProgram = GLMessage_Function_glDeleteProgram;
- static const Function glDeleteRenderbuffers = GLMessage_Function_glDeleteRenderbuffers;
- static const Function glDeleteRenderbuffersOES = GLMessage_Function_glDeleteRenderbuffersOES;
- static const Function glDeleteShader = GLMessage_Function_glDeleteShader;
- static const Function glDeleteTextures = GLMessage_Function_glDeleteTextures;
- static const Function glDeleteVertexArraysOES = GLMessage_Function_glDeleteVertexArraysOES;
- static const Function glDepthFunc = GLMessage_Function_glDepthFunc;
- static const Function glDepthMask = GLMessage_Function_glDepthMask;
- static const Function glDepthRangef = GLMessage_Function_glDepthRangef;
- static const Function glDepthRangefOES = GLMessage_Function_glDepthRangefOES;
- static const Function glDepthRangex = GLMessage_Function_glDepthRangex;
- static const Function glDepthRangexOES = GLMessage_Function_glDepthRangexOES;
- static const Function glDetachShader = GLMessage_Function_glDetachShader;
- static const Function glDisableClientState = GLMessage_Function_glDisableClientState;
- static const Function glDisableDriverControlQCOM = GLMessage_Function_glDisableDriverControlQCOM;
- static const Function glDisable = GLMessage_Function_glDisable;
- static const Function glDisableVertexAttribArray = GLMessage_Function_glDisableVertexAttribArray;
- static const Function glDiscardFramebufferEXT = GLMessage_Function_glDiscardFramebufferEXT;
- static const Function glDrawArrays = GLMessage_Function_glDrawArrays;
- static const Function glDrawElements = GLMessage_Function_glDrawElements;
- static const Function glDrawTexfOES = GLMessage_Function_glDrawTexfOES;
- static const Function glDrawTexfvOES = GLMessage_Function_glDrawTexfvOES;
- static const Function glDrawTexiOES = GLMessage_Function_glDrawTexiOES;
- static const Function glDrawTexivOES = GLMessage_Function_glDrawTexivOES;
- static const Function glDrawTexsOES = GLMessage_Function_glDrawTexsOES;
- static const Function glDrawTexsvOES = GLMessage_Function_glDrawTexsvOES;
- static const Function glDrawTexxOES = GLMessage_Function_glDrawTexxOES;
- static const Function glDrawTexxvOES = GLMessage_Function_glDrawTexxvOES;
- static const Function glEGLImageTargetRenderbufferStorageOES = GLMessage_Function_glEGLImageTargetRenderbufferStorageOES;
- static const Function glEGLImageTargetTexture2DOES = GLMessage_Function_glEGLImageTargetTexture2DOES;
- static const Function glEnableClientState = GLMessage_Function_glEnableClientState;
- static const Function glEnableDriverControlQCOM = GLMessage_Function_glEnableDriverControlQCOM;
- static const Function glEnable = GLMessage_Function_glEnable;
- static const Function glEnableVertexAttribArray = GLMessage_Function_glEnableVertexAttribArray;
- static const Function glEndPerfMonitorAMD = GLMessage_Function_glEndPerfMonitorAMD;
- static const Function glEndTilingQCOM = GLMessage_Function_glEndTilingQCOM;
- static const Function glExtGetBufferPointervQCOM = GLMessage_Function_glExtGetBufferPointervQCOM;
- static const Function glExtGetBuffersQCOM = GLMessage_Function_glExtGetBuffersQCOM;
- static const Function glExtGetFramebuffersQCOM = GLMessage_Function_glExtGetFramebuffersQCOM;
- static const Function glExtGetProgramBinarySourceQCOM = GLMessage_Function_glExtGetProgramBinarySourceQCOM;
- static const Function glExtGetProgramsQCOM = GLMessage_Function_glExtGetProgramsQCOM;
- static const Function glExtGetRenderbuffersQCOM = GLMessage_Function_glExtGetRenderbuffersQCOM;
- static const Function glExtGetShadersQCOM = GLMessage_Function_glExtGetShadersQCOM;
- static const Function glExtGetTexLevelParameterivQCOM = GLMessage_Function_glExtGetTexLevelParameterivQCOM;
- static const Function glExtGetTexSubImageQCOM = GLMessage_Function_glExtGetTexSubImageQCOM;
- static const Function glExtGetTexturesQCOM = GLMessage_Function_glExtGetTexturesQCOM;
- static const Function glExtIsProgramBinaryQCOM = GLMessage_Function_glExtIsProgramBinaryQCOM;
- static const Function glExtTexObjectStateOverrideiQCOM = GLMessage_Function_glExtTexObjectStateOverrideiQCOM;
- static const Function glFinishFenceNV = GLMessage_Function_glFinishFenceNV;
- static const Function glFinish = GLMessage_Function_glFinish;
- static const Function glFlush = GLMessage_Function_glFlush;
- static const Function glFogf = GLMessage_Function_glFogf;
- static const Function glFogfv = GLMessage_Function_glFogfv;
- static const Function glFogx = GLMessage_Function_glFogx;
- static const Function glFogxOES = GLMessage_Function_glFogxOES;
- static const Function glFogxv = GLMessage_Function_glFogxv;
- static const Function glFogxvOES = GLMessage_Function_glFogxvOES;
- static const Function glFramebufferRenderbuffer = GLMessage_Function_glFramebufferRenderbuffer;
- static const Function glFramebufferRenderbufferOES = GLMessage_Function_glFramebufferRenderbufferOES;
- static const Function glFramebufferTexture2D = GLMessage_Function_glFramebufferTexture2D;
- static const Function glFramebufferTexture2DMultisampleIMG = GLMessage_Function_glFramebufferTexture2DMultisampleIMG;
- static const Function glFramebufferTexture2DOES = GLMessage_Function_glFramebufferTexture2DOES;
- static const Function glFramebufferTexture3DOES = GLMessage_Function_glFramebufferTexture3DOES;
- static const Function glFrontFace = GLMessage_Function_glFrontFace;
- static const Function glFrustumf = GLMessage_Function_glFrustumf;
- static const Function glFrustumfOES = GLMessage_Function_glFrustumfOES;
- static const Function glFrustumx = GLMessage_Function_glFrustumx;
- static const Function glFrustumxOES = GLMessage_Function_glFrustumxOES;
- static const Function glGenBuffers = GLMessage_Function_glGenBuffers;
- static const Function glGenerateMipmap = GLMessage_Function_glGenerateMipmap;
- static const Function glGenerateMipmapOES = GLMessage_Function_glGenerateMipmapOES;
- static const Function glGenFencesNV = GLMessage_Function_glGenFencesNV;
- static const Function glGenFramebuffers = GLMessage_Function_glGenFramebuffers;
- static const Function glGenFramebuffersOES = GLMessage_Function_glGenFramebuffersOES;
- static const Function glGenPerfMonitorsAMD = GLMessage_Function_glGenPerfMonitorsAMD;
- static const Function glGenRenderbuffers = GLMessage_Function_glGenRenderbuffers;
- static const Function glGenRenderbuffersOES = GLMessage_Function_glGenRenderbuffersOES;
- static const Function glGenTextures = GLMessage_Function_glGenTextures;
- static const Function glGenVertexArraysOES = GLMessage_Function_glGenVertexArraysOES;
- static const Function glGetActiveAttrib = GLMessage_Function_glGetActiveAttrib;
- static const Function glGetActiveUniform = GLMessage_Function_glGetActiveUniform;
- static const Function glGetAttachedShaders = GLMessage_Function_glGetAttachedShaders;
- static const Function glGetAttribLocation = GLMessage_Function_glGetAttribLocation;
- static const Function glGetBooleanv = GLMessage_Function_glGetBooleanv;
- static const Function glGetBufferParameteriv = GLMessage_Function_glGetBufferParameteriv;
- static const Function glGetBufferPointervOES = GLMessage_Function_glGetBufferPointervOES;
- static const Function glGetClipPlanef = GLMessage_Function_glGetClipPlanef;
- static const Function glGetClipPlanefOES = GLMessage_Function_glGetClipPlanefOES;
- static const Function glGetClipPlanex = GLMessage_Function_glGetClipPlanex;
- static const Function glGetClipPlanexOES = GLMessage_Function_glGetClipPlanexOES;
- static const Function glGetDriverControlsQCOM = GLMessage_Function_glGetDriverControlsQCOM;
- static const Function glGetDriverControlStringQCOM = GLMessage_Function_glGetDriverControlStringQCOM;
- static const Function glGetError = GLMessage_Function_glGetError;
- static const Function glGetFenceivNV = GLMessage_Function_glGetFenceivNV;
- static const Function glGetFixedv = GLMessage_Function_glGetFixedv;
- static const Function glGetFixedvOES = GLMessage_Function_glGetFixedvOES;
- static const Function glGetFloatv = GLMessage_Function_glGetFloatv;
- static const Function glGetFramebufferAttachmentParameteriv = GLMessage_Function_glGetFramebufferAttachmentParameteriv;
- static const Function glGetFramebufferAttachmentParameterivOES = GLMessage_Function_glGetFramebufferAttachmentParameterivOES;
- static const Function glGetIntegerv = GLMessage_Function_glGetIntegerv;
- static const Function glGetLightfv = GLMessage_Function_glGetLightfv;
- static const Function glGetLightxv = GLMessage_Function_glGetLightxv;
- static const Function glGetLightxvOES = GLMessage_Function_glGetLightxvOES;
- static const Function glGetMaterialfv = GLMessage_Function_glGetMaterialfv;
- static const Function glGetMaterialxv = GLMessage_Function_glGetMaterialxv;
- static const Function glGetMaterialxvOES = GLMessage_Function_glGetMaterialxvOES;
- static const Function glGetPerfMonitorCounterDataAMD = GLMessage_Function_glGetPerfMonitorCounterDataAMD;
- static const Function glGetPerfMonitorCounterInfoAMD = GLMessage_Function_glGetPerfMonitorCounterInfoAMD;
- static const Function glGetPerfMonitorCountersAMD = GLMessage_Function_glGetPerfMonitorCountersAMD;
- static const Function glGetPerfMonitorCounterStringAMD = GLMessage_Function_glGetPerfMonitorCounterStringAMD;
- static const Function glGetPerfMonitorGroupsAMD = GLMessage_Function_glGetPerfMonitorGroupsAMD;
- static const Function glGetPerfMonitorGroupStringAMD = GLMessage_Function_glGetPerfMonitorGroupStringAMD;
- static const Function glGetPointerv = GLMessage_Function_glGetPointerv;
- static const Function glGetProgramBinaryOES = GLMessage_Function_glGetProgramBinaryOES;
- static const Function glGetProgramInfoLog = GLMessage_Function_glGetProgramInfoLog;
- static const Function glGetProgramiv = GLMessage_Function_glGetProgramiv;
- static const Function glGetRenderbufferParameteriv = GLMessage_Function_glGetRenderbufferParameteriv;
- static const Function glGetRenderbufferParameterivOES = GLMessage_Function_glGetRenderbufferParameterivOES;
- static const Function glGetShaderInfoLog = GLMessage_Function_glGetShaderInfoLog;
- static const Function glGetShaderiv = GLMessage_Function_glGetShaderiv;
- static const Function glGetShaderPrecisionFormat = GLMessage_Function_glGetShaderPrecisionFormat;
- static const Function glGetShaderSource = GLMessage_Function_glGetShaderSource;
- static const Function glGetString = GLMessage_Function_glGetString;
- static const Function glGetTexEnvfv = GLMessage_Function_glGetTexEnvfv;
- static const Function glGetTexEnviv = GLMessage_Function_glGetTexEnviv;
- static const Function glGetTexEnvxv = GLMessage_Function_glGetTexEnvxv;
- static const Function glGetTexEnvxvOES = GLMessage_Function_glGetTexEnvxvOES;
- static const Function glGetTexGenfvOES = GLMessage_Function_glGetTexGenfvOES;
- static const Function glGetTexGenivOES = GLMessage_Function_glGetTexGenivOES;
- static const Function glGetTexGenxvOES = GLMessage_Function_glGetTexGenxvOES;
- static const Function glGetTexParameterfv = GLMessage_Function_glGetTexParameterfv;
- static const Function glGetTexParameteriv = GLMessage_Function_glGetTexParameteriv;
- static const Function glGetTexParameterxv = GLMessage_Function_glGetTexParameterxv;
- static const Function glGetTexParameterxvOES = GLMessage_Function_glGetTexParameterxvOES;
- static const Function glGetUniformfv = GLMessage_Function_glGetUniformfv;
- static const Function glGetUniformiv = GLMessage_Function_glGetUniformiv;
- static const Function glGetUniformLocation = GLMessage_Function_glGetUniformLocation;
- static const Function glGetVertexAttribfv = GLMessage_Function_glGetVertexAttribfv;
- static const Function glGetVertexAttribiv = GLMessage_Function_glGetVertexAttribiv;
- static const Function glGetVertexAttribPointerv = GLMessage_Function_glGetVertexAttribPointerv;
- static const Function glHint = GLMessage_Function_glHint;
- static const Function glIsBuffer = GLMessage_Function_glIsBuffer;
- static const Function glIsEnabled = GLMessage_Function_glIsEnabled;
- static const Function glIsFenceNV = GLMessage_Function_glIsFenceNV;
- static const Function glIsFramebuffer = GLMessage_Function_glIsFramebuffer;
- static const Function glIsFramebufferOES = GLMessage_Function_glIsFramebufferOES;
- static const Function glIsProgram = GLMessage_Function_glIsProgram;
- static const Function glIsRenderbuffer = GLMessage_Function_glIsRenderbuffer;
- static const Function glIsRenderbufferOES = GLMessage_Function_glIsRenderbufferOES;
- static const Function glIsShader = GLMessage_Function_glIsShader;
- static const Function glIsTexture = GLMessage_Function_glIsTexture;
- static const Function glIsVertexArrayOES = GLMessage_Function_glIsVertexArrayOES;
- static const Function glLightf = GLMessage_Function_glLightf;
- static const Function glLightfv = GLMessage_Function_glLightfv;
- static const Function glLightModelf = GLMessage_Function_glLightModelf;
- static const Function glLightModelfv = GLMessage_Function_glLightModelfv;
- static const Function glLightModelx = GLMessage_Function_glLightModelx;
- static const Function glLightModelxOES = GLMessage_Function_glLightModelxOES;
- static const Function glLightModelxv = GLMessage_Function_glLightModelxv;
- static const Function glLightModelxvOES = GLMessage_Function_glLightModelxvOES;
- static const Function glLightx = GLMessage_Function_glLightx;
- static const Function glLightxOES = GLMessage_Function_glLightxOES;
- static const Function glLightxv = GLMessage_Function_glLightxv;
- static const Function glLightxvOES = GLMessage_Function_glLightxvOES;
- static const Function glLineWidth = GLMessage_Function_glLineWidth;
- static const Function glLineWidthx = GLMessage_Function_glLineWidthx;
- static const Function glLineWidthxOES = GLMessage_Function_glLineWidthxOES;
- static const Function glLinkProgram = GLMessage_Function_glLinkProgram;
- static const Function glLoadIdentity = GLMessage_Function_glLoadIdentity;
- static const Function glLoadMatrixf = GLMessage_Function_glLoadMatrixf;
- static const Function glLoadMatrixx = GLMessage_Function_glLoadMatrixx;
- static const Function glLoadMatrixxOES = GLMessage_Function_glLoadMatrixxOES;
- static const Function glLoadPaletteFromModelViewMatrixOES = GLMessage_Function_glLoadPaletteFromModelViewMatrixOES;
- static const Function glLogicOp = GLMessage_Function_glLogicOp;
- static const Function glMapBufferOES = GLMessage_Function_glMapBufferOES;
- static const Function glMaterialf = GLMessage_Function_glMaterialf;
- static const Function glMaterialfv = GLMessage_Function_glMaterialfv;
- static const Function glMaterialx = GLMessage_Function_glMaterialx;
- static const Function glMaterialxOES = GLMessage_Function_glMaterialxOES;
- static const Function glMaterialxv = GLMessage_Function_glMaterialxv;
- static const Function glMaterialxvOES = GLMessage_Function_glMaterialxvOES;
- static const Function glMatrixIndexPointerOES = GLMessage_Function_glMatrixIndexPointerOES;
- static const Function glMatrixMode = GLMessage_Function_glMatrixMode;
- static const Function glMultiDrawArraysEXT = GLMessage_Function_glMultiDrawArraysEXT;
- static const Function glMultiDrawElementsEXT = GLMessage_Function_glMultiDrawElementsEXT;
- static const Function glMultiTexCoord4f = GLMessage_Function_glMultiTexCoord4f;
- static const Function glMultiTexCoord4x = GLMessage_Function_glMultiTexCoord4x;
- static const Function glMultiTexCoord4xOES = GLMessage_Function_glMultiTexCoord4xOES;
- static const Function glMultMatrixf = GLMessage_Function_glMultMatrixf;
- static const Function glMultMatrixx = GLMessage_Function_glMultMatrixx;
- static const Function glMultMatrixxOES = GLMessage_Function_glMultMatrixxOES;
- static const Function glNormal3f = GLMessage_Function_glNormal3f;
- static const Function glNormal3x = GLMessage_Function_glNormal3x;
- static const Function glNormal3xOES = GLMessage_Function_glNormal3xOES;
- static const Function glNormalPointer = GLMessage_Function_glNormalPointer;
- static const Function glOrthof = GLMessage_Function_glOrthof;
- static const Function glOrthofOES = GLMessage_Function_glOrthofOES;
- static const Function glOrthox = GLMessage_Function_glOrthox;
- static const Function glOrthoxOES = GLMessage_Function_glOrthoxOES;
- static const Function glPixelStorei = GLMessage_Function_glPixelStorei;
- static const Function glPointParameterf = GLMessage_Function_glPointParameterf;
- static const Function glPointParameterfv = GLMessage_Function_glPointParameterfv;
- static const Function glPointParameterx = GLMessage_Function_glPointParameterx;
- static const Function glPointParameterxOES = GLMessage_Function_glPointParameterxOES;
- static const Function glPointParameterxv = GLMessage_Function_glPointParameterxv;
- static const Function glPointParameterxvOES = GLMessage_Function_glPointParameterxvOES;
- static const Function glPointSize = GLMessage_Function_glPointSize;
- static const Function glPointSizePointerOES = GLMessage_Function_glPointSizePointerOES;
- static const Function glPointSizex = GLMessage_Function_glPointSizex;
- static const Function glPointSizexOES = GLMessage_Function_glPointSizexOES;
- static const Function glPolygonOffset = GLMessage_Function_glPolygonOffset;
- static const Function glPolygonOffsetx = GLMessage_Function_glPolygonOffsetx;
- static const Function glPolygonOffsetxOES = GLMessage_Function_glPolygonOffsetxOES;
- static const Function glPopMatrix = GLMessage_Function_glPopMatrix;
- static const Function glProgramBinaryOES = GLMessage_Function_glProgramBinaryOES;
- static const Function glPushMatrix = GLMessage_Function_glPushMatrix;
- static const Function glQueryMatrixxOES = GLMessage_Function_glQueryMatrixxOES;
- static const Function glReadPixels = GLMessage_Function_glReadPixels;
- static const Function glReleaseShaderCompiler = GLMessage_Function_glReleaseShaderCompiler;
- static const Function glRenderbufferStorage = GLMessage_Function_glRenderbufferStorage;
- static const Function glRenderbufferStorageMultisampleIMG = GLMessage_Function_glRenderbufferStorageMultisampleIMG;
- static const Function glRenderbufferStorageOES = GLMessage_Function_glRenderbufferStorageOES;
- static const Function glRotatef = GLMessage_Function_glRotatef;
- static const Function glRotatex = GLMessage_Function_glRotatex;
- static const Function glRotatexOES = GLMessage_Function_glRotatexOES;
- static const Function glSampleCoverage = GLMessage_Function_glSampleCoverage;
- static const Function glSampleCoveragex = GLMessage_Function_glSampleCoveragex;
- static const Function glSampleCoveragexOES = GLMessage_Function_glSampleCoveragexOES;
- static const Function glScalef = GLMessage_Function_glScalef;
- static const Function glScalex = GLMessage_Function_glScalex;
- static const Function glScalexOES = GLMessage_Function_glScalexOES;
- static const Function glScissor = GLMessage_Function_glScissor;
- static const Function glSelectPerfMonitorCountersAMD = GLMessage_Function_glSelectPerfMonitorCountersAMD;
- static const Function glSetFenceNV = GLMessage_Function_glSetFenceNV;
- static const Function glShadeModel = GLMessage_Function_glShadeModel;
- static const Function glShaderBinary = GLMessage_Function_glShaderBinary;
- static const Function glShaderSource = GLMessage_Function_glShaderSource;
- static const Function glStartTilingQCOM = GLMessage_Function_glStartTilingQCOM;
- static const Function glStencilFunc = GLMessage_Function_glStencilFunc;
- static const Function glStencilFuncSeparate = GLMessage_Function_glStencilFuncSeparate;
- static const Function glStencilMask = GLMessage_Function_glStencilMask;
- static const Function glStencilMaskSeparate = GLMessage_Function_glStencilMaskSeparate;
- static const Function glStencilOp = GLMessage_Function_glStencilOp;
- static const Function glStencilOpSeparate = GLMessage_Function_glStencilOpSeparate;
- static const Function glTestFenceNV = GLMessage_Function_glTestFenceNV;
- static const Function glTexCoordPointer = GLMessage_Function_glTexCoordPointer;
- static const Function glTexEnvf = GLMessage_Function_glTexEnvf;
- static const Function glTexEnvfv = GLMessage_Function_glTexEnvfv;
- static const Function glTexEnvi = GLMessage_Function_glTexEnvi;
- static const Function glTexEnviv = GLMessage_Function_glTexEnviv;
- static const Function glTexEnvx = GLMessage_Function_glTexEnvx;
- static const Function glTexEnvxOES = GLMessage_Function_glTexEnvxOES;
- static const Function glTexEnvxv = GLMessage_Function_glTexEnvxv;
- static const Function glTexEnvxvOES = GLMessage_Function_glTexEnvxvOES;
- static const Function glTexGenfOES = GLMessage_Function_glTexGenfOES;
- static const Function glTexGenfvOES = GLMessage_Function_glTexGenfvOES;
- static const Function glTexGeniOES = GLMessage_Function_glTexGeniOES;
- static const Function glTexGenivOES = GLMessage_Function_glTexGenivOES;
- static const Function glTexGenxOES = GLMessage_Function_glTexGenxOES;
- static const Function glTexGenxvOES = GLMessage_Function_glTexGenxvOES;
- static const Function glTexImage2D = GLMessage_Function_glTexImage2D;
- static const Function glTexImage3DOES = GLMessage_Function_glTexImage3DOES;
- static const Function glTexParameterf = GLMessage_Function_glTexParameterf;
- static const Function glTexParameterfv = GLMessage_Function_glTexParameterfv;
- static const Function glTexParameteri = GLMessage_Function_glTexParameteri;
- static const Function glTexParameteriv = GLMessage_Function_glTexParameteriv;
- static const Function glTexParameterx = GLMessage_Function_glTexParameterx;
- static const Function glTexParameterxOES = GLMessage_Function_glTexParameterxOES;
- static const Function glTexParameterxv = GLMessage_Function_glTexParameterxv;
- static const Function glTexParameterxvOES = GLMessage_Function_glTexParameterxvOES;
- static const Function glTexSubImage2D = GLMessage_Function_glTexSubImage2D;
- static const Function glTexSubImage3DOES = GLMessage_Function_glTexSubImage3DOES;
- static const Function glTranslatef = GLMessage_Function_glTranslatef;
- static const Function glTranslatex = GLMessage_Function_glTranslatex;
- static const Function glTranslatexOES = GLMessage_Function_glTranslatexOES;
- static const Function glUniform1f = GLMessage_Function_glUniform1f;
- static const Function glUniform1fv = GLMessage_Function_glUniform1fv;
- static const Function glUniform1i = GLMessage_Function_glUniform1i;
- static const Function glUniform1iv = GLMessage_Function_glUniform1iv;
- static const Function glUniform2f = GLMessage_Function_glUniform2f;
- static const Function glUniform2fv = GLMessage_Function_glUniform2fv;
- static const Function glUniform2i = GLMessage_Function_glUniform2i;
- static const Function glUniform2iv = GLMessage_Function_glUniform2iv;
- static const Function glUniform3f = GLMessage_Function_glUniform3f;
- static const Function glUniform3fv = GLMessage_Function_glUniform3fv;
- static const Function glUniform3i = GLMessage_Function_glUniform3i;
- static const Function glUniform3iv = GLMessage_Function_glUniform3iv;
- static const Function glUniform4f = GLMessage_Function_glUniform4f;
- static const Function glUniform4fv = GLMessage_Function_glUniform4fv;
- static const Function glUniform4i = GLMessage_Function_glUniform4i;
- static const Function glUniform4iv = GLMessage_Function_glUniform4iv;
- static const Function glUniformMatrix2fv = GLMessage_Function_glUniformMatrix2fv;
- static const Function glUniformMatrix3fv = GLMessage_Function_glUniformMatrix3fv;
- static const Function glUniformMatrix4fv = GLMessage_Function_glUniformMatrix4fv;
- static const Function glUnmapBufferOES = GLMessage_Function_glUnmapBufferOES;
- static const Function glUseProgram = GLMessage_Function_glUseProgram;
- static const Function glValidateProgram = GLMessage_Function_glValidateProgram;
- static const Function glVertexAttrib1f = GLMessage_Function_glVertexAttrib1f;
- static const Function glVertexAttrib1fv = GLMessage_Function_glVertexAttrib1fv;
- static const Function glVertexAttrib2f = GLMessage_Function_glVertexAttrib2f;
- static const Function glVertexAttrib2fv = GLMessage_Function_glVertexAttrib2fv;
- static const Function glVertexAttrib3f = GLMessage_Function_glVertexAttrib3f;
- static const Function glVertexAttrib3fv = GLMessage_Function_glVertexAttrib3fv;
- static const Function glVertexAttrib4f = GLMessage_Function_glVertexAttrib4f;
- static const Function glVertexAttrib4fv = GLMessage_Function_glVertexAttrib4fv;
- static const Function glVertexAttribPointer = GLMessage_Function_glVertexAttribPointer;
- static const Function glVertexPointer = GLMessage_Function_glVertexPointer;
- static const Function glViewport = GLMessage_Function_glViewport;
- static const Function glWeightPointerOES = GLMessage_Function_glWeightPointerOES;
- static const Function glActiveShaderProgramEXT = GLMessage_Function_glActiveShaderProgramEXT;
- static const Function glAlphaFuncQCOM = GLMessage_Function_glAlphaFuncQCOM;
- static const Function glBeginQueryEXT = GLMessage_Function_glBeginQueryEXT;
- static const Function glBindProgramPipelineEXT = GLMessage_Function_glBindProgramPipelineEXT;
- static const Function glBlitFramebufferANGLE = GLMessage_Function_glBlitFramebufferANGLE;
- static const Function glCreateShaderProgramvEXT = GLMessage_Function_glCreateShaderProgramvEXT;
- static const Function glDeleteProgramPipelinesEXT = GLMessage_Function_glDeleteProgramPipelinesEXT;
- static const Function glDeleteQueriesEXT = GLMessage_Function_glDeleteQueriesEXT;
- static const Function glDrawBuffersNV = GLMessage_Function_glDrawBuffersNV;
- static const Function glEndQueryEXT = GLMessage_Function_glEndQueryEXT;
- static const Function glFramebufferTexture2DMultisampleEXT = GLMessage_Function_glFramebufferTexture2DMultisampleEXT;
- static const Function glGenProgramPipelinesEXT = GLMessage_Function_glGenProgramPipelinesEXT;
- static const Function glGenQueriesEXT = GLMessage_Function_glGenQueriesEXT;
- static const Function glGetGraphicsResetStatusEXT = GLMessage_Function_glGetGraphicsResetStatusEXT;
- static const Function glGetObjectLabelEXT = GLMessage_Function_glGetObjectLabelEXT;
- static const Function glGetProgramPipelineInfoLogEXT = GLMessage_Function_glGetProgramPipelineInfoLogEXT;
- static const Function glGetProgramPipelineivEXT = GLMessage_Function_glGetProgramPipelineivEXT;
- static const Function glGetQueryObjectuivEXT = GLMessage_Function_glGetQueryObjectuivEXT;
- static const Function glGetQueryivEXT = GLMessage_Function_glGetQueryivEXT;
- static const Function glGetnUniformfvEXT = GLMessage_Function_glGetnUniformfvEXT;
- static const Function glGetnUniformivEXT = GLMessage_Function_glGetnUniformivEXT;
- static const Function glInsertEventMarkerEXT = GLMessage_Function_glInsertEventMarkerEXT;
- static const Function glIsProgramPipelineEXT = GLMessage_Function_glIsProgramPipelineEXT;
- static const Function glIsQueryEXT = GLMessage_Function_glIsQueryEXT;
- static const Function glLabelObjectEXT = GLMessage_Function_glLabelObjectEXT;
- static const Function glPopGroupMarkerEXT = GLMessage_Function_glPopGroupMarkerEXT;
- static const Function glProgramParameteriEXT = GLMessage_Function_glProgramParameteriEXT;
- static const Function glProgramUniform1fEXT = GLMessage_Function_glProgramUniform1fEXT;
- static const Function glProgramUniform1fvEXT = GLMessage_Function_glProgramUniform1fvEXT;
- static const Function glProgramUniform1iEXT = GLMessage_Function_glProgramUniform1iEXT;
- static const Function glProgramUniform1ivEXT = GLMessage_Function_glProgramUniform1ivEXT;
- static const Function glProgramUniform2fEXT = GLMessage_Function_glProgramUniform2fEXT;
- static const Function glProgramUniform2fvEXT = GLMessage_Function_glProgramUniform2fvEXT;
- static const Function glProgramUniform2iEXT = GLMessage_Function_glProgramUniform2iEXT;
- static const Function glProgramUniform2ivEXT = GLMessage_Function_glProgramUniform2ivEXT;
- static const Function glProgramUniform3fEXT = GLMessage_Function_glProgramUniform3fEXT;
- static const Function glProgramUniform3fvEXT = GLMessage_Function_glProgramUniform3fvEXT;
- static const Function glProgramUniform3iEXT = GLMessage_Function_glProgramUniform3iEXT;
- static const Function glProgramUniform3ivEXT = GLMessage_Function_glProgramUniform3ivEXT;
- static const Function glProgramUniform4fEXT = GLMessage_Function_glProgramUniform4fEXT;
- static const Function glProgramUniform4fvEXT = GLMessage_Function_glProgramUniform4fvEXT;
- static const Function glProgramUniform4iEXT = GLMessage_Function_glProgramUniform4iEXT;
- static const Function glProgramUniform4ivEXT = GLMessage_Function_glProgramUniform4ivEXT;
- static const Function glProgramUniformMatrix2fvEXT = GLMessage_Function_glProgramUniformMatrix2fvEXT;
- static const Function glProgramUniformMatrix3fvEXT = GLMessage_Function_glProgramUniformMatrix3fvEXT;
- static const Function glProgramUniformMatrix4fvEXT = GLMessage_Function_glProgramUniformMatrix4fvEXT;
- static const Function glPushGroupMarkerEXT = GLMessage_Function_glPushGroupMarkerEXT;
- static const Function glReadBufferNV = GLMessage_Function_glReadBufferNV;
- static const Function glReadnPixelsEXT = GLMessage_Function_glReadnPixelsEXT;
- static const Function glRenderbufferStorageMultisampleANGLE = GLMessage_Function_glRenderbufferStorageMultisampleANGLE;
- static const Function glRenderbufferStorageMultisampleAPPLE = GLMessage_Function_glRenderbufferStorageMultisampleAPPLE;
- static const Function glRenderbufferStorageMultisampleEXT = GLMessage_Function_glRenderbufferStorageMultisampleEXT;
- static const Function glResolveMultisampleFramebufferAPPLE = GLMessage_Function_glResolveMultisampleFramebufferAPPLE;
- static const Function glTexStorage1DEXT = GLMessage_Function_glTexStorage1DEXT;
- static const Function glTexStorage2DEXT = GLMessage_Function_glTexStorage2DEXT;
- static const Function glTexStorage3DEXT = GLMessage_Function_glTexStorage3DEXT;
- static const Function glTextureStorage1DEXT = GLMessage_Function_glTextureStorage1DEXT;
- static const Function glTextureStorage2DEXT = GLMessage_Function_glTextureStorage2DEXT;
- static const Function glTextureStorage3DEXT = GLMessage_Function_glTextureStorage3DEXT;
- static const Function glUseProgramStagesEXT = GLMessage_Function_glUseProgramStagesEXT;
- static const Function glValidateProgramPipelineEXT = GLMessage_Function_glValidateProgramPipelineEXT;
- static const Function eglGetDisplay = GLMessage_Function_eglGetDisplay;
- static const Function eglInitialize = GLMessage_Function_eglInitialize;
- static const Function eglTerminate = GLMessage_Function_eglTerminate;
- static const Function eglGetConfigs = GLMessage_Function_eglGetConfigs;
- static const Function eglChooseConfig = GLMessage_Function_eglChooseConfig;
- static const Function eglGetConfigAttrib = GLMessage_Function_eglGetConfigAttrib;
- static const Function eglCreateWindowSurface = GLMessage_Function_eglCreateWindowSurface;
- static const Function eglCreatePixmapSurface = GLMessage_Function_eglCreatePixmapSurface;
- static const Function eglCreatePbufferSurface = GLMessage_Function_eglCreatePbufferSurface;
- static const Function eglDestroySurface = GLMessage_Function_eglDestroySurface;
- static const Function eglQuerySurface = GLMessage_Function_eglQuerySurface;
- static const Function eglCreateContext = GLMessage_Function_eglCreateContext;
- static const Function eglDestroyContext = GLMessage_Function_eglDestroyContext;
- static const Function eglMakeCurrent = GLMessage_Function_eglMakeCurrent;
- static const Function eglGetCurrentContext = GLMessage_Function_eglGetCurrentContext;
- static const Function eglGetCurrentSurface = GLMessage_Function_eglGetCurrentSurface;
- static const Function eglGetCurrentDisplay = GLMessage_Function_eglGetCurrentDisplay;
- static const Function eglQueryContext = GLMessage_Function_eglQueryContext;
- static const Function eglWaitGL = GLMessage_Function_eglWaitGL;
- static const Function eglWaitNative = GLMessage_Function_eglWaitNative;
- static const Function eglSwapBuffers = GLMessage_Function_eglSwapBuffers;
- static const Function eglCopyBuffers = GLMessage_Function_eglCopyBuffers;
- static const Function eglGetError = GLMessage_Function_eglGetError;
- static const Function eglQueryString = GLMessage_Function_eglQueryString;
- static const Function eglGetProcAddress = GLMessage_Function_eglGetProcAddress;
- static const Function eglSurfaceAttrib = GLMessage_Function_eglSurfaceAttrib;
- static const Function eglBindTexImage = GLMessage_Function_eglBindTexImage;
- static const Function eglReleaseTexImage = GLMessage_Function_eglReleaseTexImage;
- static const Function eglSwapInterval = GLMessage_Function_eglSwapInterval;
- static const Function eglBindAPI = GLMessage_Function_eglBindAPI;
- static const Function eglQueryAPI = GLMessage_Function_eglQueryAPI;
- static const Function eglWaitClient = GLMessage_Function_eglWaitClient;
- static const Function eglReleaseThread = GLMessage_Function_eglReleaseThread;
- static const Function eglCreatePbufferFromClientBuffer = GLMessage_Function_eglCreatePbufferFromClientBuffer;
- static const Function eglLockSurfaceKHR = GLMessage_Function_eglLockSurfaceKHR;
- static const Function eglUnlockSurfaceKHR = GLMessage_Function_eglUnlockSurfaceKHR;
- static const Function eglCreateImageKHR = GLMessage_Function_eglCreateImageKHR;
- static const Function eglDestroyImageKHR = GLMessage_Function_eglDestroyImageKHR;
- static const Function eglCreateSyncKHR = GLMessage_Function_eglCreateSyncKHR;
- static const Function eglDestroySyncKHR = GLMessage_Function_eglDestroySyncKHR;
- static const Function eglClientWaitSyncKHR = GLMessage_Function_eglClientWaitSyncKHR;
- static const Function eglGetSyncAttribKHR = GLMessage_Function_eglGetSyncAttribKHR;
- static const Function eglSetSwapRectangleANDROID = GLMessage_Function_eglSetSwapRectangleANDROID;
- static const Function eglGetRenderBufferANDROID = GLMessage_Function_eglGetRenderBufferANDROID;
- static const Function eglGetSystemTimeFrequencyNV = GLMessage_Function_eglGetSystemTimeFrequencyNV;
- static const Function eglGetSystemTimeNV = GLMessage_Function_eglGetSystemTimeNV;
- static const Function invalid = GLMessage_Function_invalid;
- static const Function glVertexAttribPointerData = GLMessage_Function_glVertexAttribPointerData;
- static inline bool Function_IsValid(int value) {
- return GLMessage_Function_IsValid(value);
- }
- static const Function Function_MIN =
- GLMessage_Function_Function_MIN;
- static const Function Function_MAX =
- GLMessage_Function_Function_MAX;
- static const int Function_ARRAYSIZE =
- GLMessage_Function_Function_ARRAYSIZE;
-
- // accessors -------------------------------------------------------
-
- // required int32 context_id = 1;
- inline bool has_context_id() const;
- inline void clear_context_id();
- static const int kContextIdFieldNumber = 1;
- inline ::google::protobuf::int32 context_id() const;
- inline void set_context_id(::google::protobuf::int32 value);
-
- // required int64 start_time = 2;
- inline bool has_start_time() const;
- inline void clear_start_time();
- static const int kStartTimeFieldNumber = 2;
- inline ::google::protobuf::int64 start_time() const;
- inline void set_start_time(::google::protobuf::int64 value);
-
- // required int32 duration = 3;
- inline bool has_duration() const;
- inline void clear_duration();
- static const int kDurationFieldNumber = 3;
- inline ::google::protobuf::int32 duration() const;
- inline void set_duration(::google::protobuf::int32 value);
-
- // required .android.gltrace.GLMessage.Function function = 4 [default = invalid];
- inline bool has_function() const;
- inline void clear_function();
- static const int kFunctionFieldNumber = 4;
- inline ::android::gltrace::GLMessage_Function function() const;
- inline void set_function(::android::gltrace::GLMessage_Function value);
-
- // repeated .android.gltrace.GLMessage.DataType args = 5;
- inline int args_size() const;
- inline void clear_args();
- static const int kArgsFieldNumber = 5;
- inline const ::android::gltrace::GLMessage_DataType& args(int index) const;
- inline ::android::gltrace::GLMessage_DataType* mutable_args(int index);
- inline ::android::gltrace::GLMessage_DataType* add_args();
- inline const ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >&
- args() const;
- inline ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >*
- mutable_args();
-
- // optional .android.gltrace.GLMessage.DataType returnValue = 6;
- inline bool has_returnvalue() const;
- inline void clear_returnvalue();
- static const int kReturnValueFieldNumber = 6;
- inline const ::android::gltrace::GLMessage_DataType& returnvalue() const;
- inline ::android::gltrace::GLMessage_DataType* mutable_returnvalue();
-
- // optional .android.gltrace.GLMessage.FrameBuffer fb = 7;
- inline bool has_fb() const;
- inline void clear_fb();
- static const int kFbFieldNumber = 7;
- inline const ::android::gltrace::GLMessage_FrameBuffer& fb() const;
- inline ::android::gltrace::GLMessage_FrameBuffer* mutable_fb();
-
- // optional int32 threadtime = 8;
- inline bool has_threadtime() const;
- inline void clear_threadtime();
- static const int kThreadtimeFieldNumber = 8;
- inline ::google::protobuf::int32 threadtime() const;
- inline void set_threadtime(::google::protobuf::int32 value);
-
- // @@protoc_insertion_point(class_scope:android.gltrace.GLMessage)
- private:
- mutable int _cached_size_;
-
- ::google::protobuf::int32 context_id_;
- ::google::protobuf::int64 start_time_;
- ::google::protobuf::int32 duration_;
- int function_;
- ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType > args_;
- ::android::gltrace::GLMessage_DataType* returnvalue_;
- ::android::gltrace::GLMessage_FrameBuffer* fb_;
- ::google::protobuf::int32 threadtime_;
- friend void protobuf_AddDesc_gltrace_2eproto();
- friend void protobuf_AssignDesc_gltrace_2eproto();
- friend void protobuf_ShutdownFile_gltrace_2eproto();
-
- ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
-
- // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
- inline bool _has_bit(int index) const {
- return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
- }
- inline void _set_bit(int index) {
- _has_bits_[index / 32] |= (1u << (index % 32));
- }
- inline void _clear_bit(int index) {
- _has_bits_[index / 32] &= ~(1u << (index % 32));
- }
-
- void InitAsDefaultInstance();
- static GLMessage* default_instance_;
-};
-// ===================================================================
-
-
-// ===================================================================
-
-// GLMessage_DataType
-
-// required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
-inline bool GLMessage_DataType::has_type() const {
- return _has_bit(0);
-}
-inline void GLMessage_DataType::clear_type() {
- type_ = 1;
- _clear_bit(0);
-}
-inline ::android::gltrace::GLMessage_DataType_Type GLMessage_DataType::type() const {
- return static_cast< ::android::gltrace::GLMessage_DataType_Type >(type_);
-}
-inline void GLMessage_DataType::set_type(::android::gltrace::GLMessage_DataType_Type value) {
- GOOGLE_DCHECK(::android::gltrace::GLMessage_DataType_Type_IsValid(value));
- _set_bit(0);
- type_ = value;
-}
-
-// required bool isArray = 2 [default = false];
-inline bool GLMessage_DataType::has_isarray() const {
- return _has_bit(1);
-}
-inline void GLMessage_DataType::clear_isarray() {
- isarray_ = false;
- _clear_bit(1);
-}
-inline bool GLMessage_DataType::isarray() const {
- return isarray_;
-}
-inline void GLMessage_DataType::set_isarray(bool value) {
- _set_bit(1);
- isarray_ = value;
-}
-
-// repeated int32 intValue = 3;
-inline int GLMessage_DataType::intvalue_size() const {
- return intvalue_.size();
-}
-inline void GLMessage_DataType::clear_intvalue() {
- intvalue_.Clear();
-}
-inline ::google::protobuf::int32 GLMessage_DataType::intvalue(int index) const {
- return intvalue_.Get(index);
-}
-inline void GLMessage_DataType::set_intvalue(int index, ::google::protobuf::int32 value) {
- intvalue_.Set(index, value);
-}
-inline void GLMessage_DataType::add_intvalue(::google::protobuf::int32 value) {
- intvalue_.Add(value);
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
-GLMessage_DataType::intvalue() const {
- return intvalue_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
-GLMessage_DataType::mutable_intvalue() {
- return &intvalue_;
-}
-
-// repeated float floatValue = 4;
-inline int GLMessage_DataType::floatvalue_size() const {
- return floatvalue_.size();
-}
-inline void GLMessage_DataType::clear_floatvalue() {
- floatvalue_.Clear();
-}
-inline float GLMessage_DataType::floatvalue(int index) const {
- return floatvalue_.Get(index);
-}
-inline void GLMessage_DataType::set_floatvalue(int index, float value) {
- floatvalue_.Set(index, value);
-}
-inline void GLMessage_DataType::add_floatvalue(float value) {
- floatvalue_.Add(value);
-}
-inline const ::google::protobuf::RepeatedField< float >&
-GLMessage_DataType::floatvalue() const {
- return floatvalue_;
-}
-inline ::google::protobuf::RepeatedField< float >*
-GLMessage_DataType::mutable_floatvalue() {
- return &floatvalue_;
-}
-
-// repeated bytes charValue = 5;
-inline int GLMessage_DataType::charvalue_size() const {
- return charvalue_.size();
-}
-inline void GLMessage_DataType::clear_charvalue() {
- charvalue_.Clear();
-}
-inline const ::std::string& GLMessage_DataType::charvalue(int index) const {
- return charvalue_.Get(index);
-}
-inline ::std::string* GLMessage_DataType::mutable_charvalue(int index) {
- return charvalue_.Mutable(index);
-}
-inline void GLMessage_DataType::set_charvalue(int index, const ::std::string& value) {
- charvalue_.Mutable(index)->assign(value);
-}
-inline void GLMessage_DataType::set_charvalue(int index, const char* value) {
- charvalue_.Mutable(index)->assign(value);
-}
-inline void GLMessage_DataType::set_charvalue(int index, const void* value, size_t size) {
- charvalue_.Mutable(index)->assign(
- reinterpret_cast<const char*>(value), size);
-}
-inline ::std::string* GLMessage_DataType::add_charvalue() {
- return charvalue_.Add();
-}
-inline void GLMessage_DataType::add_charvalue(const ::std::string& value) {
- charvalue_.Add()->assign(value);
-}
-inline void GLMessage_DataType::add_charvalue(const char* value) {
- charvalue_.Add()->assign(value);
-}
-inline void GLMessage_DataType::add_charvalue(const void* value, size_t size) {
- charvalue_.Add()->assign(reinterpret_cast<const char*>(value), size);
-}
-inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
-GLMessage_DataType::charvalue() const {
- return charvalue_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::std::string>*
-GLMessage_DataType::mutable_charvalue() {
- return &charvalue_;
-}
-
-// repeated bytes rawBytes = 6;
-inline int GLMessage_DataType::rawbytes_size() const {
- return rawbytes_.size();
-}
-inline void GLMessage_DataType::clear_rawbytes() {
- rawbytes_.Clear();
-}
-inline const ::std::string& GLMessage_DataType::rawbytes(int index) const {
- return rawbytes_.Get(index);
-}
-inline ::std::string* GLMessage_DataType::mutable_rawbytes(int index) {
- return rawbytes_.Mutable(index);
-}
-inline void GLMessage_DataType::set_rawbytes(int index, const ::std::string& value) {
- rawbytes_.Mutable(index)->assign(value);
-}
-inline void GLMessage_DataType::set_rawbytes(int index, const char* value) {
- rawbytes_.Mutable(index)->assign(value);
-}
-inline void GLMessage_DataType::set_rawbytes(int index, const void* value, size_t size) {
- rawbytes_.Mutable(index)->assign(
- reinterpret_cast<const char*>(value), size);
-}
-inline ::std::string* GLMessage_DataType::add_rawbytes() {
- return rawbytes_.Add();
-}
-inline void GLMessage_DataType::add_rawbytes(const ::std::string& value) {
- rawbytes_.Add()->assign(value);
-}
-inline void GLMessage_DataType::add_rawbytes(const char* value) {
- rawbytes_.Add()->assign(value);
-}
-inline void GLMessage_DataType::add_rawbytes(const void* value, size_t size) {
- rawbytes_.Add()->assign(reinterpret_cast<const char*>(value), size);
-}
-inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
-GLMessage_DataType::rawbytes() const {
- return rawbytes_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::std::string>*
-GLMessage_DataType::mutable_rawbytes() {
- return &rawbytes_;
-}
-
-// repeated bool boolValue = 7;
-inline int GLMessage_DataType::boolvalue_size() const {
- return boolvalue_.size();
-}
-inline void GLMessage_DataType::clear_boolvalue() {
- boolvalue_.Clear();
-}
-inline bool GLMessage_DataType::boolvalue(int index) const {
- return boolvalue_.Get(index);
-}
-inline void GLMessage_DataType::set_boolvalue(int index, bool value) {
- boolvalue_.Set(index, value);
-}
-inline void GLMessage_DataType::add_boolvalue(bool value) {
- boolvalue_.Add(value);
-}
-inline const ::google::protobuf::RepeatedField< bool >&
-GLMessage_DataType::boolvalue() const {
- return boolvalue_;
-}
-inline ::google::protobuf::RepeatedField< bool >*
-GLMessage_DataType::mutable_boolvalue() {
- return &boolvalue_;
-}
-
-// -------------------------------------------------------------------
-
-// GLMessage_FrameBuffer
-
-// required int32 width = 1;
-inline bool GLMessage_FrameBuffer::has_width() const {
- return _has_bit(0);
-}
-inline void GLMessage_FrameBuffer::clear_width() {
- width_ = 0;
- _clear_bit(0);
-}
-inline ::google::protobuf::int32 GLMessage_FrameBuffer::width() const {
- return width_;
-}
-inline void GLMessage_FrameBuffer::set_width(::google::protobuf::int32 value) {
- _set_bit(0);
- width_ = value;
-}
-
-// required int32 height = 2;
-inline bool GLMessage_FrameBuffer::has_height() const {
- return _has_bit(1);
-}
-inline void GLMessage_FrameBuffer::clear_height() {
- height_ = 0;
- _clear_bit(1);
-}
-inline ::google::protobuf::int32 GLMessage_FrameBuffer::height() const {
- return height_;
-}
-inline void GLMessage_FrameBuffer::set_height(::google::protobuf::int32 value) {
- _set_bit(1);
- height_ = value;
-}
-
-// repeated bytes contents = 3;
-inline int GLMessage_FrameBuffer::contents_size() const {
- return contents_.size();
-}
-inline void GLMessage_FrameBuffer::clear_contents() {
- contents_.Clear();
-}
-inline const ::std::string& GLMessage_FrameBuffer::contents(int index) const {
- return contents_.Get(index);
-}
-inline ::std::string* GLMessage_FrameBuffer::mutable_contents(int index) {
- return contents_.Mutable(index);
-}
-inline void GLMessage_FrameBuffer::set_contents(int index, const ::std::string& value) {
- contents_.Mutable(index)->assign(value);
-}
-inline void GLMessage_FrameBuffer::set_contents(int index, const char* value) {
- contents_.Mutable(index)->assign(value);
-}
-inline void GLMessage_FrameBuffer::set_contents(int index, const void* value, size_t size) {
- contents_.Mutable(index)->assign(
- reinterpret_cast<const char*>(value), size);
-}
-inline ::std::string* GLMessage_FrameBuffer::add_contents() {
- return contents_.Add();
-}
-inline void GLMessage_FrameBuffer::add_contents(const ::std::string& value) {
- contents_.Add()->assign(value);
-}
-inline void GLMessage_FrameBuffer::add_contents(const char* value) {
- contents_.Add()->assign(value);
-}
-inline void GLMessage_FrameBuffer::add_contents(const void* value, size_t size) {
- contents_.Add()->assign(reinterpret_cast<const char*>(value), size);
-}
-inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
-GLMessage_FrameBuffer::contents() const {
- return contents_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::std::string>*
-GLMessage_FrameBuffer::mutable_contents() {
- return &contents_;
-}
-
-// -------------------------------------------------------------------
-
-// GLMessage
-
-// required int32 context_id = 1;
-inline bool GLMessage::has_context_id() const {
- return _has_bit(0);
-}
-inline void GLMessage::clear_context_id() {
- context_id_ = 0;
- _clear_bit(0);
-}
-inline ::google::protobuf::int32 GLMessage::context_id() const {
- return context_id_;
-}
-inline void GLMessage::set_context_id(::google::protobuf::int32 value) {
- _set_bit(0);
- context_id_ = value;
-}
-
-// required int64 start_time = 2;
-inline bool GLMessage::has_start_time() const {
- return _has_bit(1);
-}
-inline void GLMessage::clear_start_time() {
- start_time_ = GOOGLE_LONGLONG(0);
- _clear_bit(1);
-}
-inline ::google::protobuf::int64 GLMessage::start_time() const {
- return start_time_;
-}
-inline void GLMessage::set_start_time(::google::protobuf::int64 value) {
- _set_bit(1);
- start_time_ = value;
-}
-
-// required int32 duration = 3;
-inline bool GLMessage::has_duration() const {
- return _has_bit(2);
-}
-inline void GLMessage::clear_duration() {
- duration_ = 0;
- _clear_bit(2);
-}
-inline ::google::protobuf::int32 GLMessage::duration() const {
- return duration_;
-}
-inline void GLMessage::set_duration(::google::protobuf::int32 value) {
- _set_bit(2);
- duration_ = value;
-}
-
-// required .android.gltrace.GLMessage.Function function = 4 [default = invalid];
-inline bool GLMessage::has_function() const {
- return _has_bit(3);
-}
-inline void GLMessage::clear_function() {
- function_ = 3000;
- _clear_bit(3);
-}
-inline ::android::gltrace::GLMessage_Function GLMessage::function() const {
- return static_cast< ::android::gltrace::GLMessage_Function >(function_);
-}
-inline void GLMessage::set_function(::android::gltrace::GLMessage_Function value) {
- GOOGLE_DCHECK(::android::gltrace::GLMessage_Function_IsValid(value));
- _set_bit(3);
- function_ = value;
-}
-
-// repeated .android.gltrace.GLMessage.DataType args = 5;
-inline int GLMessage::args_size() const {
- return args_.size();
-}
-inline void GLMessage::clear_args() {
- args_.Clear();
-}
-inline const ::android::gltrace::GLMessage_DataType& GLMessage::args(int index) const {
- return args_.Get(index);
-}
-inline ::android::gltrace::GLMessage_DataType* GLMessage::mutable_args(int index) {
- return args_.Mutable(index);
-}
-inline ::android::gltrace::GLMessage_DataType* GLMessage::add_args() {
- return args_.Add();
-}
-inline const ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >&
-GLMessage::args() const {
- return args_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >*
-GLMessage::mutable_args() {
- return &args_;
-}
-
-// optional .android.gltrace.GLMessage.DataType returnValue = 6;
-inline bool GLMessage::has_returnvalue() const {
- return _has_bit(5);
-}
-inline void GLMessage::clear_returnvalue() {
- if (returnvalue_ != NULL) returnvalue_->::android::gltrace::GLMessage_DataType::Clear();
- _clear_bit(5);
-}
-inline const ::android::gltrace::GLMessage_DataType& GLMessage::returnvalue() const {
- return returnvalue_ != NULL ? *returnvalue_ : *default_instance_->returnvalue_;
-}
-inline ::android::gltrace::GLMessage_DataType* GLMessage::mutable_returnvalue() {
- _set_bit(5);
- if (returnvalue_ == NULL) returnvalue_ = new ::android::gltrace::GLMessage_DataType;
- return returnvalue_;
-}
-
-// optional .android.gltrace.GLMessage.FrameBuffer fb = 7;
-inline bool GLMessage::has_fb() const {
- return _has_bit(6);
-}
-inline void GLMessage::clear_fb() {
- if (fb_ != NULL) fb_->::android::gltrace::GLMessage_FrameBuffer::Clear();
- _clear_bit(6);
-}
-inline const ::android::gltrace::GLMessage_FrameBuffer& GLMessage::fb() const {
- return fb_ != NULL ? *fb_ : *default_instance_->fb_;
-}
-inline ::android::gltrace::GLMessage_FrameBuffer* GLMessage::mutable_fb() {
- _set_bit(6);
- if (fb_ == NULL) fb_ = new ::android::gltrace::GLMessage_FrameBuffer;
- return fb_;
-}
-
-// optional int32 threadtime = 8;
-inline bool GLMessage::has_threadtime() const {
- return _has_bit(7);
-}
-inline void GLMessage::clear_threadtime() {
- threadtime_ = 0;
- _clear_bit(7);
-}
-inline ::google::protobuf::int32 GLMessage::threadtime() const {
- return threadtime_;
-}
-inline void GLMessage::set_threadtime(::google::protobuf::int32 value) {
- _set_bit(7);
- threadtime_ = value;
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace gltrace
-} // namespace android
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_gltrace_2eproto__INCLUDED
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
deleted file mode 100644
index cef6cbb..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ /dev/null
@@ -1,17862 +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.
- *
- * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
- */
-
-#include <cutils/log.h>
-#include <utils/Timers.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 {
-
-// Definitions for GL2 APIs
-
-void GLTrace_glActiveTexture(GLenum texture) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glActiveTexture);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::ENUM);
- arg_texture->add_intvalue((int)texture);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glActiveTexture(texture);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glAttachShader(GLuint program, GLuint shader) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glAttachShader);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glAttachShader(program, shader);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindAttribLocation);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // copy argument name
- GLMessage_DataType *arg_name = glmsg.add_args();
- arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindAttribLocation(program, index, name);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) name,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBindBuffer(GLenum target, GLuint buffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindBuffer);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument buffer
- GLMessage_DataType *arg_buffer = glmsg.add_args();
- arg_buffer->set_isarray(false);
- arg_buffer->set_type(GLMessage::DataType::INT);
- arg_buffer->add_intvalue(buffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindBuffer(target, buffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindFramebuffer);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument framebuffer
- GLMessage_DataType *arg_framebuffer = glmsg.add_args();
- arg_framebuffer->set_isarray(false);
- arg_framebuffer->set_type(GLMessage::DataType::INT);
- arg_framebuffer->add_intvalue(framebuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindFramebuffer(target, framebuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindRenderbuffer);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument renderbuffer
- GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
- arg_renderbuffer->set_isarray(false);
- arg_renderbuffer->set_type(GLMessage::DataType::INT);
- arg_renderbuffer->add_intvalue(renderbuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindRenderbuffer(target, renderbuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBindTexture(GLenum target, GLuint texture) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindTexture);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindTexture(target, texture);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendColor);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::FLOAT);
- arg_red->add_floatvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::FLOAT);
- arg_green->add_floatvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::FLOAT);
- arg_blue->add_floatvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::FLOAT);
- arg_alpha->add_floatvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendColor(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendEquation(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendEquation);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendEquation(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendEquationSeparate);
-
- // copy argument modeRGB
- GLMessage_DataType *arg_modeRGB = glmsg.add_args();
- arg_modeRGB->set_isarray(false);
- arg_modeRGB->set_type(GLMessage::DataType::ENUM);
- arg_modeRGB->add_intvalue((int)modeRGB);
-
- // copy argument modeAlpha
- GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
- arg_modeAlpha->set_isarray(false);
- arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
- arg_modeAlpha->add_intvalue((int)modeAlpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendEquationSeparate(modeRGB, modeAlpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendFunc);
-
- // copy argument sfactor
- GLMessage_DataType *arg_sfactor = glmsg.add_args();
- arg_sfactor->set_isarray(false);
- arg_sfactor->set_type(GLMessage::DataType::ENUM);
- arg_sfactor->add_intvalue((int)sfactor);
-
- // copy argument dfactor
- GLMessage_DataType *arg_dfactor = glmsg.add_args();
- arg_dfactor->set_isarray(false);
- arg_dfactor->set_type(GLMessage::DataType::ENUM);
- arg_dfactor->add_intvalue((int)dfactor);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendFunc(sfactor, dfactor);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendFuncSeparate);
-
- // copy argument srcRGB
- GLMessage_DataType *arg_srcRGB = glmsg.add_args();
- arg_srcRGB->set_isarray(false);
- arg_srcRGB->set_type(GLMessage::DataType::ENUM);
- arg_srcRGB->add_intvalue((int)srcRGB);
-
- // copy argument dstRGB
- GLMessage_DataType *arg_dstRGB = glmsg.add_args();
- arg_dstRGB->set_isarray(false);
- arg_dstRGB->set_type(GLMessage::DataType::ENUM);
- arg_dstRGB->add_intvalue((int)dstRGB);
-
- // copy argument srcAlpha
- GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
- arg_srcAlpha->set_isarray(false);
- arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
- arg_srcAlpha->add_intvalue((int)srcAlpha);
-
- // copy argument dstAlpha
- GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
- arg_dstAlpha->set_isarray(false);
- arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
- arg_dstAlpha->add_intvalue((int)dstAlpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBufferData);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // copy argument usage
- GLMessage_DataType *arg_usage = glmsg.add_args();
- arg_usage->set_isarray(false);
- arg_usage->set_type(GLMessage::DataType::ENUM);
- arg_usage->add_intvalue((int)usage);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBufferData(target, size, data, usage);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBufferSubData);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument offset
- GLMessage_DataType *arg_offset = glmsg.add_args();
- arg_offset->set_isarray(false);
- arg_offset->set_type(GLMessage::DataType::INT);
- arg_offset->add_intvalue(offset);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBufferSubData(target, offset, size, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLenum GLTrace_glCheckFramebufferStatus(GLenum target) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCheckFramebufferStatus);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatus(target);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::ENUM);
- rt->add_intvalue((int)retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glClear(GLbitfield mask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClear);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::INT);
- arg_mask->add_intvalue(mask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClear(mask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearColor);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::FLOAT);
- arg_red->add_floatvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::FLOAT);
- arg_green->add_floatvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::FLOAT);
- arg_blue->add_floatvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::FLOAT);
- arg_alpha->add_floatvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearColor(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearDepthf(GLclampf depth) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearDepthf);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::FLOAT);
- arg_depth->add_floatvalue(depth);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearDepthf(depth);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearStencil(GLint s) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearStencil);
-
- // copy argument s
- GLMessage_DataType *arg_s = glmsg.add_args();
- arg_s->set_isarray(false);
- arg_s->set_type(GLMessage::DataType::INT);
- arg_s->add_intvalue(s);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearStencil(s);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glColorMask);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::BOOL);
- arg_red->add_boolvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::BOOL);
- arg_green->add_boolvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::BOOL);
- arg_blue->add_boolvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::BOOL);
- arg_alpha->add_boolvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glColorMask(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCompileShader(GLuint shader) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCompileShader);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCompileShader(shader);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCompressedTexImage2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument border
- GLMessage_DataType *arg_border = glmsg.add_args();
- arg_border->set_isarray(false);
- arg_border->set_type(GLMessage::DataType::INT);
- arg_border->add_intvalue(border);
-
- // copy argument imageSize
- GLMessage_DataType *arg_imageSize = glmsg.add_args();
- arg_imageSize->set_isarray(false);
- arg_imageSize->set_type(GLMessage::DataType::INT);
- arg_imageSize->add_intvalue(imageSize);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCompressedTexSubImage2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument imageSize
- GLMessage_DataType *arg_imageSize = glmsg.add_args();
- arg_imageSize->set_isarray(false);
- arg_imageSize->set_type(GLMessage::DataType::INT);
- arg_imageSize->add_intvalue(imageSize);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCopyTexImage2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument border
- GLMessage_DataType *arg_border = glmsg.add_args();
- arg_border->set_isarray(false);
- arg_border->set_type(GLMessage::DataType::INT);
- arg_border->add_intvalue(border);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCopyTexSubImage2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLuint GLTrace_glCreateProgram(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCreateProgram);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLuint retValue = glContext->hooks->gl.glCreateProgram();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLuint GLTrace_glCreateShader(GLenum type) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCreateShader);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLuint retValue = glContext->hooks->gl.glCreateShader(type);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glCullFace(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCullFace);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCullFace(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteBuffers);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument buffers
- GLMessage_DataType *arg_buffers = glmsg.add_args();
- arg_buffers->set_isarray(false);
- arg_buffers->set_type(GLMessage::DataType::INT);
- arg_buffers->add_intvalue((int)buffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteBuffers(n, buffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) buffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteFramebuffers);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument framebuffers
- GLMessage_DataType *arg_framebuffers = glmsg.add_args();
- arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteFramebuffers(n, framebuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) framebuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteProgram(GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteProgram);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteProgram(program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteRenderbuffers);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument renderbuffers
- GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
- arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteRenderbuffers(n, renderbuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) renderbuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteShader(GLuint shader) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteShader);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteShader(shader);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteTextures);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument textures
- GLMessage_DataType *arg_textures = glmsg.add_args();
- arg_textures->set_isarray(false);
- arg_textures->set_type(GLMessage::DataType::INT);
- arg_textures->add_intvalue((int)textures);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteTextures(n, textures);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) textures,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDepthFunc(GLenum func) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDepthFunc);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDepthFunc(func);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDepthMask(GLboolean flag) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDepthMask);
-
- // copy argument flag
- GLMessage_DataType *arg_flag = glmsg.add_args();
- arg_flag->set_isarray(false);
- arg_flag->set_type(GLMessage::DataType::BOOL);
- arg_flag->add_boolvalue(flag);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDepthMask(flag);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDepthRangef);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::FLOAT);
- arg_zNear->add_floatvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::FLOAT);
- arg_zFar->add_floatvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDepthRangef(zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDetachShader(GLuint program, GLuint shader) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDetachShader);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDetachShader(program, shader);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDisable(GLenum cap) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDisable);
-
- // copy argument cap
- GLMessage_DataType *arg_cap = glmsg.add_args();
- arg_cap->set_isarray(false);
- arg_cap->set_type(GLMessage::DataType::ENUM);
- arg_cap->add_intvalue((int)cap);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDisable(cap);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDisableVertexAttribArray(GLuint index) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDisableVertexAttribArray);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDisableVertexAttribArray(index);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawArrays);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // copy argument first
- GLMessage_DataType *arg_first = glmsg.add_args();
- arg_first->set_isarray(false);
- arg_first->set_type(GLMessage::DataType::INT);
- arg_first->add_intvalue(first);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawArrays(mode, first, count);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawElements);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument indices
- GLMessage_DataType *arg_indices = glmsg.add_args();
- arg_indices->set_isarray(false);
- arg_indices->set_type(GLMessage::DataType::INT);
- arg_indices->add_intvalue((int)indices);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawElements(mode, count, type, indices);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) indices,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEnable(GLenum cap) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEnable);
-
- // copy argument cap
- GLMessage_DataType *arg_cap = glmsg.add_args();
- arg_cap->set_isarray(false);
- arg_cap->set_type(GLMessage::DataType::ENUM);
- arg_cap->add_intvalue((int)cap);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEnable(cap);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEnableVertexAttribArray(GLuint index) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEnableVertexAttribArray);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEnableVertexAttribArray(index);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFinish(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFinish);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFinish();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFlush(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFlush);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFlush();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferRenderbuffer);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument renderbuffertarget
- GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
- arg_renderbuffertarget->set_isarray(false);
- arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
- arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
-
- // copy argument renderbuffer
- GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
- arg_renderbuffer->set_isarray(false);
- arg_renderbuffer->set_type(GLMessage::DataType::INT);
- arg_renderbuffer->add_intvalue(renderbuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferTexture2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument textarget
- GLMessage_DataType *arg_textarget = glmsg.add_args();
- arg_textarget->set_isarray(false);
- arg_textarget->set_type(GLMessage::DataType::ENUM);
- arg_textarget->add_intvalue((int)textarget);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferTexture2D(target, attachment, textarget, texture, level);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFrontFace(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFrontFace);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFrontFace(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenBuffers);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument buffers
- GLMessage_DataType *arg_buffers = glmsg.add_args();
- arg_buffers->set_isarray(false);
- arg_buffers->set_type(GLMessage::DataType::INT);
- arg_buffers->add_intvalue((int)buffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenBuffers(n, buffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) buffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenerateMipmap(GLenum target) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenerateMipmap);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenerateMipmap(target);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenFramebuffers);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument framebuffers
- GLMessage_DataType *arg_framebuffers = glmsg.add_args();
- arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenFramebuffers(n, framebuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) framebuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenRenderbuffers);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument renderbuffers
- GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
- arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenRenderbuffers(n, renderbuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) renderbuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenTextures(GLsizei n, GLuint* textures) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenTextures);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument textures
- GLMessage_DataType *arg_textures = glmsg.add_args();
- arg_textures->set_isarray(false);
- arg_textures->set_type(GLMessage::DataType::INT);
- arg_textures->add_intvalue((int)textures);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenTextures(n, textures);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) textures,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetActiveAttrib);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // copy argument bufsize
- GLMessage_DataType *arg_bufsize = glmsg.add_args();
- arg_bufsize->set_isarray(false);
- arg_bufsize->set_type(GLMessage::DataType::INT);
- arg_bufsize->add_intvalue(bufsize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::INT);
- arg_type->add_intvalue((int)type);
-
- // copy argument name
- GLMessage_DataType *arg_name = glmsg.add_args();
- arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetActiveAttrib(program, index, bufsize, length, size, type, name);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) size,
- (void *) type,
- (void *) name,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetActiveUniform);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // copy argument bufsize
- GLMessage_DataType *arg_bufsize = glmsg.add_args();
- arg_bufsize->set_isarray(false);
- arg_bufsize->set_type(GLMessage::DataType::INT);
- arg_bufsize->add_intvalue(bufsize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue((int)size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::INT);
- arg_type->add_intvalue((int)type);
-
- // copy argument name
- GLMessage_DataType *arg_name = glmsg.add_args();
- arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetActiveUniform(program, index, bufsize, length, size, type, name);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) size,
- (void *) type,
- (void *) name,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetAttachedShaders);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument maxcount
- GLMessage_DataType *arg_maxcount = glmsg.add_args();
- arg_maxcount->set_isarray(false);
- arg_maxcount->set_type(GLMessage::DataType::INT);
- arg_maxcount->add_intvalue(maxcount);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue((int)count);
-
- // copy argument shaders
- GLMessage_DataType *arg_shaders = glmsg.add_args();
- arg_shaders->set_isarray(false);
- arg_shaders->set_type(GLMessage::DataType::INT);
- arg_shaders->add_intvalue((int)shaders);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetAttachedShaders(program, maxcount, count, shaders);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) count,
- (void *) shaders,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetAttribLocation);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument name
- GLMessage_DataType *arg_name = glmsg.add_args();
- arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- int retValue = glContext->hooks->gl.glGetAttribLocation(program, name);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue(retValue);
-
- void *pointerArgs[] = {
- (void *) name,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetBooleanv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetBooleanv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetBufferParameteriv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetBufferParameteriv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLenum GLTrace_glGetError(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetError);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLenum retValue = glContext->hooks->gl.glGetError();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::ENUM);
- rt->add_intvalue((int)retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetFloatv(GLenum pname, GLfloat* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetFloatv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetFloatv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameteriv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetIntegerv(GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetIntegerv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetIntegerv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetProgramiv);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetProgramiv(program, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetProgramInfoLog);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument bufsize
- GLMessage_DataType *arg_bufsize = glmsg.add_args();
- arg_bufsize->set_isarray(false);
- arg_bufsize->set_type(GLMessage::DataType::INT);
- arg_bufsize->add_intvalue(bufsize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument infolog
- GLMessage_DataType *arg_infolog = glmsg.add_args();
- arg_infolog->set_isarray(false);
- arg_infolog->set_type(GLMessage::DataType::INT);
- arg_infolog->add_intvalue((int)infolog);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetProgramInfoLog(program, bufsize, length, infolog);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) infolog,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetRenderbufferParameteriv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetRenderbufferParameteriv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetShaderiv);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetShaderiv(shader, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetShaderInfoLog);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // copy argument bufsize
- GLMessage_DataType *arg_bufsize = glmsg.add_args();
- arg_bufsize->set_isarray(false);
- arg_bufsize->set_type(GLMessage::DataType::INT);
- arg_bufsize->add_intvalue(bufsize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument infolog
- GLMessage_DataType *arg_infolog = glmsg.add_args();
- arg_infolog->set_isarray(false);
- arg_infolog->set_type(GLMessage::DataType::INT);
- arg_infolog->add_intvalue((int)infolog);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetShaderInfoLog(shader, bufsize, length, infolog);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) infolog,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetShaderPrecisionFormat);
-
- // copy argument shadertype
- GLMessage_DataType *arg_shadertype = glmsg.add_args();
- arg_shadertype->set_isarray(false);
- arg_shadertype->set_type(GLMessage::DataType::ENUM);
- arg_shadertype->add_intvalue((int)shadertype);
-
- // copy argument precisiontype
- GLMessage_DataType *arg_precisiontype = glmsg.add_args();
- arg_precisiontype->set_isarray(false);
- arg_precisiontype->set_type(GLMessage::DataType::ENUM);
- arg_precisiontype->add_intvalue((int)precisiontype);
-
- // copy argument range
- GLMessage_DataType *arg_range = glmsg.add_args();
- arg_range->set_isarray(false);
- arg_range->set_type(GLMessage::DataType::INT);
- arg_range->add_intvalue((int)range);
-
- // copy argument precision
- GLMessage_DataType *arg_precision = glmsg.add_args();
- arg_precision->set_isarray(false);
- arg_precision->set_type(GLMessage::DataType::INT);
- arg_precision->add_intvalue((int)precision);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) range,
- (void *) precision,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetShaderSource);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // copy argument bufsize
- GLMessage_DataType *arg_bufsize = glmsg.add_args();
- arg_bufsize->set_isarray(false);
- arg_bufsize->set_type(GLMessage::DataType::INT);
- arg_bufsize->add_intvalue(bufsize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument source
- GLMessage_DataType *arg_source = glmsg.add_args();
- arg_source->set_isarray(false);
- arg_source->set_type(GLMessage::DataType::INT);
- arg_source->add_intvalue((int)source);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetShaderSource(shader, bufsize, length, source);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) source,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-const GLubyte* GLTrace_glGetString(GLenum name) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetString);
-
- // copy argument name
- GLMessage_DataType *arg_name = glmsg.add_args();
- arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::ENUM);
- arg_name->add_intvalue((int)name);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- const GLubyte* retValue = glContext->hooks->gl.glGetString(name);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
-
- void *pointerArgs[] = {
- (void *) retValue,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexParameterfv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexParameterfv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexParameteriv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexParameteriv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetUniformfv);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetUniformfv(program, location, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetUniformiv);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetUniformiv(program, location, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetUniformLocation);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument name
- GLMessage_DataType *arg_name = glmsg.add_args();
- arg_name->set_isarray(false);
- arg_name->set_type(GLMessage::DataType::INT);
- arg_name->add_intvalue((int)name);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- int retValue = glContext->hooks->gl.glGetUniformLocation(program, name);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue(retValue);
-
- void *pointerArgs[] = {
- (void *) name,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetVertexAttribfv);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetVertexAttribfv(index, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetVertexAttribiv);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetVertexAttribiv(index, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetVertexAttribPointerv);
-
- // copy argument index
- GLMessage_DataType *arg_index = glmsg.add_args();
- arg_index->set_isarray(false);
- arg_index->set_type(GLMessage::DataType::INT);
- arg_index->add_intvalue(index);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetVertexAttribPointerv(index, pname, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glHint(GLenum target, GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glHint);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glHint(target, mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsBuffer(GLuint buffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsBuffer);
-
- // copy argument buffer
- GLMessage_DataType *arg_buffer = glmsg.add_args();
- arg_buffer->set_isarray(false);
- arg_buffer->set_type(GLMessage::DataType::INT);
- arg_buffer->add_intvalue(buffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsBuffer(buffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glIsEnabled(GLenum cap) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsEnabled);
-
- // copy argument cap
- GLMessage_DataType *arg_cap = glmsg.add_args();
- arg_cap->set_isarray(false);
- arg_cap->set_type(GLMessage::DataType::ENUM);
- arg_cap->add_intvalue((int)cap);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsEnabled(cap);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsFramebuffer);
-
- // copy argument framebuffer
- GLMessage_DataType *arg_framebuffer = glmsg.add_args();
- arg_framebuffer->set_isarray(false);
- arg_framebuffer->set_type(GLMessage::DataType::INT);
- arg_framebuffer->add_intvalue(framebuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsFramebuffer(framebuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glIsProgram(GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsProgram);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsProgram(program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsRenderbuffer);
-
- // copy argument renderbuffer
- GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
- arg_renderbuffer->set_isarray(false);
- arg_renderbuffer->set_type(GLMessage::DataType::INT);
- arg_renderbuffer->add_intvalue(renderbuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsRenderbuffer(renderbuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glIsShader(GLuint shader) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsShader);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsShader(shader);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glIsTexture(GLuint texture) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsTexture);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsTexture(texture);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glLineWidth(GLfloat width) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLineWidth);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::FLOAT);
- arg_width->add_floatvalue(width);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLineWidth(width);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLinkProgram(GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLinkProgram);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLinkProgram(program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPixelStorei(GLenum pname, GLint param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPixelStorei);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPixelStorei(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPolygonOffset);
-
- // copy argument factor
- GLMessage_DataType *arg_factor = glmsg.add_args();
- arg_factor->set_isarray(false);
- arg_factor->set_type(GLMessage::DataType::FLOAT);
- arg_factor->add_floatvalue(factor);
-
- // copy argument units
- GLMessage_DataType *arg_units = glmsg.add_args();
- arg_units->set_isarray(false);
- arg_units->set_type(GLMessage::DataType::FLOAT);
- arg_units->add_floatvalue(units);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPolygonOffset(factor, units);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glReadPixels);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument pixels
- GLMessage_DataType *arg_pixels = glmsg.add_args();
- arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glReadPixels(x, y, width, height, format, type, pixels);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pixels,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glReleaseShaderCompiler(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glReleaseShaderCompiler);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glReleaseShaderCompiler();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRenderbufferStorage);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRenderbufferStorage(target, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glSampleCoverage);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::FLOAT);
- arg_value->add_floatvalue(value);
-
- // copy argument invert
- GLMessage_DataType *arg_invert = glmsg.add_args();
- arg_invert->set_isarray(false);
- arg_invert->set_type(GLMessage::DataType::BOOL);
- arg_invert->add_boolvalue(invert);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glSampleCoverage(value, invert);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glScissor);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glScissor(x, y, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glShaderBinary);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument shaders
- GLMessage_DataType *arg_shaders = glmsg.add_args();
- arg_shaders->set_isarray(false);
- arg_shaders->set_type(GLMessage::DataType::INT);
- arg_shaders->add_intvalue((int)shaders);
-
- // copy argument binaryformat
- GLMessage_DataType *arg_binaryformat = glmsg.add_args();
- arg_binaryformat->set_isarray(false);
- arg_binaryformat->set_type(GLMessage::DataType::ENUM);
- arg_binaryformat->add_intvalue((int)binaryformat);
-
- // copy argument binary
- GLMessage_DataType *arg_binary = glmsg.add_args();
- arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue(length);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glShaderBinary(n, shaders, binaryformat, binary, length);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) shaders,
- (void *) binary,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glShaderSource);
-
- // copy argument shader
- GLMessage_DataType *arg_shader = glmsg.add_args();
- arg_shader->set_isarray(false);
- arg_shader->set_type(GLMessage::DataType::INT);
- arg_shader->add_intvalue(shader);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument string
- GLMessage_DataType *arg_string = glmsg.add_args();
- arg_string->set_isarray(false);
- arg_string->set_type(GLMessage::DataType::INT);
- arg_string->add_intvalue((int)string);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glShaderSource(shader, count, string, length);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) string,
- (void *) length,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStencilFunc);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // copy argument ref
- GLMessage_DataType *arg_ref = glmsg.add_args();
- arg_ref->set_isarray(false);
- arg_ref->set_type(GLMessage::DataType::INT);
- arg_ref->add_intvalue(ref);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::INT);
- arg_mask->add_intvalue(mask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStencilFunc(func, ref, mask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStencilFuncSeparate);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // copy argument ref
- GLMessage_DataType *arg_ref = glmsg.add_args();
- arg_ref->set_isarray(false);
- arg_ref->set_type(GLMessage::DataType::INT);
- arg_ref->add_intvalue(ref);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::INT);
- arg_mask->add_intvalue(mask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStencilFuncSeparate(face, func, ref, mask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStencilMask(GLuint mask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStencilMask);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::INT);
- arg_mask->add_intvalue(mask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStencilMask(mask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStencilMaskSeparate);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::INT);
- arg_mask->add_intvalue(mask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStencilMaskSeparate(face, mask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStencilOp);
-
- // copy argument fail
- GLMessage_DataType *arg_fail = glmsg.add_args();
- arg_fail->set_isarray(false);
- arg_fail->set_type(GLMessage::DataType::ENUM);
- arg_fail->add_intvalue((int)fail);
-
- // copy argument zfail
- GLMessage_DataType *arg_zfail = glmsg.add_args();
- arg_zfail->set_isarray(false);
- arg_zfail->set_type(GLMessage::DataType::ENUM);
- arg_zfail->add_intvalue((int)zfail);
-
- // copy argument zpass
- GLMessage_DataType *arg_zpass = glmsg.add_args();
- arg_zpass->set_isarray(false);
- arg_zpass->set_type(GLMessage::DataType::ENUM);
- arg_zpass->add_intvalue((int)zpass);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStencilOp(fail, zfail, zpass);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStencilOpSeparate);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument fail
- GLMessage_DataType *arg_fail = glmsg.add_args();
- arg_fail->set_isarray(false);
- arg_fail->set_type(GLMessage::DataType::ENUM);
- arg_fail->add_intvalue((int)fail);
-
- // copy argument zfail
- GLMessage_DataType *arg_zfail = glmsg.add_args();
- arg_zfail->set_isarray(false);
- arg_zfail->set_type(GLMessage::DataType::ENUM);
- arg_zfail->add_intvalue((int)zfail);
-
- // copy argument zpass
- GLMessage_DataType *arg_zpass = glmsg.add_args();
- arg_zpass->set_isarray(false);
- arg_zpass->set_type(GLMessage::DataType::ENUM);
- arg_zpass->add_intvalue((int)zpass);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStencilOpSeparate(face, fail, zfail, zpass);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexImage2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::INT);
- arg_internalformat->add_intvalue(internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument border
- GLMessage_DataType *arg_border = glmsg.add_args();
- arg_border->set_isarray(false);
- arg_border->set_type(GLMessage::DataType::INT);
- arg_border->add_intvalue(border);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument pixels
- GLMessage_DataType *arg_pixels = glmsg.add_args();
- arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pixels,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameterf);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameterf(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameterfv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameterfv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameteri);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameteri(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameteriv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameteriv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexSubImage2D);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument pixels
- GLMessage_DataType *arg_pixels = glmsg.add_args();
- arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pixels,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform1f(GLint location, GLfloat x) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform1f);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform1f(location, x);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform1fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform1fv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform1i(GLint location, GLint x) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform1i);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform1i(location, x);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform1iv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform1iv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform2f);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform2f(location, x, y);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform2fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform2fv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform2i(GLint location, GLint x, GLint y) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform2i);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform2i(location, x, y);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform2iv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform2iv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform3f);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform3f(location, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform3fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform3fv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform3i);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform3i(location, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform3iv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform3iv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform4f);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // copy argument w
- GLMessage_DataType *arg_w = glmsg.add_args();
- arg_w->set_isarray(false);
- arg_w->set_type(GLMessage::DataType::FLOAT);
- arg_w->add_floatvalue(w);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform4f(location, x, y, z, w);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform4fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform4fv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform4i);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // copy argument w
- GLMessage_DataType *arg_w = glmsg.add_args();
- arg_w->set_isarray(false);
- arg_w->set_type(GLMessage::DataType::INT);
- arg_w->add_intvalue(w);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform4i(location, x, y, z, w);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniform4iv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument v
- GLMessage_DataType *arg_v = glmsg.add_args();
- arg_v->set_isarray(false);
- arg_v->set_type(GLMessage::DataType::INT);
- arg_v->add_intvalue((int)v);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniform4iv(location, count, v);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) v,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniformMatrix2fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument transpose
- GLMessage_DataType *arg_transpose = glmsg.add_args();
- arg_transpose->set_isarray(false);
- arg_transpose->set_type(GLMessage::DataType::BOOL);
- arg_transpose->add_boolvalue(transpose);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniformMatrix2fv(location, count, transpose, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniformMatrix3fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument transpose
- GLMessage_DataType *arg_transpose = glmsg.add_args();
- arg_transpose->set_isarray(false);
- arg_transpose->set_type(GLMessage::DataType::BOOL);
- arg_transpose->add_boolvalue(transpose);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniformMatrix3fv(location, count, transpose, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUniformMatrix4fv);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument transpose
- GLMessage_DataType *arg_transpose = glmsg.add_args();
- arg_transpose->set_isarray(false);
- arg_transpose->set_type(GLMessage::DataType::BOOL);
- arg_transpose->add_boolvalue(transpose);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUniformMatrix4fv(location, count, transpose, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUseProgram(GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUseProgram);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUseProgram(program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glValidateProgram(GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glValidateProgram);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glValidateProgram(program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib1f);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib1f(indx, x);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib1fv);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument values
- GLMessage_DataType *arg_values = glmsg.add_args();
- arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib1fv(indx, values);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) values,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib2f);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib2f(indx, x, y);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib2fv);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument values
- GLMessage_DataType *arg_values = glmsg.add_args();
- arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib2fv(indx, values);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) values,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib3f);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib3f(indx, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib3fv);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument values
- GLMessage_DataType *arg_values = glmsg.add_args();
- arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib3fv(indx, values);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) values,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib4f);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // copy argument w
- GLMessage_DataType *arg_w = glmsg.add_args();
- arg_w->set_isarray(false);
- arg_w->set_type(GLMessage::DataType::FLOAT);
- arg_w->add_floatvalue(w);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib4f(indx, x, y, z, w);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttrib4fv);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument values
- GLMessage_DataType *arg_values = glmsg.add_args();
- arg_values->set_isarray(false);
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->add_intvalue((int)values);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttrib4fv(indx, values);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) values,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexAttribPointer);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument normalized
- GLMessage_DataType *arg_normalized = glmsg.add_args();
- arg_normalized->set_isarray(false);
- arg_normalized->set_type(GLMessage::DataType::BOOL);
- arg_normalized->add_boolvalue(normalized);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument ptr
- GLMessage_DataType *arg_ptr = glmsg.add_args();
- arg_ptr->set_isarray(false);
- arg_ptr->set_type(GLMessage::DataType::INT);
- arg_ptr->add_intvalue((int)ptr);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) ptr,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glViewport);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glViewport(x, y, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-
-// Definitions for GL2Ext APIs
-
-void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEGLImageTargetTexture2DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument image
- GLMessage_DataType *arg_image = glmsg.add_args();
- arg_image->set_isarray(false);
- arg_image->set_type(GLMessage::DataType::INT);
- arg_image->add_intvalue((int)image);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEGLImageTargetTexture2DOES(target, image);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) image,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEGLImageTargetRenderbufferStorageOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument image
- GLMessage_DataType *arg_image = glmsg.add_args();
- arg_image->set_isarray(false);
- arg_image->set_type(GLMessage::DataType::INT);
- arg_image->add_intvalue((int)image);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEGLImageTargetRenderbufferStorageOES(target, image);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) image,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetProgramBinaryOES);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument binaryFormat
- GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
- arg_binaryFormat->set_isarray(false);
- arg_binaryFormat->set_type(GLMessage::DataType::INT);
- arg_binaryFormat->add_intvalue((int)binaryFormat);
-
- // copy argument binary
- GLMessage_DataType *arg_binary = glmsg.add_args();
- arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) binaryFormat,
- (void *) binary,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramBinaryOES);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument binaryFormat
- GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
- arg_binaryFormat->set_isarray(false);
- arg_binaryFormat->set_type(GLMessage::DataType::ENUM);
- arg_binaryFormat->add_intvalue((int)binaryFormat);
-
- // copy argument binary
- GLMessage_DataType *arg_binary = glmsg.add_args();
- arg_binary->set_isarray(false);
- arg_binary->set_type(GLMessage::DataType::INT);
- arg_binary->add_intvalue((int)binary);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue(length);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramBinaryOES(program, binaryFormat, binary, length);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) binary,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void* GLTrace_glMapBufferOES(GLenum target, GLenum access) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMapBufferOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument access
- GLMessage_DataType *arg_access = glmsg.add_args();
- arg_access->set_isarray(false);
- arg_access->set_type(GLMessage::DataType::ENUM);
- arg_access->add_intvalue((int)access);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- void* retValue = glContext->hooks->gl.glMapBufferOES(target, access);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue((int)retValue);
-
- void *pointerArgs[] = {
- (void *) retValue,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glUnmapBufferOES(GLenum target) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUnmapBufferOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glUnmapBufferOES(target);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetBufferPointervOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetBufferPointervOES(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexImage3DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // copy argument border
- GLMessage_DataType *arg_border = glmsg.add_args();
- arg_border->set_isarray(false);
- arg_border->set_type(GLMessage::DataType::INT);
- arg_border->add_intvalue(border);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument pixels
- GLMessage_DataType *arg_pixels = glmsg.add_args();
- arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pixels,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-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) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexSubImage3DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument zoffset
- GLMessage_DataType *arg_zoffset = glmsg.add_args();
- arg_zoffset->set_isarray(false);
- arg_zoffset->set_type(GLMessage::DataType::INT);
- arg_zoffset->add_intvalue(zoffset);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument pixels
- GLMessage_DataType *arg_pixels = glmsg.add_args();
- arg_pixels->set_isarray(false);
- arg_pixels->set_type(GLMessage::DataType::INT);
- arg_pixels->add_intvalue((int)pixels);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pixels,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCopyTexSubImage3DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument zoffset
- GLMessage_DataType *arg_zoffset = glmsg.add_args();
- arg_zoffset->set_isarray(false);
- arg_zoffset->set_type(GLMessage::DataType::INT);
- arg_zoffset->add_intvalue(zoffset);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCompressedTexImage3DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // copy argument border
- GLMessage_DataType *arg_border = glmsg.add_args();
- arg_border->set_isarray(false);
- arg_border->set_type(GLMessage::DataType::INT);
- arg_border->add_intvalue(border);
-
- // copy argument imageSize
- GLMessage_DataType *arg_imageSize = glmsg.add_args();
- arg_imageSize->set_isarray(false);
- arg_imageSize->set_type(GLMessage::DataType::INT);
- arg_imageSize->add_intvalue(imageSize);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-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) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCompressedTexSubImage3DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument zoffset
- GLMessage_DataType *arg_zoffset = glmsg.add_args();
- arg_zoffset->set_isarray(false);
- arg_zoffset->set_type(GLMessage::DataType::INT);
- arg_zoffset->add_intvalue(zoffset);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument imageSize
- GLMessage_DataType *arg_imageSize = glmsg.add_args();
- arg_imageSize->set_isarray(false);
- arg_imageSize->set_type(GLMessage::DataType::INT);
- arg_imageSize->add_intvalue(imageSize);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferTexture3DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument textarget
- GLMessage_DataType *arg_textarget = glmsg.add_args();
- arg_textarget->set_isarray(false);
- arg_textarget->set_type(GLMessage::DataType::ENUM);
- arg_textarget->add_intvalue((int)textarget);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument zoffset
- GLMessage_DataType *arg_zoffset = glmsg.add_args();
- arg_zoffset->set_isarray(false);
- arg_zoffset->set_type(GLMessage::DataType::INT);
- arg_zoffset->add_intvalue(zoffset);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBindVertexArrayOES(GLuint array) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindVertexArrayOES);
-
- // copy argument array
- GLMessage_DataType *arg_array = glmsg.add_args();
- arg_array->set_isarray(false);
- arg_array->set_type(GLMessage::DataType::INT);
- arg_array->add_intvalue(array);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindVertexArrayOES(array);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteVertexArraysOES);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument arrays
- GLMessage_DataType *arg_arrays = glmsg.add_args();
- arg_arrays->set_isarray(false);
- arg_arrays->set_type(GLMessage::DataType::INT);
- arg_arrays->add_intvalue((int)arrays);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteVertexArraysOES(n, arrays);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) arrays,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenVertexArraysOES);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument arrays
- GLMessage_DataType *arg_arrays = glmsg.add_args();
- arg_arrays->set_isarray(false);
- arg_arrays->set_type(GLMessage::DataType::INT);
- arg_arrays->add_intvalue((int)arrays);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenVertexArraysOES(n, arrays);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) arrays,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsVertexArrayOES(GLuint array) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsVertexArrayOES);
-
- // copy argument array
- GLMessage_DataType *arg_array = glmsg.add_args();
- arg_array->set_isarray(false);
- arg_array->set_type(GLMessage::DataType::INT);
- arg_array->add_intvalue(array);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsVertexArrayOES(array);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPerfMonitorGroupsAMD);
-
- // copy argument numGroups
- GLMessage_DataType *arg_numGroups = glmsg.add_args();
- arg_numGroups->set_isarray(false);
- arg_numGroups->set_type(GLMessage::DataType::INT);
- arg_numGroups->add_intvalue((int)numGroups);
-
- // copy argument groupsSize
- GLMessage_DataType *arg_groupsSize = glmsg.add_args();
- arg_groupsSize->set_isarray(false);
- arg_groupsSize->set_type(GLMessage::DataType::INT);
- arg_groupsSize->add_intvalue(groupsSize);
-
- // copy argument groups
- GLMessage_DataType *arg_groups = glmsg.add_args();
- arg_groups->set_isarray(false);
- arg_groups->set_type(GLMessage::DataType::INT);
- arg_groups->add_intvalue((int)groups);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) numGroups,
- (void *) groups,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPerfMonitorCountersAMD);
-
- // copy argument group
- GLMessage_DataType *arg_group = glmsg.add_args();
- arg_group->set_isarray(false);
- arg_group->set_type(GLMessage::DataType::INT);
- arg_group->add_intvalue(group);
-
- // copy argument numCounters
- GLMessage_DataType *arg_numCounters = glmsg.add_args();
- arg_numCounters->set_isarray(false);
- arg_numCounters->set_type(GLMessage::DataType::INT);
- arg_numCounters->add_intvalue((int)numCounters);
-
- // copy argument maxActiveCounters
- GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args();
- arg_maxActiveCounters->set_isarray(false);
- arg_maxActiveCounters->set_type(GLMessage::DataType::INT);
- arg_maxActiveCounters->add_intvalue((int)maxActiveCounters);
-
- // copy argument counterSize
- GLMessage_DataType *arg_counterSize = glmsg.add_args();
- arg_counterSize->set_isarray(false);
- arg_counterSize->set_type(GLMessage::DataType::INT);
- arg_counterSize->add_intvalue(counterSize);
-
- // copy argument counters
- GLMessage_DataType *arg_counters = glmsg.add_args();
- arg_counters->set_isarray(false);
- arg_counters->set_type(GLMessage::DataType::INT);
- arg_counters->add_intvalue((int)counters);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) numCounters,
- (void *) maxActiveCounters,
- (void *) counters,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPerfMonitorGroupStringAMD);
-
- // copy argument group
- GLMessage_DataType *arg_group = glmsg.add_args();
- arg_group->set_isarray(false);
- arg_group->set_type(GLMessage::DataType::INT);
- arg_group->add_intvalue(group);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument groupString
- GLMessage_DataType *arg_groupString = glmsg.add_args();
- arg_groupString->set_isarray(false);
- arg_groupString->set_type(GLMessage::DataType::INT);
- arg_groupString->add_intvalue((int)groupString);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) groupString,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPerfMonitorCounterStringAMD);
-
- // copy argument group
- GLMessage_DataType *arg_group = glmsg.add_args();
- arg_group->set_isarray(false);
- arg_group->set_type(GLMessage::DataType::INT);
- arg_group->add_intvalue(group);
-
- // copy argument counter
- GLMessage_DataType *arg_counter = glmsg.add_args();
- arg_counter->set_isarray(false);
- arg_counter->set_type(GLMessage::DataType::INT);
- arg_counter->add_intvalue(counter);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument counterString
- GLMessage_DataType *arg_counterString = glmsg.add_args();
- arg_counterString->set_isarray(false);
- arg_counterString->set_type(GLMessage::DataType::INT);
- arg_counterString->add_intvalue((int)counterString);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) counterString,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPerfMonitorCounterInfoAMD);
-
- // copy argument group
- GLMessage_DataType *arg_group = glmsg.add_args();
- arg_group->set_isarray(false);
- arg_group->set_type(GLMessage::DataType::INT);
- arg_group->add_intvalue(group);
-
- // copy argument counter
- GLMessage_DataType *arg_counter = glmsg.add_args();
- arg_counter->set_isarray(false);
- arg_counter->set_type(GLMessage::DataType::INT);
- arg_counter->add_intvalue(counter);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenPerfMonitorsAMD);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument monitors
- GLMessage_DataType *arg_monitors = glmsg.add_args();
- arg_monitors->set_isarray(false);
- arg_monitors->set_type(GLMessage::DataType::INT);
- arg_monitors->add_intvalue((int)monitors);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenPerfMonitorsAMD(n, monitors);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) monitors,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeletePerfMonitorsAMD);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument monitors
- GLMessage_DataType *arg_monitors = glmsg.add_args();
- arg_monitors->set_isarray(false);
- arg_monitors->set_type(GLMessage::DataType::INT);
- arg_monitors->add_intvalue((int)monitors);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeletePerfMonitorsAMD(n, monitors);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) monitors,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glSelectPerfMonitorCountersAMD);
-
- // copy argument monitor
- GLMessage_DataType *arg_monitor = glmsg.add_args();
- arg_monitor->set_isarray(false);
- arg_monitor->set_type(GLMessage::DataType::INT);
- arg_monitor->add_intvalue(monitor);
-
- // copy argument enable
- GLMessage_DataType *arg_enable = glmsg.add_args();
- arg_enable->set_isarray(false);
- arg_enable->set_type(GLMessage::DataType::BOOL);
- arg_enable->add_boolvalue(enable);
-
- // copy argument group
- GLMessage_DataType *arg_group = glmsg.add_args();
- arg_group->set_isarray(false);
- arg_group->set_type(GLMessage::DataType::INT);
- arg_group->add_intvalue(group);
-
- // copy argument numCounters
- GLMessage_DataType *arg_numCounters = glmsg.add_args();
- arg_numCounters->set_isarray(false);
- arg_numCounters->set_type(GLMessage::DataType::INT);
- arg_numCounters->add_intvalue(numCounters);
-
- // copy argument countersList
- GLMessage_DataType *arg_countersList = glmsg.add_args();
- arg_countersList->set_isarray(false);
- arg_countersList->set_type(GLMessage::DataType::INT);
- arg_countersList->add_intvalue((int)countersList);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, countersList);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) countersList,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBeginPerfMonitorAMD(GLuint monitor) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBeginPerfMonitorAMD);
-
- // copy argument monitor
- GLMessage_DataType *arg_monitor = glmsg.add_args();
- arg_monitor->set_isarray(false);
- arg_monitor->set_type(GLMessage::DataType::INT);
- arg_monitor->add_intvalue(monitor);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBeginPerfMonitorAMD(monitor);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEndPerfMonitorAMD(GLuint monitor) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEndPerfMonitorAMD);
-
- // copy argument monitor
- GLMessage_DataType *arg_monitor = glmsg.add_args();
- arg_monitor->set_isarray(false);
- arg_monitor->set_type(GLMessage::DataType::INT);
- arg_monitor->add_intvalue(monitor);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEndPerfMonitorAMD(monitor);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPerfMonitorCounterDataAMD);
-
- // copy argument monitor
- GLMessage_DataType *arg_monitor = glmsg.add_args();
- arg_monitor->set_isarray(false);
- arg_monitor->set_type(GLMessage::DataType::INT);
- arg_monitor->add_intvalue(monitor);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument dataSize
- GLMessage_DataType *arg_dataSize = glmsg.add_args();
- arg_dataSize->set_isarray(false);
- arg_dataSize->set_type(GLMessage::DataType::INT);
- arg_dataSize->add_intvalue(dataSize);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // copy argument bytesWritten
- GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
- arg_bytesWritten->set_isarray(false);
- arg_bytesWritten->set_type(GLMessage::DataType::INT);
- arg_bytesWritten->add_intvalue((int)bytesWritten);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- (void *) bytesWritten,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlitFramebufferANGLE);
-
- // copy argument srcX0
- GLMessage_DataType *arg_srcX0 = glmsg.add_args();
- arg_srcX0->set_isarray(false);
- arg_srcX0->set_type(GLMessage::DataType::INT);
- arg_srcX0->add_intvalue(srcX0);
-
- // copy argument srcY0
- GLMessage_DataType *arg_srcY0 = glmsg.add_args();
- arg_srcY0->set_isarray(false);
- arg_srcY0->set_type(GLMessage::DataType::INT);
- arg_srcY0->add_intvalue(srcY0);
-
- // copy argument srcX1
- GLMessage_DataType *arg_srcX1 = glmsg.add_args();
- arg_srcX1->set_isarray(false);
- arg_srcX1->set_type(GLMessage::DataType::INT);
- arg_srcX1->add_intvalue(srcX1);
-
- // copy argument srcY1
- GLMessage_DataType *arg_srcY1 = glmsg.add_args();
- arg_srcY1->set_isarray(false);
- arg_srcY1->set_type(GLMessage::DataType::INT);
- arg_srcY1->add_intvalue(srcY1);
-
- // copy argument dstX0
- GLMessage_DataType *arg_dstX0 = glmsg.add_args();
- arg_dstX0->set_isarray(false);
- arg_dstX0->set_type(GLMessage::DataType::INT);
- arg_dstX0->add_intvalue(dstX0);
-
- // copy argument dstY0
- GLMessage_DataType *arg_dstY0 = glmsg.add_args();
- arg_dstY0->set_isarray(false);
- arg_dstY0->set_type(GLMessage::DataType::INT);
- arg_dstY0->add_intvalue(dstY0);
-
- // copy argument dstX1
- GLMessage_DataType *arg_dstX1 = glmsg.add_args();
- arg_dstX1->set_isarray(false);
- arg_dstX1->set_type(GLMessage::DataType::INT);
- arg_dstX1->add_intvalue(dstX1);
-
- // copy argument dstY1
- GLMessage_DataType *arg_dstY1 = glmsg.add_args();
- arg_dstY1->set_isarray(false);
- arg_dstY1->set_type(GLMessage::DataType::INT);
- arg_dstY1->add_intvalue(dstY1);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::INT);
- arg_mask->add_intvalue(mask);
-
- // copy argument filter
- GLMessage_DataType *arg_filter = glmsg.add_args();
- arg_filter->set_isarray(false);
- arg_filter->set_type(GLMessage::DataType::ENUM);
- arg_filter->add_intvalue((int)filter);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleANGLE);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument samples
- GLMessage_DataType *arg_samples = glmsg.add_args();
- arg_samples->set_isarray(false);
- arg_samples->set_type(GLMessage::DataType::INT);
- arg_samples->add_intvalue(samples);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleAPPLE);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument samples
- GLMessage_DataType *arg_samples = glmsg.add_args();
- arg_samples->set_isarray(false);
- arg_samples->set_type(GLMessage::DataType::INT);
- arg_samples->add_intvalue(samples);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glResolveMultisampleFramebufferAPPLE(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glResolveMultisampleFramebufferAPPLE);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glResolveMultisampleFramebufferAPPLE();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLabelObjectEXT);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument object
- GLMessage_DataType *arg_object = glmsg.add_args();
- arg_object->set_isarray(false);
- arg_object->set_type(GLMessage::DataType::INT);
- arg_object->add_intvalue(object);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue(length);
-
- // copy argument label
- GLMessage_DataType *arg_label = glmsg.add_args();
- arg_label->set_isarray(false);
- arg_label->set_type(GLMessage::DataType::INT);
- arg_label->add_intvalue((int)label);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLabelObjectEXT(type, object, length, label);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) label,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetObjectLabelEXT);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument object
- GLMessage_DataType *arg_object = glmsg.add_args();
- arg_object->set_isarray(false);
- arg_object->set_type(GLMessage::DataType::INT);
- arg_object->add_intvalue(object);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument label
- GLMessage_DataType *arg_label = glmsg.add_args();
- arg_label->set_isarray(false);
- arg_label->set_type(GLMessage::DataType::INT);
- arg_label->add_intvalue((int)label);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetObjectLabelEXT(type, object, bufSize, length, label);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) label,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glInsertEventMarkerEXT);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue(length);
-
- // copy argument marker
- GLMessage_DataType *arg_marker = glmsg.add_args();
- arg_marker->set_isarray(false);
- arg_marker->set_type(GLMessage::DataType::INT);
- arg_marker->add_intvalue((int)marker);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glInsertEventMarkerEXT(length, marker);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) marker,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPushGroupMarkerEXT);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue(length);
-
- // copy argument marker
- GLMessage_DataType *arg_marker = glmsg.add_args();
- arg_marker->set_isarray(false);
- arg_marker->set_type(GLMessage::DataType::INT);
- arg_marker->add_intvalue((int)marker);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPushGroupMarkerEXT(length, marker);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) marker,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPopGroupMarkerEXT(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPopGroupMarkerEXT);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPopGroupMarkerEXT();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDiscardFramebufferEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument numAttachments
- GLMessage_DataType *arg_numAttachments = glmsg.add_args();
- arg_numAttachments->set_isarray(false);
- arg_numAttachments->set_type(GLMessage::DataType::INT);
- arg_numAttachments->add_intvalue(numAttachments);
-
- // copy argument attachments
- GLMessage_DataType *arg_attachments = glmsg.add_args();
- arg_attachments->set_isarray(false);
- arg_attachments->set_type(GLMessage::DataType::INT);
- arg_attachments->add_intvalue((int)attachments);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDiscardFramebufferEXT(target, numAttachments, attachments);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) attachments,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument samples
- GLMessage_DataType *arg_samples = glmsg.add_args();
- arg_samples->set_isarray(false);
- arg_samples->set_type(GLMessage::DataType::INT);
- arg_samples->add_intvalue(samples);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument textarget
- GLMessage_DataType *arg_textarget = glmsg.add_args();
- arg_textarget->set_isarray(false);
- arg_textarget->set_type(GLMessage::DataType::ENUM);
- arg_textarget->add_intvalue((int)textarget);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument samples
- GLMessage_DataType *arg_samples = glmsg.add_args();
- arg_samples->set_isarray(false);
- arg_samples->set_type(GLMessage::DataType::INT);
- arg_samples->add_intvalue(samples);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultiDrawArraysEXT);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // copy argument first
- GLMessage_DataType *arg_first = glmsg.add_args();
- arg_first->set_isarray(false);
- arg_first->set_type(GLMessage::DataType::INT);
- arg_first->add_intvalue((int)first);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue((int)count);
-
- // copy argument primcount
- GLMessage_DataType *arg_primcount = glmsg.add_args();
- arg_primcount->set_isarray(false);
- arg_primcount->set_type(GLMessage::DataType::INT);
- arg_primcount->add_intvalue(primcount);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) first,
- (void *) count,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultiDrawElementsEXT);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue((int)count);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument indices
- GLMessage_DataType *arg_indices = glmsg.add_args();
- arg_indices->set_isarray(false);
- arg_indices->set_type(GLMessage::DataType::INT);
- arg_indices->add_intvalue((int)indices);
-
- // copy argument primcount
- GLMessage_DataType *arg_primcount = glmsg.add_args();
- arg_primcount->set_isarray(false);
- arg_primcount->set_type(GLMessage::DataType::INT);
- arg_primcount->add_intvalue(primcount);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) count,
- (void *) indices,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenQueriesEXT);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument ids
- GLMessage_DataType *arg_ids = glmsg.add_args();
- arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenQueriesEXT(n, ids);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) ids,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteQueriesEXT);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument ids
- GLMessage_DataType *arg_ids = glmsg.add_args();
- arg_ids->set_isarray(false);
- arg_ids->set_type(GLMessage::DataType::INT);
- arg_ids->add_intvalue((int)ids);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteQueriesEXT(n, ids);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) ids,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsQueryEXT(GLuint id) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsQueryEXT);
-
- // copy argument id
- GLMessage_DataType *arg_id = glmsg.add_args();
- arg_id->set_isarray(false);
- arg_id->set_type(GLMessage::DataType::INT);
- arg_id->add_intvalue(id);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsQueryEXT(id);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glBeginQueryEXT(GLenum target, GLuint id) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBeginQueryEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument id
- GLMessage_DataType *arg_id = glmsg.add_args();
- arg_id->set_isarray(false);
- arg_id->set_type(GLMessage::DataType::INT);
- arg_id->add_intvalue(id);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBeginQueryEXT(target, id);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEndQueryEXT(GLenum target) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEndQueryEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEndQueryEXT(target);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetQueryivEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetQueryivEXT(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetQueryObjectuivEXT);
-
- // copy argument id
- GLMessage_DataType *arg_id = glmsg.add_args();
- arg_id->set_isarray(false);
- arg_id->set_type(GLMessage::DataType::INT);
- arg_id->add_intvalue(id);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetQueryObjectuivEXT(id, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLenum GLTrace_glGetGraphicsResetStatusEXT(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetGraphicsResetStatusEXT);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLenum retValue = glContext->hooks->gl.glGetGraphicsResetStatusEXT();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::ENUM);
- rt->add_intvalue((int)retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glReadnPixelsEXT);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument data
- GLMessage_DataType *arg_data = glmsg.add_args();
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::INT);
- arg_data->add_intvalue((int)data);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) data,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetnUniformfvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetnUniformfvEXT(program, location, bufSize, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetnUniformivEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetnUniformivEXT(program, location, bufSize, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glUseProgramStagesEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // copy argument stages
- GLMessage_DataType *arg_stages = glmsg.add_args();
- arg_stages->set_isarray(false);
- arg_stages->set_type(GLMessage::DataType::INT);
- arg_stages->add_intvalue(stages);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glActiveShaderProgramEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glActiveShaderProgramEXT(pipeline, program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCreateShaderProgramvEXT);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument strings
- GLMessage_DataType *arg_strings = glmsg.add_args();
- arg_strings->set_isarray(false);
- arg_strings->set_type(GLMessage::DataType::INT);
- arg_strings->add_intvalue((int)strings);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLuint retValue = glContext->hooks->gl.glCreateShaderProgramvEXT(type, count, strings);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue(retValue);
-
- void *pointerArgs[] = {
- (void *) strings,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindProgramPipelineEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindProgramPipelineEXT(pipeline);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteProgramPipelinesEXT);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument pipelines
- GLMessage_DataType *arg_pipelines = glmsg.add_args();
- arg_pipelines->set_isarray(false);
- arg_pipelines->set_type(GLMessage::DataType::INT);
- arg_pipelines->add_intvalue((int)pipelines);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteProgramPipelinesEXT(n, pipelines);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pipelines,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenProgramPipelinesEXT);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument pipelines
- GLMessage_DataType *arg_pipelines = glmsg.add_args();
- arg_pipelines->set_isarray(false);
- arg_pipelines->set_type(GLMessage::DataType::INT);
- arg_pipelines->add_intvalue((int)pipelines);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenProgramPipelinesEXT(n, pipelines);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pipelines,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsProgramPipelineEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsProgramPipelineEXT(pipeline);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramParameteriEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue(value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramParameteriEXT(program, pname, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetProgramPipelineivEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform1iEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform1iEXT(program, location, x);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform2iEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform2iEXT(program, location, x, y);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform3iEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform3iEXT(program, location, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform4iEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // copy argument w
- GLMessage_DataType *arg_w = glmsg.add_args();
- arg_w->set_isarray(false);
- arg_w->set_type(GLMessage::DataType::INT);
- arg_w->add_intvalue(w);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform4iEXT(program, location, x, y, z, w);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform1fEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform1fEXT(program, location, x);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform2fEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform2fEXT(program, location, x, y);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform3fEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform3fEXT(program, location, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform4fEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // copy argument w
- GLMessage_DataType *arg_w = glmsg.add_args();
- arg_w->set_isarray(false);
- arg_w->set_type(GLMessage::DataType::FLOAT);
- arg_w->add_floatvalue(w);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform4fEXT(program, location, x, y, z, w);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform1ivEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform2ivEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform3ivEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform4ivEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform1fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform1fvEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform2fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform2fvEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform3fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform3fvEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniform4fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniform4fvEXT(program, location, count, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniformMatrix2fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument transpose
- GLMessage_DataType *arg_transpose = glmsg.add_args();
- arg_transpose->set_isarray(false);
- arg_transpose->set_type(GLMessage::DataType::BOOL);
- arg_transpose->add_boolvalue(transpose);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniformMatrix2fvEXT(program, location, count, transpose, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniformMatrix3fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument transpose
- GLMessage_DataType *arg_transpose = glmsg.add_args();
- arg_transpose->set_isarray(false);
- arg_transpose->set_type(GLMessage::DataType::BOOL);
- arg_transpose->add_boolvalue(transpose);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniformMatrix3fvEXT(program, location, count, transpose, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glProgramUniformMatrix4fvEXT);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument location
- GLMessage_DataType *arg_location = glmsg.add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-
- // copy argument count
- GLMessage_DataType *arg_count = glmsg.add_args();
- arg_count->set_isarray(false);
- arg_count->set_type(GLMessage::DataType::INT);
- arg_count->add_intvalue(count);
-
- // copy argument transpose
- GLMessage_DataType *arg_transpose = glmsg.add_args();
- arg_transpose->set_isarray(false);
- arg_transpose->set_type(GLMessage::DataType::BOOL);
- arg_transpose->add_boolvalue(transpose);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue((int)value);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glProgramUniformMatrix4fvEXT(program, location, count, transpose, value);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) value,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glValidateProgramPipelineEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glValidateProgramPipelineEXT(pipeline);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT);
-
- // copy argument pipeline
- GLMessage_DataType *arg_pipeline = glmsg.add_args();
- arg_pipeline->set_isarray(false);
- arg_pipeline->set_type(GLMessage::DataType::INT);
- arg_pipeline->add_intvalue(pipeline);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument infoLog
- GLMessage_DataType *arg_infoLog = glmsg.add_args();
- arg_infoLog->set_isarray(false);
- arg_infoLog->set_type(GLMessage::DataType::INT);
- arg_infoLog->add_intvalue((int)infoLog);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) infoLog,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexStorage1DEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument levels
- GLMessage_DataType *arg_levels = glmsg.add_args();
- arg_levels->set_isarray(false);
- arg_levels->set_type(GLMessage::DataType::INT);
- arg_levels->add_intvalue(levels);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexStorage1DEXT(target, levels, internalformat, width);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexStorage2DEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument levels
- GLMessage_DataType *arg_levels = glmsg.add_args();
- arg_levels->set_isarray(false);
- arg_levels->set_type(GLMessage::DataType::INT);
- arg_levels->add_intvalue(levels);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexStorage2DEXT(target, levels, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexStorage3DEXT);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument levels
- GLMessage_DataType *arg_levels = glmsg.add_args();
- arg_levels->set_isarray(false);
- arg_levels->set_type(GLMessage::DataType::INT);
- arg_levels->add_intvalue(levels);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexStorage3DEXT(target, levels, internalformat, width, height, depth);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTextureStorage1DEXT);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument levels
- GLMessage_DataType *arg_levels = glmsg.add_args();
- arg_levels->set_isarray(false);
- arg_levels->set_type(GLMessage::DataType::INT);
- arg_levels->add_intvalue(levels);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTextureStorage1DEXT(texture, target, levels, internalformat, width);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTextureStorage2DEXT);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument levels
- GLMessage_DataType *arg_levels = glmsg.add_args();
- arg_levels->set_isarray(false);
- arg_levels->set_type(GLMessage::DataType::INT);
- arg_levels->add_intvalue(levels);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTextureStorage3DEXT);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument levels
- GLMessage_DataType *arg_levels = glmsg.add_args();
- arg_levels->set_isarray(false);
- arg_levels->set_type(GLMessage::DataType::INT);
- arg_levels->add_intvalue(levels);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleIMG);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument samples
- GLMessage_DataType *arg_samples = glmsg.add_args();
- arg_samples->set_isarray(false);
- arg_samples->set_type(GLMessage::DataType::INT);
- arg_samples->add_intvalue(samples);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleIMG);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument textarget
- GLMessage_DataType *arg_textarget = glmsg.add_args();
- arg_textarget->set_isarray(false);
- arg_textarget->set_type(GLMessage::DataType::ENUM);
- arg_textarget->add_intvalue((int)textarget);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument samples
- GLMessage_DataType *arg_samples = glmsg.add_args();
- arg_samples->set_isarray(false);
- arg_samples->set_type(GLMessage::DataType::INT);
- arg_samples->add_intvalue(samples);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCoverageMaskNV(GLboolean mask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCoverageMaskNV);
-
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::BOOL);
- arg_mask->add_boolvalue(mask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCoverageMaskNV(mask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCoverageOperationNV(GLenum operation) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCoverageOperationNV);
-
- // copy argument operation
- GLMessage_DataType *arg_operation = glmsg.add_args();
- arg_operation->set_isarray(false);
- arg_operation->set_type(GLMessage::DataType::ENUM);
- arg_operation->add_intvalue((int)operation);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCoverageOperationNV(operation);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawBuffersNV);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument bufs
- GLMessage_DataType *arg_bufs = glmsg.add_args();
- arg_bufs->set_isarray(false);
- arg_bufs->set_type(GLMessage::DataType::INT);
- arg_bufs->add_intvalue((int)bufs);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawBuffersNV(n, bufs);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) bufs,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteFencesNV);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument fences
- GLMessage_DataType *arg_fences = glmsg.add_args();
- arg_fences->set_isarray(false);
- arg_fences->set_type(GLMessage::DataType::INT);
- arg_fences->add_intvalue((int)fences);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteFencesNV(n, fences);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) fences,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenFencesNV);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument fences
- GLMessage_DataType *arg_fences = glmsg.add_args();
- arg_fences->set_isarray(false);
- arg_fences->set_type(GLMessage::DataType::INT);
- arg_fences->add_intvalue((int)fences);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenFencesNV(n, fences);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) fences,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsFenceNV(GLuint fence) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsFenceNV);
-
- // copy argument fence
- GLMessage_DataType *arg_fence = glmsg.add_args();
- arg_fence->set_isarray(false);
- arg_fence->set_type(GLMessage::DataType::INT);
- arg_fence->add_intvalue(fence);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsFenceNV(fence);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-GLboolean GLTrace_glTestFenceNV(GLuint fence) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTestFenceNV);
-
- // copy argument fence
- GLMessage_DataType *arg_fence = glmsg.add_args();
- arg_fence->set_isarray(false);
- arg_fence->set_type(GLMessage::DataType::INT);
- arg_fence->add_intvalue(fence);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glTestFenceNV(fence);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetFenceivNV);
-
- // copy argument fence
- GLMessage_DataType *arg_fence = glmsg.add_args();
- arg_fence->set_isarray(false);
- arg_fence->set_type(GLMessage::DataType::INT);
- arg_fence->add_intvalue(fence);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetFenceivNV(fence, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFinishFenceNV(GLuint fence) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFinishFenceNV);
-
- // copy argument fence
- GLMessage_DataType *arg_fence = glmsg.add_args();
- arg_fence->set_isarray(false);
- arg_fence->set_type(GLMessage::DataType::INT);
- arg_fence->add_intvalue(fence);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFinishFenceNV(fence);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glSetFenceNV);
-
- // copy argument fence
- GLMessage_DataType *arg_fence = glmsg.add_args();
- arg_fence->set_isarray(false);
- arg_fence->set_type(GLMessage::DataType::INT);
- arg_fence->add_intvalue(fence);
-
- // copy argument condition
- GLMessage_DataType *arg_condition = glmsg.add_args();
- arg_condition->set_isarray(false);
- arg_condition->set_type(GLMessage::DataType::ENUM);
- arg_condition->add_intvalue((int)condition);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glSetFenceNV(fence, condition);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glReadBufferNV(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glReadBufferNV);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glReadBufferNV(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glAlphaFuncQCOM);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // copy argument ref
- GLMessage_DataType *arg_ref = glmsg.add_args();
- arg_ref->set_isarray(false);
- arg_ref->set_type(GLMessage::DataType::FLOAT);
- arg_ref->add_floatvalue(ref);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glAlphaFuncQCOM(func, ref);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetDriverControlsQCOM);
-
- // copy argument num
- GLMessage_DataType *arg_num = glmsg.add_args();
- arg_num->set_isarray(false);
- arg_num->set_type(GLMessage::DataType::INT);
- arg_num->add_intvalue((int)num);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument driverControls
- GLMessage_DataType *arg_driverControls = glmsg.add_args();
- arg_driverControls->set_isarray(false);
- arg_driverControls->set_type(GLMessage::DataType::INT);
- arg_driverControls->add_intvalue((int)driverControls);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetDriverControlsQCOM(num, size, driverControls);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) num,
- (void *) driverControls,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetDriverControlStringQCOM);
-
- // copy argument driverControl
- GLMessage_DataType *arg_driverControl = glmsg.add_args();
- arg_driverControl->set_isarray(false);
- arg_driverControl->set_type(GLMessage::DataType::INT);
- arg_driverControl->add_intvalue(driverControl);
-
- // copy argument bufSize
- GLMessage_DataType *arg_bufSize = glmsg.add_args();
- arg_bufSize->set_isarray(false);
- arg_bufSize->set_type(GLMessage::DataType::INT);
- arg_bufSize->add_intvalue(bufSize);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // copy argument driverControlString
- GLMessage_DataType *arg_driverControlString = glmsg.add_args();
- arg_driverControlString->set_isarray(false);
- arg_driverControlString->set_type(GLMessage::DataType::INT);
- arg_driverControlString->add_intvalue((int)driverControlString);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) length,
- (void *) driverControlString,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEnableDriverControlQCOM(GLuint driverControl) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEnableDriverControlQCOM);
-
- // copy argument driverControl
- GLMessage_DataType *arg_driverControl = glmsg.add_args();
- arg_driverControl->set_isarray(false);
- arg_driverControl->set_type(GLMessage::DataType::INT);
- arg_driverControl->add_intvalue(driverControl);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEnableDriverControlQCOM(driverControl);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDisableDriverControlQCOM(GLuint driverControl) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDisableDriverControlQCOM);
-
- // copy argument driverControl
- GLMessage_DataType *arg_driverControl = glmsg.add_args();
- arg_driverControl->set_isarray(false);
- arg_driverControl->set_type(GLMessage::DataType::INT);
- arg_driverControl->add_intvalue(driverControl);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDisableDriverControlQCOM(driverControl);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetTexturesQCOM);
-
- // copy argument textures
- GLMessage_DataType *arg_textures = glmsg.add_args();
- arg_textures->set_isarray(false);
- arg_textures->set_type(GLMessage::DataType::INT);
- arg_textures->add_intvalue((int)textures);
-
- // copy argument maxTextures
- GLMessage_DataType *arg_maxTextures = glmsg.add_args();
- arg_maxTextures->set_isarray(false);
- arg_maxTextures->set_type(GLMessage::DataType::INT);
- arg_maxTextures->add_intvalue(maxTextures);
-
- // copy argument numTextures
- GLMessage_DataType *arg_numTextures = glmsg.add_args();
- arg_numTextures->set_isarray(false);
- arg_numTextures->set_type(GLMessage::DataType::INT);
- arg_numTextures->add_intvalue((int)numTextures);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetTexturesQCOM(textures, maxTextures, numTextures);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) textures,
- (void *) numTextures,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetBuffersQCOM);
-
- // copy argument buffers
- GLMessage_DataType *arg_buffers = glmsg.add_args();
- arg_buffers->set_isarray(false);
- arg_buffers->set_type(GLMessage::DataType::INT);
- arg_buffers->add_intvalue((int)buffers);
-
- // copy argument maxBuffers
- GLMessage_DataType *arg_maxBuffers = glmsg.add_args();
- arg_maxBuffers->set_isarray(false);
- arg_maxBuffers->set_type(GLMessage::DataType::INT);
- arg_maxBuffers->add_intvalue(maxBuffers);
-
- // copy argument numBuffers
- GLMessage_DataType *arg_numBuffers = glmsg.add_args();
- arg_numBuffers->set_isarray(false);
- arg_numBuffers->set_type(GLMessage::DataType::INT);
- arg_numBuffers->add_intvalue((int)numBuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) buffers,
- (void *) numBuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetRenderbuffersQCOM);
-
- // copy argument renderbuffers
- GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
- arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
-
- // copy argument maxRenderbuffers
- GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args();
- arg_maxRenderbuffers->set_isarray(false);
- arg_maxRenderbuffers->set_type(GLMessage::DataType::INT);
- arg_maxRenderbuffers->add_intvalue(maxRenderbuffers);
-
- // copy argument numRenderbuffers
- GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args();
- arg_numRenderbuffers->set_isarray(false);
- arg_numRenderbuffers->set_type(GLMessage::DataType::INT);
- arg_numRenderbuffers->add_intvalue((int)numRenderbuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) renderbuffers,
- (void *) numRenderbuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetFramebuffersQCOM);
-
- // copy argument framebuffers
- GLMessage_DataType *arg_framebuffers = glmsg.add_args();
- arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
-
- // copy argument maxFramebuffers
- GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args();
- arg_maxFramebuffers->set_isarray(false);
- arg_maxFramebuffers->set_type(GLMessage::DataType::INT);
- arg_maxFramebuffers->add_intvalue(maxFramebuffers);
-
- // copy argument numFramebuffers
- GLMessage_DataType *arg_numFramebuffers = glmsg.add_args();
- arg_numFramebuffers->set_isarray(false);
- arg_numFramebuffers->set_type(GLMessage::DataType::INT);
- arg_numFramebuffers->add_intvalue((int)numFramebuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) framebuffers,
- (void *) numFramebuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetTexLevelParameterivQCOM);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtTexObjectStateOverrideiQCOM);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtTexObjectStateOverrideiQCOM(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-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) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetTexSubImageQCOM);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // copy argument xoffset
- GLMessage_DataType *arg_xoffset = glmsg.add_args();
- arg_xoffset->set_isarray(false);
- arg_xoffset->set_type(GLMessage::DataType::INT);
- arg_xoffset->add_intvalue(xoffset);
-
- // copy argument yoffset
- GLMessage_DataType *arg_yoffset = glmsg.add_args();
- arg_yoffset->set_isarray(false);
- arg_yoffset->set_type(GLMessage::DataType::INT);
- arg_yoffset->add_intvalue(yoffset);
-
- // copy argument zoffset
- GLMessage_DataType *arg_zoffset = glmsg.add_args();
- arg_zoffset->set_isarray(false);
- arg_zoffset->set_type(GLMessage::DataType::INT);
- arg_zoffset->add_intvalue(zoffset);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // copy argument format
- GLMessage_DataType *arg_format = glmsg.add_args();
- arg_format->set_isarray(false);
- arg_format->set_type(GLMessage::DataType::ENUM);
- arg_format->add_intvalue((int)format);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument texels
- GLMessage_DataType *arg_texels = glmsg.add_args();
- arg_texels->set_isarray(false);
- arg_texels->set_type(GLMessage::DataType::INT);
- arg_texels->add_intvalue((int)texels);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) texels,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetBufferPointervQCOM);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetBufferPointervQCOM(target, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetShadersQCOM);
-
- // copy argument shaders
- GLMessage_DataType *arg_shaders = glmsg.add_args();
- arg_shaders->set_isarray(false);
- arg_shaders->set_type(GLMessage::DataType::INT);
- arg_shaders->add_intvalue((int)shaders);
-
- // copy argument maxShaders
- GLMessage_DataType *arg_maxShaders = glmsg.add_args();
- arg_maxShaders->set_isarray(false);
- arg_maxShaders->set_type(GLMessage::DataType::INT);
- arg_maxShaders->add_intvalue(maxShaders);
-
- // copy argument numShaders
- GLMessage_DataType *arg_numShaders = glmsg.add_args();
- arg_numShaders->set_isarray(false);
- arg_numShaders->set_type(GLMessage::DataType::INT);
- arg_numShaders->add_intvalue((int)numShaders);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetShadersQCOM(shaders, maxShaders, numShaders);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) shaders,
- (void *) numShaders,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetProgramsQCOM);
-
- // copy argument programs
- GLMessage_DataType *arg_programs = glmsg.add_args();
- arg_programs->set_isarray(false);
- arg_programs->set_type(GLMessage::DataType::INT);
- arg_programs->add_intvalue((int)programs);
-
- // copy argument maxPrograms
- GLMessage_DataType *arg_maxPrograms = glmsg.add_args();
- arg_maxPrograms->set_isarray(false);
- arg_maxPrograms->set_type(GLMessage::DataType::INT);
- arg_maxPrograms->add_intvalue(maxPrograms);
-
- // copy argument numPrograms
- GLMessage_DataType *arg_numPrograms = glmsg.add_args();
- arg_numPrograms->set_isarray(false);
- arg_numPrograms->set_type(GLMessage::DataType::INT);
- arg_numPrograms->add_intvalue((int)numPrograms);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetProgramsQCOM(programs, maxPrograms, numPrograms);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) programs,
- (void *) numPrograms,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtIsProgramBinaryQCOM);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glExtIsProgramBinaryQCOM(program);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glExtGetProgramBinarySourceQCOM);
-
- // copy argument program
- GLMessage_DataType *arg_program = glmsg.add_args();
- arg_program->set_isarray(false);
- arg_program->set_type(GLMessage::DataType::INT);
- arg_program->add_intvalue(program);
-
- // copy argument shadertype
- GLMessage_DataType *arg_shadertype = glmsg.add_args();
- arg_shadertype->set_isarray(false);
- arg_shadertype->set_type(GLMessage::DataType::ENUM);
- arg_shadertype->add_intvalue((int)shadertype);
-
- // copy argument source
- GLMessage_DataType *arg_source = glmsg.add_args();
- arg_source->set_isarray(false);
- arg_source->set_type(GLMessage::DataType::INT);
- arg_source->add_intvalue((int)source);
-
- // copy argument length
- GLMessage_DataType *arg_length = glmsg.add_args();
- arg_length->set_isarray(false);
- arg_length->set_type(GLMessage::DataType::INT);
- arg_length->add_intvalue((int)length);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glExtGetProgramBinarySourceQCOM(program, shadertype, source, length);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) source,
- (void *) length,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glStartTilingQCOM);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // copy argument preserveMask
- GLMessage_DataType *arg_preserveMask = glmsg.add_args();
- arg_preserveMask->set_isarray(false);
- arg_preserveMask->set_type(GLMessage::DataType::INT);
- arg_preserveMask->add_intvalue(preserveMask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glStartTilingQCOM(x, y, width, height, preserveMask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEndTilingQCOM(GLbitfield preserveMask) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEndTilingQCOM);
-
- // copy argument preserveMask
- GLMessage_DataType *arg_preserveMask = glmsg.add_args();
- arg_preserveMask->set_isarray(false);
- arg_preserveMask->set_type(GLMessage::DataType::INT);
- arg_preserveMask->add_intvalue(preserveMask);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEndTilingQCOM(preserveMask);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-
-// Definitions for GL1 APIs
-
-void GLTrace_glAlphaFunc(GLenum func, GLclampf ref) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glAlphaFunc);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // copy argument ref
- GLMessage_DataType *arg_ref = glmsg.add_args();
- arg_ref->set_isarray(false);
- arg_ref->set_type(GLMessage::DataType::FLOAT);
- arg_ref->add_floatvalue(ref);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glAlphaFunc(func, ref);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClipPlanef);
-
- // copy argument plane
- GLMessage_DataType *arg_plane = glmsg.add_args();
- arg_plane->set_isarray(false);
- arg_plane->set_type(GLMessage::DataType::ENUM);
- arg_plane->add_intvalue((int)plane);
-
- // copy argument equation
- GLMessage_DataType *arg_equation = glmsg.add_args();
- arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClipPlanef(plane, equation);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) equation,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glColor4f);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::FLOAT);
- arg_red->add_floatvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::FLOAT);
- arg_green->add_floatvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::FLOAT);
- arg_blue->add_floatvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::FLOAT);
- arg_alpha->add_floatvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glColor4f(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFogf(GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFogf);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFogf(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFogfv(GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFogfv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFogfv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFrustumf);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::FLOAT);
- arg_left->add_floatvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::FLOAT);
- arg_right->add_floatvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::FLOAT);
- arg_bottom->add_floatvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::FLOAT);
- arg_top->add_floatvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::FLOAT);
- arg_zNear->add_floatvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::FLOAT);
- arg_zFar->add_floatvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFrustumf(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetClipPlanef);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument eqn
- GLMessage_DataType *arg_eqn = glmsg.add_args();
- arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetClipPlanef(pname, eqn);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) eqn,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetLightfv);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetLightfv(light, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetMaterialfv);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetMaterialfv(face, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexEnvfv);
-
- // copy argument env
- GLMessage_DataType *arg_env = glmsg.add_args();
- arg_env->set_isarray(false);
- arg_env->set_type(GLMessage::DataType::ENUM);
- arg_env->add_intvalue((int)env);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexEnvfv(env, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightModelf(GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightModelf);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightModelf(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightModelfv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightModelfv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightf);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightf(light, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightfv);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightfv(light, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLoadMatrixf(const GLfloat *m) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLoadMatrixf);
-
- // copy argument m
- GLMessage_DataType *arg_m = glmsg.add_args();
- arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLoadMatrixf(m);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) m,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMaterialf);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMaterialf(face, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMaterialfv);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMaterialfv(face, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultMatrixf(const GLfloat *m) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultMatrixf);
-
- // copy argument m
- GLMessage_DataType *arg_m = glmsg.add_args();
- arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultMatrixf(m);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) m,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultiTexCoord4f);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument s
- GLMessage_DataType *arg_s = glmsg.add_args();
- arg_s->set_isarray(false);
- arg_s->set_type(GLMessage::DataType::FLOAT);
- arg_s->add_floatvalue(s);
-
- // copy argument t
- GLMessage_DataType *arg_t = glmsg.add_args();
- arg_t->set_isarray(false);
- arg_t->set_type(GLMessage::DataType::FLOAT);
- arg_t->add_floatvalue(t);
-
- // copy argument r
- GLMessage_DataType *arg_r = glmsg.add_args();
- arg_r->set_isarray(false);
- arg_r->set_type(GLMessage::DataType::FLOAT);
- arg_r->add_floatvalue(r);
-
- // copy argument q
- GLMessage_DataType *arg_q = glmsg.add_args();
- arg_q->set_isarray(false);
- arg_q->set_type(GLMessage::DataType::FLOAT);
- arg_q->add_floatvalue(q);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultiTexCoord4f(target, s, t, r, q);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glNormal3f);
-
- // copy argument nx
- GLMessage_DataType *arg_nx = glmsg.add_args();
- arg_nx->set_isarray(false);
- arg_nx->set_type(GLMessage::DataType::FLOAT);
- arg_nx->add_floatvalue(nx);
-
- // copy argument ny
- GLMessage_DataType *arg_ny = glmsg.add_args();
- arg_ny->set_isarray(false);
- arg_ny->set_type(GLMessage::DataType::FLOAT);
- arg_ny->add_floatvalue(ny);
-
- // copy argument nz
- GLMessage_DataType *arg_nz = glmsg.add_args();
- arg_nz->set_isarray(false);
- arg_nz->set_type(GLMessage::DataType::FLOAT);
- arg_nz->add_floatvalue(nz);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glNormal3f(nx, ny, nz);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glOrthof);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::FLOAT);
- arg_left->add_floatvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::FLOAT);
- arg_right->add_floatvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::FLOAT);
- arg_bottom->add_floatvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::FLOAT);
- arg_top->add_floatvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::FLOAT);
- arg_zNear->add_floatvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::FLOAT);
- arg_zFar->add_floatvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glOrthof(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterf(GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointParameterf);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointParameterf(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointParameterfv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointParameterfv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointSize(GLfloat size) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointSize);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::FLOAT);
- arg_size->add_floatvalue(size);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointSize(size);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRotatef);
-
- // copy argument angle
- GLMessage_DataType *arg_angle = glmsg.add_args();
- arg_angle->set_isarray(false);
- arg_angle->set_type(GLMessage::DataType::FLOAT);
- arg_angle->add_floatvalue(angle);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRotatef(angle, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glScalef);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glScalef(x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvf);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvf(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvfv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvfv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTranslatef);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTranslatef(x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glAlphaFuncx);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // copy argument ref
- GLMessage_DataType *arg_ref = glmsg.add_args();
- arg_ref->set_isarray(false);
- arg_ref->set_type(GLMessage::DataType::INT);
- arg_ref->add_intvalue(ref);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glAlphaFuncx(func, ref);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearColorx);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::INT);
- arg_red->add_intvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::INT);
- arg_green->add_intvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::INT);
- arg_blue->add_intvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::INT);
- arg_alpha->add_intvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearColorx(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearDepthx(GLclampx depth) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearDepthx);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearDepthx(depth);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClientActiveTexture(GLenum texture) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClientActiveTexture);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::ENUM);
- arg_texture->add_intvalue((int)texture);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClientActiveTexture(texture);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClipPlanex);
-
- // copy argument plane
- GLMessage_DataType *arg_plane = glmsg.add_args();
- arg_plane->set_isarray(false);
- arg_plane->set_type(GLMessage::DataType::ENUM);
- arg_plane->add_intvalue((int)plane);
-
- // copy argument equation
- GLMessage_DataType *arg_equation = glmsg.add_args();
- arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClipPlanex(plane, equation);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) equation,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glColor4ub);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::BYTE);
- arg_red->add_intvalue((int)red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::BYTE);
- arg_green->add_intvalue((int)green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::BYTE);
- arg_blue->add_intvalue((int)blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::BYTE);
- arg_alpha->add_intvalue((int)alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glColor4ub(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glColor4x);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::INT);
- arg_red->add_intvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::INT);
- arg_green->add_intvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::INT);
- arg_blue->add_intvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::INT);
- arg_alpha->add_intvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glColor4x(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glColorPointer);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glColorPointer(size, type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDepthRangex);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::INT);
- arg_zNear->add_intvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::INT);
- arg_zFar->add_intvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDepthRangex(zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDisableClientState(GLenum array) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDisableClientState);
-
- // copy argument array
- GLMessage_DataType *arg_array = glmsg.add_args();
- arg_array->set_isarray(false);
- arg_array->set_type(GLMessage::DataType::ENUM);
- arg_array->add_intvalue((int)array);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDisableClientState(array);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glEnableClientState(GLenum array) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glEnableClientState);
-
- // copy argument array
- GLMessage_DataType *arg_array = glmsg.add_args();
- arg_array->set_isarray(false);
- arg_array->set_type(GLMessage::DataType::ENUM);
- arg_array->add_intvalue((int)array);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glEnableClientState(array);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFogx(GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFogx);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFogx(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFogxv(GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFogxv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFogxv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFrustumx);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::INT);
- arg_left->add_intvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::INT);
- arg_right->add_intvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::INT);
- arg_bottom->add_intvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::INT);
- arg_top->add_intvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::INT);
- arg_zNear->add_intvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::INT);
- arg_zFar->add_intvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFrustumx(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetClipPlanex);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument eqn
- GLMessage_DataType *arg_eqn = glmsg.add_args();
- arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetClipPlanex(pname, eqn);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) eqn,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetFixedv(GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetFixedv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetFixedv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetLightxv);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetLightxv(light, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetMaterialxv);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetMaterialxv(face, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetPointerv(GLenum pname, GLvoid **params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetPointerv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetPointerv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexEnviv);
-
- // copy argument env
- GLMessage_DataType *arg_env = glmsg.add_args();
- arg_env->set_isarray(false);
- arg_env->set_type(GLMessage::DataType::ENUM);
- arg_env->add_intvalue((int)env);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexEnviv(env, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexEnvxv);
-
- // copy argument env
- GLMessage_DataType *arg_env = glmsg.add_args();
- arg_env->set_isarray(false);
- arg_env->set_type(GLMessage::DataType::ENUM);
- arg_env->add_intvalue((int)env);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexEnvxv(env, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexParameterxv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexParameterxv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightModelx(GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightModelx);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightModelx(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightModelxv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightModelxv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightx);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightx(light, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightxv);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightxv(light, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLineWidthx(GLfixed width) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLineWidthx);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLineWidthx(width);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLoadIdentity(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLoadIdentity);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLoadIdentity();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLoadMatrixx(const GLfixed *m) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLoadMatrixx);
-
- // copy argument m
- GLMessage_DataType *arg_m = glmsg.add_args();
- arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLoadMatrixx(m);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) m,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLogicOp(GLenum opcode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLogicOp);
-
- // copy argument opcode
- GLMessage_DataType *arg_opcode = glmsg.add_args();
- arg_opcode->set_isarray(false);
- arg_opcode->set_type(GLMessage::DataType::ENUM);
- arg_opcode->add_intvalue((int)opcode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLogicOp(opcode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMaterialx);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMaterialx(face, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMaterialxv);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMaterialxv(face, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMatrixMode(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMatrixMode);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMatrixMode(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultMatrixx(const GLfixed *m) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultMatrixx);
-
- // copy argument m
- GLMessage_DataType *arg_m = glmsg.add_args();
- arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultMatrixx(m);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) m,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultiTexCoord4x);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument s
- GLMessage_DataType *arg_s = glmsg.add_args();
- arg_s->set_isarray(false);
- arg_s->set_type(GLMessage::DataType::INT);
- arg_s->add_intvalue(s);
-
- // copy argument t
- GLMessage_DataType *arg_t = glmsg.add_args();
- arg_t->set_isarray(false);
- arg_t->set_type(GLMessage::DataType::INT);
- arg_t->add_intvalue(t);
-
- // copy argument r
- GLMessage_DataType *arg_r = glmsg.add_args();
- arg_r->set_isarray(false);
- arg_r->set_type(GLMessage::DataType::INT);
- arg_r->add_intvalue(r);
-
- // copy argument q
- GLMessage_DataType *arg_q = glmsg.add_args();
- arg_q->set_isarray(false);
- arg_q->set_type(GLMessage::DataType::INT);
- arg_q->add_intvalue(q);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultiTexCoord4x(target, s, t, r, q);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glNormal3x);
-
- // copy argument nx
- GLMessage_DataType *arg_nx = glmsg.add_args();
- arg_nx->set_isarray(false);
- arg_nx->set_type(GLMessage::DataType::INT);
- arg_nx->add_intvalue(nx);
-
- // copy argument ny
- GLMessage_DataType *arg_ny = glmsg.add_args();
- arg_ny->set_isarray(false);
- arg_ny->set_type(GLMessage::DataType::INT);
- arg_ny->add_intvalue(ny);
-
- // copy argument nz
- GLMessage_DataType *arg_nz = glmsg.add_args();
- arg_nz->set_isarray(false);
- arg_nz->set_type(GLMessage::DataType::INT);
- arg_nz->add_intvalue(nz);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glNormal3x(nx, ny, nz);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glNormalPointer);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glNormalPointer(type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glOrthox);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::INT);
- arg_left->add_intvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::INT);
- arg_right->add_intvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::INT);
- arg_bottom->add_intvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::INT);
- arg_top->add_intvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::INT);
- arg_zNear->add_intvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::INT);
- arg_zFar->add_intvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glOrthox(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterx(GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointParameterx);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointParameterx(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointParameterxv);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointParameterxv(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointSizex(GLfixed size) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointSizex);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointSizex(size);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPolygonOffsetx);
-
- // copy argument factor
- GLMessage_DataType *arg_factor = glmsg.add_args();
- arg_factor->set_isarray(false);
- arg_factor->set_type(GLMessage::DataType::INT);
- arg_factor->add_intvalue(factor);
-
- // copy argument units
- GLMessage_DataType *arg_units = glmsg.add_args();
- arg_units->set_isarray(false);
- arg_units->set_type(GLMessage::DataType::INT);
- arg_units->add_intvalue(units);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPolygonOffsetx(factor, units);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPopMatrix(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPopMatrix);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPopMatrix();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPushMatrix(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPushMatrix);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPushMatrix();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRotatex);
-
- // copy argument angle
- GLMessage_DataType *arg_angle = glmsg.add_args();
- arg_angle->set_isarray(false);
- arg_angle->set_type(GLMessage::DataType::INT);
- arg_angle->add_intvalue(angle);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRotatex(angle, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glSampleCoveragex);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue(value);
-
- // copy argument invert
- GLMessage_DataType *arg_invert = glmsg.add_args();
- arg_invert->set_isarray(false);
- arg_invert->set_type(GLMessage::DataType::BOOL);
- arg_invert->add_boolvalue(invert);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glSampleCoveragex(value, invert);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glScalex);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glScalex(x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glShadeModel(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glShadeModel);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glShadeModel(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexCoordPointer);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexCoordPointer(size, type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvi);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvi(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvx);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvx(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnviv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnviv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvxv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvxv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameterx);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameterx(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameterxv);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameterxv(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTranslatex);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTranslatex(x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glVertexPointer);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glVertexPointer(size, type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointSizePointerOES);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointSizePointerOES(type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-
-// Definitions for GL1Ext APIs
-
-void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendEquationSeparateOES);
-
- // copy argument modeRGB
- GLMessage_DataType *arg_modeRGB = glmsg.add_args();
- arg_modeRGB->set_isarray(false);
- arg_modeRGB->set_type(GLMessage::DataType::ENUM);
- arg_modeRGB->add_intvalue((int)modeRGB);
-
- // copy argument modeAlpha
- GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
- arg_modeAlpha->set_isarray(false);
- arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
- arg_modeAlpha->add_intvalue((int)modeAlpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendEquationSeparateOES(modeRGB, modeAlpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendFuncSeparateOES);
-
- // copy argument srcRGB
- GLMessage_DataType *arg_srcRGB = glmsg.add_args();
- arg_srcRGB->set_isarray(false);
- arg_srcRGB->set_type(GLMessage::DataType::ENUM);
- arg_srcRGB->add_intvalue((int)srcRGB);
-
- // copy argument dstRGB
- GLMessage_DataType *arg_dstRGB = glmsg.add_args();
- arg_dstRGB->set_isarray(false);
- arg_dstRGB->set_type(GLMessage::DataType::ENUM);
- arg_dstRGB->add_intvalue((int)dstRGB);
-
- // copy argument srcAlpha
- GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
- arg_srcAlpha->set_isarray(false);
- arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
- arg_srcAlpha->add_intvalue((int)srcAlpha);
-
- // copy argument dstAlpha
- GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
- arg_dstAlpha->set_isarray(false);
- arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
- arg_dstAlpha->add_intvalue((int)dstAlpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glBlendEquationOES(GLenum mode) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBlendEquationOES);
-
- // copy argument mode
- GLMessage_DataType *arg_mode = glmsg.add_args();
- arg_mode->set_isarray(false);
- arg_mode->set_type(GLMessage::DataType::ENUM);
- arg_mode->add_intvalue((int)mode);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBlendEquationOES(mode);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexsOES);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexsOES(x, y, z, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexiOES);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexiOES(x, y, z, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexxOES);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexxOES(x, y, z, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexsvOES(const GLshort *coords) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexsvOES);
-
- // copy argument coords
- GLMessage_DataType *arg_coords = glmsg.add_args();
- arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexsvOES(coords);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) coords,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexivOES(const GLint *coords) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexivOES);
-
- // copy argument coords
- GLMessage_DataType *arg_coords = glmsg.add_args();
- arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexivOES(coords);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) coords,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexxvOES(const GLfixed *coords) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexxvOES);
-
- // copy argument coords
- GLMessage_DataType *arg_coords = glmsg.add_args();
- arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexxvOES(coords);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) coords,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexfOES);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::FLOAT);
- arg_x->add_floatvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::FLOAT);
- arg_y->add_floatvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::FLOAT);
- arg_z->add_floatvalue(z);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::FLOAT);
- arg_width->add_floatvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::FLOAT);
- arg_height->add_floatvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexfOES(x, y, z, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDrawTexfvOES(const GLfloat *coords) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDrawTexfvOES);
-
- // copy argument coords
- GLMessage_DataType *arg_coords = glmsg.add_args();
- arg_coords->set_isarray(false);
- arg_coords->set_type(GLMessage::DataType::INT);
- arg_coords->add_intvalue((int)coords);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDrawTexfvOES(coords);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) coords,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glAlphaFuncxOES);
-
- // copy argument func
- GLMessage_DataType *arg_func = glmsg.add_args();
- arg_func->set_isarray(false);
- arg_func->set_type(GLMessage::DataType::ENUM);
- arg_func->add_intvalue((int)func);
-
- // copy argument ref
- GLMessage_DataType *arg_ref = glmsg.add_args();
- arg_ref->set_isarray(false);
- arg_ref->set_type(GLMessage::DataType::INT);
- arg_ref->add_intvalue(ref);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glAlphaFuncxOES(func, ref);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearColorxOES);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::INT);
- arg_red->add_intvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::INT);
- arg_green->add_intvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::INT);
- arg_blue->add_intvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::INT);
- arg_alpha->add_intvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearColorxOES(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearDepthxOES(GLclampx depth) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearDepthxOES);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::INT);
- arg_depth->add_intvalue(depth);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearDepthxOES(depth);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClipPlanexOES);
-
- // copy argument plane
- GLMessage_DataType *arg_plane = glmsg.add_args();
- arg_plane->set_isarray(false);
- arg_plane->set_type(GLMessage::DataType::ENUM);
- arg_plane->add_intvalue((int)plane);
-
- // copy argument equation
- GLMessage_DataType *arg_equation = glmsg.add_args();
- arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClipPlanexOES(plane, equation);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) equation,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glColor4xOES);
-
- // copy argument red
- GLMessage_DataType *arg_red = glmsg.add_args();
- arg_red->set_isarray(false);
- arg_red->set_type(GLMessage::DataType::INT);
- arg_red->add_intvalue(red);
-
- // copy argument green
- GLMessage_DataType *arg_green = glmsg.add_args();
- arg_green->set_isarray(false);
- arg_green->set_type(GLMessage::DataType::INT);
- arg_green->add_intvalue(green);
-
- // copy argument blue
- GLMessage_DataType *arg_blue = glmsg.add_args();
- arg_blue->set_isarray(false);
- arg_blue->set_type(GLMessage::DataType::INT);
- arg_blue->add_intvalue(blue);
-
- // copy argument alpha
- GLMessage_DataType *arg_alpha = glmsg.add_args();
- arg_alpha->set_isarray(false);
- arg_alpha->set_type(GLMessage::DataType::INT);
- arg_alpha->add_intvalue(alpha);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glColor4xOES(red, green, blue, alpha);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDepthRangexOES);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::INT);
- arg_zNear->add_intvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::INT);
- arg_zFar->add_intvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDepthRangexOES(zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFogxOES(GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFogxOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFogxOES(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFogxvOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFogxvOES(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFrustumxOES);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::INT);
- arg_left->add_intvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::INT);
- arg_right->add_intvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::INT);
- arg_bottom->add_intvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::INT);
- arg_top->add_intvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::INT);
- arg_zNear->add_intvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::INT);
- arg_zFar->add_intvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFrustumxOES(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetClipPlanexOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument eqn
- GLMessage_DataType *arg_eqn = glmsg.add_args();
- arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetClipPlanexOES(pname, eqn);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) eqn,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetFixedvOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetFixedvOES(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetLightxvOES);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetLightxvOES(light, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetMaterialxvOES);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetMaterialxvOES(face, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexEnvxvOES);
-
- // copy argument env
- GLMessage_DataType *arg_env = glmsg.add_args();
- arg_env->set_isarray(false);
- arg_env->set_type(GLMessage::DataType::ENUM);
- arg_env->add_intvalue((int)env);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexEnvxvOES(env, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexParameterxvOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexParameterxvOES(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightModelxOES(GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightModelxOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightModelxOES(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightModelxvOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightModelxvOES(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightxOES);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightxOES(light, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLightxvOES);
-
- // copy argument light
- GLMessage_DataType *arg_light = glmsg.add_args();
- arg_light->set_isarray(false);
- arg_light->set_type(GLMessage::DataType::ENUM);
- arg_light->add_intvalue((int)light);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLightxvOES(light, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLineWidthxOES(GLfixed width) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLineWidthxOES);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLineWidthxOES(width);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLoadMatrixxOES(const GLfixed *m) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLoadMatrixxOES);
-
- // copy argument m
- GLMessage_DataType *arg_m = glmsg.add_args();
- arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLoadMatrixxOES(m);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) m,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMaterialxOES);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMaterialxOES(face, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMaterialxvOES);
-
- // copy argument face
- GLMessage_DataType *arg_face = glmsg.add_args();
- arg_face->set_isarray(false);
- arg_face->set_type(GLMessage::DataType::ENUM);
- arg_face->add_intvalue((int)face);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMaterialxvOES(face, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultMatrixxOES(const GLfixed *m) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultMatrixxOES);
-
- // copy argument m
- GLMessage_DataType *arg_m = glmsg.add_args();
- arg_m->set_isarray(false);
- arg_m->set_type(GLMessage::DataType::INT);
- arg_m->add_intvalue((int)m);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultMatrixxOES(m);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) m,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMultiTexCoord4xOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument s
- GLMessage_DataType *arg_s = glmsg.add_args();
- arg_s->set_isarray(false);
- arg_s->set_type(GLMessage::DataType::INT);
- arg_s->add_intvalue(s);
-
- // copy argument t
- GLMessage_DataType *arg_t = glmsg.add_args();
- arg_t->set_isarray(false);
- arg_t->set_type(GLMessage::DataType::INT);
- arg_t->add_intvalue(t);
-
- // copy argument r
- GLMessage_DataType *arg_r = glmsg.add_args();
- arg_r->set_isarray(false);
- arg_r->set_type(GLMessage::DataType::INT);
- arg_r->add_intvalue(r);
-
- // copy argument q
- GLMessage_DataType *arg_q = glmsg.add_args();
- arg_q->set_isarray(false);
- arg_q->set_type(GLMessage::DataType::INT);
- arg_q->add_intvalue(q);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMultiTexCoord4xOES(target, s, t, r, q);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glNormal3xOES);
-
- // copy argument nx
- GLMessage_DataType *arg_nx = glmsg.add_args();
- arg_nx->set_isarray(false);
- arg_nx->set_type(GLMessage::DataType::INT);
- arg_nx->add_intvalue(nx);
-
- // copy argument ny
- GLMessage_DataType *arg_ny = glmsg.add_args();
- arg_ny->set_isarray(false);
- arg_ny->set_type(GLMessage::DataType::INT);
- arg_ny->add_intvalue(ny);
-
- // copy argument nz
- GLMessage_DataType *arg_nz = glmsg.add_args();
- arg_nz->set_isarray(false);
- arg_nz->set_type(GLMessage::DataType::INT);
- arg_nz->add_intvalue(nz);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glNormal3xOES(nx, ny, nz);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glOrthoxOES);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::INT);
- arg_left->add_intvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::INT);
- arg_right->add_intvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::INT);
- arg_bottom->add_intvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::INT);
- arg_top->add_intvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::INT);
- arg_zNear->add_intvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::INT);
- arg_zFar->add_intvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glOrthoxOES(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointParameterxOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointParameterxOES(pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointParameterxvOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointParameterxvOES(pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointSizexOES(GLfixed size) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPointSizexOES);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPointSizexOES(size);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glPolygonOffsetxOES);
-
- // copy argument factor
- GLMessage_DataType *arg_factor = glmsg.add_args();
- arg_factor->set_isarray(false);
- arg_factor->set_type(GLMessage::DataType::INT);
- arg_factor->add_intvalue(factor);
-
- // copy argument units
- GLMessage_DataType *arg_units = glmsg.add_args();
- arg_units->set_isarray(false);
- arg_units->set_type(GLMessage::DataType::INT);
- arg_units->add_intvalue(units);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glPolygonOffsetxOES(factor, units);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRotatexOES);
-
- // copy argument angle
- GLMessage_DataType *arg_angle = glmsg.add_args();
- arg_angle->set_isarray(false);
- arg_angle->set_type(GLMessage::DataType::INT);
- arg_angle->add_intvalue(angle);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRotatexOES(angle, x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glSampleCoveragexOES);
-
- // copy argument value
- GLMessage_DataType *arg_value = glmsg.add_args();
- arg_value->set_isarray(false);
- arg_value->set_type(GLMessage::DataType::INT);
- arg_value->add_intvalue(value);
-
- // copy argument invert
- GLMessage_DataType *arg_invert = glmsg.add_args();
- arg_invert->set_isarray(false);
- arg_invert->set_type(GLMessage::DataType::BOOL);
- arg_invert->add_boolvalue(invert);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glSampleCoveragexOES(value, invert);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glScalexOES);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glScalexOES(x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvxOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvxOES(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexEnvxvOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexEnvxvOES(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameterxOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameterxOES(target, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexParameterxvOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexParameterxvOES(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTranslatexOES);
-
- // copy argument x
- GLMessage_DataType *arg_x = glmsg.add_args();
- arg_x->set_isarray(false);
- arg_x->set_type(GLMessage::DataType::INT);
- arg_x->add_intvalue(x);
-
- // copy argument y
- GLMessage_DataType *arg_y = glmsg.add_args();
- arg_y->set_isarray(false);
- arg_y->set_type(GLMessage::DataType::INT);
- arg_y->add_intvalue(y);
-
- // copy argument z
- GLMessage_DataType *arg_z = glmsg.add_args();
- arg_z->set_isarray(false);
- arg_z->set_type(GLMessage::DataType::INT);
- arg_z->add_intvalue(z);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTranslatexOES(x, y, z);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsRenderbufferOES);
-
- // copy argument renderbuffer
- GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
- arg_renderbuffer->set_isarray(false);
- arg_renderbuffer->set_type(GLMessage::DataType::INT);
- arg_renderbuffer->add_intvalue(renderbuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsRenderbufferOES(renderbuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindRenderbufferOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument renderbuffer
- GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
- arg_renderbuffer->set_isarray(false);
- arg_renderbuffer->set_type(GLMessage::DataType::INT);
- arg_renderbuffer->add_intvalue(renderbuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindRenderbufferOES(target, renderbuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteRenderbuffersOES);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument renderbuffers
- GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
- arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteRenderbuffersOES(n, renderbuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) renderbuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenRenderbuffersOES);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument renderbuffers
- GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
- arg_renderbuffers->set_isarray(false);
- arg_renderbuffers->set_type(GLMessage::DataType::INT);
- arg_renderbuffers->add_intvalue((int)renderbuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenRenderbuffersOES(n, renderbuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) renderbuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glRenderbufferStorageOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument internalformat
- GLMessage_DataType *arg_internalformat = glmsg.add_args();
- arg_internalformat->set_isarray(false);
- arg_internalformat->set_type(GLMessage::DataType::ENUM);
- arg_internalformat->add_intvalue((int)internalformat);
-
- // copy argument width
- GLMessage_DataType *arg_width = glmsg.add_args();
- arg_width->set_isarray(false);
- arg_width->set_type(GLMessage::DataType::INT);
- arg_width->add_intvalue(width);
-
- // copy argument height
- GLMessage_DataType *arg_height = glmsg.add_args();
- arg_height->set_isarray(false);
- arg_height->set_type(GLMessage::DataType::INT);
- arg_height->add_intvalue(height);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glRenderbufferStorageOES(target, internalformat, width, height);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetRenderbufferParameterivOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetRenderbufferParameterivOES(target, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glIsFramebufferOES);
-
- // copy argument framebuffer
- GLMessage_DataType *arg_framebuffer = glmsg.add_args();
- arg_framebuffer->set_isarray(false);
- arg_framebuffer->set_type(GLMessage::DataType::INT);
- arg_framebuffer->add_intvalue(framebuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLboolean retValue = glContext->hooks->gl.glIsFramebufferOES(framebuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::BOOL);
- rt->add_boolvalue(retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glBindFramebufferOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument framebuffer
- GLMessage_DataType *arg_framebuffer = glmsg.add_args();
- arg_framebuffer->set_isarray(false);
- arg_framebuffer->set_type(GLMessage::DataType::INT);
- arg_framebuffer->add_intvalue(framebuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glBindFramebufferOES(target, framebuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDeleteFramebuffersOES);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument framebuffers
- GLMessage_DataType *arg_framebuffers = glmsg.add_args();
- arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDeleteFramebuffersOES(n, framebuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) framebuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenFramebuffersOES);
-
- // copy argument n
- GLMessage_DataType *arg_n = glmsg.add_args();
- arg_n->set_isarray(false);
- arg_n->set_type(GLMessage::DataType::INT);
- arg_n->add_intvalue(n);
-
- // copy argument framebuffers
- GLMessage_DataType *arg_framebuffers = glmsg.add_args();
- arg_framebuffers->set_isarray(false);
- arg_framebuffers->set_type(GLMessage::DataType::INT);
- arg_framebuffers->add_intvalue((int)framebuffers);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenFramebuffersOES(n, framebuffers);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) framebuffers,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCheckFramebufferStatusOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatusOES(target);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::ENUM);
- rt->add_intvalue((int)retValue);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferRenderbufferOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument renderbuffertarget
- GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
- arg_renderbuffertarget->set_isarray(false);
- arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
- arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
-
- // copy argument renderbuffer
- GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
- arg_renderbuffer->set_isarray(false);
- arg_renderbuffer->set_type(GLMessage::DataType::INT);
- arg_renderbuffer->add_intvalue(renderbuffer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFramebufferTexture2DOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument textarget
- GLMessage_DataType *arg_textarget = glmsg.add_args();
- arg_textarget->set_isarray(false);
- arg_textarget->set_type(GLMessage::DataType::ENUM);
- arg_textarget->add_intvalue((int)textarget);
-
- // copy argument texture
- GLMessage_DataType *arg_texture = glmsg.add_args();
- arg_texture->set_isarray(false);
- arg_texture->set_type(GLMessage::DataType::INT);
- arg_texture->add_intvalue(texture);
-
- // copy argument level
- GLMessage_DataType *arg_level = glmsg.add_args();
- arg_level->set_isarray(false);
- arg_level->set_type(GLMessage::DataType::INT);
- arg_level->add_intvalue(level);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFramebufferTexture2DOES(target, attachment, textarget, texture, level);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameterivOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // copy argument attachment
- GLMessage_DataType *arg_attachment = glmsg.add_args();
- arg_attachment->set_isarray(false);
- arg_attachment->set_type(GLMessage::DataType::ENUM);
- arg_attachment->add_intvalue((int)attachment);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenerateMipmapOES(GLenum target) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGenerateMipmapOES);
-
- // copy argument target
- GLMessage_DataType *arg_target = glmsg.add_args();
- arg_target->set_isarray(false);
- arg_target->set_type(GLMessage::DataType::ENUM);
- arg_target->add_intvalue((int)target);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGenerateMipmapOES(target);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glCurrentPaletteMatrixOES);
-
- // copy argument matrixpaletteindex
- GLMessage_DataType *arg_matrixpaletteindex = glmsg.add_args();
- arg_matrixpaletteindex->set_isarray(false);
- arg_matrixpaletteindex->set_type(GLMessage::DataType::INT);
- arg_matrixpaletteindex->add_intvalue(matrixpaletteindex);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glCurrentPaletteMatrixOES(matrixpaletteindex);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glLoadPaletteFromModelViewMatrixOES(void) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glLoadPaletteFromModelViewMatrixOES);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glLoadPaletteFromModelViewMatrixOES();
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glMatrixIndexPointerOES);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glMatrixIndexPointerOES(size, type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glWeightPointerOES);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument pointer
- GLMessage_DataType *arg_pointer = glmsg.add_args();
- arg_pointer->set_isarray(false);
- arg_pointer->set_type(GLMessage::DataType::INT);
- arg_pointer->add_intvalue((int)pointer);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glWeightPointerOES(size, type, stride, pointer);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) pointer,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glQueryMatrixxOES);
-
- // copy argument mantissa
- GLMessage_DataType *arg_mantissa = glmsg.add_args();
- arg_mantissa->set_isarray(false);
- arg_mantissa->set_type(GLMessage::DataType::INT);
- arg_mantissa->add_intvalue((int)mantissa);
-
- // copy argument exponent
- GLMessage_DataType *arg_exponent = glmsg.add_args();
- arg_exponent->set_isarray(false);
- arg_exponent->set_type(GLMessage::DataType::INT);
- arg_exponent->add_intvalue((int)exponent);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- GLbitfield retValue = glContext->hooks->gl.glQueryMatrixxOES(mantissa, exponent);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- // set return value
- GLMessage_DataType *rt = glmsg.mutable_returnvalue();
- rt->set_isarray(false);
- rt->set_type(GLMessage::DataType::INT);
- rt->add_intvalue(retValue);
-
- void *pointerArgs[] = {
- (void *) mantissa,
- (void *) exponent,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-
- return retValue;
-}
-
-void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glDepthRangefOES);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::FLOAT);
- arg_zNear->add_floatvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::FLOAT);
- arg_zFar->add_floatvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glDepthRangefOES(zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glFrustumfOES);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::FLOAT);
- arg_left->add_floatvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::FLOAT);
- arg_right->add_floatvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::FLOAT);
- arg_bottom->add_floatvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::FLOAT);
- arg_top->add_floatvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::FLOAT);
- arg_zNear->add_floatvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::FLOAT);
- arg_zFar->add_floatvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glFrustumfOES(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glOrthofOES);
-
- // copy argument left
- GLMessage_DataType *arg_left = glmsg.add_args();
- arg_left->set_isarray(false);
- arg_left->set_type(GLMessage::DataType::FLOAT);
- arg_left->add_floatvalue(left);
-
- // copy argument right
- GLMessage_DataType *arg_right = glmsg.add_args();
- arg_right->set_isarray(false);
- arg_right->set_type(GLMessage::DataType::FLOAT);
- arg_right->add_floatvalue(right);
-
- // copy argument bottom
- GLMessage_DataType *arg_bottom = glmsg.add_args();
- arg_bottom->set_isarray(false);
- arg_bottom->set_type(GLMessage::DataType::FLOAT);
- arg_bottom->add_floatvalue(bottom);
-
- // copy argument top
- GLMessage_DataType *arg_top = glmsg.add_args();
- arg_top->set_isarray(false);
- arg_top->set_type(GLMessage::DataType::FLOAT);
- arg_top->add_floatvalue(top);
-
- // copy argument zNear
- GLMessage_DataType *arg_zNear = glmsg.add_args();
- arg_zNear->set_isarray(false);
- arg_zNear->set_type(GLMessage::DataType::FLOAT);
- arg_zNear->add_floatvalue(zNear);
-
- // copy argument zFar
- GLMessage_DataType *arg_zFar = glmsg.add_args();
- arg_zFar->set_isarray(false);
- arg_zFar->set_type(GLMessage::DataType::FLOAT);
- arg_zFar->add_floatvalue(zFar);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glOrthofOES(left, right, bottom, top, zNear, zFar);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClipPlanefOES);
-
- // copy argument plane
- GLMessage_DataType *arg_plane = glmsg.add_args();
- arg_plane->set_isarray(false);
- arg_plane->set_type(GLMessage::DataType::ENUM);
- arg_plane->add_intvalue((int)plane);
-
- // copy argument equation
- GLMessage_DataType *arg_equation = glmsg.add_args();
- arg_equation->set_isarray(false);
- arg_equation->set_type(GLMessage::DataType::INT);
- arg_equation->add_intvalue((int)equation);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClipPlanefOES(plane, equation);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) equation,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetClipPlanefOES);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument eqn
- GLMessage_DataType *arg_eqn = glmsg.add_args();
- arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetClipPlanefOES(pname, eqn);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) eqn,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClearDepthfOES(GLclampf depth) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClearDepthfOES);
-
- // copy argument depth
- GLMessage_DataType *arg_depth = glmsg.add_args();
- arg_depth->set_isarray(false);
- arg_depth->set_type(GLMessage::DataType::FLOAT);
- arg_depth->add_floatvalue(depth);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClearDepthfOES(depth);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexGenfOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::FLOAT);
- arg_param->add_floatvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexGenfOES(coord, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexGenfvOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexGenfvOES(coord, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexGeniOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexGeniOES(coord, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexGenivOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexGenivOES(coord, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexGenxOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument param
- GLMessage_DataType *arg_param = glmsg.add_args();
- arg_param->set_isarray(false);
- arg_param->set_type(GLMessage::DataType::INT);
- arg_param->add_intvalue(param);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexGenxOES(coord, pname, param);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glTexGenxvOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glTexGenxvOES(coord, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexGenfvOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexGenfvOES(coord, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexGenivOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexGenivOES(coord, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glGetTexGenxvOES);
-
- // copy argument coord
- GLMessage_DataType *arg_coord = glmsg.add_args();
- arg_coord->set_isarray(false);
- arg_coord->set_type(GLMessage::DataType::ENUM);
- arg_coord->add_intvalue((int)coord);
-
- // copy argument pname
- GLMessage_DataType *arg_pname = glmsg.add_args();
- arg_pname->set_isarray(false);
- arg_pname->set_type(GLMessage::DataType::ENUM);
- arg_pname->add_intvalue((int)pname);
-
- // copy argument params
- GLMessage_DataType *arg_params = glmsg.add_args();
- arg_params->set_isarray(false);
- arg_params->set_type(GLMessage::DataType::INT);
- arg_params->add_intvalue((int)params);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glGetTexGenxvOES(coord, pname, params);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) params,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClipPlanefIMG);
-
- // copy argument p
- GLMessage_DataType *arg_p = glmsg.add_args();
- arg_p->set_isarray(false);
- arg_p->set_type(GLMessage::DataType::ENUM);
- arg_p->add_intvalue((int)p);
-
- // copy argument eqn
- GLMessage_DataType *arg_eqn = glmsg.add_args();
- arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClipPlanefIMG(p, eqn);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) eqn,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn) {
- GLMessage glmsg;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmsg.set_function(GLMessage::glClipPlanexIMG);
-
- // copy argument p
- GLMessage_DataType *arg_p = glmsg.add_args();
- arg_p->set_isarray(false);
- arg_p->set_type(GLMessage::DataType::ENUM);
- arg_p->add_intvalue((int)p);
-
- // copy argument eqn
- GLMessage_DataType *arg_eqn = glmsg.add_args();
- arg_eqn->set_isarray(false);
- arg_eqn->set_type(GLMessage::DataType::INT);
- arg_eqn->add_intvalue((int)eqn);
-
- // call function
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
- glContext->hooks->gl.glClipPlanexIMG(p, eqn);
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
- void *pointerArgs[] = {
- (void *) eqn,
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->traceGLMessage(&glmsg);
-}
-
-
-}; // namespace gltrace
-}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.h b/opengl/libs/GLES_trace/src/gltrace_api.h
deleted file mode 100644
index debcac0..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_api.h
+++ /dev/null
@@ -1,472 +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.
- *
- * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
- */
-
-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_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glResolveMultisampleFramebufferAPPLE(void);
-void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label);
-void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker);
-void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker);
-void GLTrace_glPopGroupMarkerEXT(void);
-void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments);
-void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-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_glGenQueriesEXT(GLsizei n, GLuint *ids);
-void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids);
-GLboolean GLTrace_glIsQueryEXT(GLuint id);
-void GLTrace_glBeginQueryEXT(GLenum target, GLuint id);
-void GLTrace_glEndQueryEXT(GLenum target);
-void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params);
-void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params);
-GLenum GLTrace_glGetGraphicsResetStatusEXT(void);
-void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params);
-void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params);
-void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program);
-void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program);
-GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings);
-void GLTrace_glBindProgramPipelineEXT(GLuint pipeline);
-void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines);
-void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines);
-GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline);
-void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value);
-void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params);
-void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x);
-void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y);
-void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z);
-void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x);
-void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y);
-void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline);
-void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-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_glCoverageMaskNV(GLboolean mask);
-void GLTrace_glCoverageOperationNV(GLenum operation);
-void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs);
-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_glReadBufferNV(GLenum mode);
-void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref);
-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
diff --git a/opengl/libs/GLES_trace/src/gltrace_context.cpp b/opengl/libs/GLES_trace/src/gltrace_context.cpp
deleted file mode 100644
index 45dbb43..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_context.cpp
+++ /dev/null
@@ -1,282 +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.
- */
-
-#include <pthread.h>
-#include <cutils/log.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 setupTraceContextThreadSpecific(GLTraceContext *context) {
- pthread_once(&sPthreadOnceKey, createTLSKey);
- setGLTraceContext(context);
-}
-
-void releaseContext() {
- GLTraceContext *c = getGLTraceContext();
- if (c != NULL) {
- delete c;
- setGLTraceContext(NULL);
- }
-}
-
-GLTraceState::GLTraceState(TCPStream *stream) {
- mTraceContextIds = 0;
- mStream = stream;
-
- mCollectFbOnEglSwap = false;
- mCollectFbOnGlDraw = false;
- mCollectTextureDataOnGlTexImage = false;
- pthread_rwlock_init(&mTraceOptionsRwLock, NULL);
-}
-
-GLTraceState::~GLTraceState() {
- if (mStream) {
- mStream->closeStream();
- mStream = NULL;
- }
-}
-
-TCPStream *GLTraceState::getStream() {
- return mStream;
-}
-
-void GLTraceState::safeSetValue(bool *ptr, bool value, pthread_rwlock_t *lock) {
- pthread_rwlock_wrlock(lock);
- *ptr = value;
- pthread_rwlock_unlock(lock);
-}
-
-bool GLTraceState::safeGetValue(bool *ptr, pthread_rwlock_t *lock) {
- pthread_rwlock_rdlock(lock);
- bool value = *ptr;
- pthread_rwlock_unlock(lock);
- return value;
-}
-
-void GLTraceState::setCollectFbOnEglSwap(bool en) {
- safeSetValue(&mCollectFbOnEglSwap, en, &mTraceOptionsRwLock);
-}
-
-void GLTraceState::setCollectFbOnGlDraw(bool en) {
- safeSetValue(&mCollectFbOnGlDraw, en, &mTraceOptionsRwLock);
-}
-
-void GLTraceState::setCollectTextureDataOnGlTexImage(bool en) {
- safeSetValue(&mCollectTextureDataOnGlTexImage, en, &mTraceOptionsRwLock);
-}
-
-bool GLTraceState::shouldCollectFbOnEglSwap() {
- return safeGetValue(&mCollectFbOnEglSwap, &mTraceOptionsRwLock);
-}
-
-bool GLTraceState::shouldCollectFbOnGlDraw() {
- return safeGetValue(&mCollectFbOnGlDraw, &mTraceOptionsRwLock);
-}
-
-bool GLTraceState::shouldCollectTextureDataOnGlTexImage() {
- return safeGetValue(&mCollectTextureDataOnGlTexImage, &mTraceOptionsRwLock);
-}
-
-GLTraceContext *GLTraceState::createTraceContext(int version, EGLContext eglContext) {
- int id = __sync_fetch_and_add(&mTraceContextIds, 1);
-
- const size_t DEFAULT_BUFFER_SIZE = 8192;
- BufferedOutputStream *stream = new BufferedOutputStream(mStream, DEFAULT_BUFFER_SIZE);
- GLTraceContext *traceContext = new GLTraceContext(id, this, stream);
- mPerContextState[eglContext] = traceContext;
-
- return traceContext;
-}
-
-GLTraceContext *GLTraceState::getTraceContext(EGLContext c) {
- return mPerContextState[c];
-}
-
-GLTraceContext::GLTraceContext(int id, GLTraceState *state, BufferedOutputStream *stream) :
- mId(id),
- mState(state),
- mBufferedOutputStream(stream),
- mElementArrayBuffers(DefaultKeyedVector<GLuint, ElementArrayBuffer*>(NULL))
-{
- fbcontents = fbcompressed = NULL;
- fbcontentsSize = 0;
-}
-
-int GLTraceContext::getId() {
- return mId;
-}
-
-GLTraceState *GLTraceContext::getGlobalTraceState() {
- return mState;
-}
-
-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, FBBinding fbToRead) {
- int viewport[4] = {};
- hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
- unsigned fbContentsSize = viewport[2] * viewport[3] * 4;
-
- resizeFBMemory(fbContentsSize);
-
- // switch current framebuffer binding if necessary
- GLint currentFb = -1;
- bool fbSwitched = false;
- if (fbToRead != CURRENTLY_BOUND_FB) {
- hooks->gl.glGetIntegerv(GL_FRAMEBUFFER_BINDING, &currentFb);
-
- if (currentFb != 0) {
- hooks->gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
- fbSwitched = true;
- }
- }
-
- hooks->gl.glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3],
- GL_RGBA, GL_UNSIGNED_BYTE, fbcontents);
-
- // switch back to previously bound buffer if necessary
- if (fbSwitched) {
- hooks->gl.glBindFramebuffer(GL_FRAMEBUFFER, currentFb);
- }
-
- *fbsize = lzf_compress(fbcontents, fbContentsSize, fbcompressed, fbContentsSize);
- *fb = fbcompressed;
- *fbwidth = viewport[2];
- *fbheight = viewport[3];
-}
-
-void GLTraceContext::traceGLMessage(GLMessage *msg) {
- mBufferedOutputStream->send(msg);
-
- GLMessage_Function func = msg->function();
- if (func == GLMessage::eglSwapBuffers
- || func == GLMessage::glDrawArrays
- || func == GLMessage::glDrawElements) {
- mBufferedOutputStream->flush();
- }
-}
-
-void GLTraceContext::bindBuffer(GLuint bufferId, GLvoid *data, GLsizeiptr size) {
- // free previously bound buffer if any
- ElementArrayBuffer *oldBuffer = mElementArrayBuffers.valueFor(bufferId);
- if (oldBuffer != NULL) {
- delete oldBuffer;
- }
-
- mElementArrayBuffers.add(bufferId, new ElementArrayBuffer(data, size));
-}
-
-void GLTraceContext::getBuffer(GLuint bufferId, GLvoid **data, GLsizeiptr *size) {
- ElementArrayBuffer *buffer = mElementArrayBuffers.valueFor(bufferId);
- if (buffer == NULL) {
- *data = NULL;
- *size = 0;
- } else {
- *data = buffer->getBuffer();
- *size = buffer->getSize();
- }
-}
-
-void GLTraceContext::updateBufferSubData(GLuint bufferId, GLintptr offset, GLvoid *data,
- GLsizeiptr size) {
- ElementArrayBuffer *buffer = mElementArrayBuffers.valueFor(bufferId);
- if (buffer != NULL) {
- buffer->updateSubBuffer(offset, data, size);
- }
-}
-
-void GLTraceContext::deleteBuffer(GLuint bufferId) {
- ElementArrayBuffer *buffer = mElementArrayBuffers.valueFor(bufferId);
- if (buffer != NULL) {
- delete buffer;
- mElementArrayBuffers.removeItem(bufferId);
- }
-}
-
-ElementArrayBuffer::ElementArrayBuffer(GLvoid *buf, GLsizeiptr size) {
- mBuf = malloc(size);
- mSize = size;
-
- if (buf != NULL) {
- memcpy(mBuf, buf, size);
- }
-}
-
-ElementArrayBuffer::~ElementArrayBuffer() {
- if (mBuf != NULL) {
- free(mBuf);
- mSize = 0;
- }
-
- mBuf = NULL;
-}
-
-void ElementArrayBuffer::updateSubBuffer(GLintptr offset, const GLvoid* data, GLsizeiptr size) {
- if (offset + size <= mSize) {
- memcpy((char*)mBuf + offset, data, size);
- }
-}
-
-GLvoid *ElementArrayBuffer::getBuffer() {
- return mBuf;
-}
-
-GLsizeiptr ElementArrayBuffer::getSize() {
- return mSize;
-}
-
-}; // namespace gltrace
-}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_context.h b/opengl/libs/GLES_trace/src/gltrace_context.h
deleted file mode 100644
index 323cfdc..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_context.h
+++ /dev/null
@@ -1,127 +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 __GLTRACE_CONTEXT_H_
-#define __GLTRACE_CONTEXT_H_
-
-#include <map>
-#include <pthread.h>
-#include <utils/KeyedVector.h>
-
-#include "hooks.h"
-#include "gltrace_transport.h"
-
-namespace android {
-namespace gltrace {
-
-using ::android::gl_hooks_t;
-
-enum FBBinding {CURRENTLY_BOUND_FB, FB0};
-
-class GLTraceState;
-
-class ElementArrayBuffer {
- GLvoid *mBuf;
- GLsizeiptr mSize;
-
-public:
- ElementArrayBuffer():mBuf(NULL), mSize(0) {}
- ElementArrayBuffer(GLvoid *buf, GLsizeiptr size);
- ~ElementArrayBuffer();
-
- void updateSubBuffer(GLintptr offset, const GLvoid* data, GLsizeiptr size);
- GLvoid *getBuffer();
- GLsizeiptr getSize();
-};
-
-/** GL Trace Context info associated with each EGLContext */
-class GLTraceContext {
- int mId; /* unique context id */
- GLTraceState *mState; /* parent GL Trace state (for per process GL Trace State Info) */
-
- void *fbcontents; /* memory area to read framebuffer contents */
- void *fbcompressed; /* destination for lzf compressed framebuffer */
- unsigned fbcontentsSize; /* size of fbcontents & fbcompressed buffers */
-
- BufferedOutputStream *mBufferedOutputStream; /* stream where trace info is sent */
-
- /* list of element array buffers in use. */
- DefaultKeyedVector<GLuint, ElementArrayBuffer*> mElementArrayBuffers;
-
- void resizeFBMemory(unsigned minSize);
-public:
- gl_hooks_t *hooks;
-
- GLTraceContext(int id, GLTraceState *state, BufferedOutputStream *stream);
- int getId();
- GLTraceState *getGlobalTraceState();
- void getCompressedFB(void **fb, unsigned *fbsize,
- unsigned *fbwidth, unsigned *fbheight,
- FBBinding fbToRead);
-
- // Methods to work with element array buffers
- void bindBuffer(GLuint bufferId, GLvoid *data, GLsizeiptr size);
- void getBuffer(GLuint bufferId, GLvoid **data, GLsizeiptr *size);
- void updateBufferSubData(GLuint bufferId, GLintptr offset, GLvoid *data, GLsizeiptr size);
- void deleteBuffer(GLuint bufferId);
-
- void traceGLMessage(GLMessage *msg);
-};
-
-/** Per process trace state. */
-class GLTraceState {
- int mTraceContextIds;
- TCPStream *mStream;
- std::map<EGLContext, GLTraceContext*> mPerContextState;
-
- /* Options controlling additional data to be collected on
- certain trace calls. */
- bool mCollectFbOnEglSwap;
- bool mCollectFbOnGlDraw;
- bool mCollectTextureDataOnGlTexImage;
- pthread_rwlock_t mTraceOptionsRwLock;
-
- /* helper methods to get/set values using provided lock for mutual exclusion. */
- void safeSetValue(bool *ptr, bool value, pthread_rwlock_t *lock);
- bool safeGetValue(bool *ptr, pthread_rwlock_t *lock);
-public:
- GLTraceState(TCPStream *stream);
- ~GLTraceState();
-
- GLTraceContext *createTraceContext(int version, EGLContext c);
- GLTraceContext *getTraceContext(EGLContext c);
-
- TCPStream *getStream();
-
- /* Methods to set trace options. */
- void setCollectFbOnEglSwap(bool en);
- void setCollectFbOnGlDraw(bool en);
- void setCollectTextureDataOnGlTexImage(bool en);
-
- /* Methods to retrieve trace options. */
- bool shouldCollectFbOnEglSwap();
- bool shouldCollectFbOnGlDraw();
- bool shouldCollectTextureDataOnGlTexImage();
-};
-
-void setupTraceContextThreadSpecific(GLTraceContext *context);
-GLTraceContext *getGLTraceContext();
-void releaseContext();
-
-};
-};
-
-#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_egl.cpp b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
deleted file mode 100644
index 9d1682a..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_egl.cpp
+++ /dev/null
@@ -1,94 +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.
- */
-
-#include <cutils/log.h>
-#include <utils/Timers.h>
-
-#include "gltrace.pb.h"
-#include "gltrace_context.h"
-#include "gltrace_fixup.h"
-#include "gltrace_transport.h"
-
-namespace android {
-namespace gltrace {
-
-void GLTrace_eglCreateContext(int version, int contextId) {
- GLMessage glmessage;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmessage.set_context_id(contextId);
- glmessage.set_function(GLMessage::eglCreateContext);
-
- // copy argument version
- GLMessage_DataType *arg_version = glmessage.add_args();
- arg_version->set_isarray(false);
- arg_version->set_type(GLMessage::DataType::INT);
- arg_version->add_intvalue(version);
-
- // copy argument context
- GLMessage_DataType *arg_context = glmessage.add_args();
- arg_context->set_isarray(false);
- arg_context->set_type(GLMessage::DataType::INT);
- arg_context->add_intvalue(contextId);
-
- // set start time and duration
- glmessage.set_start_time(systemTime());
- glmessage.set_duration(0);
-
- glContext->traceGLMessage(&glmessage);
-}
-
-void GLTrace_eglMakeCurrent(int contextId) {
- GLMessage glmessage;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmessage.set_context_id(contextId);
- glmessage.set_function(GLMessage::eglMakeCurrent);
-
- // copy argument context
- GLMessage_DataType *arg_context = glmessage.add_args();
- arg_context->set_isarray(false);
- arg_context->set_type(GLMessage::DataType::INT);
- arg_context->add_intvalue(contextId);
-
- // set start time and duration
- glmessage.set_start_time(systemTime());
- glmessage.set_duration(0);
-
- glContext->traceGLMessage(&glmessage);
-}
-
-void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
- GLMessage glmessage;
- GLTraceContext *glContext = getGLTraceContext();
-
- glmessage.set_context_id(glContext->getId());
- glmessage.set_function(GLMessage::eglSwapBuffers);
-
- if (glContext->getGlobalTraceState()->shouldCollectFbOnEglSwap()) {
- // read FB0 since that is what is displayed on the screen
- fixup_addFBContents(glContext, &glmessage, FB0);
- }
-
- // set start time and duration
- glmessage.set_start_time(systemTime());
- glmessage.set_duration(0);
-
- glContext->traceGLMessage(&glmessage);
-}
-
-};
-};
diff --git a/opengl/libs/GLES_trace/src/gltrace_egl.h b/opengl/libs/GLES_trace/src/gltrace_egl.h
deleted file mode 100644
index f4684c5..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_egl.h
+++ /dev/null
@@ -1,30 +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 __GLTRACE_EGL_H_
-#define __GLTRACE_EGL_H_
-
-namespace android {
-namespace gltrace {
-
-void GLTrace_eglCreateContext(int version, int contextId);
-void GLTrace_eglMakeCurrent(int contextId);
-void GLTrace_eglSwapBuffers(void *dpy, void *draw);
-
-};
-};
-
-#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
deleted file mode 100644
index c442153..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
+++ /dev/null
@@ -1,134 +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.
- */
-
-#include <arpa/inet.h>
-#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 {
-
-using gltrace::GLTraceState;
-using gltrace::GLTraceContext;
-using gltrace::TCPStream;
-
-static GLTraceState *sGLTraceState;
-static pthread_t sReceiveThreadId;
-
-/**
- * Task that monitors the control stream from the host and updates
- * the trace status according to commands received from the host.
- */
-static void *commandReceiveTask(void *arg) {
- GLTraceState *state = (GLTraceState *)arg;
- TCPStream *stream = state->getStream();
-
- // Currently, there are very few user configurable settings.
- // As a result, they can be encoded in a single integer.
- int cmd;
- enum TraceSettingsMasks {
- READ_FB_ON_EGLSWAP_MASK = 1 << 0,
- READ_FB_ON_GLDRAW_MASK = 1 << 1,
- READ_TEXTURE_DATA_ON_GLTEXIMAGE_MASK = 1 << 2,
- };
-
- while (true) {
- int n = stream->receive(&cmd, 4);
- if (n != 4) {
- break;
- }
-
- cmd = ntohl(cmd);
-
- bool collectFbOnEglSwap = (cmd & READ_FB_ON_EGLSWAP_MASK) != 0;
- bool collectFbOnGlDraw = (cmd & READ_FB_ON_GLDRAW_MASK) != 0;
- bool collectTextureData = (cmd & READ_TEXTURE_DATA_ON_GLTEXIMAGE_MASK) != 0;
-
- state->setCollectFbOnEglSwap(collectFbOnEglSwap);
- state->setCollectFbOnGlDraw(collectFbOnGlDraw);
- state->setCollectTextureDataOnGlTexImage(collectTextureData);
-
- ALOGD("trace options: eglswap: %d, gldraw: %d, texImage: %d",
- collectFbOnEglSwap, collectFbOnGlDraw, collectTextureData);
- }
-
- return NULL;
-}
-
-void GLTrace_start() {
- char udsName[PROPERTY_VALUE_MAX];
-
- property_get("debug.egl.debug_portname", udsName, "gltrace");
- int clientSocket = gltrace::acceptClientConnection(udsName);
- if (clientSocket < 0) {
- ALOGE("Error creating GLTrace server socket. Quitting application.");
- exit(-1);
- }
-
- // create communication channel to the host
- TCPStream *stream = new TCPStream(clientSocket);
-
- // initialize tracing state
- sGLTraceState = new GLTraceState(stream);
-
- pthread_create(&sReceiveThreadId, NULL, commandReceiveTask, sGLTraceState);
-}
-
-void GLTrace_stop() {
- delete sGLTraceState;
- sGLTraceState = NULL;
-}
-
-void GLTrace_eglCreateContext(int version, EGLContext c) {
- // update trace state for new EGL context
- GLTraceContext *traceContext = sGLTraceState->createTraceContext(version, c);
- gltrace::setupTraceContextThreadSpecific(traceContext);
-
- // trace command through to the host
- gltrace::GLTrace_eglCreateContext(version, traceContext->getId());
-}
-
-void GLTrace_eglMakeCurrent(const unsigned version, gl_hooks_t *hooks, EGLContext c) {
- // setup per context state
- GLTraceContext *traceContext = sGLTraceState->getTraceContext(c);
- traceContext->hooks = hooks;
- gltrace::setupTraceContextThreadSpecific(traceContext);
-
- // trace command through to the host
- gltrace::GLTrace_eglMakeCurrent(traceContext->getId());
-}
-
-void GLTrace_eglReleaseThread() {
- gltrace::releaseContext();
-}
-
-void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
- gltrace::GLTrace_eglSwapBuffers(dpy, draw);
-}
-
-gl_hooks_t *GLTrace_getGLHooks() {
- return gltrace::getGLHooks();
-}
-
-}
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
deleted file mode 100644
index 3597b26..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
+++ /dev/null
@@ -1,834 +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.
- */
-
-#include <cutils/log.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include "gltrace.pb.h"
-#include "gltrace_api.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:
- ALOGE("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:
- ALOGE("GetBytesPerPixel: unknown format %x", format);
- }
-
- return 1; // in doubt...
-}
-
-void fixup_GenericFloatArray(int argIndex, int nFloats, GLMessage *glmsg, void *src) {
- GLMessage_DataType *arg_floatarray = glmsg->mutable_args(argIndex);
- GLfloat *floatp = (GLfloat *)src;
-
- if (floatp == NULL) {
- return;
- }
-
- arg_floatarray->set_type(GLMessage::DataType::FLOAT);
- arg_floatarray->set_isarray(true);
- arg_floatarray->clear_floatvalue();
-
- for (int i = 0; i < nFloats; i++, floatp++) {
- arg_floatarray->add_floatvalue(*floatp);
- }
-}
-
-void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg, void *src) {
- GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
- GLint *intp = (GLint *)src;
-
- if (intp == NULL) {
- return;
- }
-
- 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_GenericEnumArray(int argIndex, int nEnums, GLMessage *glmsg, void *src) {
- // fixup as if they were ints
- fixup_GenericIntArray(argIndex, nEnums, glmsg, src);
-
- // and then set the data type to be enum
- GLMessage_DataType *arg_enumarray = glmsg->mutable_args(argIndex);
- arg_enumarray->set_type(GLMessage::DataType::ENUM);
-}
-
-/** Generic helper function: extract pointer at argIndex and
- replace it with the C style string at *pointer */
-void fixup_CStringPtr(int argIndex, GLMessage *glmsg, void *src) {
- GLMessage_DataType *arg = glmsg->mutable_args(argIndex);
- GLchar *ptr = (GLchar *) src;
-
- arg->set_type(GLMessage::DataType::CHAR);
- arg->set_isarray(true);
- arg->add_charvalue(ptr);
-}
-
-void fixup_glGetString(GLMessage *glmsg, void *pointersToFixup[]) {
- /* const GLubyte* GLTrace_glGetString(GLenum name) */
- GLMessage_DataType *ret = glmsg->mutable_returnvalue();
- GLchar *ptr = (GLchar *) pointersToFixup[0];
-
- if (ptr != NULL) {
- ret->set_type(GLMessage::DataType::CHAR);
- ret->set_isarray(true);
- ret->add_charvalue(ptr);
- }
-}
-
-/* Add the contents of the framebuffer to the protobuf message */
-void fixup_addFBContents(GLTraceContext *context, GLMessage *glmsg, FBBinding fbToRead) {
- void *fbcontents;
- unsigned fbsize, fbwidth, fbheight;
- context->getCompressedFB(&fbcontents, &fbsize, &fbwidth, &fbheight, fbToRead);
-
- GLMessage_FrameBuffer *fb = glmsg->mutable_fb();
- fb->set_width(fbwidth);
- fb->set_height(fbheight);
- fb->add_contents(fbcontents, fbsize);
-}
-
-/** Common fixup routing for glTexImage2D & glTexSubImage2D. */
-void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg, void *dataSrc) {
- GLMessage_DataType arg_width = glmsg->args(widthIndex);
- GLMessage_DataType arg_height = glmsg->args(heightIndex);
-
- 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 *) dataSrc;
-
- int bytesPerTexel = getBytesPerTexel(format, type);
-
- arg_data->set_type(GLMessage::DataType::BYTE);
- arg_data->clear_rawbytes();
-
- if (data != NULL) {
- arg_data->set_isarray(true);
- arg_data->add_rawbytes(data, bytesPerTexel * width * height);
- } else {
- arg_data->set_isarray(false);
- arg_data->set_type(GLMessage::DataType::VOID);
- }
-}
-
-
-void fixup_glTexImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glTexImage2D(GLenum target,
- GLint level,
- GLint internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const GLvoid *data);
- */
- int widthIndex = 3;
- int heightIndex = 4;
- fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
-}
-
-void fixup_glTexSubImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
- /*
- void glTexSubImage2D(GLenum target,
- GLint level,
- GLint xoffset,
- GLint yoffset,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- const GLvoid * data);
- */
- int widthIndex = 4;
- int heightIndex = 5;
- fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
-}
-
-void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) {
- /* 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 **) pointersToFixup[0];
- GLint *lengthp = (GLint *) pointersToFixup[1];
-
- 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_glUniformGenericInteger(int argIndex, int nIntegers, GLMessage *glmsg,
- void *pointersToFixup[]) {
- /* void glUniform?iv(GLint location, GLsizei count, const GLint *value); */
- fixup_GenericIntArray(argIndex, nIntegers, glmsg, pointersToFixup[0]);
-}
-
-void fixup_glUniformGeneric(int argIndex, int nFloats, GLMessage *glmsg, void *src) {
- fixup_GenericFloatArray(argIndex, nFloats, glmsg, src);
-}
-
-void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg, void *pointersToFixup[]) {
- /* 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, pointersToFixup[0]);
-}
-
-void fixup_glGenGeneric(GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glGen*(GLsizei n, GLuint * buffers); */
- GLMessage_DataType arg_n = glmsg->args(0);
- GLsizei n = arg_n.intvalue(0);
-
- fixup_GenericIntArray(1, n, glmsg, pointersToFixup[0]);
-}
-
-void fixup_glDeleteGeneric(GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glDelete*(GLsizei n, GLuint *buffers); */
- GLMessage_DataType arg_n = glmsg->args(0);
- GLsizei n = arg_n.intvalue(0);
-
- fixup_GenericIntArray(1, n, glmsg, pointersToFixup[0]);
-}
-
-void fixup_glGetBooleanv(GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glGetBooleanv(GLenum pname, GLboolean *params); */
- GLMessage_DataType *arg_params = glmsg->mutable_args(1);
- GLboolean *src = (GLboolean*) pointersToFixup[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 *pointersToFixup[]) {
- /* void glGetFloatv(GLenum pname, GLfloat *params); */
- GLMessage_DataType *arg_params = glmsg->mutable_args(1);
- GLfloat *src = (GLfloat*) pointersToFixup[0];
-
- arg_params->set_type(GLMessage::DataType::FLOAT);
- arg_params->set_isarray(true);
- arg_params->clear_floatvalue();
- arg_params->add_floatvalue(*src);
-}
-
-void fixup_glLinkProgram(GLMessage *glmsg) {
- /* void glLinkProgram(GLuint program); */
- GLuint program = glmsg->args(0).intvalue(0);
-
- /* We don't have to fixup this call, but as soon as a program is linked,
- we obtain information about all active attributes and uniforms to
- pass on to the debugger. Note that in order to pass this info to
- the debugger, all we need to do is call the trace versions of the
- necessary calls. */
-
- GLint n, maxNameLength;
- GLchar *name;
- GLint size;
- GLenum type;
-
- // obtain info regarding active attributes
- GLTrace_glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &n);
- GLTrace_glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxNameLength);
-
- name = (GLchar *) malloc(maxNameLength);
- for (int i = 0; i < n; i++) {
- GLTrace_glGetActiveAttrib(program, i, maxNameLength, NULL, &size, &type, name);
- }
- free(name);
-
- // obtain info regarding active uniforms
- GLTrace_glGetProgramiv(program, GL_ACTIVE_UNIFORMS, &n);
- GLTrace_glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength);
-
- name = (GLchar *) malloc(maxNameLength);
- for (int i = 0; i < n; i++) {
- GLTrace_glGetActiveUniform(program, i, maxNameLength, NULL, &size, &type, name);
- }
- free(name);
-}
-
-/** Given a glGetActive[Uniform|Attrib] call, obtain the location
- * of the variable of given name in the call.
- */
-int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg, GLchar *name) {
- GLMessage_Function func = glmsg->function();
- if (func != GLMessage::glGetActiveAttrib && func != GLMessage::glGetActiveUniform) {
- return -1;
- }
-
- int program = glmsg->args(0).intvalue(0);
-
- if (func == GLMessage::glGetActiveAttrib) {
- return context->hooks->gl.glGetAttribLocation(program, name);
- } else {
- return context->hooks->gl.glGetUniformLocation(program, name);
- }
-}
-
-void fixup_glGetActiveAttribOrUniform(GLTraceContext *context, GLMessage *glmsg,
- void *pointersToFixup[]) {
- /* void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize,
- GLsizei* length, GLint* size, GLenum* type, GLchar* name); */
- /* void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize,
- GLsizei* length, GLint* size, GLenum* type, GLchar* name) */
-
- fixup_GenericIntArray(3, 1, glmsg, pointersToFixup[0]); // length
- fixup_GenericIntArray(4, 1, glmsg, pointersToFixup[1]); // size
- fixup_GenericEnumArray(5, 1, glmsg, pointersToFixup[2]); // type
- fixup_CStringPtr(6, glmsg, pointersToFixup[3]); // name
-
- // The index argument in the glGetActive[Attrib|Uniform] functions
- // does not correspond to the actual location index as used in
- // glUniform*() or glVertexAttrib*() to actually upload the data.
- // In order to make things simpler for the debugger, we also pass
- // a hidden location argument that stores the actual location.
- // append the location value to the end of the argument list
- int location = getShaderVariableLocation(context, glmsg, (GLchar*)pointersToFixup[3]);
- GLMessage_DataType *arg_location = glmsg->add_args();
- arg_location->set_isarray(false);
- arg_location->set_type(GLMessage::DataType::INT);
- arg_location->add_intvalue(location);
-}
-
-GLint glGetInteger(GLTraceContext *context, GLenum param) {
- GLint x;
- context->hooks->gl.glGetIntegerv(param, &x);
- return x;
-}
-
-GLint glGetVertexAttrib(GLTraceContext *context, GLuint index, GLenum pname) {
- GLint x;
- context->hooks->gl.glGetVertexAttribiv(index, pname, &x);
- return x;
-}
-
-bool isUsingArrayBuffers(GLTraceContext *context) {
- return glGetInteger(context, GL_ARRAY_BUFFER_BINDING) != 0;
-}
-
-bool isUsingElementArrayBuffers(GLTraceContext *context) {
- return glGetInteger(context, GL_ELEMENT_ARRAY_BUFFER_BINDING) != 0;
-}
-
-/** Copy @len bytes of data from @src into the @dataIndex'th argument of the message. */
-void addGlBufferData(GLMessage *glmsg, int dataIndex, GLvoid *src, GLsizeiptr len) {
- GLMessage_DataType *arg_datap = glmsg->mutable_args(dataIndex);
- arg_datap->set_type(GLMessage::DataType::VOID);
- arg_datap->set_isarray(true);
- arg_datap->clear_intvalue();
- arg_datap->add_rawbytes(src, len);
-}
-
-void fixup_glBufferData(GLTraceContext *context, GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) */
- GLsizeiptr size = glmsg->args(1).intvalue(0);
- GLvoid *datap = (GLvoid *) pointersToFixup[0];
-
- // Save element array buffers for future use to fixup glVertexAttribPointers
- // when a glDrawElements() call is performed.
- GLenum target = glmsg->args(0).intvalue(0);
- if (target == GL_ELEMENT_ARRAY_BUFFER) {
- GLint bufferId = glGetInteger(context, GL_ELEMENT_ARRAY_BUFFER_BINDING);
- context->bindBuffer(bufferId, datap, size);
- }
-
- // add buffer data to the protobuf message
- if (datap != NULL) {
- addGlBufferData(glmsg, 2, datap, size);
- }
-}
-
-void fixup_glBufferSubData(GLTraceContext *context, GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) */
- GLenum target = glmsg->args(0).intvalue(0);
- GLintptr offset = glmsg->args(1).intvalue(0);
- GLsizeiptr size = glmsg->args(2).intvalue(0);
- GLvoid *datap = (GLvoid *) pointersToFixup[0];
- if (target == GL_ELEMENT_ARRAY_BUFFER) {
- GLint bufferId = glGetInteger(context, GL_ELEMENT_ARRAY_BUFFER_BINDING);
- context->updateBufferSubData(bufferId, offset, datap, size);
- }
-
- // add buffer data to the protobuf message
- addGlBufferData(glmsg, 3, datap, size);
-}
-
-/** Obtain the size of each vertex attribute. */
-int vertexAttribSize(GLenum type, GLsizei numComponents) {
- int sizePerComponent;
-
- switch(type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- sizePerComponent = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- sizePerComponent = 2;
- break;
- case GL_FIXED:
- case GL_FLOAT:
- default:
- sizePerComponent = 4;
- break;
- }
-
- return sizePerComponent * numComponents;
-}
-
-/** Create and send a glVertexAttribPointerData trace message to the host. */
-void trace_glVertexAttribPointerData(GLTraceContext *context,
- GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, const GLvoid* ptr,
- GLuint minIndex, GLuint maxIndex, nsecs_t startTime) {
- /* void glVertexAttribPointerData(GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, const GLvoid* ptr,
- int minIndex, int maxIndex) */
- GLMessage glmsg;
- GLTraceContext *glContext = context;
-
- glmsg.set_function(GLMessage::glVertexAttribPointerData);
-
- // copy argument indx
- GLMessage_DataType *arg_indx = glmsg.add_args();
- arg_indx->set_isarray(false);
- arg_indx->set_type(GLMessage::DataType::INT);
- arg_indx->add_intvalue(indx);
-
- // copy argument size
- GLMessage_DataType *arg_size = glmsg.add_args();
- arg_size->set_isarray(false);
- arg_size->set_type(GLMessage::DataType::INT);
- arg_size->add_intvalue(size);
-
- // copy argument type
- GLMessage_DataType *arg_type = glmsg.add_args();
- arg_type->set_isarray(false);
- arg_type->set_type(GLMessage::DataType::ENUM);
- arg_type->add_intvalue((int)type);
-
- // copy argument normalized
- GLMessage_DataType *arg_normalized = glmsg.add_args();
- arg_normalized->set_isarray(false);
- arg_normalized->set_type(GLMessage::DataType::BOOL);
- arg_normalized->add_boolvalue(normalized);
-
- // copy argument stride
- GLMessage_DataType *arg_stride = glmsg.add_args();
- arg_stride->set_isarray(false);
- arg_stride->set_type(GLMessage::DataType::INT);
- arg_stride->add_intvalue(stride);
-
- // copy argument ptr
- GLMessage_DataType *arg_ptr = glmsg.add_args();
- arg_ptr->set_isarray(true);
- arg_ptr->set_type(GLMessage::DataType::BYTE);
- int perVertexSize = vertexAttribSize(type, size);
- GLchar *p = (GLchar*) ptr;
- std::string data;
- for (GLuint i = minIndex; i < maxIndex; i++) {
- data.append(p, perVertexSize);
- p += stride == 0 ? perVertexSize : stride;
- }
- arg_ptr->add_rawbytes(data);
-
- // copy argument min index
- GLMessage_DataType *arg_min = glmsg.add_args();
- arg_min->set_isarray(false);
- arg_min->set_type(GLMessage::DataType::INT);
- arg_min->add_intvalue(minIndex);
-
- // copy argument max index
- GLMessage_DataType *arg_max = glmsg.add_args();
- arg_max->set_isarray(false);
- arg_max->set_type(GLMessage::DataType::INT);
- arg_max->add_intvalue(maxIndex);
-
- glmsg.set_context_id(context->getId());
- glmsg.set_start_time(startTime);
- glmsg.set_threadtime(0);
- glmsg.set_duration(0);
-
- context->traceGLMessage(&glmsg);
-}
-
-void findMinAndMaxIndices(GLvoid *indices, GLsizei count, GLenum type,
- GLuint *minIndex, GLuint *maxIndex) {
- GLuint index;
- *minIndex = UINT_MAX;
- *maxIndex = 0;
-
- if (indices == NULL) {
- return;
- }
-
- for (GLsizei i = 0; i < count; i++) {
- if (type == GL_UNSIGNED_BYTE) {
- index = *((GLubyte*) indices + i);
- } else {
- index = *((GLushort*) indices + i);
- }
-
- if (index < *minIndex) *minIndex = index;
- if (index > *maxIndex) *maxIndex = index;
- }
-}
-
-void trace_VertexAttribPointerData(GLTraceContext *context,
- GLuint minIndex, GLuint maxIndex, nsecs_t time) {
- GLuint maxAttribs = glGetInteger(context, GL_MAX_VERTEX_ATTRIBS);
- for (GLuint index = 0; index < maxAttribs; index++) {
- if (!glGetVertexAttrib(context, index, GL_VERTEX_ATTRIB_ARRAY_ENABLED)) {
- // vertex array disabled
- continue;
- }
-
- if (glGetVertexAttrib(context, index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)) {
- // vbo
- continue;
- }
-
- GLint size = glGetVertexAttrib(context, index, GL_VERTEX_ATTRIB_ARRAY_SIZE);
- GLenum type = glGetVertexAttrib(context, index, GL_VERTEX_ATTRIB_ARRAY_TYPE);
- GLboolean norm = glGetVertexAttrib(context, index, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED);
- GLsizei stride = glGetVertexAttrib(context, index, GL_VERTEX_ATTRIB_ARRAY_STRIDE);
- GLvoid* ptr;
- context->hooks->gl.glGetVertexAttribPointerv(index, GL_VERTEX_ATTRIB_ARRAY_POINTER, &ptr);
-
- trace_glVertexAttribPointerData(context,
- index, size, type, norm, stride, ptr,
- minIndex, maxIndex, time);
- }
-}
-
-void trace_VertexAttribPointerDataForGlDrawArrays(GLTraceContext *context, GLMessage *glmsg) {
- /* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
- GLsizei count = glmsg->args(2).intvalue(0);
-
- // Vertex attrib pointer data patchup calls should appear as if
- // they occurred right before the draw call.
- nsecs_t time = glmsg->start_time() - 1;
-
- trace_VertexAttribPointerData(context, 0, count, time);
-}
-
-void trace_VertexAttribPointerDataForGlDrawElements(GLTraceContext *context, GLMessage *glmsg,
- GLvoid *indices) {
- /* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */
- GLsizei count = glmsg->args(1).intvalue(0);
- GLenum type = glmsg->args(2).intvalue(0);
- GLuint index;
-
- GLuint minIndex, maxIndex;
-
- // The index buffer is either passed in as an argument to the glDrawElements() call,
- // or it is stored in the current GL_ELEMENT_ARRAY_BUFFER.
- GLvoid *indexBuffer;
- if (isUsingElementArrayBuffers(context)) {
- GLsizeiptr eaBufferSize;
- GLuint bufferId = glGetInteger(context, GL_ELEMENT_ARRAY_BUFFER_BINDING);
- context->getBuffer(bufferId, &indexBuffer, &eaBufferSize);
- } else {
- indexBuffer = indices;
- }
-
- // Rather than sending vertex attribute data that corresponds to the indices
- // being drawn, we send the vertex attribute data for the entire range of
- // indices being drawn, including the ones not drawn. The min & max indices
- // provide the range of indices being drawn.
- findMinAndMaxIndices(indexBuffer, count, type, &minIndex, &maxIndex);
-
- // Vertex attrib pointer data patchup calls should appear as if
- // they occurred right before the draw call.
- nsecs_t time = glmsg->start_time() - 1;
-
- trace_VertexAttribPointerData(context, minIndex, maxIndex + 1, time);
-}
-
-void fixup_glDrawArrays(GLTraceContext *context, GLMessage *glmsg) {
- // Trace all vertex attribute data stored in client space.
- trace_VertexAttribPointerDataForGlDrawArrays(context, glmsg);
-
- // Attach the FB if requested
- if (context->getGlobalTraceState()->shouldCollectFbOnGlDraw()) {
- fixup_addFBContents(context, glmsg, CURRENTLY_BOUND_FB);
- }
-}
-
-void fixup_glDrawElements(GLTraceContext *context, GLMessage *glmsg, void *pointersToFixup[]) {
- /* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */
- GLvoid *indices = pointersToFixup[0];
- GLenum type = glmsg->args(2).intvalue(0);
- GLsizei count = glmsg->args(1).intvalue(0);
- GLuint index;
-
- // Trace all vertex attribute data stored in client space.
- trace_VertexAttribPointerDataForGlDrawElements(context, glmsg, indices);
-
- // Fixup indices argument
- if (!isUsingElementArrayBuffers(context)) {
- GLMessage_DataType *arg_indices = glmsg->mutable_args(3);
- arg_indices->set_isarray(true);
- arg_indices->clear_intvalue();
- arg_indices->set_type(GLMessage::DataType::INT);
- for (GLsizei i = 0; i < count; i++) {
- if (type == GL_UNSIGNED_BYTE) {
- index = *((GLubyte*) indices + i);
- } else {
- index = *((GLushort*) indices + i);
- }
- arg_indices->add_intvalue(index);
- }
- }
-
- // Attach the FB if requested
- if (context->getGlobalTraceState()->shouldCollectFbOnGlDraw()) {
- fixup_addFBContents(context, glmsg, CURRENTLY_BOUND_FB);
- }
-}
-
-void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
- nsecs_t threadStart, nsecs_t threadEnd,
- GLMessage *glmsg, void *pointersToFixup[]) {
- // for all messages, set the current context id
- glmsg->set_context_id(context->getId());
-
- // set start time and duration
- glmsg->set_start_time(wallStart);
- glmsg->set_duration((unsigned)(wallEnd - wallStart));
- glmsg->set_threadtime((unsigned)(threadEnd - threadStart));
-
- // do any custom message dependent processing
- switch (glmsg->function()) {
- case GLMessage::glDeleteBuffers: /* glDeleteBuffers(GLsizei n, GLuint *buffers); */
- case GLMessage::glDeleteFramebuffers: /* glDeleteFramebuffers(GLsizei n, GLuint *buffers); */
- case GLMessage::glDeleteRenderbuffers:/* glDeleteRenderbuffers(GLsizei n, GLuint *buffers); */
- case GLMessage::glDeleteTextures: /* glDeleteTextures(GLsizei n, GLuint *textures); */
- fixup_glDeleteGeneric(glmsg, pointersToFixup);
- break;
- 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 *textures); */
- fixup_glGenGeneric(glmsg, pointersToFixup);
- break;
- case GLMessage::glLinkProgram: /* void glLinkProgram(GLuint program); */
- fixup_glLinkProgram(glmsg);
- break;
- case GLMessage::glGetActiveAttrib:
- fixup_glGetActiveAttribOrUniform(context, glmsg, pointersToFixup);
- break;
- case GLMessage::glGetActiveUniform:
- fixup_glGetActiveAttribOrUniform(context, glmsg, pointersToFixup);
- break;
- case GLMessage::glBindAttribLocation:
- /* void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name); */
- fixup_CStringPtr(2, glmsg, pointersToFixup[0]);
- 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, pointersToFixup[0]);
- break;
- case GLMessage::glGetBooleanv:
- fixup_glGetBooleanv(glmsg, pointersToFixup);
- break;
- case GLMessage::glGetFloatv:
- fixup_glGetFloatv(glmsg, pointersToFixup);
- break;
- case GLMessage::glGetIntegerv: /* void glGetIntegerv(GLenum pname, GLint *params); */
- fixup_GenericIntArray(1, 1, glmsg, pointersToFixup[0]);
- 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, pointersToFixup[0]);
- break;
- case GLMessage::glGetString:
- fixup_glGetString(glmsg, pointersToFixup);
- break;
- case GLMessage::glTexImage2D:
- if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
- fixup_glTexImage2D(glmsg, pointersToFixup);
- }
- break;
- case GLMessage::glTexSubImage2D:
- if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
- fixup_glTexSubImage2D(glmsg, pointersToFixup);
- }
- break;
- case GLMessage::glShaderSource:
- fixup_glShaderSource(glmsg, pointersToFixup);
- break;
- case GLMessage::glUniform1iv:
- /* void glUniform1iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 1, glmsg, pointersToFixup);
- break;
- case GLMessage::glUniform2iv:
- /* void glUniform2iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 2, glmsg, pointersToFixup);
- break;
- case GLMessage::glUniform3iv:
- /* void glUniform3iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 3, glmsg, pointersToFixup);
- break;
- case GLMessage::glUniform4iv:
- /* void glUniform4iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 4, glmsg, pointersToFixup);
- break;
- case GLMessage::glUniform1fv:
- /* void glUniform1fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 1, glmsg, pointersToFixup[0]);
- break;
- case GLMessage::glUniform2fv:
- /* void glUniform2fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 2, glmsg, pointersToFixup[0]);
- break;
- case GLMessage::glUniform3fv:
- /* void glUniform3fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 3, glmsg, pointersToFixup[0]);
- break;
- case GLMessage::glUniform4fv:
- /* void glUniform4fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 4, glmsg, pointersToFixup[0]);
- break;
- case GLMessage::glUniformMatrix2fv:
- /* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat* value) */
- fixup_glUniformMatrixGeneric(2, glmsg, pointersToFixup);
- break;
- case GLMessage::glUniformMatrix3fv:
- /* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat* value) */
- fixup_glUniformMatrixGeneric(3, glmsg, pointersToFixup);
- break;
- case GLMessage::glUniformMatrix4fv:
- /* void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
- const GLfloat* value) */
- fixup_glUniformMatrixGeneric(4, glmsg, pointersToFixup);
- break;
- case GLMessage::glBufferData:
- /* void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) */
- fixup_glBufferData(context, glmsg, pointersToFixup);
- break;
- case GLMessage::glBufferSubData:
- /* void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) */
- fixup_glBufferSubData(context, glmsg, pointersToFixup);
- break;
- case GLMessage::glDrawArrays:
- /* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
- fixup_glDrawArrays(context, glmsg);
- break;
- case GLMessage::glDrawElements:
- /* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */
- fixup_glDrawElements(context, glmsg, pointersToFixup);
- break;
- case GLMessage::glPushGroupMarkerEXT:
- /* void PushGroupMarkerEXT(sizei length, const char *marker); */
- fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
- break;
- case GLMessage::glInsertEventMarkerEXT:
- /* void InsertEventMarkerEXT(sizei length, const char *marker); */
- fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
- break;
- default:
- break;
- }
-}
-
-};
-};
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.h b/opengl/libs/GLES_trace/src/gltrace_fixup.h
deleted file mode 100644
index fe30125..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.h
+++ /dev/null
@@ -1,36 +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 __GLTRACE_FIXUP_H_
-#define __GLTRACE_FIXUP_H_
-
-#include <utils/Timers.h>
-
-#include "gltrace.pb.h"
-#include "gltrace_context.h"
-
-namespace android {
-namespace gltrace {
-
-void fixupGLMessage(GLTraceContext *curContext, nsecs_t wallStart, nsecs_t wallEnd,
- nsecs_t threadStart, nsecs_t threadEnd,
- GLMessage *message, void *pointersToFixup[]);
-void fixup_addFBContents(GLTraceContext *curContext, GLMessage *message, FBBinding fbToRead);
-
-};
-};
-
-#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_hooks.cpp b/opengl/libs/GLES_trace/src/gltrace_hooks.cpp
deleted file mode 100644
index de8d463..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_hooks.cpp
+++ /dev/null
@@ -1,41 +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.
- */
-
-#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;
-}
-
-};
-};
diff --git a/opengl/libs/GLES_trace/src/gltrace_hooks.h b/opengl/libs/GLES_trace/src/gltrace_hooks.h
deleted file mode 100644
index c946a09..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_hooks.h
+++ /dev/null
@@ -1,32 +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 __GLD_HOOKS_H_
-#define __GLD_HOOKS_H_
-
-#include "hooks.h"
-
-namespace android {
-namespace gltrace {
-
-using ::android::gl_hooks_t;
-
-gl_hooks_t *getGLHooks();
-
-};
-};
-
-#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.cpp b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
deleted file mode 100644
index 5251b12..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_transport.cpp
+++ /dev/null
@@ -1,150 +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.
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <unistd.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
-
-#include <cutils/log.h>
-
-#include "gltrace_transport.h"
-
-namespace android {
-namespace gltrace {
-
-int acceptClientConnection(char *sockname) {
- int serverSocket = socket(AF_LOCAL, SOCK_STREAM, 0);
- if (serverSocket < 0) {
- ALOGE("Error (%d) while creating socket. Check if app has network permissions.",
- serverSocket);
- return -1;
- }
-
- struct sockaddr_un server, client;
-
- memset(&server, 0, sizeof server);
- server.sun_family = AF_UNIX;
- // the first byte of sun_path should be '\0' for abstract namespace
- strcpy(server.sun_path + 1, sockname);
-
- // note that sockaddr_len should be set to the exact size of the buffer that is used.
- socklen_t sockaddr_len = sizeof(server.sun_family) + strlen(sockname) + 1;
- if (bind(serverSocket, (struct sockaddr *) &server, sockaddr_len) < 0) {
- close(serverSocket);
- ALOGE("Failed to bind the server socket");
- return -1;
- }
-
- if (listen(serverSocket, 1) < 0) {
- close(serverSocket);
- ALOGE("Failed to listen on server socket");
- return -1;
- }
-
- ALOGD("gltrace::waitForClientConnection: server listening @ path %s", sockname);
-
- int clientSocket = accept(serverSocket, (struct sockaddr *)&client, &sockaddr_len);
- if (clientSocket < 0) {
- close(serverSocket);
- ALOGE("Failed to accept client connection");
- return -1;
- }
-
- ALOGD("gltrace::waitForClientConnection: client connected.");
-
- // do not accept any more incoming connections
- close(serverSocket);
-
- return clientSocket;
-}
-
-TCPStream::TCPStream(int socket) {
- mSocket = socket;
- pthread_mutex_init(&mSocketWriteMutex, NULL);
-}
-
-TCPStream::~TCPStream() {
- pthread_mutex_destroy(&mSocketWriteMutex);
-}
-
-void TCPStream::closeStream() {
- if (mSocket > 0) {
- close(mSocket);
- mSocket = 0;
- }
-}
-
-int TCPStream::send(void *buf, size_t len) {
- if (mSocket <= 0) {
- return -1;
- }
-
- pthread_mutex_lock(&mSocketWriteMutex);
- int n = write(mSocket, buf, len);
- pthread_mutex_unlock(&mSocketWriteMutex);
-
- return n;
-}
-
-int TCPStream::receive(void *data, size_t len) {
- if (mSocket <= 0) {
- return -1;
- }
-
- return read(mSocket, data, len);
-}
-
-BufferedOutputStream::BufferedOutputStream(TCPStream *stream, size_t bufferSize) {
- mStream = stream;
-
- mBufferSize = bufferSize;
- mStringBuffer = "";
- mStringBuffer.reserve(bufferSize);
-}
-
-int BufferedOutputStream::flush() {
- if (mStringBuffer.size() == 0) {
- return 0;
- }
-
- int n = mStream->send((void *)mStringBuffer.data(), mStringBuffer.size());
- mStringBuffer.clear();
- return n;
-}
-
-void BufferedOutputStream::enqueueMessage(GLMessage *msg) {
- const uint32_t len = msg->ByteSize();
-
- mStringBuffer.append((const char *)&len, sizeof(len)); // append header
- msg->AppendToString(&mStringBuffer); // append message
-}
-
-int BufferedOutputStream::send(GLMessage *msg) {
- enqueueMessage(msg);
-
- if (mStringBuffer.size() > mBufferSize) {
- return flush();
- }
-
- return 0;
-}
-
-}; // namespace gltrace
-}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.h b/opengl/libs/GLES_trace/src/gltrace_transport.h
deleted file mode 100644
index 3665035..0000000
--- a/opengl/libs/GLES_trace/src/gltrace_transport.h
+++ /dev/null
@@ -1,88 +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 __GLTRACE_TRANSPORT_H_
-#define __GLTRACE_TRANSPORT_H_
-
-#include <pthread.h>
-
-#include "gltrace.pb.h"
-
-namespace android {
-namespace gltrace {
-
-/**
- * TCPStream provides a TCP based communication channel from the device to
- * the host for transferring GLMessages.
- */
-class TCPStream {
- int mSocket;
- pthread_mutex_t mSocketWriteMutex;
-public:
- /** Create a TCP based communication channel over @socket */
- TCPStream(int socket);
- ~TCPStream();
-
- /** Close the channel. */
- void closeStream();
-
- /** Send @data of size @len to host. . Returns -1 on error, 0 on success. */
- int send(void *data, size_t len);
-
- /** Receive data into @buf from the remote end. This is a blocking call. */
- int receive(void *buf, size_t size);
-};
-
-/**
- * BufferedOutputStream provides buffering of data sent to the underlying
- * unbuffered channel.
- */
-class BufferedOutputStream {
- TCPStream *mStream;
-
- size_t mBufferSize;
- std::string mStringBuffer;
-
- /** Enqueue message into internal buffer. */
- void enqueueMessage(GLMessage *msg);
-public:
- /**
- * Construct a Buffered stream of size @bufferSize, using @stream as
- * its underlying channel for transport.
- */
- BufferedOutputStream(TCPStream *stream, size_t bufferSize);
-
- /**
- * Send @msg. The message could be buffered and sent later with a
- * subsequent message. Returns -1 on error, 0 on success.
- */
- int send(GLMessage *msg);
-
- /** Send any buffered messages, returns -1 on error, 0 on success. */
- int flush();
-};
-
-/**
- * Utility method: start a server listening at @sockName (unix domain socket,
- * abstract namespace path), and wait for a client connection.
- * Returns the connected client socket on success, or -1 on failure.
- */
-int acceptClientConnection(char *sockName);
-
-};
-};
-
-#endif
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
deleted file mode 100755
index 24034c1..0000000
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ /dev/null
@@ -1,408 +0,0 @@
-#!/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 GLES_trace/tools folder, or update PYTHONPATH
-# to point to wherever it was downloaded.
-#
-# USAGE
-# $ cd GLES_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.INT,
- "GLintptr":DataType.INT,
- "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_LICENSE = """/*
- * 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.
- */
-"""
-
-HEADER_INCLUDES = """
-#include <cutils/log.h>
-#include <utils/Timers.h>
-#include <GLES2/gl2.h>
-
-#include "gltrace.pb.h"
-#include "gltrace_context.h"
-#include "gltrace_fixup.h"
-#include "gltrace_transport.h"
-"""
-
-HEADER_NAMESPACE_START = """
-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_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
- nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
- nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-<!--(if retType != "void")-->
- $!retType!$ retValue = glContext->hooks->gl.$!callsite!$;
-<!--(else)-->
- glContext->hooks->gl.$!callsite!$;
-<!--(end)-->
- nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
- nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-<!--(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)-->
-
- void *pointerArgs[] = {
-<!--(for argname, argtype in parsedArgs)-->
- <!--(if argtype == DataType.POINTER)-->
- (void *) $!argname!$,
- <!--(end)-->
-<!--(end)-->
-<!--(if retDataType == DataType.POINTER)-->
- (void *) retValue,
-<!--(end)-->
- };
-
- fixupGLMessage(glContext, wallStartTime, wallEndTime,
- threadStartTime, threadEndTime,
- &glmsg, pointerArgs);
- glContext->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_LICENSE)
- lines.append(HEADER_NAMESPACE_START)
- 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_LICENSE)
- lines.append(HEADER_INCLUDES)
- lines.append(HEADER_NAMESPACE_START)
- 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
diff --git a/opengl/libs/GLES_trace/tools/testgenapi.py b/opengl/libs/GLES_trace/tools/testgenapi.py
deleted file mode 100644
index fe14954..0000000
--- a/opengl/libs/GLES_trace/tools/testgenapi.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/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 GLES_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), 121)
- self.assertEqual(len(gl_apis), 145)
- self.assertEqual(len(glext_apis), 140)
-
- 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()
diff --git a/opengl/libs/debug.in b/opengl/libs/debug.in
deleted file mode 100644
index 882b2da..0000000
--- a/opengl/libs/debug.in
+++ /dev/null
@@ -1,235 +0,0 @@
-// the following functions are not defined in GLESv2_dbg
-TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
-TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
-TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
-TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
-TRACE_GL_VOID(glBindVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glBlendEquationOES, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha)
-TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
-TRACE_GL(GLenum, glCheckFramebufferStatusOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearColorxOES, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearDepthfOES, (GLclampf depth), (depth), 1, "GLclampf", depth)
-TRACE_GL_VOID(glClearDepthx, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClearDepthxOES, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClientActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
-TRACE_GL_VOID(glClipPlanef, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat *eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn)
-TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed *eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn)
-TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha)
-TRACE_GL_VOID(glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red, green, blue, alpha), 4, "GLubyte", red, "GLubyte", green, "GLubyte", blue, "GLubyte", alpha)
-TRACE_GL_VOID(glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
-TRACE_GL_VOID(glColor4xOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
-TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_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), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask)
-TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation)
-TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex)
-TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint *fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences)
-TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
-TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
-TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays)
-TRACE_GL_VOID(glDepthRangefOES, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar)
-TRACE_GL_VOID(glDepthRangex, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDepthRangexOES, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDisableClientState, (GLenum array), (array), 1, "GLenum", array)
-TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
-TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
-TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height)
-TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords)
-TRACE_GL_VOID(glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height), (x, y, z, width, height), 5, "GLint", x, "GLint", y, "GLint", z, "GLint", width, "GLint", height)
-TRACE_GL_VOID(glDrawTexivOES, (const GLint *coords), (coords), 1, "const GLint *", coords)
-TRACE_GL_VOID(glDrawTexsOES, (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height), (x, y, z, width, height), 5, "GLshort", x, "GLshort", y, "GLshort", z, "GLshort", width, "GLshort", height)
-TRACE_GL_VOID(glDrawTexsvOES, (const GLshort *coords), (coords), 1, "const GLshort *", coords)
-TRACE_GL_VOID(glDrawTexxOES, (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height), (x, y, z, width, height), 5, "GLfixed", x, "GLfixed", y, "GLfixed", z, "GLfixed", width, "GLfixed", height)
-TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed *coords), (coords), 1, "const GLfixed *", coords)
-TRACE_GL_VOID(glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
-TRACE_GL_VOID(glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
-TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array)
-TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
-TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
-TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask)
-TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params)
-TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers)
-TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers)
-TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar *source, GLint *length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length)
-TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint *programs, GLint maxPrograms, GLint *numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms)
-TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers)
-TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint *shaders, GLint maxShaders, GLint *numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders)
-TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "GLvoid *", texels)
-TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint *textures, GLint maxTextures, GLint *numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures)
-TRACE_GL(GLboolean, glExtIsProgramBinaryQCOM, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glExtTexObjectStateOverrideiQCOM, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glFinishFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glFogf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glFogx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
-TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
-TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
-TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset)
-TRACE_GL_VOID(glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumfOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glFrustumxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences)
-TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
-TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
-TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint *arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays)
-TRACE_GL_VOID(glGenerateMipmapOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetClipPlanef, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanex, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString)
-TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint *num, GLsizei size, GLuint *driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls)
-TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten)
-TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data)
-TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString)
-TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters)
-TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString)
-TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize, GLuint *groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups)
-TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary)
-TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexEnviv, (GLenum env, GLenum pname, GLint *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
-TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer)
-TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightf, (GLenum light, GLenum pname, GLfloat param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glLightx, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxOES, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLineWidthx, (GLfixed width), (width), 1, "GLfixed", width)
-TRACE_GL_VOID(glLineWidthxOES, (GLfixed width), (width), 1, "GLfixed", width)
-TRACE_GL_VOID(glLoadIdentity, (void), (), 0)
-TRACE_GL_VOID(glLoadMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glLoadMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadPaletteFromModelViewMatrixOES, (void), (), 0)
-TRACE_GL_VOID(glLogicOp, (GLenum opcode), (opcode), 1, "GLenum", opcode)
-TRACE_GL(void*, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access)
-TRACE_GL_VOID(glMaterialf, (GLenum face, GLenum pname, GLfloat param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glMaterialx, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxOES, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glMatrixMode, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glMultMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glMultMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint *", first, "GLsizei *", count, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const GLvoid* *", indices, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q), (target, s, t, r, q), 5, "GLenum", target, "GLfloat", s, "GLfloat", t, "GLfloat", r, "GLfloat", q)
-TRACE_GL_VOID(glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz), (nx, ny, nz), 3, "GLfloat", nx, "GLfloat", ny, "GLfloat", nz)
-TRACE_GL_VOID(glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glPointParameterf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glPointParameterx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointSize, (GLfloat size), (size), 1, "GLfloat", size)
-TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glPointSizex, (GLfixed size), (size), 1, "GLfixed", size)
-TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size)
-TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
-TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
-TRACE_GL_VOID(glPopMatrix, (void), (), 0)
-TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length)
-TRACE_GL_VOID(glPushMatrix, (void), (), 0)
-TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent)
-TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glSampleCoveragex, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
-TRACE_GL_VOID(glSampleCoveragexOES, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
-TRACE_GL_VOID(glScalef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glScalex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glScalexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList), (monitor, enable, group, numCounters, countersList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", countersList)
-TRACE_GL_VOID(glSetFenceNV, (GLuint fence, GLenum condition), (fence, condition), 2, "GLuint", fence, "GLenum", condition)
-TRACE_GL_VOID(glShadeModel, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glStartTilingQCOM, (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask), (x, y, width, height, preserveMask), 5, "GLuint", x, "GLuint", y, "GLuint", width, "GLuint", height, "GLbitfield", preserveMask)
-TRACE_GL(GLboolean, glTestFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glTexEnvf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexEnvi, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexEnvx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexGenfOES, (GLenum coord, GLenum pname, GLfloat param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexGeniOES, (GLenum coord, GLenum pname, GLint param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexGenxOES, (GLenum coord, GLenum pname, GLfixed param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_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), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h
deleted file mode 100644
index cb0e908..0000000
--- a/opengl/libs/egl_impl.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- ** Copyright 2007, 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 ANDROID_EGL_IMPL_H
-#define ANDROID_EGL_IMPL_H
-
-#include <ctype.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <EGL/eglplatform.h>
-
-#include "hooks.h"
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-EGLAPI const GLubyte * egl_get_string_for_current_context(GLenum name);
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif /* ANDROID_EGL_IMPL_H */
diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in
deleted file mode 100644
index 6316d78..0000000
--- a/opengl/libs/entries.in
+++ /dev/null
@@ -1,437 +0,0 @@
-GL_ENTRY(void, glActiveShaderProgramEXT, GLuint pipeline, GLuint program)
-GL_ENTRY(void, glActiveTexture, GLenum texture)
-GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref)
-GL_ENTRY(void, glAlphaFuncQCOM, 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, glBeginQueryEXT, GLenum target, GLuint id)
-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, glBindProgramPipelineEXT, GLuint pipeline)
-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, glBlitFramebufferANGLE, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
-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(GLuint, glCreateShaderProgramvEXT, GLenum type, GLsizei count, const GLchar **strings)
-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, glDeleteProgramPipelinesEXT, GLsizei n, const GLuint *pipelines)
-GL_ENTRY(void, glDeleteQueriesEXT, GLsizei n, const GLuint *ids)
-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, glDrawBuffersNV, GLsizei n, const GLenum *bufs)
-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, glEndQueryEXT, GLenum target)
-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, glFramebufferTexture2DMultisampleEXT, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
-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, glGenProgramPipelinesEXT, GLsizei n, GLuint *pipelines)
-GL_ENTRY(void, glGenQueriesEXT, GLsizei n, GLuint *ids)
-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(GLenum, glGetGraphicsResetStatusEXT, void)
-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, glGetObjectLabelEXT, GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label)
-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, glGetProgramPipelineInfoLogEXT, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
-GL_ENTRY(void, glGetProgramPipelineivEXT, GLuint pipeline, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetQueryObjectuivEXT, GLuint id, GLenum pname, GLuint *params)
-GL_ENTRY(void, glGetQueryivEXT, GLenum target, 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, glGetnUniformfvEXT, GLuint program, GLint location, GLsizei bufSize, float *params)
-GL_ENTRY(void, glGetnUniformivEXT, GLuint program, GLint location, GLsizei bufSize, GLint *params)
-GL_ENTRY(void, glHint, GLenum target, GLenum mode)
-GL_ENTRY(void, glInsertEventMarkerEXT, GLsizei length, const GLchar *marker)
-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, glIsProgramPipelineEXT, GLuint pipeline)
-GL_ENTRY(GLboolean, glIsQueryEXT, GLuint id)
-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, glLabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar *label)
-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, glPopGroupMarkerEXT, void)
-GL_ENTRY(void, glPopMatrix, void)
-GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
-GL_ENTRY(void, glProgramParameteriEXT, GLuint program, GLenum pname, GLint value)
-GL_ENTRY(void, glProgramUniform1fEXT, GLuint program, GLint location, GLfloat x)
-GL_ENTRY(void, glProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform1iEXT, GLuint program, GLint location, GLint x)
-GL_ENTRY(void, glProgramUniform1ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniform2fEXT, GLuint program, GLint location, GLfloat x, GLfloat y)
-GL_ENTRY(void, glProgramUniform2fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform2iEXT, GLuint program, GLint location, GLint x, GLint y)
-GL_ENTRY(void, glProgramUniform2ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniform3fEXT, GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glProgramUniform3fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform3iEXT, GLuint program, GLint location, GLint x, GLint y, GLint z)
-GL_ENTRY(void, glProgramUniform3ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniform4fEXT, GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-GL_ENTRY(void, glProgramUniform4fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform4iEXT, GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)
-GL_ENTRY(void, glProgramUniform4ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniformMatrix2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
-GL_ENTRY(void, glProgramUniformMatrix3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
-GL_ENTRY(void, glProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
-GL_ENTRY(void, glPushGroupMarkerEXT, GLsizei length, const GLchar *marker)
-GL_ENTRY(void, glPushMatrix, void)
-GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16])
-GL_ENTRY(void, glReadBufferNV, GLenum mode)
-GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
-GL_ENTRY(void, glReadnPixelsEXT, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)
-GL_ENTRY(void, glReleaseShaderCompiler, void)
-GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glRenderbufferStorageMultisampleANGLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glRenderbufferStorageMultisampleAPPLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glRenderbufferStorageMultisampleEXT, GLenum target, GLsizei samples, 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, glResolveMultisampleFramebufferAPPLE, void)
-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, glTexStorage1DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
-GL_ENTRY(void, glTexStorage2DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glTexStorage3DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
-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, glTextureStorage1DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
-GL_ENTRY(void, glTextureStorage2DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glTextureStorage3DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
-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, glUseProgramStagesEXT, GLuint pipeline, GLbitfield stages, GLuint program)
-GL_ENTRY(void, glValidateProgram, GLuint program)
-GL_ENTRY(void, glValidateProgramPipelineEXT, GLuint pipeline)
-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)
diff --git a/opengl/libs/enums.in b/opengl/libs/enums.in
deleted file mode 100644
index bfbc866..0000000
--- a/opengl/libs/enums.in
+++ /dev/null
@@ -1,702 +0,0 @@
-GL_ENUM(0x0000,GL_POINTS)
-GL_ENUM(0x00000001,GL_VERTEX_SHADER_BIT_EXT)
-GL_ENUM(0x00000002,GL_FRAGMENT_SHADER_BIT_EXT)
-GL_ENUM(0x0001,GL_LINES)
-GL_ENUM(0x0002,GL_LINE_LOOP)
-GL_ENUM(0x0003,GL_LINE_STRIP)
-GL_ENUM(0x0004,GL_TRIANGLES)
-GL_ENUM(0x0005,GL_TRIANGLE_STRIP)
-GL_ENUM(0x0006,GL_TRIANGLE_FAN)
-GL_ENUM(0x0104,GL_ADD)
-GL_ENUM(0x0200,GL_NEVER)
-GL_ENUM(0x0201,GL_LESS)
-GL_ENUM(0x0202,GL_EQUAL)
-GL_ENUM(0x0203,GL_LEQUAL)
-GL_ENUM(0x0204,GL_GREATER)
-GL_ENUM(0x0205,GL_NOTEQUAL)
-GL_ENUM(0x0206,GL_GEQUAL)
-GL_ENUM(0x0207,GL_ALWAYS)
-GL_ENUM(0x0300,GL_SRC_COLOR)
-GL_ENUM(0x0301,GL_ONE_MINUS_SRC_COLOR)
-GL_ENUM(0x0302,GL_SRC_ALPHA)
-GL_ENUM(0x0303,GL_ONE_MINUS_SRC_ALPHA)
-GL_ENUM(0x0304,GL_DST_ALPHA)
-GL_ENUM(0x0305,GL_ONE_MINUS_DST_ALPHA)
-GL_ENUM(0x0306,GL_DST_COLOR)
-GL_ENUM(0x0307,GL_ONE_MINUS_DST_COLOR)
-GL_ENUM(0x0308,GL_SRC_ALPHA_SATURATE)
-GL_ENUM(0x0404,GL_FRONT)
-GL_ENUM(0x0405,GL_BACK)
-GL_ENUM(0x0408,GL_FRONT_AND_BACK)
-GL_ENUM(0x0500,GL_INVALID_ENUM)
-GL_ENUM(0x0501,GL_INVALID_VALUE)
-GL_ENUM(0x0502,GL_INVALID_OPERATION)
-GL_ENUM(0x0503,GL_STACK_OVERFLOW)
-GL_ENUM(0x0504,GL_STACK_UNDERFLOW)
-GL_ENUM(0x0505,GL_OUT_OF_MEMORY)
-GL_ENUM(0x0506,GL_INVALID_FRAMEBUFFER_OPERATION_OES)
-GL_ENUM(0x0800,GL_EXP)
-GL_ENUM(0x0801,GL_EXP2)
-GL_ENUM(0x0900,GL_CW)
-GL_ENUM(0x0901,GL_CCW)
-GL_ENUM(0x0B00,GL_CURRENT_COLOR)
-GL_ENUM(0x0B02,GL_CURRENT_NORMAL)
-GL_ENUM(0x0B03,GL_CURRENT_TEXTURE_COORDS)
-GL_ENUM(0x0B10,GL_POINT_SMOOTH)
-GL_ENUM(0x0B11,GL_POINT_SIZE)
-GL_ENUM(0x0B12,GL_SMOOTH_POINT_SIZE_RANGE)
-GL_ENUM(0x0B20,GL_LINE_SMOOTH)
-GL_ENUM(0x0B21,GL_LINE_WIDTH)
-GL_ENUM(0x0B22,GL_SMOOTH_LINE_WIDTH_RANGE)
-GL_ENUM(0x0B44,GL_CULL_FACE)
-GL_ENUM(0x0B45,GL_CULL_FACE_MODE)
-GL_ENUM(0x0B46,GL_FRONT_FACE)
-GL_ENUM(0x0B50,GL_LIGHTING)
-GL_ENUM(0x0B52,GL_LIGHT_MODEL_TWO_SIDE)
-GL_ENUM(0x0B53,GL_LIGHT_MODEL_AMBIENT)
-GL_ENUM(0x0B54,GL_SHADE_MODEL)
-GL_ENUM(0x0B57,GL_COLOR_MATERIAL)
-GL_ENUM(0x0B60,GL_FOG)
-GL_ENUM(0x0B62,GL_FOG_DENSITY)
-GL_ENUM(0x0B63,GL_FOG_START)
-GL_ENUM(0x0B64,GL_FOG_END)
-GL_ENUM(0x0B65,GL_FOG_MODE)
-GL_ENUM(0x0B66,GL_FOG_COLOR)
-GL_ENUM(0x0B70,GL_DEPTH_RANGE)
-GL_ENUM(0x0B71,GL_DEPTH_TEST)
-GL_ENUM(0x0B72,GL_DEPTH_WRITEMASK)
-GL_ENUM(0x0B73,GL_DEPTH_CLEAR_VALUE)
-GL_ENUM(0x0B74,GL_DEPTH_FUNC)
-GL_ENUM(0x0B90,GL_STENCIL_TEST)
-GL_ENUM(0x0B91,GL_STENCIL_CLEAR_VALUE)
-GL_ENUM(0x0B92,GL_STENCIL_FUNC)
-GL_ENUM(0x0B93,GL_STENCIL_VALUE_MASK)
-GL_ENUM(0x0B94,GL_STENCIL_FAIL)
-GL_ENUM(0x0B95,GL_STENCIL_PASS_DEPTH_FAIL)
-GL_ENUM(0x0B96,GL_STENCIL_PASS_DEPTH_PASS)
-GL_ENUM(0x0B97,GL_STENCIL_REF)
-GL_ENUM(0x0B98,GL_STENCIL_WRITEMASK)
-GL_ENUM(0x0BA0,GL_MATRIX_MODE)
-GL_ENUM(0x0BA1,GL_NORMALIZE)
-GL_ENUM(0x0BA2,GL_VIEWPORT)
-GL_ENUM(0x0BA3,GL_MODELVIEW_STACK_DEPTH)
-GL_ENUM(0x0BA4,GL_PROJECTION_STACK_DEPTH)
-GL_ENUM(0x0BA5,GL_TEXTURE_STACK_DEPTH)
-GL_ENUM(0x0BA6,GL_MODELVIEW_MATRIX)
-GL_ENUM(0x0BA7,GL_PROJECTION_MATRIX)
-GL_ENUM(0x0BA8,GL_TEXTURE_MATRIX)
-GL_ENUM(0x0BC0,GL_ALPHA_TEST)
-GL_ENUM(0x0BC1,GL_ALPHA_TEST_FUNC)
-GL_ENUM(0x0BC2,GL_ALPHA_TEST_REF)
-GL_ENUM(0x0BD0,GL_DITHER)
-GL_ENUM(0x0BE0,GL_BLEND_DST)
-GL_ENUM(0x0BE1,GL_BLEND_SRC)
-GL_ENUM(0x0BE2,GL_BLEND)
-GL_ENUM(0x0BF0,GL_LOGIC_OP_MODE)
-GL_ENUM(0x0BF2,GL_COLOR_LOGIC_OP)
-GL_ENUM(0x0C02,GL_READ_BUFFER_NV)
-GL_ENUM(0x0C10,GL_SCISSOR_BOX)
-GL_ENUM(0x0C11,GL_SCISSOR_TEST)
-GL_ENUM(0x0C22,GL_COLOR_CLEAR_VALUE)
-GL_ENUM(0x0C23,GL_COLOR_WRITEMASK)
-GL_ENUM(0x0C50,GL_PERSPECTIVE_CORRECTION_HINT)
-GL_ENUM(0x0C51,GL_POINT_SMOOTH_HINT)
-GL_ENUM(0x0C52,GL_LINE_SMOOTH_HINT)
-GL_ENUM(0x0C54,GL_FOG_HINT)
-GL_ENUM(0x0CF2,GL_UNPACK_ROW_LENGTH)
-GL_ENUM(0x0CF3,GL_UNPACK_SKIP_ROWS)
-GL_ENUM(0x0CF4,GL_UNPACK_SKIP_PIXELS)
-GL_ENUM(0x0CF5,GL_UNPACK_ALIGNMENT)
-GL_ENUM(0x0D05,GL_PACK_ALIGNMENT)
-GL_ENUM(0x0D1C,GL_ALPHA_SCALE)
-GL_ENUM(0x0D31,GL_MAX_LIGHTS)
-GL_ENUM(0x0D32,GL_MAX_CLIP_PLANES)
-GL_ENUM(0x0D33,GL_MAX_TEXTURE_SIZE)
-GL_ENUM(0x0D36,GL_MAX_MODELVIEW_STACK_DEPTH)
-GL_ENUM(0x0D38,GL_MAX_PROJECTION_STACK_DEPTH)
-GL_ENUM(0x0D39,GL_MAX_TEXTURE_STACK_DEPTH)
-GL_ENUM(0x0D3A,GL_MAX_VIEWPORT_DIMS)
-GL_ENUM(0x0D50,GL_SUBPIXEL_BITS)
-GL_ENUM(0x0D52,GL_RED_BITS)
-GL_ENUM(0x0D53,GL_GREEN_BITS)
-GL_ENUM(0x0D54,GL_BLUE_BITS)
-GL_ENUM(0x0D55,GL_ALPHA_BITS)
-GL_ENUM(0x0D56,GL_DEPTH_BITS)
-GL_ENUM(0x0D57,GL_STENCIL_BITS)
-GL_ENUM(0x0DE1,GL_TEXTURE_2D)
-GL_ENUM(0x1100,GL_DONT_CARE)
-GL_ENUM(0x1101,GL_FASTEST)
-GL_ENUM(0x1102,GL_NICEST)
-GL_ENUM(0x1200,GL_AMBIENT)
-GL_ENUM(0x1201,GL_DIFFUSE)
-GL_ENUM(0x1202,GL_SPECULAR)
-GL_ENUM(0x1203,GL_POSITION)
-GL_ENUM(0x1204,GL_SPOT_DIRECTION)
-GL_ENUM(0x1205,GL_SPOT_EXPONENT)
-GL_ENUM(0x1206,GL_SPOT_CUTOFF)
-GL_ENUM(0x1207,GL_CONSTANT_ATTENUATION)
-GL_ENUM(0x1208,GL_LINEAR_ATTENUATION)
-GL_ENUM(0x1209,GL_QUADRATIC_ATTENUATION)
-GL_ENUM(0x1400,GL_BYTE)
-GL_ENUM(0x1401,GL_UNSIGNED_BYTE)
-GL_ENUM(0x1402,GL_SHORT)
-GL_ENUM(0x1403,GL_UNSIGNED_SHORT)
-GL_ENUM(0x1404,GL_INT)
-GL_ENUM(0x1405,GL_UNSIGNED_INT)
-GL_ENUM(0x1406,GL_FLOAT)
-GL_ENUM(0x140C,GL_FIXED)
-GL_ENUM(0x1500,GL_CLEAR)
-GL_ENUM(0x1501,GL_AND)
-GL_ENUM(0x1502,GL_AND_REVERSE)
-GL_ENUM(0x1503,GL_COPY)
-GL_ENUM(0x1504,GL_AND_INVERTED)
-GL_ENUM(0x1505,GL_NOOP)
-GL_ENUM(0x1506,GL_XOR)
-GL_ENUM(0x1507,GL_OR)
-GL_ENUM(0x1508,GL_NOR)
-GL_ENUM(0x1509,GL_EQUIV)
-GL_ENUM(0x150A,GL_INVERT)
-GL_ENUM(0x150B,GL_OR_REVERSE)
-GL_ENUM(0x150C,GL_COPY_INVERTED)
-GL_ENUM(0x150D,GL_OR_INVERTED)
-GL_ENUM(0x150E,GL_NAND)
-GL_ENUM(0x150F,GL_SET)
-GL_ENUM(0x1600,GL_EMISSION)
-GL_ENUM(0x1601,GL_SHININESS)
-GL_ENUM(0x1602,GL_AMBIENT_AND_DIFFUSE)
-GL_ENUM(0x1700,GL_MODELVIEW)
-GL_ENUM(0x1701,GL_PROJECTION)
-GL_ENUM(0x1702,GL_TEXTURE)
-GL_ENUM(0x1800,GL_COLOR_EXT)
-GL_ENUM(0x1801,GL_DEPTH_EXT)
-GL_ENUM(0x1802,GL_STENCIL_EXT)
-GL_ENUM(0x1901,GL_STENCIL_INDEX)
-GL_ENUM(0x1902,GL_DEPTH_COMPONENT)
-GL_ENUM(0x1903,GL_RED_EXT)
-GL_ENUM(0x1906,GL_ALPHA)
-GL_ENUM(0x1907,GL_RGB)
-GL_ENUM(0x1908,GL_RGBA)
-GL_ENUM(0x1909,GL_LUMINANCE)
-GL_ENUM(0x190A,GL_LUMINANCE_ALPHA)
-GL_ENUM(0x1D00,GL_FLAT)
-GL_ENUM(0x1D01,GL_SMOOTH)
-GL_ENUM(0x1E00,GL_KEEP)
-GL_ENUM(0x1E01,GL_REPLACE)
-GL_ENUM(0x1E02,GL_INCR)
-GL_ENUM(0x1E03,GL_DECR)
-GL_ENUM(0x1F00,GL_VENDOR)
-GL_ENUM(0x1F01,GL_RENDERER)
-GL_ENUM(0x1F02,GL_VERSION)
-GL_ENUM(0x1F03,GL_EXTENSIONS)
-GL_ENUM(0x2100,GL_MODULATE)
-GL_ENUM(0x2101,GL_DECAL)
-GL_ENUM(0x2200,GL_TEXTURE_ENV_MODE)
-GL_ENUM(0x2201,GL_TEXTURE_ENV_COLOR)
-GL_ENUM(0x2300,GL_TEXTURE_ENV)
-GL_ENUM(0x2500,GL_TEXTURE_GEN_MODE_OES)
-GL_ENUM(0x2600,GL_NEAREST)
-GL_ENUM(0x2601,GL_LINEAR)
-GL_ENUM(0x2700,GL_NEAREST_MIPMAP_NEAREST)
-GL_ENUM(0x2701,GL_LINEAR_MIPMAP_NEAREST)
-GL_ENUM(0x2702,GL_NEAREST_MIPMAP_LINEAR)
-GL_ENUM(0x2703,GL_LINEAR_MIPMAP_LINEAR)
-GL_ENUM(0x2800,GL_TEXTURE_MAG_FILTER)
-GL_ENUM(0x2801,GL_TEXTURE_MIN_FILTER)
-GL_ENUM(0x2802,GL_TEXTURE_WRAP_S)
-GL_ENUM(0x2803,GL_TEXTURE_WRAP_T)
-GL_ENUM(0x2901,GL_REPEAT)
-GL_ENUM(0x2A00,GL_POLYGON_OFFSET_UNITS)
-GL_ENUM(0x3000,GL_CLIP_PLANE0)
-GL_ENUM(0x3001,GL_CLIP_PLANE1)
-GL_ENUM(0x3002,GL_CLIP_PLANE2)
-GL_ENUM(0x3003,GL_CLIP_PLANE3)
-GL_ENUM(0x3004,GL_CLIP_PLANE4)
-GL_ENUM(0x3005,GL_CLIP_PLANE5)
-GL_ENUM(0x4000,GL_LIGHT0)
-GL_ENUM(0x4001,GL_LIGHT1)
-GL_ENUM(0x4002,GL_LIGHT2)
-GL_ENUM(0x4003,GL_LIGHT3)
-GL_ENUM(0x4004,GL_LIGHT4)
-GL_ENUM(0x4005,GL_LIGHT5)
-GL_ENUM(0x4006,GL_LIGHT6)
-GL_ENUM(0x4007,GL_LIGHT7)
-GL_ENUM(0x8000,GL_COVERAGE_BUFFER_BIT_NV)
-GL_ENUM(0x8001,GL_CONSTANT_COLOR)
-GL_ENUM(0x8002,GL_ONE_MINUS_CONSTANT_COLOR)
-GL_ENUM(0x8003,GL_CONSTANT_ALPHA)
-GL_ENUM(0x8004,GL_ONE_MINUS_CONSTANT_ALPHA)
-GL_ENUM(0x8005,GL_BLEND_COLOR)
-GL_ENUM(0x8006,GL_FUNC_ADD_OES)
-GL_ENUM(0x8007,GL_MIN_EXT)
-GL_ENUM(0x8008,GL_MAX_EXT)
-GL_ENUM(0x8009,GL_BLEND_EQUATION_RGB_OES)
-GL_ENUM(0x800A,GL_FUNC_SUBTRACT_OES)
-GL_ENUM(0x800B,GL_FUNC_REVERSE_SUBTRACT_OES)
-GL_ENUM(0x8033,GL_UNSIGNED_SHORT_4_4_4_4)
-GL_ENUM(0x8034,GL_UNSIGNED_SHORT_5_5_5_1)
-GL_ENUM(0x8037,GL_POLYGON_OFFSET_FILL)
-GL_ENUM(0x8038,GL_POLYGON_OFFSET_FACTOR)
-GL_ENUM(0x803A,GL_RESCALE_NORMAL)
-GL_ENUM(0x803C,GL_ALPHA8_EXT)
-GL_ENUM(0x8040,GL_LUMINANCE8_EXT)
-GL_ENUM(0x8045,GL_LUMINANCE8_ALPHA8_EXT)
-GL_ENUM(0x8051,GL_RGB8_OES)
-GL_ENUM(0x8052,GL_RGB10_EXT)
-GL_ENUM(0x8056,GL_RGBA4_OES)
-GL_ENUM(0x8057,GL_RGB5_A1_OES)
-GL_ENUM(0x8058,GL_RGBA8_OES)
-GL_ENUM(0x8059,GL_RGB10_A2_EXT)
-GL_ENUM(0x8069,GL_TEXTURE_BINDING_2D)
-GL_ENUM(0x806A,GL_TEXTURE_BINDING_3D_OES)
-GL_ENUM(0x806F,GL_TEXTURE_3D_OES)
-GL_ENUM(0x8072,GL_TEXTURE_WRAP_R_OES)
-GL_ENUM(0x8073,GL_MAX_3D_TEXTURE_SIZE_OES)
-GL_ENUM(0x8074,GL_VERTEX_ARRAY)
-GL_ENUM(0x8075,GL_NORMAL_ARRAY)
-GL_ENUM(0x8076,GL_COLOR_ARRAY)
-GL_ENUM(0x8078,GL_TEXTURE_COORD_ARRAY)
-GL_ENUM(0x807A,GL_VERTEX_ARRAY_SIZE)
-GL_ENUM(0x807B,GL_VERTEX_ARRAY_TYPE)
-GL_ENUM(0x807C,GL_VERTEX_ARRAY_STRIDE)
-GL_ENUM(0x807E,GL_NORMAL_ARRAY_TYPE)
-GL_ENUM(0x807F,GL_NORMAL_ARRAY_STRIDE)
-GL_ENUM(0x8081,GL_COLOR_ARRAY_SIZE)
-GL_ENUM(0x8082,GL_COLOR_ARRAY_TYPE)
-GL_ENUM(0x8083,GL_COLOR_ARRAY_STRIDE)
-GL_ENUM(0x8088,GL_TEXTURE_COORD_ARRAY_SIZE)
-GL_ENUM(0x8089,GL_TEXTURE_COORD_ARRAY_TYPE)
-GL_ENUM(0x808A,GL_TEXTURE_COORD_ARRAY_STRIDE)
-GL_ENUM(0x808E,GL_VERTEX_ARRAY_POINTER)
-GL_ENUM(0x808F,GL_NORMAL_ARRAY_POINTER)
-GL_ENUM(0x8090,GL_COLOR_ARRAY_POINTER)
-GL_ENUM(0x8092,GL_TEXTURE_COORD_ARRAY_POINTER)
-GL_ENUM(0x809D,GL_MULTISAMPLE)
-GL_ENUM(0x809E,GL_SAMPLE_ALPHA_TO_COVERAGE)
-GL_ENUM(0x809F,GL_SAMPLE_ALPHA_TO_ONE)
-GL_ENUM(0x80A0,GL_SAMPLE_COVERAGE)
-GL_ENUM(0x80A8,GL_SAMPLE_BUFFERS)
-GL_ENUM(0x80A9,GL_SAMPLES)
-GL_ENUM(0x80AA,GL_SAMPLE_COVERAGE_VALUE)
-GL_ENUM(0x80AB,GL_SAMPLE_COVERAGE_INVERT)
-GL_ENUM(0x80C8,GL_BLEND_DST_RGB_OES)
-GL_ENUM(0x80C9,GL_BLEND_SRC_RGB_OES)
-GL_ENUM(0x80CA,GL_BLEND_DST_ALPHA_OES)
-GL_ENUM(0x80CB,GL_BLEND_SRC_ALPHA_OES)
-GL_ENUM(0x80E1,GL_BGRA_EXT)
-GL_ENUM(0x8126,GL_POINT_SIZE_MIN)
-GL_ENUM(0x8127,GL_POINT_SIZE_MAX)
-GL_ENUM(0x8128,GL_POINT_FADE_THRESHOLD_SIZE)
-GL_ENUM(0x8129,GL_POINT_DISTANCE_ATTENUATION)
-GL_ENUM(0x812F,GL_CLAMP_TO_EDGE)
-GL_ENUM(0x813D,GL_TEXTURE_MAX_LEVEL_APPLE)
-GL_ENUM(0x8191,GL_GENERATE_MIPMAP)
-GL_ENUM(0x8192,GL_GENERATE_MIPMAP_HINT)
-GL_ENUM(0x81A5,GL_DEPTH_COMPONENT16_OES)
-GL_ENUM(0x81A6,GL_DEPTH_COMPONENT24_OES)
-GL_ENUM(0x81A7,GL_DEPTH_COMPONENT32_OES)
-GL_ENUM(0x8210,GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)
-GL_ENUM(0x8211,GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT)
-GL_ENUM(0x8227,GL_RG_EXT)
-GL_ENUM(0x8229,GL_R8_EXT)
-GL_ENUM(0x822B,GL_RG8_EXT)
-GL_ENUM(0x822D,GL_R16F_EXT)
-GL_ENUM(0x822F,GL_RG16F_EXT)
-GL_ENUM(0x8252,GL_LOSE_CONTEXT_ON_RESET_EXT)
-GL_ENUM(0x8253,GL_GUILTY_CONTEXT_RESET_EXT)
-GL_ENUM(0x8254,GL_INNOCENT_CONTEXT_RESET_EXT)
-GL_ENUM(0x8255,GL_UNKNOWN_CONTEXT_RESET_EXT)
-GL_ENUM(0x8256,GL_RESET_NOTIFICATION_STRATEGY_EXT)
-GL_ENUM(0x8258,GL_PROGRAM_SEPARABLE_EXT)
-GL_ENUM(0x8259,GL_ACTIVE_PROGRAM_EXT)
-GL_ENUM(0x825A,GL_PROGRAM_PIPELINE_BINDING_EXT)
-GL_ENUM(0x8261,GL_NO_RESET_NOTIFICATION_EXT)
-GL_ENUM(0x8363,GL_UNSIGNED_SHORT_5_6_5)
-GL_ENUM(0x8365,GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT)
-GL_ENUM(0x8366,GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT)
-GL_ENUM(0x8368,GL_UNSIGNED_INT_2_10_10_10_REV_EXT)
-GL_ENUM(0x8370,GL_MIRRORED_REPEAT_OES)
-GL_ENUM(0x83F0,GL_COMPRESSED_RGB_S3TC_DXT1_EXT)
-GL_ENUM(0x83F1,GL_COMPRESSED_RGBA_S3TC_DXT1_EXT)
-GL_ENUM(0x846D,GL_ALIASED_POINT_SIZE_RANGE)
-GL_ENUM(0x846E,GL_ALIASED_LINE_WIDTH_RANGE)
-GL_ENUM(0x84C0,GL_TEXTURE0)
-GL_ENUM(0x84C1,GL_TEXTURE1)
-GL_ENUM(0x84C2,GL_TEXTURE2)
-GL_ENUM(0x84C3,GL_TEXTURE3)
-GL_ENUM(0x84C4,GL_TEXTURE4)
-GL_ENUM(0x84C5,GL_TEXTURE5)
-GL_ENUM(0x84C6,GL_TEXTURE6)
-GL_ENUM(0x84C7,GL_TEXTURE7)
-GL_ENUM(0x84C8,GL_TEXTURE8)
-GL_ENUM(0x84C9,GL_TEXTURE9)
-GL_ENUM(0x84CA,GL_TEXTURE10)
-GL_ENUM(0x84CB,GL_TEXTURE11)
-GL_ENUM(0x84CC,GL_TEXTURE12)
-GL_ENUM(0x84CD,GL_TEXTURE13)
-GL_ENUM(0x84CE,GL_TEXTURE14)
-GL_ENUM(0x84CF,GL_TEXTURE15)
-GL_ENUM(0x84D0,GL_TEXTURE16)
-GL_ENUM(0x84D1,GL_TEXTURE17)
-GL_ENUM(0x84D2,GL_TEXTURE18)
-GL_ENUM(0x84D3,GL_TEXTURE19)
-GL_ENUM(0x84D4,GL_TEXTURE20)
-GL_ENUM(0x84D5,GL_TEXTURE21)
-GL_ENUM(0x84D6,GL_TEXTURE22)
-GL_ENUM(0x84D7,GL_TEXTURE23)
-GL_ENUM(0x84D8,GL_TEXTURE24)
-GL_ENUM(0x84D9,GL_TEXTURE25)
-GL_ENUM(0x84DA,GL_TEXTURE26)
-GL_ENUM(0x84DB,GL_TEXTURE27)
-GL_ENUM(0x84DC,GL_TEXTURE28)
-GL_ENUM(0x84DD,GL_TEXTURE29)
-GL_ENUM(0x84DE,GL_TEXTURE30)
-GL_ENUM(0x84DF,GL_TEXTURE31)
-GL_ENUM(0x84E0,GL_ACTIVE_TEXTURE)
-GL_ENUM(0x84E1,GL_CLIENT_ACTIVE_TEXTURE)
-GL_ENUM(0x84E2,GL_MAX_TEXTURE_UNITS)
-GL_ENUM(0x84E7,GL_SUBTRACT)
-GL_ENUM(0x84E8,GL_MAX_RENDERBUFFER_SIZE_OES)
-GL_ENUM(0x84F2,GL_ALL_COMPLETED_NV)
-GL_ENUM(0x84F3,GL_FENCE_STATUS_NV)
-GL_ENUM(0x84F4,GL_FENCE_CONDITION_NV)
-GL_ENUM(0x84F9,GL_DEPTH_STENCIL_OES)
-GL_ENUM(0x84FA,GL_UNSIGNED_INT_24_8_OES)
-GL_ENUM(0x84FD,GL_MAX_TEXTURE_LOD_BIAS_EXT)
-GL_ENUM(0x84FE,GL_TEXTURE_MAX_ANISOTROPY_EXT)
-GL_ENUM(0x84FF,GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
-GL_ENUM(0x8500,GL_TEXTURE_FILTER_CONTROL_EXT)
-GL_ENUM(0x8501,GL_TEXTURE_LOD_BIAS_EXT)
-GL_ENUM(0x8507,GL_INCR_WRAP_OES)
-GL_ENUM(0x8508,GL_DECR_WRAP_OES)
-GL_ENUM(0x8511,GL_NORMAL_MAP_OES)
-GL_ENUM(0x8512,GL_REFLECTION_MAP_OES)
-GL_ENUM(0x8513,GL_TEXTURE_CUBE_MAP_OES)
-GL_ENUM(0x8514,GL_TEXTURE_BINDING_CUBE_MAP_OES)
-GL_ENUM(0x8515,GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES)
-GL_ENUM(0x8516,GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES)
-GL_ENUM(0x8517,GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES)
-GL_ENUM(0x8518,GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES)
-GL_ENUM(0x8519,GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES)
-GL_ENUM(0x851A,GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES)
-GL_ENUM(0x851C,GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES)
-GL_ENUM(0x8570,GL_COMBINE)
-GL_ENUM(0x8571,GL_COMBINE_RGB)
-GL_ENUM(0x8572,GL_COMBINE_ALPHA)
-GL_ENUM(0x8573,GL_RGB_SCALE)
-GL_ENUM(0x8574,GL_ADD_SIGNED)
-GL_ENUM(0x8575,GL_INTERPOLATE)
-GL_ENUM(0x8576,GL_CONSTANT)
-GL_ENUM(0x8577,GL_PRIMARY_COLOR)
-GL_ENUM(0x8578,GL_PREVIOUS)
-GL_ENUM(0x8580,GL_SRC0_RGB)
-GL_ENUM(0x8581,GL_SRC1_RGB)
-GL_ENUM(0x8582,GL_SRC2_RGB)
-GL_ENUM(0x8588,GL_SRC0_ALPHA)
-GL_ENUM(0x8589,GL_SRC1_ALPHA)
-GL_ENUM(0x858A,GL_SRC2_ALPHA)
-GL_ENUM(0x8590,GL_OPERAND0_RGB)
-GL_ENUM(0x8591,GL_OPERAND1_RGB)
-GL_ENUM(0x8592,GL_OPERAND2_RGB)
-GL_ENUM(0x8598,GL_OPERAND0_ALPHA)
-GL_ENUM(0x8599,GL_OPERAND1_ALPHA)
-GL_ENUM(0x859A,GL_OPERAND2_ALPHA)
-GL_ENUM(0x85B5,GL_VERTEX_ARRAY_BINDING_OES)
-GL_ENUM(0x85BA,GL_UNSIGNED_SHORT_8_8_APPLE)
-GL_ENUM(0x85BB,GL_UNSIGNED_SHORT_8_8_REV_APPLE)
-GL_ENUM(0x8622,GL_VERTEX_ATTRIB_ARRAY_ENABLED)
-GL_ENUM(0x8623,GL_VERTEX_ATTRIB_ARRAY_SIZE)
-GL_ENUM(0x8624,GL_VERTEX_ATTRIB_ARRAY_STRIDE)
-GL_ENUM(0x8625,GL_VERTEX_ATTRIB_ARRAY_TYPE)
-GL_ENUM(0x8626,GL_CURRENT_VERTEX_ATTRIB)
-GL_ENUM(0x8645,GL_VERTEX_ATTRIB_ARRAY_POINTER)
-GL_ENUM(0x86A2,GL_NUM_COMPRESSED_TEXTURE_FORMATS)
-GL_ENUM(0x86A3,GL_COMPRESSED_TEXTURE_FORMATS)
-GL_ENUM(0x86A4,GL_MAX_VERTEX_UNITS_OES)
-GL_ENUM(0x86A9,GL_WEIGHT_ARRAY_TYPE_OES)
-GL_ENUM(0x86AA,GL_WEIGHT_ARRAY_STRIDE_OES)
-GL_ENUM(0x86AB,GL_WEIGHT_ARRAY_SIZE_OES)
-GL_ENUM(0x86AC,GL_WEIGHT_ARRAY_POINTER_OES)
-GL_ENUM(0x86AD,GL_WEIGHT_ARRAY_OES)
-GL_ENUM(0x86AE,GL_DOT3_RGB)
-GL_ENUM(0x86AF,GL_DOT3_RGBA)
-GL_ENUM(0x8740,GL_Z400_BINARY_AMD)
-GL_ENUM(0x8741,GL_PROGRAM_BINARY_LENGTH_OES)
-GL_ENUM(0x8764,GL_BUFFER_SIZE)
-GL_ENUM(0x8765,GL_BUFFER_USAGE)
-GL_ENUM(0x87EE,GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD)
-GL_ENUM(0x87F9,GL_3DC_X_AMD)
-GL_ENUM(0x87FA,GL_3DC_XY_AMD)
-GL_ENUM(0x87FE,GL_NUM_PROGRAM_BINARY_FORMATS_OES)
-GL_ENUM(0x87FF,GL_PROGRAM_BINARY_FORMATS_OES)
-GL_ENUM(0x8800,GL_STENCIL_BACK_FUNC)
-GL_ENUM(0x8801,GL_STENCIL_BACK_FAIL)
-GL_ENUM(0x8802,GL_STENCIL_BACK_PASS_DEPTH_FAIL)
-GL_ENUM(0x8803,GL_STENCIL_BACK_PASS_DEPTH_PASS)
-GL_ENUM(0x8814,GL_RGBA32F_EXT)
-GL_ENUM(0x8815,GL_RGB32F_EXT)
-GL_ENUM(0x8816,GL_ALPHA32F_EXT)
-GL_ENUM(0x8818,GL_LUMINANCE32F_EXT)
-GL_ENUM(0x8819,GL_LUMINANCE_ALPHA32F_EXT)
-GL_ENUM(0x881A,GL_RGBA16F_EXT)
-GL_ENUM(0x881B,GL_RGB16F_EXT)
-GL_ENUM(0x881C,GL_ALPHA16F_EXT)
-GL_ENUM(0x881E,GL_LUMINANCE16F_EXT)
-GL_ENUM(0x881F,GL_LUMINANCE_ALPHA16F_EXT)
-GL_ENUM(0x8823,GL_WRITEONLY_RENDERING_QCOM)
-GL_ENUM(0x8824,GL_MAX_DRAW_BUFFERS_NV)
-GL_ENUM(0x8825,GL_DRAW_BUFFER0_NV)
-GL_ENUM(0x8826,GL_DRAW_BUFFER1_NV)
-GL_ENUM(0x8827,GL_DRAW_BUFFER2_NV)
-GL_ENUM(0x8828,GL_DRAW_BUFFER3_NV)
-GL_ENUM(0x8829,GL_DRAW_BUFFER4_NV)
-GL_ENUM(0x882A,GL_DRAW_BUFFER5_NV)
-GL_ENUM(0x882B,GL_DRAW_BUFFER6_NV)
-GL_ENUM(0x882C,GL_DRAW_BUFFER7_NV)
-GL_ENUM(0x882D,GL_DRAW_BUFFER8_NV)
-GL_ENUM(0x882E,GL_DRAW_BUFFER9_NV)
-GL_ENUM(0x882F,GL_DRAW_BUFFER10_NV)
-GL_ENUM(0x8830,GL_DRAW_BUFFER11_NV)
-GL_ENUM(0x8831,GL_DRAW_BUFFER12_NV)
-GL_ENUM(0x8832,GL_DRAW_BUFFER13_NV)
-GL_ENUM(0x8833,GL_DRAW_BUFFER14_NV)
-GL_ENUM(0x8834,GL_DRAW_BUFFER15_NV)
-GL_ENUM(0x883D,GL_BLEND_EQUATION_ALPHA_OES)
-GL_ENUM(0x8840,GL_MATRIX_PALETTE_OES)
-GL_ENUM(0x8842,GL_MAX_PALETTE_MATRICES_OES)
-GL_ENUM(0x8843,GL_CURRENT_PALETTE_MATRIX_OES)
-GL_ENUM(0x8844,GL_MATRIX_INDEX_ARRAY_OES)
-GL_ENUM(0x8846,GL_MATRIX_INDEX_ARRAY_SIZE_OES)
-GL_ENUM(0x8847,GL_MATRIX_INDEX_ARRAY_TYPE_OES)
-GL_ENUM(0x8848,GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
-GL_ENUM(0x8849,GL_MATRIX_INDEX_ARRAY_POINTER_OES)
-GL_ENUM(0x884C,GL_TEXTURE_COMPARE_MODE_EXT)
-GL_ENUM(0x884D,GL_TEXTURE_COMPARE_FUNC_EXT)
-GL_ENUM(0x884E,GL_COMPARE_REF_TO_TEXTURE_EXT)
-GL_ENUM(0x8861,GL_POINT_SPRITE_OES)
-GL_ENUM(0x8862,GL_COORD_REPLACE_OES)
-GL_ENUM(0x8865,GL_CURRENT_QUERY_EXT)
-GL_ENUM(0x8866,GL_QUERY_RESULT_EXT)
-GL_ENUM(0x8867,GL_QUERY_RESULT_AVAILABLE_EXT)
-GL_ENUM(0x8869,GL_MAX_VERTEX_ATTRIBS)
-GL_ENUM(0x886A,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED)
-GL_ENUM(0x8872,GL_MAX_TEXTURE_IMAGE_UNITS)
-GL_ENUM(0x8892,GL_ARRAY_BUFFER)
-GL_ENUM(0x8893,GL_ELEMENT_ARRAY_BUFFER)
-GL_ENUM(0x8894,GL_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8895,GL_ELEMENT_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8896,GL_VERTEX_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8897,GL_NORMAL_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8898,GL_COLOR_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x889A,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x889E,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
-GL_ENUM(0x889F,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x88B9,GL_WRITE_ONLY_OES)
-GL_ENUM(0x88BB,GL_BUFFER_ACCESS_OES)
-GL_ENUM(0x88BC,GL_BUFFER_MAPPED_OES)
-GL_ENUM(0x88BD,GL_BUFFER_MAP_POINTER_OES)
-GL_ENUM(0x88E0,GL_STREAM_DRAW)
-GL_ENUM(0x88E4,GL_STATIC_DRAW)
-GL_ENUM(0x88E8,GL_DYNAMIC_DRAW)
-GL_ENUM(0x88F0,GL_DEPTH24_STENCIL8_OES)
-GL_ENUM(0x898A,GL_POINT_SIZE_ARRAY_TYPE_OES)
-GL_ENUM(0x898B,GL_POINT_SIZE_ARRAY_STRIDE_OES)
-GL_ENUM(0x898C,GL_POINT_SIZE_ARRAY_POINTER_OES)
-GL_ENUM(0x898D,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
-GL_ENUM(0x898E,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
-GL_ENUM(0x898F,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
-GL_ENUM(0x8A1F,GL_RGB_422_APPLE)
-GL_ENUM(0x8A4F,GL_PROGRAM_PIPELINE_OBJECT_EXT)
-GL_ENUM(0x8B30,GL_FRAGMENT_SHADER)
-GL_ENUM(0x8B31,GL_VERTEX_SHADER)
-GL_ENUM(0x8B40,GL_PROGRAM_OBJECT_EXT)
-GL_ENUM(0x8B48,GL_SHADER_OBJECT_EXT)
-GL_ENUM(0x8B4C,GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS)
-GL_ENUM(0x8B4D,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
-GL_ENUM(0x8B4F,GL_SHADER_TYPE)
-GL_ENUM(0x8B50,GL_FLOAT_VEC2)
-GL_ENUM(0x8B51,GL_FLOAT_VEC3)
-GL_ENUM(0x8B52,GL_FLOAT_VEC4)
-GL_ENUM(0x8B53,GL_INT_VEC2)
-GL_ENUM(0x8B54,GL_INT_VEC3)
-GL_ENUM(0x8B55,GL_INT_VEC4)
-GL_ENUM(0x8B56,GL_BOOL)
-GL_ENUM(0x8B57,GL_BOOL_VEC2)
-GL_ENUM(0x8B58,GL_BOOL_VEC3)
-GL_ENUM(0x8B59,GL_BOOL_VEC4)
-GL_ENUM(0x8B5A,GL_FLOAT_MAT2)
-GL_ENUM(0x8B5B,GL_FLOAT_MAT3)
-GL_ENUM(0x8B5C,GL_FLOAT_MAT4)
-GL_ENUM(0x8B5E,GL_SAMPLER_2D)
-GL_ENUM(0x8B5F,GL_SAMPLER_3D_OES)
-GL_ENUM(0x8B60,GL_SAMPLER_CUBE)
-GL_ENUM(0x8B62,GL_SAMPLER_2D_SHADOW_EXT)
-GL_ENUM(0x8B80,GL_DELETE_STATUS)
-GL_ENUM(0x8B81,GL_COMPILE_STATUS)
-GL_ENUM(0x8B82,GL_LINK_STATUS)
-GL_ENUM(0x8B83,GL_VALIDATE_STATUS)
-GL_ENUM(0x8B84,GL_INFO_LOG_LENGTH)
-GL_ENUM(0x8B85,GL_ATTACHED_SHADERS)
-GL_ENUM(0x8B86,GL_ACTIVE_UNIFORMS)
-GL_ENUM(0x8B87,GL_ACTIVE_UNIFORM_MAX_LENGTH)
-GL_ENUM(0x8B88,GL_SHADER_SOURCE_LENGTH)
-GL_ENUM(0x8B89,GL_ACTIVE_ATTRIBUTES)
-GL_ENUM(0x8B8A,GL_ACTIVE_ATTRIBUTE_MAX_LENGTH)
-GL_ENUM(0x8B8B,GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES)
-GL_ENUM(0x8B8C,GL_SHADING_LANGUAGE_VERSION)
-GL_ENUM(0x8B8D,GL_CURRENT_PROGRAM)
-GL_ENUM(0x8B90,GL_PALETTE4_RGB8_OES)
-GL_ENUM(0x8B91,GL_PALETTE4_RGBA8_OES)
-GL_ENUM(0x8B92,GL_PALETTE4_R5_G6_B5_OES)
-GL_ENUM(0x8B93,GL_PALETTE4_RGBA4_OES)
-GL_ENUM(0x8B94,GL_PALETTE4_RGB5_A1_OES)
-GL_ENUM(0x8B95,GL_PALETTE8_RGB8_OES)
-GL_ENUM(0x8B96,GL_PALETTE8_RGBA8_OES)
-GL_ENUM(0x8B97,GL_PALETTE8_R5_G6_B5_OES)
-GL_ENUM(0x8B98,GL_PALETTE8_RGBA4_OES)
-GL_ENUM(0x8B99,GL_PALETTE8_RGB5_A1_OES)
-GL_ENUM(0x8B9A,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
-GL_ENUM(0x8B9B,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
-GL_ENUM(0x8B9C,GL_POINT_SIZE_ARRAY_OES)
-GL_ENUM(0x8B9D,GL_TEXTURE_CROP_RECT_OES)
-GL_ENUM(0x8B9E,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
-GL_ENUM(0x8B9F,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
-GL_ENUM(0x8BC0,GL_COUNTER_TYPE_AMD)
-GL_ENUM(0x8BC1,GL_COUNTER_RANGE_AMD)
-GL_ENUM(0x8BC2,GL_UNSIGNED_INT64_AMD)
-GL_ENUM(0x8BC3,GL_PERCENTAGE_AMD)
-GL_ENUM(0x8BC4,GL_PERFMON_RESULT_AVAILABLE_AMD)
-GL_ENUM(0x8BC5,GL_PERFMON_RESULT_SIZE_AMD)
-GL_ENUM(0x8BC6,GL_PERFMON_RESULT_AMD)
-GL_ENUM(0x8BD2,GL_TEXTURE_WIDTH_QCOM)
-GL_ENUM(0x8BD3,GL_TEXTURE_HEIGHT_QCOM)
-GL_ENUM(0x8BD4,GL_TEXTURE_DEPTH_QCOM)
-GL_ENUM(0x8BD5,GL_TEXTURE_INTERNAL_FORMAT_QCOM)
-GL_ENUM(0x8BD6,GL_TEXTURE_FORMAT_QCOM)
-GL_ENUM(0x8BD7,GL_TEXTURE_TYPE_QCOM)
-GL_ENUM(0x8BD8,GL_TEXTURE_IMAGE_VALID_QCOM)
-GL_ENUM(0x8BD9,GL_TEXTURE_NUM_LEVELS_QCOM)
-GL_ENUM(0x8BDA,GL_TEXTURE_TARGET_QCOM)
-GL_ENUM(0x8BDB,GL_TEXTURE_OBJECT_VALID_QCOM)
-GL_ENUM(0x8BDC,GL_STATE_RESTORE)
-GL_ENUM(0x8C00,GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG)
-GL_ENUM(0x8C01,GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG)
-GL_ENUM(0x8C02,GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG)
-GL_ENUM(0x8C03,GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG)
-GL_ENUM(0x8C04,GL_MODULATE_COLOR_IMG)
-GL_ENUM(0x8C05,GL_RECIP_ADD_SIGNED_ALPHA_IMG)
-GL_ENUM(0x8C06,GL_TEXTURE_ALPHA_MODULATE_IMG)
-GL_ENUM(0x8C07,GL_FACTOR_ALPHA_MODULATE_IMG)
-GL_ENUM(0x8C08,GL_FRAGMENT_ALPHA_MODULATE_IMG)
-GL_ENUM(0x8C09,GL_ADD_BLEND_IMG)
-GL_ENUM(0x8C0A,GL_SGX_BINARY_IMG)
-GL_ENUM(0x8C17,GL_UNSIGNED_NORMALIZED_EXT)
-GL_ENUM(0x8C2F,GL_ANY_SAMPLES_PASSED_EXT)
-GL_ENUM(0x8C40,GL_SRGB_EXT)
-GL_ENUM(0x8C42,GL_SRGB_ALPHA_EXT)
-GL_ENUM(0x8C43,GL_SRGB8_ALPHA8_EXT)
-GL_ENUM(0x8C92,GL_ATC_RGB_AMD)
-GL_ENUM(0x8C93,GL_ATC_RGBA_EXPLICIT_ALPHA_AMD)
-GL_ENUM(0x8CA3,GL_STENCIL_BACK_REF)
-GL_ENUM(0x8CA4,GL_STENCIL_BACK_VALUE_MASK)
-GL_ENUM(0x8CA5,GL_STENCIL_BACK_WRITEMASK)
-GL_ENUM(0x8CA6,GL_FRAMEBUFFER_BINDING_OES)
-GL_ENUM(0x8CA7,GL_RENDERBUFFER_BINDING_OES)
-GL_ENUM(0x8CA8,GL_READ_FRAMEBUFFER_APPLE)
-GL_ENUM(0x8CA9,GL_DRAW_FRAMEBUFFER_APPLE)
-GL_ENUM(0x8CAA,GL_READ_FRAMEBUFFER_BINDING_APPLE)
-GL_ENUM(0x8CAB,GL_RENDERBUFFER_SAMPLES_APPLE)
-GL_ENUM(0x8CD0,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES)
-GL_ENUM(0x8CD1,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES)
-GL_ENUM(0x8CD2,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES)
-GL_ENUM(0x8CD3,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES)
-GL_ENUM(0x8CD4,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES)
-GL_ENUM(0x8CD5,GL_FRAMEBUFFER_COMPLETE_OES)
-GL_ENUM(0x8CD6,GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES)
-GL_ENUM(0x8CD7,GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES)
-GL_ENUM(0x8CD9,GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES)
-GL_ENUM(0x8CDA,GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES)
-GL_ENUM(0x8CDD,GL_FRAMEBUFFER_UNSUPPORTED_OES)
-GL_ENUM(0x8CDF,GL_MAX_COLOR_ATTACHMENTS_NV)
-GL_ENUM(0x8CE0,GL_COLOR_ATTACHMENT0_OES)
-GL_ENUM(0x8CE1,GL_COLOR_ATTACHMENT1_NV)
-GL_ENUM(0x8CE2,GL_COLOR_ATTACHMENT2_NV)
-GL_ENUM(0x8CE3,GL_COLOR_ATTACHMENT3_NV)
-GL_ENUM(0x8CE4,GL_COLOR_ATTACHMENT4_NV)
-GL_ENUM(0x8CE5,GL_COLOR_ATTACHMENT5_NV)
-GL_ENUM(0x8CE6,GL_COLOR_ATTACHMENT6_NV)
-GL_ENUM(0x8CE7,GL_COLOR_ATTACHMENT7_NV)
-GL_ENUM(0x8CE8,GL_COLOR_ATTACHMENT8_NV)
-GL_ENUM(0x8CE9,GL_COLOR_ATTACHMENT9_NV)
-GL_ENUM(0x8CEA,GL_COLOR_ATTACHMENT10_NV)
-GL_ENUM(0x8CEB,GL_COLOR_ATTACHMENT11_NV)
-GL_ENUM(0x8CEC,GL_COLOR_ATTACHMENT12_NV)
-GL_ENUM(0x8CED,GL_COLOR_ATTACHMENT13_NV)
-GL_ENUM(0x8CEE,GL_COLOR_ATTACHMENT14_NV)
-GL_ENUM(0x8CEF,GL_COLOR_ATTACHMENT15_NV)
-GL_ENUM(0x8D00,GL_DEPTH_ATTACHMENT_OES)
-GL_ENUM(0x8D20,GL_STENCIL_ATTACHMENT_OES)
-GL_ENUM(0x8D40,GL_FRAMEBUFFER_OES)
-GL_ENUM(0x8D41,GL_RENDERBUFFER_OES)
-GL_ENUM(0x8D42,GL_RENDERBUFFER_WIDTH_OES)
-GL_ENUM(0x8D43,GL_RENDERBUFFER_HEIGHT_OES)
-GL_ENUM(0x8D44,GL_RENDERBUFFER_INTERNAL_FORMAT_OES)
-GL_ENUM(0x8D46,GL_STENCIL_INDEX1_OES)
-GL_ENUM(0x8D47,GL_STENCIL_INDEX4_OES)
-GL_ENUM(0x8D48,GL_STENCIL_INDEX8_OES)
-GL_ENUM(0x8D50,GL_RENDERBUFFER_RED_SIZE_OES)
-GL_ENUM(0x8D51,GL_RENDERBUFFER_GREEN_SIZE_OES)
-GL_ENUM(0x8D52,GL_RENDERBUFFER_BLUE_SIZE_OES)
-GL_ENUM(0x8D53,GL_RENDERBUFFER_ALPHA_SIZE_OES)
-GL_ENUM(0x8D54,GL_RENDERBUFFER_DEPTH_SIZE_OES)
-GL_ENUM(0x8D55,GL_RENDERBUFFER_STENCIL_SIZE_OES)
-GL_ENUM(0x8D56,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE)
-GL_ENUM(0x8D57,GL_MAX_SAMPLES_APPLE)
-GL_ENUM(0x8D60,GL_TEXTURE_GEN_STR_OES)
-GL_ENUM(0x8D61,GL_HALF_FLOAT_OES)
-GL_ENUM(0x8D62,GL_RGB565_OES)
-GL_ENUM(0x8D64,GL_ETC1_RGB8_OES)
-GL_ENUM(0x8D65,GL_TEXTURE_EXTERNAL_OES)
-GL_ENUM(0x8D66,GL_SAMPLER_EXTERNAL_OES)
-GL_ENUM(0x8D67,GL_TEXTURE_BINDING_EXTERNAL_OES)
-GL_ENUM(0x8D68,GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES)
-GL_ENUM(0x8D6A,GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT)
-GL_ENUM(0x8D6C,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT)
-GL_ENUM(0x8DF0,GL_LOW_FLOAT)
-GL_ENUM(0x8DF1,GL_MEDIUM_FLOAT)
-GL_ENUM(0x8DF2,GL_HIGH_FLOAT)
-GL_ENUM(0x8DF3,GL_LOW_INT)
-GL_ENUM(0x8DF4,GL_MEDIUM_INT)
-GL_ENUM(0x8DF5,GL_HIGH_INT)
-GL_ENUM(0x8DF6,GL_UNSIGNED_INT_10_10_10_2_OES)
-GL_ENUM(0x8DF7,GL_INT_10_10_10_2_OES)
-GL_ENUM(0x8DF8,GL_SHADER_BINARY_FORMATS)
-GL_ENUM(0x8DF9,GL_NUM_SHADER_BINARY_FORMATS)
-GL_ENUM(0x8DFA,GL_SHADER_COMPILER)
-GL_ENUM(0x8DFB,GL_MAX_VERTEX_UNIFORM_VECTORS)
-GL_ENUM(0x8DFC,GL_MAX_VARYING_VECTORS)
-GL_ENUM(0x8DFD,GL_MAX_FRAGMENT_UNIFORM_VECTORS)
-GL_ENUM(0x8E2C,GL_DEPTH_COMPONENT16_NONLINEAR_NV)
-GL_ENUM(0x8ED0,GL_COVERAGE_COMPONENT_NV)
-GL_ENUM(0x8ED1,GL_COVERAGE_COMPONENT4_NV)
-GL_ENUM(0x8ED2,GL_COVERAGE_ATTACHMENT_NV)
-GL_ENUM(0x8ED3,GL_COVERAGE_BUFFERS_NV)
-GL_ENUM(0x8ED4,GL_COVERAGE_SAMPLES_NV)
-GL_ENUM(0x8ED5,GL_COVERAGE_ALL_FRAGMENTS_NV)
-GL_ENUM(0x8ED6,GL_COVERAGE_EDGE_FRAGMENTS_NV)
-GL_ENUM(0x8ED7,GL_COVERAGE_AUTOMATIC_NV)
-GL_ENUM(0x8F60,GL_MALI_SHADER_BINARY_ARM)
-GL_ENUM(0x8FA0,GL_PERFMON_GLOBAL_MODE_QCOM)
-GL_ENUM(0x8FC4,GL_SHADER_BINARY_VIV)
-GL_ENUM(0x90F3,GL_CONTEXT_ROBUST_ACCESS_EXT)
-GL_ENUM(0x912F,GL_TEXTURE_IMMUTABLE_FORMAT_EXT)
-GL_ENUM(0x9130,GL_SGX_PROGRAM_BINARY_IMG)
-GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_EXT)
-GL_ENUM(0x9134,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT)
-GL_ENUM(0x9135,GL_MAX_SAMPLES_EXT)
-GL_ENUM(0x9136,GL_TEXTURE_SAMPLES_IMG)
-GL_ENUM(0x9151,GL_BUFFER_OBJECT_EXT)
-GL_ENUM(0x9153,GL_QUERY_OBJECT_EXT)
-GL_ENUM(0x9154,GL_VERTEX_ARRAY_OBJECT_EXT)
-GL_ENUM(0x9250,GL_SHADER_BINARY_DMP)
-GL_ENUM(0x93A1,GL_BGRA8_EXT)
-GL_ENUM(0xFFFFFFFF,GL_ALL_SHADER_BITS_EXT)
diff --git a/opengl/libs/glestrace.h b/opengl/libs/glestrace.h
deleted file mode 100644
index a08f97b..0000000
--- a/opengl/libs/glestrace.h
+++ /dev/null
@@ -1,41 +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.
- *
- * 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, EGLContext c);
-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
diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h
deleted file mode 100644
index 8b1b389..0000000
--- a/opengl/libs/hooks.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- ** Copyright 2007, 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 ANDROID_GLES_CM_HOOKS_H
-#define ANDROID_GLES_CM_HOOKS_H
-
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-
-#include <pthread.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#if !defined(__arm__)
-#define USE_SLOW_BINDING 1
-#else
-#define USE_SLOW_BINDING 0
-#endif
-#undef NELEM
-#define NELEM(x) (sizeof(x)/sizeof(*(x)))
-
-// maximum number of GL extensions that can be used simultaneously in
-// a given process. this limitation exists because we need to have
-// a static function for each extension and currently these static functions
-// are generated at compile time.
-#define MAX_NUMBER_OF_GL_EXTENSIONS 256
-
-
-#if defined(HAVE_ANDROID_OS) && !USE_SLOW_BINDING && __OPTIMIZE__
-#define USE_FAST_TLS_KEY 1
-#else
-#define USE_FAST_TLS_KEY 0
-#endif
-
-#if USE_FAST_TLS_KEY
-# include <bionic_tls.h> /* special private C library header */
-#endif
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-// GL / EGL hooks
-
-#undef GL_ENTRY
-#undef EGL_ENTRY
-#define GL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__);
-#define EGL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__);
-
-struct egl_t {
- #include "EGL/egl_entries.in"
-};
-
-struct gl_hooks_t {
- struct gl_t {
- #include "entries.in"
- } gl;
- struct gl_ext_t {
- __eglMustCastToProperFunctionPointerType extensions[MAX_NUMBER_OF_GL_EXTENSIONS];
- } ext;
-};
-#undef GL_ENTRY
-#undef EGL_ENTRY
-
-EGLAPI void setGlThreadSpecific(gl_hooks_t const *value);
-EGLAPI gl_hooks_t const* getGlThreadSpecific();
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif /* ANDROID_GLES_CM_HOOKS_H */
diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles
deleted file mode 100755
index 50bbf08..0000000
--- a/opengl/libs/tools/genfiles
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2008 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.
-
-./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in
-./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in
-./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in
-./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in
-
-./glentrygen ../../include/GLES/gl.h > /tmp/gl_entries.in
-./glentrygen ../../include/GLES/glext.h > /tmp/glext_entries.in
-./glentrygen ../../include/GLES2/gl2.h > /tmp/gl2_entries.in
-./glentrygen ../../include/GLES2/gl2ext.h > /tmp/gl2ext_entries.in
-
-cat /tmp/gl_entries.in \
- /tmp/glext_entries.in \
- /tmp/gl2_entries.in \
- /tmp/gl2ext_entries.in \
- | sort -t, -k2 \
- | awk -F, '!_[$2]++' \
- > ../entries.in
-
-./gltracegen ../entries.in >../trace.in
-
-cat ../../include/GLES/gl.h \
- ../../include/GLES/glext.h \
- ../../include/GLES2/gl2.h \
- ../../include/GLES2/gl2ext.h \
- | ./glenumsgen \
- | sort \
- > ../enums.in
-
diff --git a/opengl/libs/tools/glapigen b/opengl/libs/tools/glapigen
deleted file mode 100755
index 4d8334f..0000000
--- a/opengl/libs/tools/glapigen
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /usr/bin/perl
-#
-# Copyright (C) 2008 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.
-
-use strict;
-
-sub rtrim($)
-{
- my $string = shift;
- $string =~ s/\s+$//;
- return $string;
-}
-
-while (my $line = <>) {
- next if $line =~ /^\//;
- next if $line =~ /^#/;
- next if $line =~ /^\s*$/;
- if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) {
- next;
- }
- my $type = rtrim($2);
- my $name = $3;
- my $args = $4;
-
- #printf("%s", $line);
-
- my $prefix = "";
- if ($name eq "glGetString") {
- $prefix = "__";
- }
-
- printf("%s API_ENTRY(%s%s)(%s)", $type, $prefix, $name, $args);
-
- printf(" {\n");
- if ($type eq "void") {
- printf(" CALL_GL_API(%s", $name);
- } else {
- printf(" CALL_GL_API_RETURN(%s", $name);
- }
- my @args = split ',', $args;
- my $len = scalar(@args);
- for (my $num = 0; $num < $len; $num++) {
- if ($args[$num] ne "void") {
- print ", ";
- #
- # extract the name from the parameter
- # type name
- # const type *name
- # type *name
- # type name[4]
- #
- if ($args[$num] =~ /(\S+\s)+\**\s*([\w]+)/) {
- printf("%s", $2);
- }
- }
- }
- printf(");\n");
- printf("}\n");
-}
-
-
-
-
-
diff --git a/opengl/libs/tools/glentrygen b/opengl/libs/tools/glentrygen
deleted file mode 100755
index 170f041..0000000
--- a/opengl/libs/tools/glentrygen
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/perl
-#
-# Copyright (C) 2008 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.
-
-use strict;
-
-sub rtrim($)
-{
- my $string = shift;
- $string =~ s/\s+$//;
- return $string;
-}
-
-while (my $line = <>) {
- next if $line =~ /^\//;
- next if $line =~ /^#/;
- next if $line =~ /^\s*$/;
- if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) {
- next;
- }
- my $type = rtrim($2);
- my $name = $3;
- my $args = $4;
-
- printf("GL_ENTRY(%s, %s, %s)\n", $type, $name, $args);
-}
diff --git a/opengl/libs/tools/glenumsgen b/opengl/libs/tools/glenumsgen
deleted file mode 100755
index 2ae5fbf..0000000
--- a/opengl/libs/tools/glenumsgen
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/perl
-#
-# Copyright (C) 2010 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.
-
-use strict;
-
-my %enumHash = ();
-
-while (my $line = <STDIN>) {
- next if $line =~ /^\//;
- # Skip bitfield definitions.
- next if $line =~ /_BIT(\d+_|\s+)/;
- if ($line !~ /^#define\s+(\S+)\s+(0x\S+)/) {
- next;
- }
- my $enumName = $1;
- my $enumValue = $2;
- next if exists($enumHash { $enumValue });
- $enumHash { $enumValue } = $enumName;
- printf("GL_ENUM(%s,%s)\n", $enumValue, $enumName);
-}
-
-
-
-
-
diff --git a/opengl/libs/tools/gltracegen b/opengl/libs/tools/gltracegen
deleted file mode 100755
index da42653..0000000
--- a/opengl/libs/tools/gltracegen
+++ /dev/null
@@ -1,95 +0,0 @@
-#! /usr/bin/perl
-#
-# Copyright (C) 2010 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.
-
-use strict;
-
-sub rtrim($)
-{
- my $string = shift;
- $string =~ s/\s+$//;
- return $string;
-}
-
-while (my $line = <>) {
- next if $line =~ /^\//;
- next if $line =~ /^#/;
- next if $line =~ /^\s*$/;
- if ($line !~ /^GL_ENTRY\(([^,]+), ([^,]+), ([^\)]+)\)/) {
- next;
- }
- my $type = $1;
- my $name = $2;
- my $args = $3;
-
- my @args = split ',', $args;
- my $len = scalar(@args);
- my $nonVoidArgLen = 0;
- for (my $num = 0; $num < $len; $num++) {
- if ($args[$num] ne "void") {
- $nonVoidArgLen++;
- }
- }
- if ($type eq "void") {
- printf("TRACE_GL_VOID(");
- } else {
- printf("TRACE_GL(%s, ", $type);
- }
-
- printf("%s, (%s), (", $name, $args);
- for (my $num = 0; $num < $len; $num++) {
- if ($args[$num] ne "void") {
- if ($num > 0) {
- print ", ";
- }
- #
- # extract the name from the parameter
- # type name
- # const type *name
- # type *name
- # type name[4]
- #
- if ($args[$num] =~ /(\S+\s)+\**\s*([\w]+)/) {
- printf("%s", $2);
- }
- }
- }
- printf("), %d", $nonVoidArgLen);
- for (my $num = 0; $num < $len; $num++) {
- if ($args[$num] ne "void") {
- #
- # extract the name from the parameter
- # type name
- # const type *name
- # type *name
- # type name[4]
- #
- my $arg = $args[$num];
- if ($arg =~ /(\S+\s)+\**\s*([\w]+)/) {
- my $name = $2;
- if ($arg =~ /((const )*(\S+\s)+\**)\s*([\w]+)/) {
- my $type = rtrim($1);
- printf(", \"%s\", %s", $type, $name);
- }
- }
- }
- }
- printf(")\n");
-}
-
-
-
-
-
diff --git a/opengl/libs/trace.in b/opengl/libs/trace.in
deleted file mode 100644
index a5c5c84..0000000
--- a/opengl/libs/trace.in
+++ /dev/null
@@ -1,437 +0,0 @@
-TRACE_GL_VOID(glActiveShaderProgramEXT, (GLuint pipeline, GLuint program), (pipeline, program), 2, "GLuint", pipeline, "GLuint", program)
-TRACE_GL_VOID(glActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
-TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
-TRACE_GL_VOID(glAlphaFuncQCOM, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
-TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glAttachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader)
-TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
-TRACE_GL_VOID(glBeginQueryEXT, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id)
-TRACE_GL_VOID(glBindAttribLocation, (GLuint program, GLuint index, const GLchar* name), (program, index, name), 3, "GLuint", program, "GLuint", index, "const GLchar*", name)
-TRACE_GL_VOID(glBindBuffer, (GLenum target, GLuint buffer), (target, buffer), 2, "GLenum", target, "GLuint", buffer)
-TRACE_GL_VOID(glBindFramebuffer, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
-TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
-TRACE_GL_VOID(glBindProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
-TRACE_GL_VOID(glBindRenderbuffer, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
-TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
-TRACE_GL_VOID(glBindTexture, (GLenum target, GLuint texture), (target, texture), 2, "GLenum", target, "GLuint", texture)
-TRACE_GL_VOID(glBindVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red, green, blue, alpha), 4, "GLclampf", red, "GLclampf", green, "GLclampf", blue, "GLclampf", alpha)
-TRACE_GL_VOID(glBlendEquation, ( GLenum mode ), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glBlendEquationOES, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha)
-TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha)
-TRACE_GL_VOID(glBlendFunc, (GLenum sfactor, GLenum dfactor), (sfactor, dfactor), 2, "GLenum", sfactor, "GLenum", dfactor)
-TRACE_GL_VOID(glBlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
-TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
-TRACE_GL_VOID(glBlitFramebufferANGLE, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter)
-TRACE_GL_VOID(glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage), (target, size, data, usage), 4, "GLenum", target, "GLsizeiptr", size, "const GLvoid *", data, "GLenum", usage)
-TRACE_GL_VOID(glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data), (target, offset, size, data), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", size, "const GLvoid *", data)
-TRACE_GL(GLenum, glCheckFramebufferStatus, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL(GLenum, glCheckFramebufferStatusOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glClear, (GLbitfield mask), (mask), 1, "GLbitfield", mask)
-TRACE_GL_VOID(glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red, green, blue, alpha), 4, "GLclampf", red, "GLclampf", green, "GLclampf", blue, "GLclampf", alpha)
-TRACE_GL_VOID(glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearColorxOES, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearDepthf, (GLclampf depth), (depth), 1, "GLclampf", depth)
-TRACE_GL_VOID(glClearDepthfOES, (GLclampf depth), (depth), 1, "GLclampf", depth)
-TRACE_GL_VOID(glClearDepthx, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClearDepthxOES, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClearStencil, (GLint s), (s), 1, "GLint", s)
-TRACE_GL_VOID(glClientActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
-TRACE_GL_VOID(glClipPlanef, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat *eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn)
-TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed *eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn)
-TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha)
-TRACE_GL_VOID(glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red, green, blue, alpha), 4, "GLubyte", red, "GLubyte", green, "GLubyte", blue, "GLubyte", alpha)
-TRACE_GL_VOID(glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
-TRACE_GL_VOID(glColor4xOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
-TRACE_GL_VOID(glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), (red, green, blue, alpha), 4, "GLboolean", red, "GLboolean", green, "GLboolean", blue, "GLboolean", alpha)
-TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glCompileShader, (GLuint shader), (shader), 1, "GLuint", shader)
-TRACE_GL_VOID(glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data), (target, level, internalformat, width, height, border, imageSize, data), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLsizei", imageSize, "const GLvoid *", data)
-TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data), (target, level, xoffset, yoffset, width, height, format, imageSize, data), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLsizei", imageSize, "const GLvoid *", data)
-TRACE_GL_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), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border), (target, level, internalformat, x, y, width, height, border), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLint", border)
-TRACE_GL_VOID(glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, x, y, width, height), 8, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask)
-TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation)
-TRACE_GL(GLuint, glCreateProgram, (void), (), 0)
-TRACE_GL(GLuint, glCreateShader, (GLenum type), (type), 1, "GLenum", type)
-TRACE_GL(GLuint, glCreateShaderProgramvEXT, (GLenum type, GLsizei count, const GLchar **strings), (type, count, strings), 3, "GLenum", type, "GLsizei", count, "const GLchar **", strings)
-TRACE_GL_VOID(glCullFace, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex)
-TRACE_GL_VOID(glDeleteBuffers, (GLsizei n, const GLuint *buffers), (n, buffers), 2, "GLsizei", n, "const GLuint *", buffers)
-TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint *fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences)
-TRACE_GL_VOID(glDeleteFramebuffers, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
-TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
-TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glDeleteProgram, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glDeleteProgramPipelinesEXT, (GLsizei n, const GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "const GLuint *", pipelines)
-TRACE_GL_VOID(glDeleteQueriesEXT, (GLsizei n, const GLuint *ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids)
-TRACE_GL_VOID(glDeleteRenderbuffers, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
-TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
-TRACE_GL_VOID(glDeleteShader, (GLuint shader), (shader), 1, "GLuint", shader)
-TRACE_GL_VOID(glDeleteTextures, (GLsizei n, const GLuint *textures), (n, textures), 2, "GLsizei", n, "const GLuint *", textures)
-TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays)
-TRACE_GL_VOID(glDepthFunc, (GLenum func), (func), 1, "GLenum", func)
-TRACE_GL_VOID(glDepthMask, (GLboolean flag), (flag), 1, "GLboolean", flag)
-TRACE_GL_VOID(glDepthRangef, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar)
-TRACE_GL_VOID(glDepthRangefOES, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar)
-TRACE_GL_VOID(glDepthRangex, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDepthRangexOES, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDetachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader)
-TRACE_GL_VOID(glDisable, (GLenum cap), (cap), 1, "GLenum", cap)
-TRACE_GL_VOID(glDisableClientState, (GLenum array), (array), 1, "GLenum", array)
-TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
-TRACE_GL_VOID(glDisableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index)
-TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
-TRACE_GL_VOID(glDrawArrays, (GLenum mode, GLint first, GLsizei count), (mode, first, count), 3, "GLenum", mode, "GLint", first, "GLsizei", count)
-TRACE_GL_VOID(glDrawBuffersNV, (GLsizei n, const GLenum *bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs)
-TRACE_GL_VOID(glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices), (mode, count, type, indices), 4, "GLenum", mode, "GLsizei", count, "GLenum", type, "const GLvoid *", indices)
-TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height)
-TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords)
-TRACE_GL_VOID(glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height), (x, y, z, width, height), 5, "GLint", x, "GLint", y, "GLint", z, "GLint", width, "GLint", height)
-TRACE_GL_VOID(glDrawTexivOES, (const GLint *coords), (coords), 1, "const GLint *", coords)
-TRACE_GL_VOID(glDrawTexsOES, (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height), (x, y, z, width, height), 5, "GLshort", x, "GLshort", y, "GLshort", z, "GLshort", width, "GLshort", height)
-TRACE_GL_VOID(glDrawTexsvOES, (const GLshort *coords), (coords), 1, "const GLshort *", coords)
-TRACE_GL_VOID(glDrawTexxOES, (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height), (x, y, z, width, height), 5, "GLfixed", x, "GLfixed", y, "GLfixed", z, "GLfixed", width, "GLfixed", height)
-TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed *coords), (coords), 1, "const GLfixed *", coords)
-TRACE_GL_VOID(glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
-TRACE_GL_VOID(glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
-TRACE_GL_VOID(glEnable, (GLenum cap), (cap), 1, "GLenum", cap)
-TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array)
-TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
-TRACE_GL_VOID(glEnableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index)
-TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
-TRACE_GL_VOID(glEndQueryEXT, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask)
-TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params)
-TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers)
-TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers)
-TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar *source, GLint *length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length)
-TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint *programs, GLint maxPrograms, GLint *numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms)
-TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers)
-TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint *shaders, GLint maxShaders, GLint *numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders)
-TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "GLvoid *", texels)
-TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint *textures, GLint maxTextures, GLint *numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures)
-TRACE_GL(GLboolean, glExtIsProgramBinaryQCOM, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glExtTexObjectStateOverrideiQCOM, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glFinish, (void), (), 0)
-TRACE_GL_VOID(glFinishFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glFlush, (void), (), 0)
-TRACE_GL_VOID(glFogf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glFogx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
-TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
-TRACE_GL_VOID(glFramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
-TRACE_GL_VOID(glFramebufferTexture2DMultisampleEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
-TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
-TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
-TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset)
-TRACE_GL_VOID(glFrontFace, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumfOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glFrustumxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glGenBuffers, (GLsizei n, GLuint *buffers), (n, buffers), 2, "GLsizei", n, "GLuint *", buffers)
-TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences)
-TRACE_GL_VOID(glGenFramebuffers, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
-TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
-TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glGenProgramPipelinesEXT, (GLsizei n, GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "GLuint *", pipelines)
-TRACE_GL_VOID(glGenQueriesEXT, (GLsizei n, GLuint *ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids)
-TRACE_GL_VOID(glGenRenderbuffers, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
-TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
-TRACE_GL_VOID(glGenTextures, (GLsizei n, GLuint *textures), (n, textures), 2, "GLsizei", n, "GLuint *", textures)
-TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint *arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays)
-TRACE_GL_VOID(glGenerateMipmap, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glGenerateMipmapOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name), (program, index, bufsize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufsize, "GLsizei*", length, "GLint*", size, "GLenum*", type, "GLchar*", name)
-TRACE_GL_VOID(glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name), (program, index, bufsize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufsize, "GLsizei*", length, "GLint*", size, "GLenum*", type, "GLchar*", name)
-TRACE_GL_VOID(glGetAttachedShaders, (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders), (program, maxcount, count, shaders), 4, "GLuint", program, "GLsizei", maxcount, "GLsizei*", count, "GLuint*", shaders)
-TRACE_GL(int, glGetAttribLocation, (GLuint program, const GLchar* name), (program, name), 2, "GLuint", program, "const GLchar*", name)
-TRACE_GL_VOID(glGetBooleanv, (GLenum pname, GLboolean *params), (pname, params), 2, "GLenum", pname, "GLboolean *", params)
-TRACE_GL_VOID(glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetClipPlanef, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanex, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString)
-TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint *num, GLsizei size, GLuint *driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls)
-TRACE_GL(GLenum, glGetError, (void), (), 0)
-TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFloatv, (GLenum pname, GLfloat *params), (pname, params), 2, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
-TRACE_GL(GLenum, glGetGraphicsResetStatusEXT, (void), (), 0)
-TRACE_GL_VOID(glGetIntegerv, (GLenum pname, GLint *params), (pname, params), 2, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetObjectLabelEXT, (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label), (type, object, bufSize, length, label), 5, "GLenum", type, "GLuint", object, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", label)
-TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten)
-TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data)
-TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString)
-TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters)
-TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString)
-TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize, GLuint *groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups)
-TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary)
-TRACE_GL_VOID(glGetProgramInfoLog, (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog), (program, bufsize, length, infolog), 4, "GLuint", program, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog)
-TRACE_GL_VOID(glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog), (pipeline, bufSize, length, infoLog), 4, "GLuint", pipeline, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
-TRACE_GL_VOID(glGetProgramPipelineivEXT, (GLuint pipeline, GLenum pname, GLint *params), (pipeline, pname, params), 3, "GLuint", pipeline, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetProgramiv, (GLuint program, GLenum pname, GLint* params), (program, pname, params), 3, "GLuint", program, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint *params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint *", params)
-TRACE_GL_VOID(glGetQueryivEXT, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetShaderInfoLog, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog), (shader, bufsize, length, infolog), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog)
-TRACE_GL_VOID(glGetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision), (shadertype, precisiontype, range, precision), 4, "GLenum", shadertype, "GLenum", precisiontype, "GLint*", range, "GLint*", precision)
-TRACE_GL_VOID(glGetShaderSource, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source), (shader, bufsize, length, source), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", source)
-TRACE_GL_VOID(glGetShaderiv, (GLuint shader, GLenum pname, GLint* params), (shader, pname, params), 3, "GLuint", shader, "GLenum", pname, "GLint*", params)
-TRACE_GL(const GLubyte *, glGetString, (GLenum name), (name), 1, "GLenum", name)
-TRACE_GL_VOID(glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexEnviv, (GLenum env, GLenum pname, GLint *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL(int, glGetUniformLocation, (GLuint program, const GLchar* name), (program, name), 2, "GLuint", program, "const GLchar*", name)
-TRACE_GL_VOID(glGetUniformfv, (GLuint program, GLint location, GLfloat* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLfloat*", params)
-TRACE_GL_VOID(glGetUniformiv, (GLuint program, GLint location, GLint* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLint*", params)
-TRACE_GL_VOID(glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid** pointer), (index, pname, pointer), 3, "GLuint", index, "GLenum", pname, "GLvoid**", pointer)
-TRACE_GL_VOID(glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLfloat*", params)
-TRACE_GL_VOID(glGetVertexAttribiv, (GLuint index, GLenum pname, GLint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetnUniformfvEXT, (GLuint program, GLint location, GLsizei bufSize, float *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "float *", params)
-TRACE_GL_VOID(glGetnUniformivEXT, (GLuint program, GLint location, GLsizei bufSize, GLint *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "GLint *", params)
-TRACE_GL_VOID(glHint, (GLenum target, GLenum mode), (target, mode), 2, "GLenum", target, "GLenum", mode)
-TRACE_GL_VOID(glInsertEventMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
-TRACE_GL(GLboolean, glIsBuffer, (GLuint buffer), (buffer), 1, "GLuint", buffer)
-TRACE_GL(GLboolean, glIsEnabled, (GLenum cap), (cap), 1, "GLenum", cap)
-TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL(GLboolean, glIsFramebuffer, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
-TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
-TRACE_GL(GLboolean, glIsProgram, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL(GLboolean, glIsProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
-TRACE_GL(GLboolean, glIsQueryEXT, (GLuint id), (id), 1, "GLuint", id)
-TRACE_GL(GLboolean, glIsRenderbuffer, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer)
-TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer)
-TRACE_GL(GLboolean, glIsShader, (GLuint shader), (shader), 1, "GLuint", shader)
-TRACE_GL(GLboolean, glIsTexture, (GLuint texture), (texture), 1, "GLuint", texture)
-TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glLabelObjectEXT, (GLenum type, GLuint object, GLsizei length, const GLchar *label), (type, object, length, label), 4, "GLenum", type, "GLuint", object, "GLsizei", length, "const GLchar *", label)
-TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightf, (GLenum light, GLenum pname, GLfloat param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glLightx, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxOES, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLineWidth, (GLfloat width), (width), 1, "GLfloat", width)
-TRACE_GL_VOID(glLineWidthx, (GLfixed width), (width), 1, "GLfixed", width)
-TRACE_GL_VOID(glLineWidthxOES, (GLfixed width), (width), 1, "GLfixed", width)
-TRACE_GL_VOID(glLinkProgram, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glLoadIdentity, (void), (), 0)
-TRACE_GL_VOID(glLoadMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glLoadMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadPaletteFromModelViewMatrixOES, (void), (), 0)
-TRACE_GL_VOID(glLogicOp, (GLenum opcode), (opcode), 1, "GLenum", opcode)
-TRACE_GL(void*, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access)
-TRACE_GL_VOID(glMaterialf, (GLenum face, GLenum pname, GLfloat param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glMaterialx, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxOES, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glMatrixMode, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glMultMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glMultMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint *", first, "GLsizei *", count, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const GLvoid* *", indices, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q), (target, s, t, r, q), 5, "GLenum", target, "GLfloat", s, "GLfloat", t, "GLfloat", r, "GLfloat", q)
-TRACE_GL_VOID(glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz), (nx, ny, nz), 3, "GLfloat", nx, "GLfloat", ny, "GLfloat", nz)
-TRACE_GL_VOID(glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glPixelStorei, (GLenum pname, GLint param), (pname, param), 2, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glPointParameterf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glPointParameterx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointSize, (GLfloat size), (size), 1, "GLfloat", size)
-TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glPointSizex, (GLfixed size), (size), 1, "GLfixed", size)
-TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size)
-TRACE_GL_VOID(glPolygonOffset, (GLfloat factor, GLfloat units), (factor, units), 2, "GLfloat", factor, "GLfloat", units)
-TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
-TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
-TRACE_GL_VOID(glPopGroupMarkerEXT, (void), (), 0)
-TRACE_GL_VOID(glPopMatrix, (void), (), 0)
-TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length)
-TRACE_GL_VOID(glProgramParameteriEXT, (GLuint program, GLenum pname, GLint value), (program, pname, value), 3, "GLuint", program, "GLenum", pname, "GLint", value)
-TRACE_GL_VOID(glProgramUniform1fEXT, (GLuint program, GLint location, GLfloat x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLfloat", x)
-TRACE_GL_VOID(glProgramUniform1fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform1iEXT, (GLuint program, GLint location, GLint x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLint", x)
-TRACE_GL_VOID(glProgramUniform1ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniform2fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y), (program, location, x, y), 4, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y)
-TRACE_GL_VOID(glProgramUniform2fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform2iEXT, (GLuint program, GLint location, GLint x, GLint y), (program, location, x, y), 4, "GLuint", program, "GLint", location, "GLint", x, "GLint", y)
-TRACE_GL_VOID(glProgramUniform2ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniform3fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z), (program, location, x, y, z), 5, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glProgramUniform3fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform3iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z), (program, location, x, y, z), 5, "GLuint", program, "GLint", location, "GLint", x, "GLint", y, "GLint", z)
-TRACE_GL_VOID(glProgramUniform3ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniform4fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (program, location, x, y, z, w), 6, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
-TRACE_GL_VOID(glProgramUniform4fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform4iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w), (program, location, x, y, z, w), 6, "GLuint", program, "GLint", location, "GLint", x, "GLint", y, "GLint", z, "GLint", w)
-TRACE_GL_VOID(glProgramUniform4ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniformMatrix2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniformMatrix3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniformMatrix4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
-TRACE_GL_VOID(glPushGroupMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
-TRACE_GL_VOID(glPushMatrix, (void), (), 0)
-TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent)
-TRACE_GL_VOID(glReadBufferNV, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels), (x, y, width, height, format, type, pixels), 7, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLvoid *", pixels)
-TRACE_GL_VOID(glReadnPixelsEXT, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data), (x, y, width, height, format, type, bufSize, data), 8, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLsizei", bufSize, "void *", data)
-TRACE_GL_VOID(glReleaseShaderCompiler, (void), (), 0)
-TRACE_GL_VOID(glRenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageMultisampleANGLE, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageMultisampleAPPLE, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageMultisampleEXT, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glResolveMultisampleFramebufferAPPLE, (void), (), 0)
-TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glSampleCoverage, (GLclampf value, GLboolean invert), (value, invert), 2, "GLclampf", value, "GLboolean", invert)
-TRACE_GL_VOID(glSampleCoveragex, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
-TRACE_GL_VOID(glSampleCoveragexOES, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
-TRACE_GL_VOID(glScalef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glScalex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glScalexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glScissor, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height), 4, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList), (monitor, enable, group, numCounters, countersList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", countersList)
-TRACE_GL_VOID(glSetFenceNV, (GLuint fence, GLenum condition), (fence, condition), 2, "GLuint", fence, "GLenum", condition)
-TRACE_GL_VOID(glShadeModel, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glShaderBinary, (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length), (n, shaders, binaryformat, binary, length), 5, "GLsizei", n, "const GLuint*", shaders, "GLenum", binaryformat, "const GLvoid*", binary, "GLsizei", length)
-TRACE_GL_VOID(glShaderSource, (GLuint shader, GLsizei count, const GLchar** string, const GLint* length), (shader, count, string, length), 4, "GLuint", shader, "GLsizei", count, "const GLchar**", string, "const GLint*", length)
-TRACE_GL_VOID(glStartTilingQCOM, (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask), (x, y, width, height, preserveMask), 5, "GLuint", x, "GLuint", y, "GLuint", width, "GLuint", height, "GLbitfield", preserveMask)
-TRACE_GL_VOID(glStencilFunc, (GLenum func, GLint ref, GLuint mask), (func, ref, mask), 3, "GLenum", func, "GLint", ref, "GLuint", mask)
-TRACE_GL_VOID(glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask), (face, func, ref, mask), 4, "GLenum", face, "GLenum", func, "GLint", ref, "GLuint", mask)
-TRACE_GL_VOID(glStencilMask, (GLuint mask), (mask), 1, "GLuint", mask)
-TRACE_GL_VOID(glStencilMaskSeparate, (GLenum face, GLuint mask), (face, mask), 2, "GLenum", face, "GLuint", mask)
-TRACE_GL_VOID(glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass), (fail, zfail, zpass), 3, "GLenum", fail, "GLenum", zfail, "GLenum", zpass)
-TRACE_GL_VOID(glStencilOpSeparate, (GLenum face, GLenum fail, GLenum zfail, GLenum zpass), (face, fail, zfail, zpass), 4, "GLenum", face, "GLenum", fail, "GLenum", zfail, "GLenum", zpass)
-TRACE_GL(GLboolean, glTestFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glTexEnvf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexEnvi, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexEnvx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexGenfOES, (GLenum coord, GLenum pname, GLfloat param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexGeniOES, (GLenum coord, GLenum pname, GLint param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexGenxOES, (GLenum coord, GLenum pname, GLfixed param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target, level, internalformat, width, height, border, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid *", pixels)
-TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTexParameterf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexParameteri, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexParameteriv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexStorage1DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (target, levels, internalformat, width), 4, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width)
-TRACE_GL_VOID(glTexStorage2DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (target, levels, internalformat, width, height), 5, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glTexStorage3DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (target, levels, internalformat, width, height, depth), 6, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
-TRACE_GL_VOID(glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (target, level, xoffset, yoffset, width, height, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "const GLvoid *", pixels)
-TRACE_GL_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), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTextureStorage1DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (texture, target, levels, internalformat, width), 5, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width)
-TRACE_GL_VOID(glTextureStorage2DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (texture, target, levels, internalformat, width, height), 6, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glTextureStorage3DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (texture, target, levels, internalformat, width, height, depth), 7, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
-TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glUniform1f, (GLint location, GLfloat x), (location, x), 2, "GLint", location, "GLfloat", x)
-TRACE_GL_VOID(glUniform1fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform1i, (GLint location, GLint x), (location, x), 2, "GLint", location, "GLint", x)
-TRACE_GL_VOID(glUniform1iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
-TRACE_GL_VOID(glUniform2f, (GLint location, GLfloat x, GLfloat y), (location, x, y), 3, "GLint", location, "GLfloat", x, "GLfloat", y)
-TRACE_GL_VOID(glUniform2fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform2i, (GLint location, GLint x, GLint y), (location, x, y), 3, "GLint", location, "GLint", x, "GLint", y)
-TRACE_GL_VOID(glUniform2iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
-TRACE_GL_VOID(glUniform3f, (GLint location, GLfloat x, GLfloat y, GLfloat z), (location, x, y, z), 4, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glUniform3fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform3i, (GLint location, GLint x, GLint y, GLint z), (location, x, y, z), 4, "GLint", location, "GLint", x, "GLint", y, "GLint", z)
-TRACE_GL_VOID(glUniform3iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
-TRACE_GL_VOID(glUniform4f, (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (location, x, y, z, w), 5, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
-TRACE_GL_VOID(glUniform4fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform4i, (GLint location, GLint x, GLint y, GLint z, GLint w), (location, x, y, z, w), 5, "GLint", location, "GLint", x, "GLint", y, "GLint", z, "GLint", w)
-TRACE_GL_VOID(glUniform4iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
-TRACE_GL_VOID(glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glUseProgram, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glUseProgramStagesEXT, (GLuint pipeline, GLbitfield stages, GLuint program), (pipeline, stages, program), 3, "GLuint", pipeline, "GLbitfield", stages, "GLuint", program)
-TRACE_GL_VOID(glValidateProgram, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glValidateProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
-TRACE_GL_VOID(glVertexAttrib1f, (GLuint indx, GLfloat x), (indx, x), 2, "GLuint", indx, "GLfloat", x)
-TRACE_GL_VOID(glVertexAttrib1fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttrib2f, (GLuint indx, GLfloat x, GLfloat y), (indx, x, y), 3, "GLuint", indx, "GLfloat", x, "GLfloat", y)
-TRACE_GL_VOID(glVertexAttrib2fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttrib3f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z), (indx, x, y, z), 4, "GLuint", indx, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glVertexAttrib3fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttrib4f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (indx, x, y, z, w), 5, "GLuint", indx, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
-TRACE_GL_VOID(glVertexAttrib4fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttribPointer, (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr), (indx, size, type, normalized, stride, ptr), 6, "GLuint", indx, "GLint", size, "GLenum", type, "GLboolean", normalized, "GLsizei", stride, "const GLvoid*", ptr)
-TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glViewport, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height), 4, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
diff --git a/opengl/specs/EGL_ANDROID_blob_cache.txt b/opengl/specs/EGL_ANDROID_blob_cache.txt
deleted file mode 100644
index 61f45d3..0000000
--- a/opengl/specs/EGL_ANDROID_blob_cache.txt
+++ /dev/null
@@ -1,208 +0,0 @@
-Name
-
- ANDROID_blob_cache
-
-Name Strings
-
- EGL_ANDROID_blob_cache
-
-Contributors
-
- Jamie Gennis
-
-Contact
-
- Jamie Gennis, Google Inc. (jgennis 'at' google.com)
-
-Status
-
- Draft.
-
-Version
-
- Version 1, April 22, 2011
-
-Number
-
- EGL Extension #XXX
-
-Dependencies
-
- Requires EGL 1.0
-
- This extension is written against the wording of the EGL 1.4 Specification
-
-Overview
-
- Shader compilation and optimization has been a troublesome aspect of OpenGL
- programming for a long time. It can consume seconds of CPU cycles during
- application start-up. Additionally, state-based re-compiles done
- internally by the drivers add an unpredictable element to application
- performance tuning, often leading to occasional pauses in otherwise smooth
- animations.
-
- This extension provides a mechanism through which client API
- implementations may cache shader binaries after they are compiled. It may
- then retrieve those cached shaders during subsequent executions of the same
- program. The management of the cache is handled by the application (or
- middleware), allowing it to be tuned to a particular platform or
- environment.
-
- While the focus of this extension is on providing a persistent cache for
- shader binaries, it may also be useful for caching other data. This is
- perfectly acceptable, but the guarantees provided (or lack thereof) were
- designed around the shader use case.
-
- Note that although this extension is written as if the application
- implements the caching functionality, on the Android OS it is implemented
- as part of the Android EGL module. This extension is not exposed to
- applications on Android, but will be used automatically in every
- application that uses EGL if it is supported by the underlying
- device-specific EGL implementation.
-
-New Types
-
- /*
- * EGLsizeiANDROID is a signed integer type for representing the size of a
- * memory buffer.
- */
- #include <khrplatform.h>
- typedef khronos_ssize_t EGLsizeiANDROID;
-
- /*
- * EGLSetBlobFunc is a pointer to an application-provided function that a
- * client API implementation may use to insert a key/value pair into the
- * cache.
- */
- typedef void (*EGLSetBlobFuncANDROID) (const void* key,
- EGLsizeiANDROID keySize, const void* value, EGLsizeiANDROID valueSize)
-
- /*
- * EGLGetBlobFunc is a pointer to an application-provided function that a
- * client API implementation may use to retrieve a cached value from the
- * cache.
- */
- typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void* key,
- EGLsizeiANDROID keySize, void* value, EGLsizeiANDROID valueSize)
-
-New Procedures and Functions
-
- void eglSetBlobCacheFuncsANDROID(EGLDisplay dpy,
- EGLSetBlobFunc set,
- EGLGetBlobFunc get);
-
-New Tokens
-
- None.
-
-Changes to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
-
- Add a new subsection after Section 3.8, page 50
- (Synchronization Primitives)
-
- "3.9 Persistent Caching
-
- In order to facilitate persistent caching of internal client API state that
- is slow to compute or collect, the application may specify callback
- function pointers through which the client APIs can request data be cached
- and retrieved. The command
-
- void eglSetBlobCacheFuncsANDROID(EGLDisplay dpy,
- EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
-
- sets the callback function pointers that client APIs associated with
- display <dpy> can use to interact with caching functionality provided by
- the application. <set> points to a function that inserts a new value into
- the cache and associates it with the given key. <get> points to a function
- that retrieves from the cache the value associated with a given key. The
- semantics of these callback functions are described in Section 3.9.1 (Cache
- Operations).
-
- Cache functions may only be specified once during the lifetime of an
- EGLDisplay. The <set> and <get> functions may be called at any time and
- from any thread from the time at which eglSetBlobCacheFuncsANDROID is
- called until the time that the last resource associated with <dpy> is
- deleted and <dpy> itself is terminated. Concurrent calls to these
- functions from different threads is also allowed.
-
- If eglSetBlobCacheFuncsANDROID generates an error then all client APIs must
- behave as though eglSetBlobCacheFuncsANDROID was not called for the display
- <dpy>. If <set> or <get> is NULL then an EGL_BAD_PARAMETER error is
- generated. If a successful eglSetBlobCacheFuncsANDROID call was already
- made for <dpy> and the display has not since been terminated then an
- EGL_BAD_PARAMETER error is generated.
-
- 3.9.1 Cache Operations
-
- To insert a new binary value into the cache and associate it with a given
- key, a client API implementation can call the application-provided callback
- function
-
- void (*set) (const void* key, EGLsizeiANDROID keySize,
- const void* value, EGLsizeiANDROID valueSize)
-
- <key> and <value> are pointers to the beginning of the key and value,
- respectively, that are to be inserted. <keySize> and <valueSize> specify
- the size in bytes of the data pointed to by <key> and <value>,
- respectively.
-
- No guarantees are made as to whether a given key/value pair is present in
- the cache after the set call. If a different value has been associated
- with the given key in the past then it is undefined which value, if any, is
- associated with the key after the set call. Note that while there are no
- guarantees, the cache implementation should attempt to cache the most
- recently set value for a given key.
-
- To retrieve the binary value associated with a given key from the cache, a
- client API implementation can call the application-provided callback
- function
-
- EGLsizeiANDROID (*get) (const void* key, EGLsizeiANDROID keySize,
- void* value, EGLsizeiANDROID valueSize)
-
- <key> is a pointer to the beginning of the key. <keySize> specifies the
- size in bytes of the binary key pointed to by <key>. If the cache contains
- a value associated with the given key then the size of that binary value in
- bytes is returned. Otherwise 0 is returned.
-
- If the cache contains a value for the given key and its size in bytes is
- less than or equal to <valueSize> then the value is written to the memory
- pointed to by <value>. Otherwise nothing is written to the memory pointed
- to by <value>.
-
-Issues
-
- 1. How should errors be handled in the callback functions?
-
- RESOLVED: No guarantees are made about the presence of values in the cache,
- so there should not be a need to return error information to the client API
- implementation. The cache implementation can simply drop a value if it
- encounters an error during the 'set' callback. Similarly, it can simply
- return 0 if it encouters an error in a 'get' callback.
-
- 2. When a client API driver gets updated, that may need to invalidate
- previously cached entries. How can the driver handle this situation?
-
- RESPONSE: There are a number of ways the driver can handle this situation.
- The recommended way is to include the driver version in all cache keys.
- That way each driver version will use a set of cache keys that are unique
- to that version, and conflicts should never occur. Updating the driver
- could then leave a number of values in the cache that will never be
- requested again. If needed, the cache implementation can handle those
- values in some way, but the driver does not need to take any special
- action.
-
- 3. How much data can be stored in the cache?
-
- RESPONSE: This is entirely dependent upon the cache implementation.
- Presumably it will be tuned to store enough data to be useful, but not
- enough to become problematic. :)
-
-Revision History
-
-#2 (Jamie Gennis, April 25, 2011)
- - Swapped the order of the size and pointer arguments to the get and set
- functions.
-
-#1 (Jamie Gennis, April 22, 2011)
- - Initial draft.
diff --git a/opengl/specs/EGL_ANDROID_recordable.txt b/opengl/specs/EGL_ANDROID_recordable.txt
deleted file mode 100644
index 8dbd26f..0000000
--- a/opengl/specs/EGL_ANDROID_recordable.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-Name
-
- ANDROID_recordable
-
-Name Strings
-
- EGL_ANDROID_recordable
-
-Contributors
-
- Jamie Gennis
-
-Contact
-
- Jamie Gennis, Google Inc. (jgennis 'at' google.com)
-
-Status
-
- Draft.
-
-Version
-
- Version 1, July 8, 2011
-
-Number
-
- EGL Extension #XXX
-
-Dependencies
-
- Requires EGL 1.0
-
- This extension is written against the wording of the EGL 1.4 Specification
-
-Overview
-
- Android supports a number of different ANativeWindow implementations that
- can be used to create an EGLSurface. One implementation, which records the
- rendered image as a video each time eglSwapBuffers gets called, may have
- some device-specific restrictions. Because of this, some EGLConfigs may be
- incompatible with these ANativeWindows. This extension introduces a new
- boolean EGLConfig attribute that indicates whether the EGLConfig supports
- rendering to an ANativeWindow that records images to a video.
-
-New Types
-
- None.
-
-New Procedures and Functions
-
- None.
-
-New Tokens
-
- Accepted by the <attribute> parameter of eglGetConfigAttrib and
- the <attrib_list> parameter of eglChooseConfig:
-
- EGL_RECORDABLE_ANDROID 0x3142
-
-Changes to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
-
- Section 3.4, Configuration Management, add a row to Table 3.1.
-
- Attribute Type Notes
- ---------------------- ------- --------------------------
- EGL_RECORDABLE_ANDROID boolean whether video recording is
- supported
-
- Section 3.4, Configuration Management, add a row to Table 3.4.
-
- Attribute Default Selection Sort Sort
- Criteria Order Priority
- ---------------------- ------------- --------- ----- --------
- EGL_RECORDABLE_ANDROID EGL_DONT_CARE Exact None
-
- Section 3.4, Configuration Management, add a paragraph at the end of the
- subsection titled Other EGLConfig Attribute Descriptions.
-
- EGL_RECORDABLE_ANDROID is a boolean indicating whether the config may
- be used to create an EGLSurface from an ANativeWindow that is a video
- recorder as indicated by the NATIVE_WINDOW_IS_VIDEO_RECORDER query on
- the ANativeWindow.
-
- Section 3.4.1, Querying Configurations, change the last paragraph as follow
-
- EGLConfigs are not sorted with respect to the parameters
- EGL_BIND_TO_TEXTURE_RGB, EGL_BIND_TO_TEXTURE_RGBA, EGL_CONFORMANT,
- EGL_LEVEL, EGL_NATIVE_RENDERABLE, EGL_MAX_SWAP_INTERVAL,
- EGL_MIN_SWAP_INTERVAL, EGL_RENDERABLE_TYPE, EGL_SURFACE_TYPE,
- EGL_TRANSPARENT_TYPE, EGL_TRANSPARENT_RED_VALUE,
- EGL_TRANSPARENT_GREEN_VALUE, EGL_TRANSPARENT_BLUE_VALUE, and
- EGL_RECORDABLE_ANDROID.
-
-Issues
-
- 1. Should this functionality be exposed as a new attribute or as a bit in
- the EGL_SURFACE_TYPE bitfield?
-
- RESOLVED: It should be a new attribute. It does not make sense to use up a
- bit in the limit-size bitfield for a platform-specific extension.
-
- 2. How should the new attribute affect the sorting of EGLConfigs?
-
- RESOLVED: It should not affect sorting. Some implementations may not have
- any drawback associated with using a recordable EGLConfig. Such
- implementations should not have to double-up some of their configs to one
- sort earlier than . Implementations that do have drawbacks can use the
- existing caveat mechanism to report this drawback to the client.
-
- 3. How is this extension expected to be implemented?
-
- RESPONSE: There are two basic approaches to implementing this extension
- that were considered during its design. In both cases it is assumed that a
- color space conversion must be performed at some point because most video
- encoding formats use a YUV color space. The two approaches are
- distinguished by the point at which this color space conversion is
- performed.
-
- One approach involves performing the color space conversion as part of the
- eglSwapBuffers call before queuing the rendered image to the ANativeWindow.
- In this case, the VisualID of the EGLConfig would correspond to a YUV
- Android HAL pixel format from which the video encoder can read. The
- EGLConfig would likely have the EGL_SLOW_CONFIG caveat because using that
- config to render normal window contents would result in an RGB -> YUV color
- space conversion when rendering the frame as well as a YUV -> RGB
- conversion when compositing the window.
-
- The other approach involves performing the color space conversion in the
- video encoder. In this case, the VisualID of the EGLConfig would
- correspond to an RGB HAL pixel format from which the video encoder can
- read. The EGLConfig would likely not need to have any caveat set, as using
- this config for normal window rendering would not have any added cost.
-
-Revision History
-
-#2 (Jamie Gennis, July 15, 2011)
- - Added issue 3.
-
-#1 (Jamie Gennis, July 8, 2011)
- - Initial draft.
diff --git a/opengl/specs/README b/opengl/specs/README
deleted file mode 100644
index 16b278f..0000000
--- a/opengl/specs/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This directory contains OpenGL ES and EGL extension specifications that have
-been or are being defined for Android.
-
-The table below tracks usage of EGL enumerant values that have been reserved
-for use by Android extensions.
-
- Value Extension
----------------- ----------------------------------
-0x3140 EGL_ANDROID_image_native_buffer
-0x3141 (unused)
-0x3142 EGL_ANDROID_recordable
-0x3143 EGL_VERSION_HW_ANDROID (internal use)
-0x3144 - 0x314F (unused)
diff --git a/opengl/tests/Android.mk b/opengl/tests/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/opengl/tests/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/opengl/tests/EGLTest/Android.mk b/opengl/tests/EGLTest/Android.mk
deleted file mode 100644
index d8e7012..0000000
--- a/opengl/tests/EGLTest/Android.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# Build the unit tests.
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := EGL_test
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := \
- egl_cache_test.cpp \
- EGL_test.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
- libEGL \
- libcutils \
- libstlport \
- libutils \
-
-LOCAL_STATIC_LIBRARIES := \
- libgtest \
- libgtest_main \
-
-LOCAL_C_INCLUDES := \
- bionic \
- bionic/libc/private \
- bionic/libstdc++/include \
- external/gtest/include \
- external/stlport/stlport \
- frameworks/native/opengl/libs \
- frameworks/native/opengl/libs/EGL \
-
-include $(BUILD_EXECUTABLE)
-
-# Include subdirectory makefiles
-# ============================================================
-
-# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
-# team really wants is to build the stuff defined by this makefile.
-ifeq (,$(ONE_SHOT_MAKEFILE))
-include $(call first-makefiles-under,$(LOCAL_PATH))
-endif
diff --git a/opengl/tests/EGLTest/EGL_test.cpp b/opengl/tests/EGLTest/EGL_test.cpp
deleted file mode 100644
index 337ad33..0000000
--- a/opengl/tests/EGLTest/EGL_test.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * 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.
- */
-
-#include <gtest/gtest.h>
-
-#include <utils/String8.h>
-
-#include <EGL/egl.h>
-
-namespace android {
-
-class EGLTest : public ::testing::Test {
-protected:
- EGLDisplay mEglDisplay;
-
-protected:
- EGLTest() :
- mEglDisplay(EGL_NO_DISPLAY) {
- }
-
- virtual void SetUp() {
- mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- ASSERT_NE(EGL_NO_DISPLAY, mEglDisplay);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
- EGLint majorVersion;
- EGLint minorVersion;
- EXPECT_TRUE(eglInitialize(mEglDisplay, &majorVersion, &minorVersion));
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- RecordProperty("EglVersionMajor", majorVersion);
- RecordProperty("EglVersionMajor", minorVersion);
- }
-
- virtual void TearDown() {
- EGLBoolean success = eglTerminate(mEglDisplay);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- }
-};
-
-TEST_F(EGLTest, DISABLED_EGLConfigEightBitFirst) {
-
- EGLint numConfigs;
- EGLConfig config;
- EGLBoolean success;
- EGLint attrs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_NONE
- };
-
- success = eglChooseConfig(mEglDisplay, attrs, &config, 1, &numConfigs);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- ASSERT_GE(numConfigs, 1);
-
- EGLint components[3];
-
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_RED_SIZE, &components[0]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_GREEN_SIZE, &components[1]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_BLUE_SIZE, &components[2]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
- EXPECT_GE(components[0], 8);
- EXPECT_GE(components[1], 8);
- EXPECT_GE(components[2], 8);
-}
-
-TEST_F(EGLTest, EGLConfigRGBA8888First) {
-
- EGLint numConfigs;
- EGLConfig config;
- EGLBoolean success;
- EGLint attrs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_RED_SIZE, 8,
- EGL_GREEN_SIZE, 8,
- EGL_BLUE_SIZE, 8,
- EGL_ALPHA_SIZE, 8,
- EGL_NONE
- };
-
- success = eglChooseConfig(mEglDisplay, attrs, &config, 1, &numConfigs);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- ASSERT_GE(numConfigs, 1);
-
- EGLint components[4];
-
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_RED_SIZE, &components[0]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_GREEN_SIZE, &components[1]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_BLUE_SIZE, &components[2]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
- success = eglGetConfigAttrib(mEglDisplay, config, EGL_ALPHA_SIZE, &components[3]);
- ASSERT_EQ(EGL_TRUE, success);
- ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
- EXPECT_GE(components[0], 8);
- EXPECT_GE(components[1], 8);
- EXPECT_GE(components[2], 8);
- EXPECT_GE(components[3], 8);
-}
-
-
-}
diff --git a/opengl/tests/EGLTest/egl_cache_test.cpp b/opengl/tests/EGLTest/egl_cache_test.cpp
deleted file mode 100644
index c7d9e3e..0000000
--- a/opengl/tests/EGLTest/egl_cache_test.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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.
- */
-
-#define LOG_TAG "EGL_test"
-//#define LOG_NDEBUG 0
-
-#include <gtest/gtest.h>
-
-#include <utils/Log.h>
-
-#include "egl_cache.h"
-#include "egl_display.h"
-
-namespace android {
-
-class EGLCacheTest : public ::testing::Test {
-protected:
- virtual void SetUp() {
- mCache = egl_cache_t::get();
- }
-
- virtual void TearDown() {
- mCache->setCacheFilename("");
- mCache->terminate();
- }
-
- egl_cache_t* mCache;
-};
-
-TEST_F(EGLCacheTest, UninitializedCacheAlwaysMisses) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
- mCache->setBlob("abcd", 4, "efgh", 4);
- ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4));
- ASSERT_EQ(0xee, buf[0]);
- ASSERT_EQ(0xee, buf[1]);
- ASSERT_EQ(0xee, buf[2]);
- ASSERT_EQ(0xee, buf[3]);
-}
-
-TEST_F(EGLCacheTest, InitializedCacheAlwaysHits) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
- mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
- mCache->setBlob("abcd", 4, "efgh", 4);
- ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4));
- ASSERT_EQ('e', buf[0]);
- ASSERT_EQ('f', buf[1]);
- ASSERT_EQ('g', buf[2]);
- ASSERT_EQ('h', buf[3]);
-}
-
-TEST_F(EGLCacheTest, TerminatedCacheAlwaysMisses) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
- mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
- mCache->setBlob("abcd", 4, "efgh", 4);
- mCache->terminate();
- ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4));
- ASSERT_EQ(0xee, buf[0]);
- ASSERT_EQ(0xee, buf[1]);
- ASSERT_EQ(0xee, buf[2]);
- ASSERT_EQ(0xee, buf[3]);
-}
-
-class EGLCacheSerializationTest : public EGLCacheTest {
-
-protected:
-
- virtual void SetUp() {
- EGLCacheTest::SetUp();
-
- char* tn = tempnam("/sdcard", "EGL_test-cache-");
- mFilename = tn;
- free(tn);
- }
-
- virtual void TearDown() {
- unlink(mFilename.string());
- EGLCacheTest::TearDown();
- }
-
- String8 mFilename;
-};
-
-TEST_F(EGLCacheSerializationTest, ReinitializedCacheContainsValues) {
- char buf[4] = { 0xee, 0xee, 0xee, 0xee };
- mCache->setCacheFilename(mFilename);
- mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
- mCache->setBlob("abcd", 4, "efgh", 4);
- mCache->terminate();
- mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY));
- ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4));
- ASSERT_EQ('e', buf[0]);
- ASSERT_EQ('f', buf[1]);
- ASSERT_EQ('g', buf[2]);
- ASSERT_EQ('h', buf[3]);
-}
-
-}
diff --git a/opengl/tests/angeles/Android.mk b/opengl/tests/angeles/Android.mk
deleted file mode 100644
index ae4f76d..0000000
--- a/opengl/tests/angeles/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 2006 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= app-linux.cpp demo.c.arm
-LOCAL_SHARED_LIBRARIES := libEGL libGLESv1_CM libui
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-LOCAL_MODULE:= angeles
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/angeles/MODULE_LICENSE_BSD_OR_LGPL b/opengl/tests/angeles/MODULE_LICENSE_BSD_OR_LGPL
deleted file mode 100644
index e69de29..0000000
--- a/opengl/tests/angeles/MODULE_LICENSE_BSD_OR_LGPL
+++ /dev/null
diff --git a/opengl/tests/angeles/README.txt b/opengl/tests/angeles/README.txt
deleted file mode 100644
index 38b8a4a..0000000
--- a/opengl/tests/angeles/README.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-------------------------------------------------------------------------
-San Angeles Observation OpenGL ES version example
-Copyright 2004-2005 Jetro Lauha
-Web: http://iki.fi/jetro/
-See file license.txt for licensing information.
-------------------------------------------------------------------------
-
-This is an OpenGL ES port of the small self-running demonstration
-called "San Angeles Observation", which was first presented in the
-Assembly'2004 event. It won the first place in the 4 KB intro
-competition category.
-
-The demonstration features a sightseeing of a futuristic city
-having many different kind of buildings and items. Everything is
-flat shaded with three different lights.
-
-The original version was made for desktop with OpenGL. It was
-naturally heavily size optimized in order to fit it in the size
-limit. For this OpenGL ES version example much of the code is
-cleaned up and the sound is removed. Also detail level is lowered,
-although it still contains over 60000 faces.
-
-The Win32 (2000/XP) binary package of original version is
-available from this address: http://jet.ro/files/angeles.zip
-
-First version of this OpenGL ES port was submitted to the Khronos
-OpenGL ES Coding Challenge held in 2004-2005.
-
-As a code example, this source shows the following:
- * How to create a minimal and portable ad hoc framework
- for small testing/demonstration programs. This framework
- compiles for both desktop and PocketPC Win32 environment,
- and a separate source is included for Linux with X11.
- * How to dynamically find and use the OpenGL ES DLL or
- shared object, so that the library is not needed at
- the compile/link stage.
- * How to use the basic features of OpenGL ES 1.0/1.1
- Common Lite, such as vertex arrays, color arrays and
- lighting.
- * How to create a self contained small demonstration
- application with objects generated using procedural
- algorithms.
-
-As the original version was optimized for size instead of
-performance, that holds true for this OpenGL ES version as
-well. Thus the performance could be significantly increased,
-for example by changing the code to use glDrawElements
-instead of glDrawArrays. The code uses only OpenGL ES 1.0
-Common Lite -level function calls without any extensions.
-
-The reference OpenGL ES implementations used for this application:
- * Hybrid's OpenGL ES API Implementation (Gerbera) version 2.0.4
- Prebuilt Win32 PC executable: SanOGLES-Gerbera.exe
- * PowerVR MBX SDK, OpenGL ES Windows PC Emulation version 1.04.14.0170
- Prebuilt Win32 PC executable: SanOGLES-PVRSDK.exe
-
-Note that DISABLE_IMPORTGL preprocessor macro can be used
-to specify not to use dynamic runtime binding of the library.
-You also need to define preprocessor macro PVRSDK to compile
-the source with PowerVR OpenGL ES SDK.
-
-The demo application is briefly tested with a few other OpenGL ES
-implementations as well (e.g. Vincent, GLESonGL on Linux, Dell
-Axim X50v). Most of these other implementations rendered the demo
-erroneously in some aspect. This may indicate that the demo source
-could still have some work to do with compatibility and correct
-API usage, although the non-conforming implementations are most
-probably unfinished as well.
-
-Thanks and Acknowledgements:
-
-* Toni Lönnberg (!Cube) created the music for original version, which
- is not featured in this OpenGL ES port.
-* Sara Kapli (st Rana) for additional camera work.
-* Paul Bourke for information about the supershapes.
-
-------------------------------------------------------------------------
diff --git a/opengl/tests/angeles/app-linux.cpp b/opengl/tests/angeles/app-linux.cpp
deleted file mode 100644
index 6ac68a2..0000000
--- a/opengl/tests/angeles/app-linux.cpp
+++ /dev/null
@@ -1,232 +0,0 @@
-/* San Angeles Observation OpenGL ES version example
- * Copyright 2004-2005 Jetro Lauha
- * All rights reserved.
- * Web: http://iki.fi/jetro/
- *
- * This source is free software; you can redistribute it and/or
- * modify it under the terms of EITHER:
- * (1) The GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. The text of the GNU Lesser
- * General Public License is included with this source in the
- * file LICENSE-LGPL.txt.
- * (2) The BSD-style license that is included with this source in
- * the file LICENSE-BSD.txt.
- *
- * This source is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
- * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
- *
- * $Id: app-linux.c,v 1.4 2005/02/08 18:42:48 tonic Exp $
- * $Revision: 1.4 $
- *
- * Parts of this source file is based on test/example code from
- * GLESonGL implementation by David Blythe. Here is copy of the
- * license notice from that source:
- *
- * Copyright (C) 2003 David Blythe All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * DAVID BLYTHE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/time.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-#include "app.h"
-
-
-int gAppAlive = 1;
-
-static const char sAppName[] =
- "San Angeles Observation OpenGL ES version example (Linux)";
-
-static int sWindowWidth = WINDOW_DEFAULT_WIDTH;
-static int sWindowHeight = WINDOW_DEFAULT_HEIGHT;
-static EGLDisplay sEglDisplay = EGL_NO_DISPLAY;
-static EGLContext sEglContext = EGL_NO_CONTEXT;
-static EGLSurface sEglSurface = EGL_NO_SURFACE;
-
-const char *egl_strerror(unsigned err)
-{
- switch(err){
- case EGL_SUCCESS: return "SUCCESS";
- case EGL_NOT_INITIALIZED: return "NOT INITIALIZED";
- case EGL_BAD_ACCESS: return "BAD ACCESS";
- case EGL_BAD_ALLOC: return "BAD ALLOC";
- case EGL_BAD_ATTRIBUTE: return "BAD_ATTRIBUTE";
- case EGL_BAD_CONFIG: return "BAD CONFIG";
- case EGL_BAD_CONTEXT: return "BAD CONTEXT";
- case EGL_BAD_CURRENT_SURFACE: return "BAD CURRENT SURFACE";
- case EGL_BAD_DISPLAY: return "BAD DISPLAY";
- case EGL_BAD_MATCH: return "BAD MATCH";
- case EGL_BAD_NATIVE_PIXMAP: return "BAD NATIVE PIXMAP";
- case EGL_BAD_NATIVE_WINDOW: return "BAD NATIVE WINDOW";
- case EGL_BAD_PARAMETER: return "BAD PARAMETER";
- case EGL_BAD_SURFACE: return "BAD_SURFACE";
- // case EGL_CONTEXT_LOST: return "CONTEXT LOST";
- default: return "UNKNOWN";
- }
-}
-
-void egl_error(const char *name)
-{
- unsigned err = eglGetError();
- if(err != EGL_SUCCESS) {
- fprintf(stderr,"%s(): egl error 0x%x (%s)\n",
- name, err, egl_strerror(err));
- }
-}
-
-static void checkGLErrors()
-{
- GLenum error = glGetError();
- if (error != GL_NO_ERROR)
- fprintf(stderr, "GL Error: 0x%04x\n", (int)error);
-}
-
-
-static void checkEGLErrors()
-{
- EGLint error = eglGetError();
- // GLESonGL seems to be returning 0 when there is no errors?
- if (error && error != EGL_SUCCESS)
- fprintf(stderr, "EGL Error: 0x%04x\n", (int)error);
-}
-
-static int initGraphics(unsigned samples)
-{
- EGLint configAttribs[] = {
- EGL_DEPTH_SIZE, 16,
- EGL_SAMPLE_BUFFERS, samples ? 1 : 0,
- EGL_SAMPLES, samples,
- EGL_NONE
- };
-
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLConfig config;
- EGLSurface surface;
- EGLint w, h;
- EGLDisplay dpy;
-
- EGLNativeWindowType window = android_createDisplaySurface();
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
-
- status_t err = EGLUtils::selectConfigForNativeWindow(
- dpy, configAttribs, window, &config);
- if (err) {
- fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n");
- return 0;
- }
-
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- egl_error("eglCreateWindowSurface");
-
- fprintf(stderr,"surface = %p\n", surface);
-
- context = eglCreateContext(dpy, config, NULL, NULL);
- egl_error("eglCreateContext");
- fprintf(stderr,"context = %p\n", context);
-
- eglMakeCurrent(dpy, surface, surface, context);
- egl_error("eglMakeCurrent");
-
- eglQuerySurface(dpy, surface, EGL_WIDTH, &sWindowWidth);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &sWindowHeight);
-
- sEglDisplay = dpy;
- sEglSurface = surface;
- sEglContext = context;
-
- if (samples == 0) {
- // GL_MULTISAMPLE is enabled by default
- glDisable(GL_MULTISAMPLE);
- }
-
- return EGL_TRUE;
-}
-
-
-static void deinitGraphics()
-{
- eglMakeCurrent(sEglDisplay, NULL, NULL, NULL);
- eglDestroyContext(sEglDisplay, sEglContext);
- eglDestroySurface(sEglDisplay, sEglSurface);
- eglTerminate(sEglDisplay);
-}
-
-
-int main(int argc, char *argv[])
-{
- unsigned samples = 0;
- printf("usage: %s [samples]\n", argv[0]);
- if (argc == 2) {
- samples = atoi( argv[1] );
- printf("Multisample enabled: GL_SAMPLES = %u\n", samples);
- }
-
- if (!initGraphics(samples))
- {
- fprintf(stderr, "Graphics initialization failed.\n");
- return EXIT_FAILURE;
- }
-
- appInit();
-
- struct timeval timeTemp;
- int frameCount = 0;
- gettimeofday(&timeTemp, NULL);
- double totalTime = timeTemp.tv_usec/1000000.0 + timeTemp.tv_sec;
-
- while (gAppAlive)
- {
- struct timeval timeNow;
-
- gettimeofday(&timeNow, NULL);
- appRender(timeNow.tv_sec * 1000 + timeNow.tv_usec / 1000,
- sWindowWidth, sWindowHeight);
- checkGLErrors();
- eglSwapBuffers(sEglDisplay, sEglSurface);
- checkEGLErrors();
- frameCount++;
- }
-
- gettimeofday(&timeTemp, NULL);
-
- appDeinit();
- deinitGraphics();
-
- totalTime = (timeTemp.tv_usec/1000000.0 + timeTemp.tv_sec) - totalTime;
- printf("totalTime=%f s, frameCount=%d, %.2f fps\n",
- totalTime, frameCount, frameCount/totalTime);
-
- return EXIT_SUCCESS;
-}
diff --git a/opengl/tests/angeles/app.h b/opengl/tests/angeles/app.h
deleted file mode 100644
index 70ebd35..0000000
--- a/opengl/tests/angeles/app.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* San Angeles Observation OpenGL ES version example
- * Copyright 2004-2005 Jetro Lauha
- * All rights reserved.
- * Web: http://iki.fi/jetro/
- *
- * This source is free software; you can redistribute it and/or
- * modify it under the terms of EITHER:
- * (1) The GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. The text of the GNU Lesser
- * General Public License is included with this source in the
- * file LICENSE-LGPL.txt.
- * (2) The BSD-style license that is included with this source in
- * the file LICENSE-BSD.txt.
- *
- * This source is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
- * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
- *
- * $Id: app.h,v 1.14 2005/02/06 21:13:54 tonic Exp $
- * $Revision: 1.14 $
- */
-
-#ifndef APP_H_INCLUDED
-#define APP_H_INCLUDED
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define WINDOW_DEFAULT_WIDTH 640
-#define WINDOW_DEFAULT_HEIGHT 480
-
-#define WINDOW_BPP 16
-
-
-// The simple framework expects the application code to define these functions.
-extern void appInit();
-extern void appDeinit();
-extern void appRender(long tick, int width, int height);
-
-/* Value is non-zero when application is alive, and 0 when it is closing.
- * Defined by the application framework.
- */
-extern int gAppAlive;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif // !APP_H_INCLUDED
diff --git a/opengl/tests/angeles/cams.h b/opengl/tests/angeles/cams.h
deleted file mode 100644
index 2b1acb3..0000000
--- a/opengl/tests/angeles/cams.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* San Angeles Observation OpenGL ES version example
- * Copyright 2004-2005 Jetro Lauha
- * All rights reserved.
- * Web: http://iki.fi/jetro/
- *
- * This source is free software; you can redistribute it and/or
- * modify it under the terms of EITHER:
- * (1) The GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. The text of the GNU Lesser
- * General Public License is included with this source in the
- * file LICENSE-LGPL.txt.
- * (2) The BSD-style license that is included with this source in
- * the file LICENSE-BSD.txt.
- *
- * This source is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
- * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
- *
- * $Id: cams.h,v 1.7 2005/01/31 22:15:15 tonic Exp $
- * $Revision: 1.7 $
- */
-
-#ifndef CAMS_H_INCLUDED
-#define CAMS_H_INCLUDED
-
-
-/* Length in milliseconds of one camera track base unit.
- * The value originates from the music synchronization.
- */
-#define CAMTRACK_LEN 5442
-
-
-// Camera track definition for one camera trucking shot.
-typedef struct
-{
- /* Five parameters of src[5] and dest[5]:
- * eyeX, eyeY, eyeZ, viewAngle, viewHeightOffs
- */
- short src[5], dest[5];
- unsigned char dist; // if >0, cam rotates around eye xy on dist * 0.1
- unsigned char len; // length multiplier
-} CAMTRACK;
-
-static CAMTRACK sCamTracks[] =
-{
- { { 4500, 2700, 100, 70, -30 }, { 50, 50, -90, -100, 0 }, 20, 1 },
- { { -1448, 4294, 25, 363, 0 }, { -136, 202, 125, -98, 100 }, 0, 1 },
- { { 1437, 4930, 200, -275, -20 }, { 1684, 0, 0, 9, 0 }, 0, 1 },
- { { 1800, 3609, 200, 0, 675 }, { 0, 0, 0, 300, 0 }, 0, 1 },
- { { 923, 996, 50, 2336, -80 }, { 0, -20, -50, 0, 170 }, 0, 1 },
- { { -1663, -43, 600, 2170, 0 }, { 20, 0, -600, 0, 100 }, 0, 1 },
- { { 1049, -1420, 175, 2111, -17 }, { 0, 0, 0, -334, 0 }, 0, 2 },
- { { 0, 0, 50, 300, 25 }, { 0, 0, 0, 300, 0 }, 70, 2 },
- { { -473, -953, 3500, -353, -350 }, { 0, 0, -2800, 0, 0 }, 0, 2 },
- { { 191, 1938, 35, 1139, -17 }, { 1205, -2909, 0, 0, 0 }, 0, 2 },
- { { -1449, -2700, 150, 0, 0 }, { 0, 2000, 0, 0, 0 }, 0, 2 },
- { { 5273, 4992, 650, 373, -50 }, { -4598, -3072, 0, 0, 0 }, 0, 2 },
- { { 3223, -3282, 1075, -393, -25 }, { 1649, -1649, 0, 0, 0 }, 0, 2 }
-};
-#define CAMTRACK_COUNT (sizeof(camTracks) / sizeof(camTracks[0]))
-
-
-#endif // !CAMS_H_INCLUDED
diff --git a/opengl/tests/angeles/demo.c b/opengl/tests/angeles/demo.c
deleted file mode 100644
index 802f398..0000000
--- a/opengl/tests/angeles/demo.c
+++ /dev/null
@@ -1,792 +0,0 @@
-/* San Angeles Observation OpenGL ES version example
- * Copyright 2004-2005 Jetro Lauha
- * All rights reserved.
- * Web: http://iki.fi/jetro/
- *
- * This source is free software; you can redistribute it and/or
- * modify it under the terms of EITHER:
- * (1) The GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. The text of the GNU Lesser
- * General Public License is included with this source in the
- * file LICENSE-LGPL.txt.
- * (2) The BSD-style license that is included with this source in
- * the file LICENSE-BSD.txt.
- *
- * This source is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
- * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
- *
- * $Id: demo.c,v 1.10 2005/02/08 20:54:39 tonic Exp $
- * $Revision: 1.10 $
- */
-
-#include <stdlib.h>
-#include <math.h>
-#include <float.h>
-#include <assert.h>
-
-#include <GLES/gl.h>
-
-#include "app.h"
-#include "shapes.h"
-#include "cams.h"
-
-
-// Total run length is 20 * camera track base unit length (see cams.h).
-#define RUN_LENGTH (20 * CAMTRACK_LEN)
-#undef PI
-#define PI 3.1415926535897932f
-#define RANDOM_UINT_MAX 65535
-
-
-static unsigned long sRandomSeed = 0;
-
-static void seedRandom(unsigned long seed)
-{
- sRandomSeed = seed;
-}
-
-static unsigned long randomUInt()
-{
- sRandomSeed = sRandomSeed * 0x343fd + 0x269ec3;
- return sRandomSeed >> 16;
-}
-
-
-// Capped conversion from float to fixed.
-static long floatToFixed(float value)
-{
- if (value < -32768) value = -32768;
- if (value > 32767) value = 32767;
- return (long)(value * 65536);
-}
-
-#define FIXED(value) floatToFixed(value)
-
-
-// Definition of one GL object in this demo.
-typedef struct {
- /* Vertex array and color array are enabled for all objects, so their
- * pointers must always be valid and non-NULL. Normal array is not
- * used by the ground plane, so when its pointer is NULL then normal
- * array usage is disabled.
- *
- * Vertex array is supposed to use GL_FIXED datatype and stride 0
- * (i.e. tightly packed array). Color array is supposed to have 4
- * components per color with GL_UNSIGNED_BYTE datatype and stride 0.
- * Normal array is supposed to use GL_FIXED datatype and stride 0.
- */
- GLfixed *vertexArray;
- GLubyte *colorArray;
- GLfixed *normalArray;
- GLint vertexComponents;
- GLsizei count;
-} GLOBJECT;
-
-
-static long sStartTick = 0;
-static long sTick = 0;
-
-static int sCurrentCamTrack = 0;
-static long sCurrentCamTrackStartTick = 0;
-static long sNextCamTrackStartTick = 0x7fffffff;
-
-static GLOBJECT *sSuperShapeObjects[SUPERSHAPE_COUNT] = { NULL };
-static GLOBJECT *sGroundPlane = NULL;
-
-
-typedef struct {
- float x, y, z;
-} VECTOR3;
-
-
-static void freeGLObject(GLOBJECT *object)
-{
- if (object == NULL)
- return;
- free(object->normalArray);
- free(object->colorArray);
- free(object->vertexArray);
- free(object);
-}
-
-
-static GLOBJECT * newGLObject(long vertices, int vertexComponents,
- int useNormalArray)
-{
- GLOBJECT *result;
- result = (GLOBJECT *)malloc(sizeof(GLOBJECT));
- if (result == NULL)
- return NULL;
- result->count = vertices;
- result->vertexComponents = vertexComponents;
- result->vertexArray = (GLfixed *)malloc(vertices * vertexComponents *
- sizeof(GLfixed));
- result->colorArray = (GLubyte *)malloc(vertices * 4 * sizeof(GLubyte));
- if (useNormalArray)
- {
- result->normalArray = (GLfixed *)malloc(vertices * 3 *
- sizeof(GLfixed));
- }
- else
- result->normalArray = NULL;
- if (result->vertexArray == NULL ||
- result->colorArray == NULL ||
- (useNormalArray && result->normalArray == NULL))
- {
- freeGLObject(result);
- return NULL;
- }
- return result;
-}
-
-
-static void drawGLObject(GLOBJECT *object)
-{
- assert(object != NULL);
-
- glVertexPointer(object->vertexComponents, GL_FIXED,
- 0, object->vertexArray);
- glColorPointer(4, GL_UNSIGNED_BYTE, 0, object->colorArray);
-
- // Already done in initialization:
- //glEnableClientState(GL_VERTEX_ARRAY);
- //glEnableClientState(GL_COLOR_ARRAY);
-
- if (object->normalArray)
- {
- glNormalPointer(GL_FIXED, 0, object->normalArray);
- glEnableClientState(GL_NORMAL_ARRAY);
- }
- else
- glDisableClientState(GL_NORMAL_ARRAY);
- glDrawArrays(GL_TRIANGLES, 0, object->count);
-}
-
-
-static void vector3Sub(VECTOR3 *dest, VECTOR3 *v1, VECTOR3 *v2)
-{
- dest->x = v1->x - v2->x;
- dest->y = v1->y - v2->y;
- dest->z = v1->z - v2->z;
-}
-
-
-static void superShapeMap(VECTOR3 *point, float r1, float r2, float t, float p)
-{
- // sphere-mapping of supershape parameters
- point->x = (float)(cos(t) * cos(p) / r1 / r2);
- point->y = (float)(sin(t) * cos(p) / r1 / r2);
- point->z = (float)(sin(p) / r2);
-}
-
-
-static float ssFunc(const float t, const float *p)
-{
- return (float)(pow(pow(fabs(cos(p[0] * t / 4)) / p[1], p[4]) +
- pow(fabs(sin(p[0] * t / 4)) / p[2], p[5]), 1 / p[3]));
-}
-
-
-// Creates and returns a supershape object.
-// Based on Paul Bourke's POV-Ray implementation.
-// http://astronomy.swin.edu.au/~pbourke/povray/supershape/
-static GLOBJECT * createSuperShape(const float *params)
-{
- const int resol1 = (int)params[SUPERSHAPE_PARAMS - 3];
- const int resol2 = (int)params[SUPERSHAPE_PARAMS - 2];
- // latitude 0 to pi/2 for no mirrored bottom
- // (latitudeBegin==0 for -pi/2 to pi/2 originally)
- const int latitudeBegin = resol2 / 4;
- const int latitudeEnd = resol2 / 2; // non-inclusive
- const int longitudeCount = resol1;
- const int latitudeCount = latitudeEnd - latitudeBegin;
- const long triangleCount = longitudeCount * latitudeCount * 2;
- const long vertices = triangleCount * 3;
- GLOBJECT *result;
- float baseColor[3];
- int a, longitude, latitude;
- long currentVertex, currentQuad;
-
- result = newGLObject(vertices, 3, 1);
- if (result == NULL)
- return NULL;
-
- for (a = 0; a < 3; ++a)
- baseColor[a] = ((randomUInt() % 155) + 100) / 255.f;
-
- currentQuad = 0;
- currentVertex = 0;
-
- // longitude -pi to pi
- for (longitude = 0; longitude < longitudeCount; ++longitude)
- {
-
- // latitude 0 to pi/2
- for (latitude = latitudeBegin; latitude < latitudeEnd; ++latitude)
- {
- float t1 = -PI + longitude * 2 * PI / resol1;
- float t2 = -PI + (longitude + 1) * 2 * PI / resol1;
- float p1 = -PI / 2 + latitude * 2 * PI / resol2;
- float p2 = -PI / 2 + (latitude + 1) * 2 * PI / resol2;
- float r0, r1, r2, r3;
-
- r0 = ssFunc(t1, params);
- r1 = ssFunc(p1, &params[6]);
- r2 = ssFunc(t2, params);
- r3 = ssFunc(p2, &params[6]);
-
- if (r0 != 0 && r1 != 0 && r2 != 0 && r3 != 0)
- {
- VECTOR3 pa, pb, pc, pd;
- VECTOR3 v1, v2, n;
- float ca;
- int i;
- //float lenSq, invLenSq;
-
- superShapeMap(&pa, r0, r1, t1, p1);
- superShapeMap(&pb, r2, r1, t2, p1);
- superShapeMap(&pc, r2, r3, t2, p2);
- superShapeMap(&pd, r0, r3, t1, p2);
-
- // kludge to set lower edge of the object to fixed level
- if (latitude == latitudeBegin + 1)
- pa.z = pb.z = 0;
-
- vector3Sub(&v1, &pb, &pa);
- vector3Sub(&v2, &pd, &pa);
-
- // Calculate normal with cross product.
- /* i j k i j
- * v1.x v1.y v1.z | v1.x v1.y
- * v2.x v2.y v2.z | v2.x v2.y
- */
-
- n.x = v1.y * v2.z - v1.z * v2.y;
- n.y = v1.z * v2.x - v1.x * v2.z;
- n.z = v1.x * v2.y - v1.y * v2.x;
-
- /* Pre-normalization of the normals is disabled here because
- * they will be normalized anyway later due to automatic
- * normalization (GL_NORMALIZE). It is enabled because the
- * objects are scaled with glScale.
- */
- /*
- lenSq = n.x * n.x + n.y * n.y + n.z * n.z;
- invLenSq = (float)(1 / sqrt(lenSq));
- n.x *= invLenSq;
- n.y *= invLenSq;
- n.z *= invLenSq;
- */
-
- ca = pa.z + 0.5f;
-
- for (i = currentVertex * 3;
- i < (currentVertex + 6) * 3;
- i += 3)
- {
- result->normalArray[i] = FIXED(n.x);
- result->normalArray[i + 1] = FIXED(n.y);
- result->normalArray[i + 2] = FIXED(n.z);
- }
- for (i = currentVertex * 4;
- i < (currentVertex + 6) * 4;
- i += 4)
- {
- int a, color[3];
- for (a = 0; a < 3; ++a)
- {
- color[a] = (int)(ca * baseColor[a] * 255);
- if (color[a] > 255) color[a] = 255;
- }
- result->colorArray[i] = (GLubyte)color[0];
- result->colorArray[i + 1] = (GLubyte)color[1];
- result->colorArray[i + 2] = (GLubyte)color[2];
- result->colorArray[i + 3] = 0;
- }
- result->vertexArray[currentVertex * 3] = FIXED(pa.x);
- result->vertexArray[currentVertex * 3 + 1] = FIXED(pa.y);
- result->vertexArray[currentVertex * 3 + 2] = FIXED(pa.z);
- ++currentVertex;
- result->vertexArray[currentVertex * 3] = FIXED(pb.x);
- result->vertexArray[currentVertex * 3 + 1] = FIXED(pb.y);
- result->vertexArray[currentVertex * 3 + 2] = FIXED(pb.z);
- ++currentVertex;
- result->vertexArray[currentVertex * 3] = FIXED(pd.x);
- result->vertexArray[currentVertex * 3 + 1] = FIXED(pd.y);
- result->vertexArray[currentVertex * 3 + 2] = FIXED(pd.z);
- ++currentVertex;
- result->vertexArray[currentVertex * 3] = FIXED(pb.x);
- result->vertexArray[currentVertex * 3 + 1] = FIXED(pb.y);
- result->vertexArray[currentVertex * 3 + 2] = FIXED(pb.z);
- ++currentVertex;
- result->vertexArray[currentVertex * 3] = FIXED(pc.x);
- result->vertexArray[currentVertex * 3 + 1] = FIXED(pc.y);
- result->vertexArray[currentVertex * 3 + 2] = FIXED(pc.z);
- ++currentVertex;
- result->vertexArray[currentVertex * 3] = FIXED(pd.x);
- result->vertexArray[currentVertex * 3 + 1] = FIXED(pd.y);
- result->vertexArray[currentVertex * 3 + 2] = FIXED(pd.z);
- ++currentVertex;
- } // r0 && r1 && r2 && r3
- ++currentQuad;
- } // latitude
- } // longitude
-
- // Set number of vertices in object to the actual amount created.
- result->count = currentVertex;
-
- return result;
-}
-
-
-static GLOBJECT * createGroundPlane()
-{
- const int scale = 4;
- const int yBegin = -15, yEnd = 15; // ends are non-inclusive
- const int xBegin = -15, xEnd = 15;
- const long triangleCount = (yEnd - yBegin) * (xEnd - xBegin) * 2;
- const long vertices = triangleCount * 3;
- GLOBJECT *result;
- int x, y;
- long currentVertex, currentQuad;
-
- result = newGLObject(vertices, 2, 0);
- if (result == NULL)
- return NULL;
-
- currentQuad = 0;
- currentVertex = 0;
-
- for (y = yBegin; y < yEnd; ++y)
- {
- for (x = xBegin; x < xEnd; ++x)
- {
- GLubyte color;
- int i, a;
- color = (GLubyte)((randomUInt() & 0x5f) + 81); // 101 1111
- for (i = currentVertex * 4; i < (currentVertex + 6) * 4; i += 4)
- {
- result->colorArray[i] = color;
- result->colorArray[i + 1] = color;
- result->colorArray[i + 2] = color;
- result->colorArray[i + 3] = 0;
- }
-
- // Axis bits for quad triangles:
- // x: 011100 (0x1c), y: 110001 (0x31) (clockwise)
- // x: 001110 (0x0e), y: 100011 (0x23) (counter-clockwise)
- for (a = 0; a < 6; ++a)
- {
- const int xm = x + ((0x1c >> a) & 1);
- const int ym = y + ((0x31 >> a) & 1);
- const float m = (float)(cos(xm * 2) * sin(ym * 4) * 0.75f);
- result->vertexArray[currentVertex * 2] =
- FIXED(xm * scale + m);
- result->vertexArray[currentVertex * 2 + 1] =
- FIXED(ym * scale + m);
- ++currentVertex;
- }
- ++currentQuad;
- }
- }
- return result;
-}
-
-
-static void drawGroundPlane()
-{
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glEnable(GL_BLEND);
- glBlendFunc(GL_ZERO, GL_SRC_COLOR);
- glDisable(GL_LIGHTING);
-
- drawGLObject(sGroundPlane);
-
- glEnable(GL_LIGHTING);
- glDisable(GL_BLEND);
- glEnable(GL_DEPTH_TEST);
-}
-
-
-static void drawFadeQuad()
-{
- static const GLfixed quadVertices[] = {
- -0x10000, -0x10000,
- 0x10000, -0x10000,
- -0x10000, 0x10000,
- 0x10000, -0x10000,
- 0x10000, 0x10000,
- -0x10000, 0x10000
- };
-
- const int beginFade = sTick - sCurrentCamTrackStartTick;
- const int endFade = sNextCamTrackStartTick - sTick;
- const int minFade = beginFade < endFade ? beginFade : endFade;
-
- if (minFade < 1024)
- {
- const GLfixed fadeColor = minFade << 6;
- glColor4x(fadeColor, fadeColor, fadeColor, 0);
-
- glDisable(GL_DEPTH_TEST);
- glEnable(GL_BLEND);
- glBlendFunc(GL_ZERO, GL_SRC_COLOR);
- glDisable(GL_LIGHTING);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-
- glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
- glVertexPointer(2, GL_FIXED, 0, quadVertices);
- glDrawArrays(GL_TRIANGLES, 0, 6);
-
- glEnableClientState(GL_COLOR_ARRAY);
-
- glMatrixMode(GL_MODELVIEW);
-
- glEnable(GL_LIGHTING);
- glDisable(GL_BLEND);
- glEnable(GL_DEPTH_TEST);
- }
-}
-
-
-// Called from the app framework.
-void appInit()
-{
- int a;
-
- glEnable(GL_NORMALIZE);
- glEnable(GL_DEPTH_TEST);
- glDisable(GL_CULL_FACE);
- glShadeModel(GL_FLAT);
-
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_LIGHT1);
- glEnable(GL_LIGHT2);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_COLOR_ARRAY);
-
- seedRandom(15);
-
- for (a = 0; a < SUPERSHAPE_COUNT; ++a)
- {
- sSuperShapeObjects[a] = createSuperShape(sSuperShapeParams[a]);
- assert(sSuperShapeObjects[a] != NULL);
- }
- sGroundPlane = createGroundPlane();
- assert(sGroundPlane != NULL);
-}
-
-
-// Called from the app framework.
-void appDeinit()
-{
- int a;
- for (a = 0; a < SUPERSHAPE_COUNT; ++a)
- freeGLObject(sSuperShapeObjects[a]);
- freeGLObject(sGroundPlane);
-}
-
-
-static void gluPerspective(GLfloat fovy, GLfloat aspect,
- GLfloat zNear, GLfloat zFar)
-{
- GLfloat xmin, xmax, ymin, ymax;
-
- ymax = zNear * (GLfloat)tan(fovy * PI / 360);
- ymin = -ymax;
- xmin = ymin * aspect;
- xmax = ymax * aspect;
-
- glFrustumx((GLfixed)(xmin * 65536), (GLfixed)(xmax * 65536),
- (GLfixed)(ymin * 65536), (GLfixed)(ymax * 65536),
- (GLfixed)(zNear * 65536), (GLfixed)(zFar * 65536));
-}
-
-
-static void prepareFrame(int width, int height)
-{
- glViewport(0, 0, width, height);
-
- glClearColorx((GLfixed)(0.1f * 65536),
- (GLfixed)(0.2f * 65536),
- (GLfixed)(0.3f * 65536), 0x10000);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(45, (float)width / height, 0.5f, 150);
-
- glMatrixMode(GL_MODELVIEW);
-
- glLoadIdentity();
-}
-
-
-static void configureLightAndMaterial()
-{
- static GLfixed light0Position[] = { -0x40000, 0x10000, 0x10000, 0 };
- static GLfixed light0Diffuse[] = { 0x10000, 0x6666, 0, 0x10000 };
- static GLfixed light1Position[] = { 0x10000, -0x20000, -0x10000, 0 };
- static GLfixed light1Diffuse[] = { 0x11eb, 0x23d7, 0x5999, 0x10000 };
- static GLfixed light2Position[] = { -0x10000, 0, -0x40000, 0 };
- static GLfixed light2Diffuse[] = { 0x11eb, 0x2b85, 0x23d7, 0x10000 };
- static GLfixed materialSpecular[] = { 0x10000, 0x10000, 0x10000, 0x10000 };
-
- glLightxv(GL_LIGHT0, GL_POSITION, light0Position);
- glLightxv(GL_LIGHT0, GL_DIFFUSE, light0Diffuse);
- glLightxv(GL_LIGHT1, GL_POSITION, light1Position);
- glLightxv(GL_LIGHT1, GL_DIFFUSE, light1Diffuse);
- glLightxv(GL_LIGHT2, GL_POSITION, light2Position);
- glLightxv(GL_LIGHT2, GL_DIFFUSE, light2Diffuse);
- glMaterialxv(GL_FRONT_AND_BACK, GL_SPECULAR, materialSpecular);
-
- glMaterialx(GL_FRONT_AND_BACK, GL_SHININESS, 60 << 16);
- glEnable(GL_COLOR_MATERIAL);
-}
-
-
-static void drawModels(float zScale)
-{
- const int translationScale = 9;
- int x, y;
-
- seedRandom(9);
-
- glScalex(1 << 16, 1 << 16, (GLfixed)(zScale * 65536));
-
- for (y = -5; y <= 5; ++y)
- {
- for (x = -5; x <= 5; ++x)
- {
- float buildingScale;
- GLfixed fixedScale;
-
- int curShape = randomUInt() % SUPERSHAPE_COUNT;
- buildingScale = sSuperShapeParams[curShape][SUPERSHAPE_PARAMS - 1];
- fixedScale = (GLfixed)(buildingScale * 65536);
-
- glPushMatrix();
- glTranslatex((x * translationScale) * 65536,
- (y * translationScale) * 65536,
- 0);
- glRotatex((GLfixed)((randomUInt() % 360) << 16), 0, 0, 1 << 16);
- glScalex(fixedScale, fixedScale, fixedScale);
-
- drawGLObject(sSuperShapeObjects[curShape]);
- glPopMatrix();
- }
- }
-
- for (x = -2; x <= 2; ++x)
- {
- const int shipScale100 = translationScale * 500;
- const int offs100 = x * shipScale100 + (sTick % shipScale100);
- float offs = offs100 * 0.01f;
- GLfixed fixedOffs = (GLfixed)(offs * 65536);
- glPushMatrix();
- glTranslatex(fixedOffs, -4 * 65536, 2 << 16);
- drawGLObject(sSuperShapeObjects[SUPERSHAPE_COUNT - 1]);
- glPopMatrix();
- glPushMatrix();
- glTranslatex(-4 * 65536, fixedOffs, 4 << 16);
- glRotatex(90 << 16, 0, 0, 1 << 16);
- drawGLObject(sSuperShapeObjects[SUPERSHAPE_COUNT - 1]);
- glPopMatrix();
- }
-}
-
-
-/* Following gluLookAt implementation is adapted from the
- * Mesa 3D Graphics library. http://www.mesa3d.org
- */
-static void gluLookAt(GLfloat eyex, GLfloat eyey, GLfloat eyez,
- GLfloat centerx, GLfloat centery, GLfloat centerz,
- GLfloat upx, GLfloat upy, GLfloat upz)
-{
- GLfloat m[16];
- GLfloat x[3], y[3], z[3];
- GLfloat mag;
-
- /* Make rotation matrix */
-
- /* Z vector */
- z[0] = eyex - centerx;
- z[1] = eyey - centery;
- z[2] = eyez - centerz;
- mag = (float)sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]);
- if (mag) { /* mpichler, 19950515 */
- z[0] /= mag;
- z[1] /= mag;
- z[2] /= mag;
- }
-
- /* Y vector */
- y[0] = upx;
- y[1] = upy;
- y[2] = upz;
-
- /* X vector = Y cross Z */
- x[0] = y[1] * z[2] - y[2] * z[1];
- x[1] = -y[0] * z[2] + y[2] * z[0];
- x[2] = y[0] * z[1] - y[1] * z[0];
-
- /* Recompute Y = Z cross X */
- y[0] = z[1] * x[2] - z[2] * x[1];
- y[1] = -z[0] * x[2] + z[2] * x[0];
- y[2] = z[0] * x[1] - z[1] * x[0];
-
- /* mpichler, 19950515 */
- /* cross product gives area of parallelogram, which is < 1.0 for
- * non-perpendicular unit-length vectors; so normalize x, y here
- */
-
- mag = (float)sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
- if (mag) {
- x[0] /= mag;
- x[1] /= mag;
- x[2] /= mag;
- }
-
- mag = (float)sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]);
- if (mag) {
- y[0] /= mag;
- y[1] /= mag;
- y[2] /= mag;
- }
-
-#define M(row,col) m[col*4+row]
- M(0, 0) = x[0];
- M(0, 1) = x[1];
- M(0, 2) = x[2];
- M(0, 3) = 0.0;
- M(1, 0) = y[0];
- M(1, 1) = y[1];
- M(1, 2) = y[2];
- M(1, 3) = 0.0;
- M(2, 0) = z[0];
- M(2, 1) = z[1];
- M(2, 2) = z[2];
- M(2, 3) = 0.0;
- M(3, 0) = 0.0;
- M(3, 1) = 0.0;
- M(3, 2) = 0.0;
- M(3, 3) = 1.0;
-#undef M
- {
- int a;
- GLfixed fixedM[16];
- for (a = 0; a < 16; ++a)
- fixedM[a] = (GLfixed)(m[a] * 65536);
- glMultMatrixx(fixedM);
- }
-
- /* Translate Eye to Origin */
- glTranslatex((GLfixed)(-eyex * 65536),
- (GLfixed)(-eyey * 65536),
- (GLfixed)(-eyez * 65536));
-}
-
-
-static void camTrack()
-{
- float lerp[5];
- float eX, eY, eZ, cX, cY, cZ;
- float trackPos;
- CAMTRACK *cam;
- long currentCamTick;
- int a;
-
- if (sNextCamTrackStartTick <= sTick)
- {
- ++sCurrentCamTrack;
- sCurrentCamTrackStartTick = sNextCamTrackStartTick;
- }
- sNextCamTrackStartTick = sCurrentCamTrackStartTick +
- sCamTracks[sCurrentCamTrack].len * CAMTRACK_LEN;
-
- cam = &sCamTracks[sCurrentCamTrack];
- currentCamTick = sTick - sCurrentCamTrackStartTick;
- trackPos = (float)currentCamTick / (CAMTRACK_LEN * cam->len);
-
- for (a = 0; a < 5; ++a)
- lerp[a] = (cam->src[a] + cam->dest[a] * trackPos) * 0.01f;
-
- if (cam->dist)
- {
- float dist = cam->dist * 0.1f;
- cX = lerp[0];
- cY = lerp[1];
- cZ = lerp[2];
- eX = cX - (float)cos(lerp[3]) * dist;
- eY = cY - (float)sin(lerp[3]) * dist;
- eZ = cZ - lerp[4];
- }
- else
- {
- eX = lerp[0];
- eY = lerp[1];
- eZ = lerp[2];
- cX = eX + (float)cos(lerp[3]);
- cY = eY + (float)sin(lerp[3]);
- cZ = eZ + lerp[4];
- }
- gluLookAt(eX, eY, eZ, cX, cY, cZ, 0, 0, 1);
-}
-
-
-// Called from the app framework.
-/* The tick is current time in milliseconds, width and height
- * are the image dimensions to be rendered.
- */
-void appRender(long tick, int width, int height)
-{
- if (sStartTick == 0)
- sStartTick = tick;
- if (!gAppAlive)
- return;
-
- // Actual tick value is "blurred" a little bit.
- sTick = (sTick + tick - sStartTick) >> 1;
-
- // Terminate application after running through the demonstration once.
- if (sTick >= RUN_LENGTH)
- {
- gAppAlive = 0;
- return;
- }
-
- // Prepare OpenGL ES for rendering of the frame.
- prepareFrame(width, height);
-
- // Update the camera position and set the lookat.
- camTrack();
-
- // Configure environment.
- configureLightAndMaterial();
-
- // Draw the reflection by drawing models with negated Z-axis.
- glPushMatrix();
- drawModels(-1);
- glPopMatrix();
-
- // Blend the ground plane to the window.
- drawGroundPlane();
-
- // Draw all the models normally.
- drawModels(1);
-
- // Draw fade quad over whole window (when changing cameras).
- drawFadeQuad();
-}
diff --git a/opengl/tests/angeles/include/GLES/egl.h b/opengl/tests/angeles/include/GLES/egl.h
deleted file mode 100644
index cdf8410..0000000
--- a/opengl/tests/angeles/include/GLES/egl.h
+++ /dev/null
@@ -1,229 +0,0 @@
-#ifndef __egl_h_
-#define __egl_h_
-
-/*
-** License Applicability. Except to the extent portions of this file are
-** made subject to an alternative license as permitted in the SGI Free
-** Software License B, Version 1.0 (the "License"), the contents of this
-** file are subject only to the provisions of the License. You may not use
-** this file except in compliance with the License. You may obtain a copy
-** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
-** http://oss.sgi.com/projects/FreeB
-**
-** Note that, as provided in the License, the Software is distributed on an
-** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
-** Original Code. The Original Code is: OpenGL Sample Implementation,
-** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
-** Copyright in any portions created by third parties is as indicated
-** elsewhere herein. All Rights Reserved.
-**
-** Additional Notice Provisions: The application programming interfaces
-** established by SGI in conjunction with the Original Code are The
-** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
-** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
-** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
-** Window System(R) (Version 1.3), released October 19, 1998. This software
-** was created using the OpenGL(R) version 1.2.1 Sample Implementation
-** published by SGI, but has not been independently verified as being
-** compliant with the OpenGL(R) version 1.2.1 Specification.
-*/
-
-#include <GLES/gl.h>
-#include <GLES/egltypes.h>
-
-/*
-** egltypes.h is platform dependent. It defines:
-**
-** - EGL types and resources
-** - Native types
-** - EGL and native handle values
-**
-** EGL types and resources are to be typedef'ed with appropriate platform
-** dependent resource handle types. EGLint must be an integer of at least
-** 32-bit.
-**
-** NativeDisplayType, NativeWindowType and NativePixmapType are to be
-** replaced with corresponding types of the native window system in egl.h.
-**
-** EGL and native handle values must match their types.
-**
-** Example egltypes.h:
-*/
-
-#if 0
-
-#include <sys/types.h>
-#include <native_window_system.h>
-
-/*
-** Types and resources
-*/
-typedef int EGLBoolean;
-typedef int32_t EGLint;
-typedef void *EGLDisplay;
-typedef void *EGLConfig;
-typedef void *EGLSurface;
-typedef void *EGLContext;
-
-/*
-** EGL and native handle values
-*/
-#define EGL_DEFAULT_DISPLAY ((NativeDisplayType)0)
-#define EGL_NO_CONTEXT ((EGLContext)0)
-#define EGL_NO_DISPLAY ((EGLDisplay)0)
-#define EGL_NO_SURFACE ((EGLSurface)0)
-
-#endif
-
-/*
-** Versioning and extensions
-*/
-#define EGL_VERSION_1_0 1
-
-/*
-** Boolean
-*/
-#define EGL_FALSE 0
-#define EGL_TRUE 1
-
-/*
-** Errors
-*/
-#define EGL_SUCCESS 0x3000
-#define EGL_NOT_INITIALIZED 0x3001
-#define EGL_BAD_ACCESS 0x3002
-#define EGL_BAD_ALLOC 0x3003
-#define EGL_BAD_ATTRIBUTE 0x3004
-#define EGL_BAD_CONFIG 0x3005
-#define EGL_BAD_CONTEXT 0x3006
-#define EGL_BAD_CURRENT_SURFACE 0x3007
-#define EGL_BAD_DISPLAY 0x3008
-#define EGL_BAD_MATCH 0x3009
-#define EGL_BAD_NATIVE_PIXMAP 0x300A
-#define EGL_BAD_NATIVE_WINDOW 0x300B
-#define EGL_BAD_PARAMETER 0x300C
-#define EGL_BAD_SURFACE 0x300D
-/* 0x300E - 0x301F reserved for additional errors. */
-
-/*
-** Config attributes
-*/
-#define EGL_BUFFER_SIZE 0x3020
-#define EGL_ALPHA_SIZE 0x3021
-#define EGL_BLUE_SIZE 0x3022
-#define EGL_GREEN_SIZE 0x3023
-#define EGL_RED_SIZE 0x3024
-#define EGL_DEPTH_SIZE 0x3025
-#define EGL_STENCIL_SIZE 0x3026
-#define EGL_CONFIG_CAVEAT 0x3027
-#define EGL_CONFIG_ID 0x3028
-#define EGL_LEVEL 0x3029
-#define EGL_MAX_PBUFFER_HEIGHT 0x302A
-#define EGL_MAX_PBUFFER_PIXELS 0x302B
-#define EGL_MAX_PBUFFER_WIDTH 0x302C
-#define EGL_NATIVE_RENDERABLE 0x302D
-#define EGL_NATIVE_VISUAL_ID 0x302E
-#define EGL_NATIVE_VISUAL_TYPE 0x302F
-/*#define EGL_PRESERVED_RESOURCES 0x3030*/
-#define EGL_SAMPLES 0x3031
-#define EGL_SAMPLE_BUFFERS 0x3032
-#define EGL_SURFACE_TYPE 0x3033
-#define EGL_TRANSPARENT_TYPE 0x3034
-#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
-#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
-#define EGL_TRANSPARENT_RED_VALUE 0x3037
-
-/*
-** Config attribute and value
-*/
-#define EGL_NONE 0x3038
-/* 0x3039 - 0x304F reserved for additional config attributes. */
-
-/*
-** Config values
-*/
-#define EGL_DONT_CARE ((EGLint) -1)
-#define EGL_PBUFFER_BIT 0x01
-#define EGL_PIXMAP_BIT 0x02
-#define EGL_WINDOW_BIT 0x04
-#define EGL_SLOW_CONFIG 0x3050
-#define EGL_NON_CONFORMANT_CONFIG 0x3051
-#define EGL_TRANSPARENT_RGB 0x3052
-
-/*
-** String names
-*/
-#define EGL_VENDOR 0x3053
-#define EGL_VERSION 0x3054
-#define EGL_EXTENSIONS 0x3055
-
-/*
-** Surface attributes
-*/
-#define EGL_HEIGHT 0x3056
-#define EGL_WIDTH 0x3057
-#define EGL_LARGEST_PBUFFER 0x3058
-
-/*
-** Current surfaces
-*/
-#define EGL_DRAW 0x3059
-#define EGL_READ 0x305A
-
-/*
-** Engines
-*/
-#define EGL_CORE_NATIVE_ENGINE 0x305B
-
-/* 0x305C-0x3FFFF reserved for future use */
-
-/*
-** Functions
-*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-GLAPI EGLint APIENTRY eglGetError (void);
-
-GLAPI EGLDisplay APIENTRY eglGetDisplay (NativeDisplayType display);
-GLAPI EGLBoolean APIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
-GLAPI EGLBoolean APIENTRY eglTerminate (EGLDisplay dpy);
-GLAPI const char * APIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
-GLAPI void (* APIENTRY eglGetProcAddress (const char *procname))();
-
-GLAPI EGLBoolean APIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-GLAPI EGLBoolean APIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-GLAPI EGLBoolean APIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
-
-GLAPI EGLSurface APIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
-GLAPI EGLSurface APIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
-GLAPI EGLSurface APIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
-GLAPI EGLBoolean APIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
-GLAPI EGLBoolean APIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
-
-GLAPI EGLContext APIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
-GLAPI EGLBoolean APIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
-GLAPI EGLBoolean APIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
-GLAPI EGLContext APIENTRY eglGetCurrentContext (void);
-GLAPI EGLSurface APIENTRY eglGetCurrentSurface (EGLint readdraw);
-GLAPI EGLDisplay APIENTRY eglGetCurrentDisplay (void);
-GLAPI EGLBoolean APIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
-
-GLAPI EGLBoolean APIENTRY eglWaitGL (void);
-GLAPI EGLBoolean APIENTRY eglWaitNative (EGLint engine);
-GLAPI EGLBoolean APIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw);
-GLAPI EGLBoolean APIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ___egl_h_ */
diff --git a/opengl/tests/angeles/include/GLES/egltypes.h b/opengl/tests/angeles/include/GLES/egltypes.h
deleted file mode 100644
index 9db36c9..0000000
--- a/opengl/tests/angeles/include/GLES/egltypes.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-** Types and resources
-*/
-typedef int EGLBoolean;
-typedef long EGLint;
-typedef void *EGLDisplay;
-typedef void *EGLConfig;
-typedef void *EGLSurface;
-typedef void *EGLContext;
-typedef void *NativeDisplayType;
-typedef void *NativeWindowType;
-typedef void *NativePixmapType;
-
-/*
-** EGL and native handle values
-*/
-#define EGL_DEFAULT_DISPLAY ((NativeDisplayType)0)
-#define EGL_NO_CONTEXT ((EGLContext)0)
-#define EGL_NO_DISPLAY ((EGLDisplay)0)
-#define EGL_NO_SURFACE ((EGLSurface)0)
diff --git a/opengl/tests/angeles/include/GLES/gl.h b/opengl/tests/angeles/include/GLES/gl.h
deleted file mode 100644
index 4154822..0000000
--- a/opengl/tests/angeles/include/GLES/gl.h
+++ /dev/null
@@ -1,584 +0,0 @@
-#ifndef __gl_h_
-#define __gl_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** License Applicability. Except to the extent portions of this file are
-** made subject to an alternative license as permitted in the SGI Free
-** Software License B, Version 1.0 (the "License"), the contents of this
-** file are subject only to the provisions of the License. You may not use
-** this file except in compliance with the License. You may obtain a copy
-** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
-** http://oss.sgi.com/projects/FreeB
-**
-** Note that, as provided in the License, the Software is distributed on an
-** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
-** Original Code. The Original Code is: OpenGL Sample Implementation,
-** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
-** Copyright in any portions created by third parties is as indicated
-** elsewhere herein. All Rights Reserved.
-**
-** Additional Notice Provisions: The application programming interfaces
-** established by SGI in conjunction with the Original Code are The
-** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
-** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
-** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
-** Window System(R) (Version 1.3), released October 19, 1998. This software
-** was created using the OpenGL(R) version 1.2.1 Sample Implementation
-** published by SGI, but has not been independently verified as being
-** compliant with the OpenGL(R) version 1.2.1 Specification.
-*/
-
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef signed char GLbyte;
-typedef short GLshort;
-typedef int GLint;
-typedef int GLsizei;
-typedef unsigned char GLubyte;
-typedef unsigned short GLushort;
-typedef unsigned int GLuint;
-typedef float GLfloat;
-typedef float GLclampf;
-typedef void GLvoid;
-typedef int GLintptrARB;
-typedef int GLsizeiptrARB;
-typedef int GLfixed;
-typedef int GLclampx;
-/* Internal convenience typedefs */
-typedef void (*_GLfuncptr)();
-
-/*************************************************************/
-
-/* Extensions */
-#define GL_OES_VERSION_1_0 1
-#define GL_OES_read_format 1
-#define GL_OES_compressed_paletted_texture 1
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_COLOR_BUFFER_BIT 0x00004000
-
-/* Boolean */
-#define GL_FALSE 0
-#define GL_TRUE 1
-
-/* BeginMode */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-
-/* AlphaFunction */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-
-/* BlendingFactorDest */
-#define GL_ZERO 0
-#define GL_ONE 1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-
-/* BlendingFactorSrc */
-/* GL_ZERO */
-/* GL_ONE */
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-/* GL_SRC_ALPHA */
-/* GL_ONE_MINUS_SRC_ALPHA */
-/* GL_DST_ALPHA */
-/* GL_ONE_MINUS_DST_ALPHA */
-
-/* ColorMaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* ColorMaterialParameter */
-/* GL_AMBIENT_AND_DIFFUSE */
-
-/* ColorPointerType */
-/* GL_UNSIGNED_BYTE */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* CullFaceMode */
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_FRONT_AND_BACK 0x0408
-
-/* DepthFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* EnableCap */
-#define GL_FOG 0x0B60
-#define GL_LIGHTING 0x0B50
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_CULL_FACE 0x0B44
-#define GL_ALPHA_TEST 0x0BC0
-#define GL_BLEND 0x0BE2
-#define GL_COLOR_LOGIC_OP 0x0BF2
-#define GL_DITHER 0x0BD0
-#define GL_STENCIL_TEST 0x0B90
-#define GL_DEPTH_TEST 0x0B71
-/* GL_LIGHT0 */
-/* GL_LIGHT1 */
-/* GL_LIGHT2 */
-/* GL_LIGHT3 */
-/* GL_LIGHT4 */
-/* GL_LIGHT5 */
-/* GL_LIGHT6 */
-/* GL_LIGHT7 */
-#define GL_POINT_SMOOTH 0x0B10
-#define GL_LINE_SMOOTH 0x0B20
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_COLOR_MATERIAL 0x0B57
-#define GL_NORMALIZE 0x0BA1
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_POLYGON_OFFSET_FILL 0x8037
-#define GL_VERTEX_ARRAY 0x8074
-#define GL_NORMAL_ARRAY 0x8075
-#define GL_COLOR_ARRAY 0x8076
-#define GL_TEXTURE_COORD_ARRAY 0x8078
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR 0
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_OPERATION 0x0502
-#define GL_STACK_OVERFLOW 0x0503
-#define GL_STACK_UNDERFLOW 0x0504
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* FogMode */
-/* GL_LINEAR */
-#define GL_EXP 0x0800
-#define GL_EXP2 0x0801
-
-/* FogParameter */
-#define GL_FOG_DENSITY 0x0B62
-#define GL_FOG_START 0x0B63
-#define GL_FOG_END 0x0B64
-#define GL_FOG_MODE 0x0B65
-#define GL_FOG_COLOR 0x0B66
-
-/* FrontFaceDirection */
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-
-/* GetPName */
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
-#define GL_MAX_LIGHTS 0x0D31
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
-#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_ALPHA_BITS 0x0D55
-#define GL_DEPTH_BITS 0x0D56
-#define GL_STENCIL_BITS 0x0D57
-
-/* HintMode */
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* HintTarget */
-#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
-#define GL_POINT_SMOOTH_HINT 0x0C51
-#define GL_LINE_SMOOTH_HINT 0x0C52
-#define GL_POLYGON_SMOOTH_HINT 0x0C53
-#define GL_FOG_HINT 0x0C54
-
-/* LightModelParameter */
-#define GL_LIGHT_MODEL_AMBIENT 0x0B53
-#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
-
-/* LightParameter */
-#define GL_AMBIENT 0x1200
-#define GL_DIFFUSE 0x1201
-#define GL_SPECULAR 0x1202
-#define GL_POSITION 0x1203
-#define GL_SPOT_DIRECTION 0x1204
-#define GL_SPOT_EXPONENT 0x1205
-#define GL_SPOT_CUTOFF 0x1206
-#define GL_CONSTANT_ATTENUATION 0x1207
-#define GL_LINEAR_ATTENUATION 0x1208
-#define GL_QUADRATIC_ATTENUATION 0x1209
-
-/* DataType */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_FLOAT 0x1406
-#define GL_FIXED 0x140C
-
-/* LogicOp */
-#define GL_CLEAR 0x1500
-#define GL_AND 0x1501
-#define GL_AND_REVERSE 0x1502
-#define GL_COPY 0x1503
-#define GL_AND_INVERTED 0x1504
-#define GL_NOOP 0x1505
-#define GL_XOR 0x1506
-#define GL_OR 0x1507
-#define GL_NOR 0x1508
-#define GL_EQUIV 0x1509
-#define GL_INVERT 0x150A
-#define GL_OR_REVERSE 0x150B
-#define GL_COPY_INVERTED 0x150C
-#define GL_OR_INVERTED 0x150D
-#define GL_NAND 0x150E
-#define GL_SET 0x150F
-
-/* MaterialFace */
-/* GL_FRONT_AND_BACK */
-
-/* MaterialParameter */
-#define GL_EMISSION 0x1600
-#define GL_SHININESS 0x1601
-#define GL_AMBIENT_AND_DIFFUSE 0x1602
-/* GL_AMBIENT */
-/* GL_DIFFUSE */
-/* GL_SPECULAR */
-
-/* MatrixMode */
-#define GL_MODELVIEW 0x1700
-#define GL_PROJECTION 0x1701
-#define GL_TEXTURE 0x1702
-
-/* NormalPointerType */
-/* GL_BYTE */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-
-/* PixelFormat */
-#define GL_ALPHA 0x1906
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-
-/* PixelStoreParameter */
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_PACK_ALIGNMENT 0x0D05
-
-/* PixelType */
-/* GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-
-/* ShadingModel */
-#define GL_FLAT 0x1D00
-#define GL_SMOOTH 0x1D01
-
-/* StencilFunction */
-/* GL_NEVER */
-/* GL_LESS */
-/* GL_EQUAL */
-/* GL_LEQUAL */
-/* GL_GREATER */
-/* GL_NOTEQUAL */
-/* GL_GEQUAL */
-/* GL_ALWAYS */
-
-/* StencilOp */
-/* GL_ZERO */
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-/* GL_INVERT */
-
-/* StringName */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* TexCoordPointerType */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-/* GL_BYTE */
-
-/* TextureEnvMode */
-#define GL_MODULATE 0x2100
-#define GL_DECAL 0x2101
-/* GL_BLEND */
-#define GL_ADD 0x0104
-/* GL_REPLACE */
-
-/* TextureEnvParameter */
-#define GL_TEXTURE_ENV_MODE 0x2200
-#define GL_TEXTURE_ENV_COLOR 0x2201
-
-/* TextureEnvTarget */
-#define GL_TEXTURE_ENV 0x2300
-
-/* TextureMagFilter */
-#define GL_NEAREST 0x2600
-#define GL_LINEAR 0x2601
-
-/* TextureMinFilter */
-/* GL_NEAREST */
-/* GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-
-/* TextureTarget */
-/* GL_TEXTURE_2D */
-
-/* TextureUnit */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-
-/* TextureWrapMode */
-#define GL_REPEAT 0x2901
-#define GL_CLAMP_TO_EDGE 0x812F
-
-/* PixelInternalFormat */
-#define GL_PALETTE4_RGB8_OES 0x8B90
-#define GL_PALETTE4_RGBA8_OES 0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
-#define GL_PALETTE4_RGBA4_OES 0x8B93
-#define GL_PALETTE4_RGB5_A1_OES 0x8B94
-#define GL_PALETTE8_RGB8_OES 0x8B95
-#define GL_PALETTE8_RGBA8_OES 0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
-#define GL_PALETTE8_RGBA4_OES 0x8B98
-#define GL_PALETTE8_RGB5_A1_OES 0x8B99
-
-/* VertexPointerType */
-/* GL_SHORT */
-/* GL_FLOAT */
-/* GL_FIXED */
-/* GL_BYTE */
-
-/* LightName */
-#define GL_LIGHT0 0x4000
-#define GL_LIGHT1 0x4001
-#define GL_LIGHT2 0x4002
-#define GL_LIGHT3 0x4003
-#define GL_LIGHT4 0x4004
-#define GL_LIGHT5 0x4005
-#define GL_LIGHT6 0x4006
-#define GL_LIGHT7 0x4007
-
-
-/*************************************************************/
-
-GLAPI void APIENTRY glActiveTexture (GLenum texture);
-GLAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
-GLAPI void APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
-GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
-GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GLAPI void APIENTRY glClear (GLbitfield mask);
-GLAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GLAPI void APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-GLAPI void APIENTRY glClearDepthf (GLclampf depth);
-GLAPI void APIENTRY glClearDepthx (GLclampx depth);
-GLAPI void APIENTRY glClearStencil (GLint s);
-GLAPI void APIENTRY glClientActiveTexture (GLenum texture);
-GLAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GLAPI void APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GLAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glCullFace (GLenum mode);
-GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
-GLAPI void APIENTRY glDepthFunc (GLenum func);
-GLAPI void APIENTRY glDepthMask (GLboolean flag);
-GLAPI void APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GLAPI void APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
-GLAPI void APIENTRY glDisable (GLenum cap);
-GLAPI void APIENTRY glDisableClientState (GLenum array);
-GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
-GLAPI void APIENTRY glEnable (GLenum cap);
-GLAPI void APIENTRY glEnableClientState (GLenum array);
-GLAPI void APIENTRY glFinish (void);
-GLAPI void APIENTRY glFlush (void);
-GLAPI void APIENTRY glFogf (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glFogfv (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glFogx (GLenum pname, GLfixed param);
-GLAPI void APIENTRY glFogxv (GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glFrontFace (GLenum mode);
-GLAPI void APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GLAPI void APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
-GLAPI GLenum APIENTRY glGetError (void);
-GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params);
-GLAPI const GLubyte * APIENTRY glGetString (GLenum name);
-GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
-GLAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param);
-GLAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glLightModelx (GLenum pname, GLfixed param);
-GLAPI void APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glLineWidth (GLfloat width);
-GLAPI void APIENTRY glLineWidthx (GLfixed width);
-GLAPI void APIENTRY glLoadIdentity (void);
-GLAPI void APIENTRY glLoadMatrixf (const GLfloat *m);
-GLAPI void APIENTRY glLoadMatrixx (const GLfixed *m);
-GLAPI void APIENTRY glLogicOp (GLenum opcode);
-GLAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glMatrixMode (GLenum mode);
-GLAPI void APIENTRY glMultMatrixf (const GLfloat *m);
-GLAPI void APIENTRY glMultMatrixx (const GLfixed *m);
-GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI void APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
-GLAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
-GLAPI void APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
-GLAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
-GLAPI void APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-GLAPI void APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
-GLAPI void APIENTRY glPointSize (GLfloat size);
-GLAPI void APIENTRY glPointSizex (GLfixed size);
-GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GLAPI void APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
-GLAPI void APIENTRY glPopMatrix (void);
-GLAPI void APIENTRY glPushMatrix (void);
-GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
-GLAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GLAPI void APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
-GLAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glShadeModel (GLenum mode);
-GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GLAPI void APIENTRY glStencilMask (GLuint mask);
-GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GLAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GLAPI void APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
-GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GLAPI void APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
-GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-GLAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
-GLAPI void APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
-GLAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl_h_ */
diff --git a/opengl/tests/angeles/license-BSD.txt b/opengl/tests/angeles/license-BSD.txt
deleted file mode 100644
index 8924e3c..0000000
--- a/opengl/tests/angeles/license-BSD.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-This is the BSD-style license for the "San Angeles Observation"
-OpenGL ES version example source code
----------------------------------------------------------------
-
-San Angeles Observation OpenGL ES version example
-Copyright (c) 2004-2005, Jetro Lauha
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- * Neither the name of the software product's copyright owner nor
- the names of its contributors may be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/opengl/tests/angeles/license-LGPL.txt b/opengl/tests/angeles/license-LGPL.txt
deleted file mode 100644
index b1e3f5a..0000000
--- a/opengl/tests/angeles/license-LGPL.txt
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/opengl/tests/angeles/license.txt b/opengl/tests/angeles/license.txt
deleted file mode 100644
index 620841e..0000000
--- a/opengl/tests/angeles/license.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-San Angeles Observation OpenGL ES version example
-Copyright 2004-2005 Jetro Lauha
-All rights reserved.
-Web: http://iki.fi/jetro/
-
-This source is free software; you can redistribute it and/or
-modify it under the terms of EITHER:
- (1) The GNU Lesser General Public License as published by the Free
- Software Foundation; either version 2.1 of the License, or (at
- your option) any later version. The text of the GNU Lesser
- General Public License is included with this source in the
- file LICENSE-LGPL.txt.
- (2) The BSD-style license that is included with this source in
- the file LICENSE-BSD.txt.
-
-This source is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
-LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
diff --git a/opengl/tests/angeles/shapes.h b/opengl/tests/angeles/shapes.h
deleted file mode 100644
index 25ffae8..0000000
--- a/opengl/tests/angeles/shapes.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* San Angeles Observation OpenGL ES version example
- * Copyright 2004-2005 Jetro Lauha
- * All rights reserved.
- * Web: http://iki.fi/jetro/
- *
- * This source is free software; you can redistribute it and/or
- * modify it under the terms of EITHER:
- * (1) The GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. The text of the GNU Lesser
- * General Public License is included with this source in the
- * file LICENSE-LGPL.txt.
- * (2) The BSD-style license that is included with this source in
- * the file LICENSE-BSD.txt.
- *
- * This source is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
- * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
- *
- * $Id: shapes.h,v 1.6 2005/01/31 22:15:30 tonic Exp $
- * $Revision: 1.6 $
- */
-
-#ifndef SHAPES_H_INCLUDED
-#define SHAPES_H_INCLUDED
-
-
-#define SUPERSHAPE_PARAMS 15
-
-static const float sSuperShapeParams[][SUPERSHAPE_PARAMS] =
-{
- // m a b n1 n2 n3 m a b n1 n2 n3 res1 res2 scale (org.res1,res2)
- { 10, 1, 2, 90, 1, -45, 8, 1, 1, -1, 1, -0.4f, 20, 30, 2 }, // 40, 60
- { 10, 1, 2, 90, 1, -45, 4, 1, 1, 10, 1, -0.4f, 20, 20, 4 }, // 40, 40
- { 10, 1, 2, 60, 1, -10, 4, 1, 1, -1, -2, -0.4f, 41, 41, 1 }, // 82, 82
- { 6, 1, 1, 60, 1, -70, 8, 1, 1, 0.4f, 3, 0.25f, 20, 20, 1 }, // 40, 40
- { 4, 1, 1, 30, 1, 20, 12, 1, 1, 0.4f, 3, 0.25f, 10, 30, 1 }, // 20, 60
- { 8, 1, 1, 30, 1, -4, 8, 2, 1, -1, 5, 0.5f, 25, 26, 1 }, // 60, 60
- { 13, 1, 1, 30, 1, -4, 13, 1, 1, 1, 5, 1, 30, 30, 6 }, // 60, 60
- { 10, 1, 1.1f, -0.5f, 0.1f, 70, 60, 1, 1, -90, 0, -0.25f, 20, 60, 8 }, // 60, 180
- { 7, 1, 1, 20, -0.3f, -3.5f, 6, 1, 1, -1, 4.5f, 0.5f, 10, 20, 4 }, // 60, 80
- { 4, 1, 1, 10, 10, 10, 4, 1, 1, 10, 10, 10, 10, 20, 1 }, // 20, 40
- { 4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 10, 10, 2 }, // 10, 10
- { 1, 1, 1, 38, -0.25f, 19, 4, 1, 1, 10, 10, 10, 10, 15, 2 }, // 20, 40
- { 2, 1, 1, 0.7f, 0.3f, 0.2f, 3, 1, 1, 100, 100, 100, 10, 25, 2 }, // 20, 50
- { 6, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 30, 30, 2 }, // 60, 60
- { 3, 1, 1, 1, 1, 1, 6, 1, 1, 2, 1, 1, 10, 20, 2 }, // 20, 40
- { 6, 1, 1, 6, 5.5f, 100, 6, 1, 1, 25, 10, 10, 30, 20, 2 }, // 60, 40
- { 3, 1, 1, 0.5f, 1.7f, 1.7f, 2, 1, 1, 10, 10, 10, 20, 20, 2 }, // 40, 40
- { 5, 1, 1, 0.1f, 1.7f, 1.7f, 1, 1, 1, 0.3f, 0.5f, 0.5f, 20, 20, 4 }, // 40, 40
- { 2, 1, 1, 6, 5.5f, 100, 6, 1, 1, 4, 10, 10, 10, 22, 1 }, // 40, 40
- { 6, 1, 1, -1, 70, 0.1f, 9, 1, 0.5f, -98, 0.05f, -45, 20, 30, 4 }, // 60, 91
- { 6, 1, 1, -1, 90, -0.1f, 7, 1, 1, 90, 1.3f, 34, 13, 16, 1 }, // 32, 60
-};
-#define SUPERSHAPE_COUNT (sizeof(sSuperShapeParams) / sizeof(sSuperShapeParams[0]))
-
-
-#endif // !SHAPES_H_INCLUDED
diff --git a/opengl/tests/configdump/Android.mk b/opengl/tests/configdump/Android.mk
deleted file mode 100644
index 3f7c915..0000000
--- a/opengl/tests/configdump/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- configdump.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM
-
-LOCAL_MODULE:= test-opengl-configdump
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/configdump/configdump.cpp b/opengl/tests/configdump/configdump.cpp
deleted file mode 100644
index 69b9eb6..0000000
--- a/opengl/tests/configdump/configdump.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-** Copyright 2010, 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 <stdio.h>
-
-#include <EGL/egl.h>
-
-#define ATTRIBUTE(_attr) { _attr, #_attr }
-
-struct Attribute {
- EGLint attribute;
- char const* name;
-};
-
-Attribute attributes[] = {
- ATTRIBUTE( EGL_BUFFER_SIZE ),
- ATTRIBUTE( EGL_ALPHA_SIZE ),
- ATTRIBUTE( EGL_BLUE_SIZE ),
- ATTRIBUTE( EGL_GREEN_SIZE ),
- ATTRIBUTE( EGL_RED_SIZE ),
- ATTRIBUTE( EGL_DEPTH_SIZE ),
- ATTRIBUTE( EGL_STENCIL_SIZE ),
- ATTRIBUTE( EGL_CONFIG_CAVEAT ),
- ATTRIBUTE( EGL_CONFIG_ID ),
- ATTRIBUTE( EGL_LEVEL ),
- ATTRIBUTE( EGL_MAX_PBUFFER_HEIGHT ),
- ATTRIBUTE( EGL_MAX_PBUFFER_WIDTH ),
- ATTRIBUTE( EGL_MAX_PBUFFER_PIXELS ),
- ATTRIBUTE( EGL_NATIVE_RENDERABLE ),
- ATTRIBUTE( EGL_NATIVE_VISUAL_ID ),
- ATTRIBUTE( EGL_NATIVE_VISUAL_TYPE ),
- ATTRIBUTE( EGL_SAMPLES ),
- ATTRIBUTE( EGL_SAMPLE_BUFFERS ),
- ATTRIBUTE( EGL_SURFACE_TYPE ),
- ATTRIBUTE( EGL_TRANSPARENT_TYPE ),
- ATTRIBUTE( EGL_TRANSPARENT_BLUE_VALUE ),
- ATTRIBUTE( EGL_TRANSPARENT_GREEN_VALUE ),
- ATTRIBUTE( EGL_TRANSPARENT_RED_VALUE ),
- ATTRIBUTE( EGL_BIND_TO_TEXTURE_RGB ),
- ATTRIBUTE( EGL_BIND_TO_TEXTURE_RGBA ),
- ATTRIBUTE( EGL_MIN_SWAP_INTERVAL ),
- ATTRIBUTE( EGL_MAX_SWAP_INTERVAL ),
- ATTRIBUTE( EGL_LUMINANCE_SIZE ),
- ATTRIBUTE( EGL_ALPHA_MASK_SIZE ),
- ATTRIBUTE( EGL_COLOR_BUFFER_TYPE ),
- ATTRIBUTE( EGL_RENDERABLE_TYPE ),
- ATTRIBUTE( EGL_MATCH_NATIVE_PIXMAP ),
- ATTRIBUTE( EGL_CONFORMANT ),
-};
-
-
-int main(int argc, char** argv)
-{
- EGLConfig* configs;
- EGLint n;
-
- EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, 0, 0);
- eglGetConfigs(dpy, NULL, 0, &n);
- configs = new EGLConfig[n];
- eglGetConfigs(dpy, configs, n, &n);
-
- for (EGLint i=0 ; i<n ; i++) {
- printf("EGLConfig[%d]\n", i);
- for (int attr = 0 ; attr<sizeof(attributes)/sizeof(Attribute) ; attr++) {
- EGLint value;
- eglGetConfigAttrib(dpy, configs[i], attributes[attr].attribute, &value);
- printf("\t%-32s: %10d (0x%08x)\n", attributes[attr].name, value, value);
- }
- }
-
- delete [] configs;
- eglTerminate(dpy);
- return 0;
-}
diff --git a/opengl/tests/fillrate/Android.mk b/opengl/tests/fillrate/Android.mk
deleted file mode 100644
index 4dade21..0000000
--- a/opengl/tests/fillrate/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- fillrate.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-fillrate
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp
deleted file mode 100644
index a708647..0000000
--- a/opengl/tests/fillrate/fillrate.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-**
-** Copyright 2006, 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.
-*/
-
-#define LOG_TAG "fillrate"
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/StopWatch.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-int main(int argc, char** argv)
-{
- EGLint configAttribs[] = {
- EGL_DEPTH_SIZE, 0,
- EGL_NONE
- };
-
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLConfig config;
- EGLSurface surface;
- EGLint w, h;
- EGLDisplay dpy;
-
- EGLNativeWindowType window = android_createDisplaySurface();
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
-
- status_t err = EGLUtils::selectConfigForNativeWindow(
- dpy, configAttribs, window, &config);
- if (err) {
- fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n");
- return 0;
- }
-
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- context = eglCreateContext(dpy, config, NULL, NULL);
- eglMakeCurrent(dpy, surface, surface, context);
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
-
- printf("w=%d, h=%d\n", w, h);
-
- glBindTexture(GL_TEXTURE_2D, 0);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glDisable(GL_DITHER);
- glEnable(GL_BLEND);
- glEnable(GL_TEXTURE_2D);
- glColor4f(1,1,1,1);
-
- uint32_t* t32 = (uint32_t*)malloc(512*512*4);
- for (int y=0 ; y<512 ; y++) {
- for (int x=0 ; x<512 ; x++) {
- int u = x-256;
- int v = y-256;
- if (u*u+v*v < 256*256) {
- t32[x+y*512] = 0x10FFFFFF;
- } else {
- t32[x+y*512] = 0x20FF0000;
- }
- }
- }
-
- const GLfloat vertices[4][2] = {
- { 0, 0 },
- { 0, h },
- { w, h },
- { w, 0 }
- };
-
- const GLfloat texCoords[4][2] = {
- { 0, 0 },
- { 0, 1 },
- { 1, 1 },
- { 1, 0 }
- };
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, t32);
-
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrthof(0, w, 0, h, 0, 1);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glVertexPointer(2, GL_FLOAT, 0, vertices);
- glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
-
- eglSwapInterval(dpy, 1);
-
- glClearColor(1,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
- eglSwapBuffers(dpy, surface);
-
-
- nsecs_t times[32];
-
- for (int c=1 ; c<32 ; c++) {
- glClear(GL_COLOR_BUFFER_BIT);
- for (int i=0 ; i<c ; i++) {
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
- }
- eglSwapBuffers(dpy, surface);
- }
-
-
- // for (int c=31 ; c>=1 ; c--) {
- int j=0;
- for (int c=1 ; c<32 ; c++) {
- glClear(GL_COLOR_BUFFER_BIT);
- nsecs_t now = systemTime();
- for (int i=0 ; i<c ; i++) {
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
- }
- eglSwapBuffers(dpy, surface);
- nsecs_t t = systemTime() - now;
- times[j++] = t;
- }
-
- for (int c=1, j=0 ; c<32 ; c++, j++) {
- nsecs_t t = times[j];
- printf("%lld\t%d\t%f\n", t, c, (double(t)/c)/1000000.0);
- }
-
-
-
- eglTerminate(dpy);
-
- return 0;
-}
diff --git a/opengl/tests/filter/Android.mk b/opengl/tests/filter/Android.mk
deleted file mode 100644
index d3e4d38..0000000
--- a/opengl/tests/filter/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- filter.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-filter
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/filter/filter.cpp b/opengl/tests/filter/filter.cpp
deleted file mode 100644
index 0067327..0000000
--- a/opengl/tests/filter/filter.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-#define USE_DRAW_TEXTURE 1
-
-int main(int argc, char** argv)
-{
- if (argc!=2 && argc!=3) {
- printf("usage: %s <0-6> [pbuffer]\n", argv[0]);
- return 0;
- }
-
- const int test = atoi(argv[1]);
- int usePbuffer = argc==3 && !strcmp(argv[2], "pbuffer");
- EGLint s_configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_PBUFFER_BIT|EGL_WINDOW_BIT,
- EGL_RED_SIZE, 5,
- EGL_GREEN_SIZE, 6,
- EGL_BLUE_SIZE, 5,
- EGL_NONE
- };
-
- EGLint numConfigs = -1;
- EGLint majorVersion;
- EGLint minorVersion;
- EGLConfig config;
- EGLContext context;
- EGLSurface surface;
- EGLint w, h;
-
- EGLDisplay dpy;
-
- EGLNativeWindowType window = 0;
- if (!usePbuffer) {
- window = android_createDisplaySurface();
- }
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
- if (!usePbuffer) {
- EGLUtils::selectConfigForNativeWindow(
- dpy, s_configAttribs, window, &config);
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- } else {
- printf("using pbuffer\n");
- eglChooseConfig(dpy, s_configAttribs, &config, 1, &numConfigs);
- EGLint attribs[] = { EGL_WIDTH, 320, EGL_HEIGHT, 480, EGL_NONE };
- surface = eglCreatePbufferSurface(dpy, config, attribs);
- if (surface == EGL_NO_SURFACE) {
- printf("eglCreatePbufferSurface error %x\n", eglGetError());
- }
- }
- context = eglCreateContext(dpy, config, NULL, NULL);
- eglMakeCurrent(dpy, surface, surface, context);
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- GLint dim = w<h ? w : h;
-
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrthof(0, w, 0, h, 0, 1);
-
- glClearColor(0,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- GLint crop[4] = { 0, 4, 4, -4 };
- glBindTexture(GL_TEXTURE_2D, 0);
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glEnable(GL_TEXTURE_2D);
- glColor4f(1,1,1,1);
-
- // packing is always 4
- uint8_t t8[] = {
- 0x00, 0x55, 0x00, 0x55,
- 0xAA, 0xFF, 0xAA, 0xFF,
- 0x00, 0x55, 0x00, 0x55,
- 0xAA, 0xFF, 0xAA, 0xFF };
-
- uint16_t t16[] = {
- 0x0000, 0x5555, 0x0000, 0x5555,
- 0xAAAA, 0xFFFF, 0xAAAA, 0xFFFF,
- 0x0000, 0x5555, 0x0000, 0x5555,
- 0xAAAA, 0xFFFF, 0xAAAA, 0xFFFF };
-
- uint16_t t5551[] = {
- 0x0000, 0xFFFF, 0x0000, 0xFFFF,
- 0xFFFF, 0x0000, 0xFFFF, 0x0000,
- 0x0000, 0xFFFF, 0x0000, 0xFFFF,
- 0xFFFF, 0x0000, 0xFFFF, 0x0000 };
-
- uint32_t t32[] = {
- 0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFFFF0000,
- 0xFF00FF00, 0xFFFF0000, 0xFF000000, 0xFF0000FF,
- 0xFF00FFFF, 0xFF00FF00, 0x00FF00FF, 0xFFFFFF00,
- 0xFF000000, 0xFFFF00FF, 0xFF00FFFF, 0xFFFFFFFF
- };
-
- switch(test)
- {
- case 1:
- glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
- 4, 4, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, t8);
- break;
- case 2:
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
- 4, 4, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, t16);
- break;
- case 3:
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
- 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, t16);
- break;
- case 4:
- glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA,
- 4, 4, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, t16);
- break;
- case 5:
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
- 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, t5551);
- break;
- case 6:
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
- 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, t32);
- break;
- }
-
- //glDrawTexiOES(0, 0, 0, dim, dim);
-
- const GLfloat vertices[4][2] = {
- { 0, 0 },
- { 0, dim },
- { dim, dim },
- { dim, 0 }
- };
-
- const GLfloat texCoords[4][2] = {
- { 0, 0 },
- { 0, 1 },
- { 1, 1 },
- { 1, 0 }
- };
-
- if (!usePbuffer) {
- eglSwapBuffers(dpy, surface);
- }
-
- glMatrixMode(GL_MODELVIEW);
- glScissor(0,dim,dim,h-dim);
- glDisable(GL_SCISSOR_TEST);
-
- for (int y=0 ; y<dim ; y++) {
- //glDisable(GL_SCISSOR_TEST);
- glClear(GL_COLOR_BUFFER_BIT);
-
- //glEnable(GL_SCISSOR_TEST);
-
-#if USE_DRAW_TEXTURE && GL_OES_draw_texture
- glDrawTexiOES(0, y, 1, dim, dim);
-#else
- glLoadIdentity();
- glTranslatef(0, y, 0);
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glVertexPointer(2, GL_FLOAT, 0, vertices);
- glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-#endif
-
- if (!usePbuffer) {
- eglSwapBuffers(dpy, surface);
- } else {
- glFinish();
- }
- }
-
- eglTerminate(dpy);
- return 0;
-}
diff --git a/opengl/tests/finish/Android.mk b/opengl/tests/finish/Android.mk
deleted file mode 100644
index aa8adca..0000000
--- a/opengl/tests/finish/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- finish.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-finish
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/finish/finish.cpp b/opengl/tests/finish/finish.cpp
deleted file mode 100644
index 11f0c22..0000000
--- a/opengl/tests/finish/finish.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (C) 2007 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/Timers.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-int main(int argc, char** argv)
-{
- EGLint configAttribs[] = {
- EGL_DEPTH_SIZE, 0,
- EGL_NONE
- };
-
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLConfig config;
- EGLSurface surface;
- EGLint w, h;
- EGLDisplay dpy;
-
- EGLNativeWindowType window = android_createDisplaySurface();
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
-
- status_t err = EGLUtils::selectConfigForNativeWindow(
- dpy, configAttribs, window, &config);
- if (err) {
- fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n");
- return 0;
- }
-
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- context = eglCreateContext(dpy, config, NULL, NULL);
- eglMakeCurrent(dpy, surface, surface, context);
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- GLint dim = w<h ? w : h;
-
- glBindTexture(GL_TEXTURE_2D, 0);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glEnable(GL_TEXTURE_2D);
- glColor4f(1,1,1,1);
- glDisable(GL_DITHER);
- glShadeModel(GL_FLAT);
-
- long long now, t;
- int i;
-
- char* texels = (char*)malloc(512*512*2);
- memset(texels,0xFF,512*512*2);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
- 512, 512, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, texels);
-
- char* dst = (char*)malloc(320*480*2);
- memset(dst, 0, 320*480*2);
- printf("307200 bytes memcpy\n");
- for (i=0 ; i<4 ; i++) {
- now = systemTime();
- memcpy(dst, texels, 320*480*2);
- t = systemTime();
- printf("memcpy() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- }
- free(dst);
-
- free(texels);
-
- setpriority(PRIO_PROCESS, 0, -20);
-
- printf("512x512 unmodified texture, 512x512 blit:\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- GLint crop[4] = { 0, 512, 512, -512 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 512, 512);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
- printf("512x512 unmodified texture, 1x1 blit:\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- GLint crop[4] = { 0, 1, 1, -1 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 1, 1);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
- printf("512x512 unmodified texture, 512x512 blit (x2):\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- GLint crop[4] = { 0, 512, 512, -512 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 512, 512);
- glDrawTexiOES(0, 0, 0, 512, 512);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
- printf("512x512 unmodified texture, 1x1 blit (x2):\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- GLint crop[4] = { 0, 1, 1, -1 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 1, 1);
- glDrawTexiOES(0, 0, 0, 1, 1);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
-
- printf("512x512 (1x1 texel MODIFIED texture), 512x512 blit:\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- uint16_t green = 0x7E0;
- GLint crop[4] = { 0, 512, 512, -512 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, &green);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 512, 512);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
-
- int16_t texel = 0xF800;
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
- 1, 1, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, &texel);
-
- printf("1x1 unmodified texture, 1x1 blit:\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- GLint crop[4] = { 0, 1, 1, -1 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 1, 1);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- eglSwapBuffers(dpy, surface);
- }
-
- printf("1x1 unmodified texture, 512x512 blit:\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- GLint crop[4] = { 0, 1, 1, -1 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 512, 512);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
- printf("1x1 (1x1 texel MODIFIED texture), 512x512 blit:\n");
- glClear(GL_COLOR_BUFFER_BIT);
- for (i=0 ; i<4 ; i++) {
- uint16_t green = 0x7E0;
- GLint crop[4] = { 0, 1, 1, -1 };
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, &green);
- now = systemTime();
- glDrawTexiOES(0, 0, 0, 1, 1);
- glFinish();
- t = systemTime();
- printf("glFinish() time = %llu us\n", (t-now)/1000);
- fflush(stdout);
- eglSwapBuffers(dpy, surface);
- }
-
- return 0;
-}
diff --git a/opengl/tests/gl2_basic/Android.mk b/opengl/tests/gl2_basic/Android.mk
deleted file mode 100644
index d7819a1..0000000
--- a/opengl/tests/gl2_basic/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gl2_basic.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-gl2_basic
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl2_basic/gl2_basic.cpp b/opengl/tests/gl2_basic/gl2_basic.cpp
deleted file mode 100644
index 7007871..0000000
--- a/opengl/tests/gl2_basic/gl2_basic.cpp
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (C) 2007 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <utils/Timers.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-static void printGLString(const char *name, GLenum s) {
- // fprintf(stderr, "printGLString %s, %d\n", name, s);
- const char *v = (const char *) glGetString(s);
- // int error = glGetError();
- // fprintf(stderr, "glGetError() = %d, result of glGetString = %x\n", error,
- // (unsigned int) v);
- // if ((v < (const char*) 0) || (v > (const char*) 0x10000))
- // fprintf(stderr, "GL %s = %s\n", name, v);
- // else
- // fprintf(stderr, "GL %s = (null) 0x%08x\n", name, (unsigned int) v);
- fprintf(stderr, "GL %s = %s\n", name, v);
-}
-
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
- if (returnVal != EGL_TRUE) {
- fprintf(stderr, "%s() returned %d\n", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
- error);
- }
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- fprintf(stderr, "after %s() glError (0x%x)\n", op, error);
- }
-}
-
-static const char gVertexShader[] = "attribute vec4 vPosition;\n"
- "void main() {\n"
- " gl_Position = vPosition;\n"
- "}\n";
-
-static const char gFragmentShader[] = "precision mediump float;\n"
- "void main() {\n"
- " gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);\n"
- "}\n";
-
-GLuint loadShader(GLenum shaderType, const char* pSource) {
- GLuint shader = glCreateShader(shaderType);
- if (shader) {
- glShaderSource(shader, 1, &pSource, NULL);
- glCompileShader(shader);
- GLint compiled = 0;
- glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (infoLen) {
- char* buf = (char*) malloc(infoLen);
- if (buf) {
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- fprintf(stderr, "Could not compile shader %d:\n%s\n",
- shaderType, buf);
- free(buf);
- }
- glDeleteShader(shader);
- shader = 0;
- }
- }
- }
- return shader;
-}
-
-GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
- GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
- if (!vertexShader) {
- return 0;
- }
-
- GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
- if (!pixelShader) {
- return 0;
- }
-
- GLuint program = glCreateProgram();
- if (program) {
- glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- glLinkProgram(program);
- GLint linkStatus = GL_FALSE;
- glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
- if (linkStatus != GL_TRUE) {
- GLint bufLength = 0;
- glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
- if (bufLength) {
- char* buf = (char*) malloc(bufLength);
- if (buf) {
- glGetProgramInfoLog(program, bufLength, NULL, buf);
- fprintf(stderr, "Could not link program:\n%s\n", buf);
- free(buf);
- }
- }
- glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
-}
-
-GLuint gProgram;
-GLuint gvPositionHandle;
-
-bool setupGraphics(int w, int h) {
- gProgram = createProgram(gVertexShader, gFragmentShader);
- if (!gProgram) {
- return false;
- }
- gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
- checkGlError("glGetAttribLocation");
- fprintf(stderr, "glGetAttribLocation(\"vPosition\") = %d\n",
- gvPositionHandle);
-
- glViewport(0, 0, w, h);
- checkGlError("glViewport");
- return true;
-}
-
-const GLfloat gTriangleVertices[] = { 0.0f, 0.5f, -0.5f, -0.5f,
- 0.5f, -0.5f };
-
-void renderFrame() {
- glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
- checkGlError("glClearColor");
- glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- glUseProgram(gProgram);
- checkGlError("glUseProgram");
-
- glVertexAttribPointer(gvPositionHandle, 2, GL_FLOAT, GL_FALSE, 0, gTriangleVertices);
- checkGlError("glVertexAttribPointer");
- glEnableVertexAttribArray(gvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
- glDrawArrays(GL_TRIANGLES, 0, 3);
- checkGlError("glDrawArrays");
-}
-
-void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute, &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- printf(" %s: ", names[j].name);
- printf("%d (0x%x)", value, value);
- }
- }
- printf("\n");
-}
-
-int printEGLConfigurations(EGLDisplay dpy) {
- EGLint numConfig = 0;
- EGLint returnVal = eglGetConfigs(dpy, NULL, 0, &numConfig);
- checkEglError("eglGetConfigs", returnVal);
- if (!returnVal) {
- return false;
- }
-
- printf("Number of EGL configuration: %d\n", numConfig);
-
- EGLConfig* configs = (EGLConfig*) malloc(sizeof(EGLConfig) * numConfig);
- if (! configs) {
- printf("Could not allocate configs.\n");
- return false;
- }
-
- returnVal = eglGetConfigs(dpy, configs, numConfig, &numConfig);
- checkEglError("eglGetConfigs", returnVal);
- if (!returnVal) {
- free(configs);
- return false;
- }
-
- for(int i = 0; i < numConfig; i++) {
- printf("Configuration %d\n", i);
- printEGLConfiguration(dpy, configs[i]);
- }
-
- free(configs);
- return true;
-}
-
-int main(int argc, char** argv) {
- EGLBoolean returnValue;
- EGLConfig myConfig = {0};
-
- EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
- EGLint s_configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_NONE };
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLSurface surface;
- EGLint w, h;
-
- EGLDisplay dpy;
-
- checkEglError("<init>");
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- checkEglError("eglGetDisplay");
- if (dpy == EGL_NO_DISPLAY) {
- printf("eglGetDisplay returned EGL_NO_DISPLAY.\n");
- return 0;
- }
-
- returnValue = eglInitialize(dpy, &majorVersion, &minorVersion);
- checkEglError("eglInitialize", returnValue);
- fprintf(stderr, "EGL version %d.%d\n", majorVersion, minorVersion);
- if (returnValue != EGL_TRUE) {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- if (!printEGLConfigurations(dpy)) {
- printf("printEGLConfigurations failed\n");
- return 0;
- }
-
- checkEglError("printEGLConfigurations");
-
- EGLNativeWindowType window = android_createDisplaySurface();
- returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
- if (returnValue) {
- printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
- return 0;
- }
-
- checkEglError("EGLUtils::selectConfigForNativeWindow");
-
- printf("Chose this configuration:\n");
- printEGLConfiguration(dpy, myConfig);
-
- surface = eglCreateWindowSurface(dpy, myConfig, window, NULL);
- checkEglError("eglCreateWindowSurface");
- if (surface == EGL_NO_SURFACE) {
- printf("gelCreateWindowSurface failed.\n");
- return 0;
- }
-
- context = eglCreateContext(dpy, myConfig, EGL_NO_CONTEXT, context_attribs);
- checkEglError("eglCreateContext");
- if (context == EGL_NO_CONTEXT) {
- printf("eglCreateContext failed\n");
- return 0;
- }
- returnValue = eglMakeCurrent(dpy, surface, surface, context);
- checkEglError("eglMakeCurrent", returnValue);
- if (returnValue != EGL_TRUE) {
- return 0;
- }
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- checkEglError("eglQuerySurface");
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- checkEglError("eglQuerySurface");
- GLint dim = w < h ? w : h;
-
- fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
-
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- if(!setupGraphics(w, h)) {
- fprintf(stderr, "Could not set up graphics.\n");
- return 0;
- }
-
- for (;;) {
- renderFrame();
- eglSwapBuffers(dpy, surface);
- checkEglError("eglSwapBuffers");
- }
-
- return 0;
-}
diff --git a/opengl/tests/gl2_cameraeye/Android.mk b/opengl/tests/gl2_cameraeye/Android.mk
deleted file mode 100644
index 4a43a9e..0000000
--- a/opengl/tests/gl2_cameraeye/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := GL2CameraEye
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/opengl/tests/gl2_cameraeye/AndroidManifest.xml b/opengl/tests/gl2_cameraeye/AndroidManifest.xml
deleted file mode 100644
index c53f7be..0000000
--- a/opengl/tests/gl2_cameraeye/AndroidManifest.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<!-- Declare the contents of this Android application. The namespace
- attribute brings in the Android platform namespace, and the package
- supplies a unique name for the application. When writing your
- own application, the package name must be changed from "com.example.*"
- to come from a domain that you own or have control over. -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.gl2cameraeye">
- <uses-permission android:name="android.permission.CAMERA" />
- <uses-feature android:name="android.hardware.camera" />
- <uses-feature android:name="android.hardware.camera.autofocus" />
- <uses-feature android:glEsVersion="0x00020000" />
- <application android:label="@string/gl2cameraeye_name">
- <activity android:name="GL2CameraEye">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/gl2_cameraeye/res/values/strings.xml b/opengl/tests/gl2_cameraeye/res/values/strings.xml
deleted file mode 100644
index 386b930..0000000
--- a/opengl/tests/gl2_cameraeye/res/values/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<resources>
-
- <string name="gl2cameraeye_name">GL2CameraEye</string>
-
-</resources>
diff --git a/opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/GL2CameraEye.java b/opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/GL2CameraEye.java
deleted file mode 100644
index 561e4c5..0000000
--- a/opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/GL2CameraEye.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
- * 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 com.android.gl2cameraeye;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.app.Activity;
-import android.content.pm.ActivityInfo;
-import android.os.Bundle;
-import android.view.MotionEvent;
-import android.content.Context;
-import android.util.Log;
-
-import android.opengl.GLES20;
-import android.opengl.GLSurfaceView;
-import android.opengl.GLUtils;
-import android.opengl.Matrix;
-
-import android.graphics.SurfaceTexture;
-
-import android.hardware.Camera;
-import android.hardware.SensorManager;
-import android.hardware.SensorEvent;
-import android.hardware.SensorEventListener;
-import android.hardware.Sensor;
-
-public class GL2CameraEye extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- mGLView = new CamGLSurfaceView(this);
- setContentView(mGLView);
- setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- mGLView.onPause();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mGLView.onResume();
- }
-
- private GLSurfaceView mGLView;
-}
-
-class CamGLSurfaceView extends GLSurfaceView implements SensorEventListener {
- public CamGLSurfaceView(Context context) {
- super(context);
- setEGLContextClientVersion(2);
- mRenderer = new CamRenderer(context);
- setRenderer(mRenderer);
-
- mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
- mAcceleration = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION);
- }
-
- public boolean onTouchEvent(final MotionEvent event) {
- queueEvent(new Runnable(){
- public void run() {
- mRenderer.setPosition(event.getX() / getWidth(),
- event.getY() / getHeight());
- }});
- return true;
- }
-
- @Override
- public void onPause() {
- super.onPause();
- mCamera.stopPreview();
- mCamera.release();
-
- mSensorManager.unregisterListener(this);
- }
-
- @Override
- public void onResume() {
- mCamera = Camera.open();
- Camera.Parameters p = mCamera.getParameters();
- // No changes to default camera parameters
- mCamera.setParameters(p);
-
- queueEvent(new Runnable(){
- public void run() {
- mRenderer.setCamera(mCamera);
- }});
-
- mSensorManager.registerListener(this, mAcceleration, SensorManager.SENSOR_DELAY_GAME);
- super.onResume();
- }
-
- public void onSensorChanged(SensorEvent event) {
- if (event.sensor.getType() == Sensor.TYPE_LINEAR_ACCELERATION) {
- final float[] accelerationVector = event.values;
- queueEvent(new Runnable(){
- public void run() {
- mRenderer.setAcceleration(accelerationVector);
- }});
- }
- }
-
- public void onAccuracyChanged(Sensor sensor, int accuracy) {
- // Ignoring sensor accuracy changes.
- }
-
- CamRenderer mRenderer;
- Camera mCamera;
-
- SensorManager mSensorManager;
- Sensor mAcceleration;
-}
-
-class CamRenderer implements GLSurfaceView.Renderer, SurfaceTexture.OnFrameAvailableListener {
-
- public CamRenderer(Context context) {
- mContext = context;
-
- mTriangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length
- * FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
- mTriangleVertices.put(mTriangleVerticesData).position(0);
-
- Matrix.setIdentityM(mSTMatrix, 0);
- Matrix.setIdentityM(mMMatrix, 0);
-
- float[] defaultAcceleration = {0.f,0.f,0.f};
- setAcceleration(defaultAcceleration);
- mPos[0] = 0.f;
- mPos[1] = 0.f;
- mPos[2] = 0.f;
- mVel[0] = 0.f;
- mVel[1] = 0.f;
- mVel[2] = 0.f;
-
- }
-
- /* The following set methods are not synchronized, so should only
- * be called within the rendering thread context. Use GLSurfaceView.queueEvent for safe access.
- */
- public void setPosition(float x, float y) {
- /* Map from screen (0,0)-(1,1) to scene coordinates */
- mPos[0] = (x*2-1)*mRatio;
- mPos[1] = (-y)*2+1;
- mPos[2] = 0.f;
- mVel[0] = 0;
- mVel[1] = 0;
- mVel[2] = 0;
- }
-
- public void setCamera(Camera camera) {
- mCamera = camera;
- Camera.Size previewSize = camera.getParameters().getPreviewSize();
- mCameraRatio = (float)previewSize.width/previewSize.height;
- }
-
- public void setAcceleration(float[] accelerationVector) {
- mGForce[0] = accelerationVector[0];
- mGForce[1] = accelerationVector[1];
- mGForce[2] = accelerationVector[2];
- }
-
- public void onDrawFrame(GL10 glUnused) {
- synchronized(this) {
- if (updateSurface) {
- mSurface.updateTexImage();
-
- mSurface.getTransformMatrix(mSTMatrix);
- long timestamp = mSurface.getTimestamp();
- doPhysics(timestamp);
-
- updateSurface = false;
- }
- }
-
- // Ignore the passed-in GL10 interface, and use the GLES20
- // class's static methods instead.
- GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
- GLES20.glUseProgram(mProgram);
- checkGlError("glUseProgram");
-
- GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
- GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID);
-
- mTriangleVertices.position(TRIANGLE_VERTICES_DATA_POS_OFFSET);
- GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false,
- TRIANGLE_VERTICES_DATA_STRIDE_BYTES, mTriangleVertices);
- checkGlError("glVertexAttribPointer maPosition");
- GLES20.glEnableVertexAttribArray(maPositionHandle);
- checkGlError("glEnableVertexAttribArray maPositionHandle");
-
- mTriangleVertices.position(TRIANGLE_VERTICES_DATA_UV_OFFSET);
- GLES20.glVertexAttribPointer(maTextureHandle, 3, GLES20.GL_FLOAT, false,
- TRIANGLE_VERTICES_DATA_STRIDE_BYTES, mTriangleVertices);
- checkGlError("glVertexAttribPointer maTextureHandle");
- GLES20.glEnableVertexAttribArray(maTextureHandle);
- checkGlError("glEnableVertexAttribArray maTextureHandle");
-
- Matrix.multiplyMM(mMVPMatrix, 0, mVMatrix, 0, mMMatrix, 0);
- Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mMVPMatrix, 0);
-
- GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0);
- GLES20.glUniformMatrix4fv(muSTMatrixHandle, 1, false, mSTMatrix, 0);
- GLES20.glUniform1f(muCRatioHandle, mCameraRatio);
-
- GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);
- checkGlError("glDrawArrays");
- }
-
- public void onSurfaceChanged(GL10 glUnused, int width, int height) {
- // Ignore the passed-in GL10 interface, and use the GLES20
- // class's static methods instead.
- GLES20.glViewport(0, 0, width, height);
- mRatio = (float) width / height;
- Matrix.frustumM(mProjMatrix, 0, -mRatio, mRatio, -1, 1, 3, 7);
- }
-
- public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {
- // Ignore the passed-in GL10 interface, and use the GLES20
- // class's static methods instead.
-
- /* Set up alpha blending and an Android background color */
- GLES20.glEnable(GLES20.GL_BLEND);
- GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
- GLES20.glClearColor(0.643f, 0.776f, 0.223f, 1.0f);
-
- /* Set up shaders and handles to their variables */
- mProgram = createProgram(mVertexShader, mFragmentShader);
- if (mProgram == 0) {
- return;
- }
- maPositionHandle = GLES20.glGetAttribLocation(mProgram, "aPosition");
- checkGlError("glGetAttribLocation aPosition");
- if (maPositionHandle == -1) {
- throw new RuntimeException("Could not get attrib location for aPosition");
- }
- maTextureHandle = GLES20.glGetAttribLocation(mProgram, "aTextureCoord");
- checkGlError("glGetAttribLocation aTextureCoord");
- if (maTextureHandle == -1) {
- throw new RuntimeException("Could not get attrib location for aTextureCoord");
- }
-
- muMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
- checkGlError("glGetUniformLocation uMVPMatrix");
- if (muMVPMatrixHandle == -1) {
- throw new RuntimeException("Could not get attrib location for uMVPMatrix");
- }
-
- muSTMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uSTMatrix");
- checkGlError("glGetUniformLocation uSTMatrix");
- if (muMVPMatrixHandle == -1) {
- throw new RuntimeException("Could not get attrib location for uSTMatrix");
- }
-
- muCRatioHandle = GLES20.glGetUniformLocation(mProgram, "uCRatio");
- checkGlError("glGetUniformLocation uCRatio");
- if (muMVPMatrixHandle == -1) {
- throw new RuntimeException("Could not get attrib location for uCRatio");
- }
-
- /*
- * Create our texture. This has to be done each time the
- * surface is created.
- */
-
- int[] textures = new int[1];
- GLES20.glGenTextures(1, textures, 0);
-
- mTextureID = textures[0];
- GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID);
- checkGlError("glBindTexture mTextureID");
-
- // Can't do mipmapping with camera source
- GLES20.glTexParameterf(GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER,
- GLES20.GL_NEAREST);
- GLES20.glTexParameterf(GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MAG_FILTER,
- GLES20.GL_LINEAR);
- // Clamp to edge is the only option
- GLES20.glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S,
- GLES20.GL_CLAMP_TO_EDGE);
- GLES20.glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T,
- GLES20.GL_CLAMP_TO_EDGE);
- checkGlError("glTexParameteri mTextureID");
-
- /*
- * Create the SurfaceTexture that will feed this textureID, and pass it to the camera
- */
-
- mSurface = new SurfaceTexture(mTextureID);
- mSurface.setOnFrameAvailableListener(this);
- try {
- mCamera.setPreviewTexture(mSurface);
- } catch (IOException t) {
- Log.e(TAG, "Cannot set preview texture target!");
- }
-
- /* Start the camera */
- mCamera.startPreview();
-
- Matrix.setLookAtM(mVMatrix, 0, 0, 0, 5f, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
-
- mLastTime = 0;
-
- synchronized(this) {
- updateSurface = false;
- }
- }
-
- synchronized public void onFrameAvailable(SurfaceTexture surface) {
- /* For simplicity, SurfaceTexture calls here when it has new
- * data available. Call may come in from some random thread,
- * so let's be safe and use synchronize. No OpenGL calls can be done here.
- */
- updateSurface = true;
- }
-
- private void doPhysics(long timestamp) {
- /*
- * Move the camera surface around based on some simple spring physics with drag
- */
-
- if (mLastTime == 0)
- mLastTime = timestamp;
-
- float deltaT = (timestamp - mLastTime)/1000000000.f; // To seconds
-
- float springStrength = 20.f;
- float frictionCoeff = 10.f;
- float mass = 10.f;
- float gMultiplier = 4.f;
- /* Only update physics every 30 ms */
- if (deltaT > 0.030f) {
- mLastTime = timestamp;
-
- float[] totalForce = new float[3];
- totalForce[0] = -mPos[0] * springStrength - mVel[0]*frictionCoeff + gMultiplier*mGForce[0]*mass;
- totalForce[1] = -mPos[1] * springStrength - mVel[1]*frictionCoeff + gMultiplier*mGForce[1]*mass;
- totalForce[2] = -mPos[2] * springStrength - mVel[2]*frictionCoeff + gMultiplier*mGForce[2]*mass;
-
- float[] accel = new float[3];
- accel[0] = totalForce[0]/mass;
- accel[1] = totalForce[1]/mass;
- accel[2] = totalForce[2]/mass;
-
- /* Not a very accurate integrator */
- mVel[0] = mVel[0] + accel[0]*deltaT;
- mVel[1] = mVel[1] + accel[1]*deltaT;
- mVel[2] = mVel[2] + accel[2]*deltaT;
-
- mPos[0] = mPos[0] + mVel[0]*deltaT;
- mPos[1] = mPos[1] + mVel[1]*deltaT;
- mPos[2] = mPos[2] + mVel[2]*deltaT;
-
- Matrix.setIdentityM(mMMatrix, 0);
- Matrix.translateM(mMMatrix, 0, mPos[0], mPos[1], mPos[2]);
- }
-
- }
-
- private int loadShader(int shaderType, String source) {
- int shader = GLES20.glCreateShader(shaderType);
- if (shader != 0) {
- GLES20.glShaderSource(shader, source);
- GLES20.glCompileShader(shader);
- int[] compiled = new int[1];
- GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0);
- if (compiled[0] == 0) {
- Log.e(TAG, "Could not compile shader " + shaderType + ":");
- Log.e(TAG, GLES20.glGetShaderInfoLog(shader));
- GLES20.glDeleteShader(shader);
- shader = 0;
- }
- }
- return shader;
- }
-
- private int createProgram(String vertexSource, String fragmentSource) {
- int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexSource);
- if (vertexShader == 0) {
- return 0;
- }
- int pixelShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource);
- if (pixelShader == 0) {
- return 0;
- }
-
- int program = GLES20.glCreateProgram();
- if (program != 0) {
- GLES20.glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- GLES20.glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- GLES20.glLinkProgram(program);
- int[] linkStatus = new int[1];
- GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0);
- if (linkStatus[0] != GLES20.GL_TRUE) {
- Log.e(TAG, "Could not link program: ");
- Log.e(TAG, GLES20.glGetProgramInfoLog(program));
- GLES20.glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
- }
-
- private void checkGlError(String op) {
- int error;
- while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
- Log.e(TAG, op + ": glError " + error);
- throw new RuntimeException(op + ": glError " + error);
- }
- }
-
- private static final int FLOAT_SIZE_BYTES = 4;
- private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES;
- private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0;
- private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3;
- private final float[] mTriangleVerticesData = {
- // X, Y, Z, U, V
- -1.0f, -1.0f, 0, 0.f, 0.f,
- 1.0f, -1.0f, 0, 1.f, 0.f,
- -1.0f, 1.0f, 0, 0.f, 1.f,
- 1.0f, 1.0f, 0, 1.f, 1.f,
- };
-
- private FloatBuffer mTriangleVertices;
-
- private final String mVertexShader =
- "uniform mat4 uMVPMatrix;\n" +
- "uniform mat4 uSTMatrix;\n" +
- "uniform float uCRatio;\n" +
- "attribute vec4 aPosition;\n" +
- "attribute vec4 aTextureCoord;\n" +
- "varying vec2 vTextureCoord;\n" +
- "varying vec2 vTextureNormCoord;\n" +
- "void main() {\n" +
- " vec4 scaledPos = aPosition;\n" +
- " scaledPos.x = scaledPos.x * uCRatio;\n" +
- " gl_Position = uMVPMatrix * scaledPos;\n" +
- " vTextureCoord = (uSTMatrix * aTextureCoord).xy;\n" +
- " vTextureNormCoord = aTextureCoord.xy;\n" +
- "}\n";
-
- private final String mFragmentShader =
- "#extension GL_OES_EGL_image_external : require\n" +
- "precision mediump float;\n" +
- "varying vec2 vTextureCoord;\n" +
- "varying vec2 vTextureNormCoord;\n" +
- "uniform samplerExternalOES sTexture;\n" +
- "void main() {\n" +
- " gl_FragColor = texture2D(sTexture, vTextureCoord);\n" +
- " gl_FragColor.a = 1.0-min(length(vTextureNormCoord-0.5)*2.0,1.0);\n" +
- "}\n";
-
- private float[] mMVPMatrix = new float[16];
- private float[] mProjMatrix = new float[16];
- private float[] mMMatrix = new float[16];
- private float[] mVMatrix = new float[16];
- private float[] mSTMatrix = new float[16];
-
- private int mProgram;
- private int mTextureID;
- private int muMVPMatrixHandle;
- private int muSTMatrixHandle;
- private int muCRatioHandle;
- private int maPositionHandle;
- private int maTextureHandle;
-
- private float mRatio = 1.0f;
- private float mCameraRatio = 1.0f;
- private float[] mVel = new float[3];
- private float[] mPos = new float[3];
- private float[] mGForce = new float[3];
-
- private long mLastTime;
-
- private SurfaceTexture mSurface;
- private Camera mCamera;
- private boolean updateSurface = false;
-
- private Context mContext;
- private static String TAG = "CamRenderer";
-
- // Magic key
- private static int GL_TEXTURE_EXTERNAL_OES = 0x8D65;
-}
diff --git a/opengl/tests/gl2_copyTexImage/Android.mk b/opengl/tests/gl2_copyTexImage/Android.mk
deleted file mode 100644
index 005c383..0000000
--- a/opengl/tests/gl2_copyTexImage/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gl2_copyTexImage.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-gl2_copyTexImage
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
deleted file mode 100644
index 988d7ac..0000000
--- a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * Copyright (C) 2007 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <utils/Timers.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-static void printGLString(const char *name, GLenum s) {
- // fprintf(stderr, "printGLString %s, %d\n", name, s);
- const char *v = (const char *) glGetString(s);
- // int error = glGetError();
- // fprintf(stderr, "glGetError() = %d, result of glGetString = %x\n", error,
- // (unsigned int) v);
- // if ((v < (const char*) 0) || (v > (const char*) 0x10000))
- // fprintf(stderr, "GL %s = %s\n", name, v);
- // else
- // fprintf(stderr, "GL %s = (null) 0x%08x\n", name, (unsigned int) v);
- fprintf(stderr, "GL %s = %s\n", name, v);
-}
-
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
- if (returnVal != EGL_TRUE) {
- fprintf(stderr, "%s() returned %d\n", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
- error);
- }
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- fprintf(stderr, "after %s() glError (0x%x)\n", op, error);
- }
-}
-
-static const char gVertexShader[] = "attribute vec4 vPosition;\n"
- "void main() {\n"
- " gl_Position = vPosition;\n"
- "}\n";
-
-static const char gFragmentShader[] = "precision mediump float;\n"
- "void main() {\n"
- " gl_FragColor = vec4(0.0, 1.0, 0.0, 0.5);\n"
- "}\n";
-
-GLuint loadShader(GLenum shaderType, const char* pSource) {
- GLuint shader = glCreateShader(shaderType);
- if (shader) {
- glShaderSource(shader, 1, &pSource, NULL);
- glCompileShader(shader);
- GLint compiled = 0;
- glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (infoLen) {
- char* buf = (char*) malloc(infoLen);
- if (buf) {
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- fprintf(stderr, "Could not compile shader %d:\n%s\n",
- shaderType, buf);
- free(buf);
- }
- glDeleteShader(shader);
- shader = 0;
- }
- }
- }
- return shader;
-}
-
-GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
- GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
- if (!vertexShader) {
- return 0;
- }
-
- GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
- if (!pixelShader) {
- return 0;
- }
-
- GLuint program = glCreateProgram();
- if (program) {
- glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- glLinkProgram(program);
- GLint linkStatus = GL_FALSE;
- glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
- if (linkStatus != GL_TRUE) {
- GLint bufLength = 0;
- glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
- if (bufLength) {
- char* buf = (char*) malloc(bufLength);
- if (buf) {
- glGetProgramInfoLog(program, bufLength, NULL, buf);
- fprintf(stderr, "Could not link program:\n%s\n", buf);
- free(buf);
- }
- }
- glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
-}
-
-GLuint gProgram;
-GLuint gTextureProgram;
-GLuint gvPositionHandle;
-GLuint gvTexturePositionHandle;
-GLuint gvTextureTexCoordsHandle;
-GLuint gvTextureSamplerHandle;
-GLuint gFbo;
-GLuint gTexture;
-GLuint gBufferTexture;
-
-static const char gSimpleVS[] =
- "attribute vec4 position;\n"
- "attribute vec2 texCoords;\n"
- "varying vec2 outTexCoords;\n"
- "\nvoid main(void) {\n"
- " outTexCoords = texCoords;\n"
- " gl_Position = position;\n"
- "}\n\n";
-static const char gSimpleFS[] =
- "precision mediump float;\n\n"
- "varying vec2 outTexCoords;\n"
- "uniform sampler2D texture;\n"
- "\nvoid main(void) {\n"
- " gl_FragColor = texture2D(texture, outTexCoords);\n"
- "}\n\n";
-
-bool setupGraphics(int w, int h) {
- gProgram = createProgram(gVertexShader, gFragmentShader);
- if (!gProgram) {
- return false;
- }
- gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
- checkGlError("glGetAttribLocation");
- fprintf(stderr, "glGetAttribLocation(\"vPosition\") = %d\n", gvPositionHandle);
-
- gTextureProgram = createProgram(gSimpleVS, gSimpleFS);
- if (!gTextureProgram) {
- return false;
- }
- gvTexturePositionHandle = glGetAttribLocation(gTextureProgram, "position");
- checkGlError("glGetAttribLocation");
- gvTextureTexCoordsHandle = glGetAttribLocation(gTextureProgram, "texCoords");
- checkGlError("glGetAttribLocation");
- gvTextureSamplerHandle = glGetUniformLocation(gTextureProgram, "texture");
- checkGlError("glGetAttribLocation");
-
- glActiveTexture(GL_TEXTURE0);
-
- glGenTextures(1, &gTexture);
- glBindTexture(GL_TEXTURE_2D, gTexture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- glGenTextures(1, &gBufferTexture);
- glBindTexture(GL_TEXTURE_2D, gBufferTexture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- glGenFramebuffers(1, &gFbo);
- glBindFramebuffer(GL_FRAMEBUFFER, gFbo);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gTexture, 0);
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- glViewport(0, 0, w, h);
- checkGlError("glViewport");
- return true;
-}
-
-const GLfloat gTriangleVertices[] = { 0.0f, 0.5f, -0.5f, -0.5f,
- 0.5f, -0.5f };
-
-const GLint FLOAT_SIZE_BYTES = 4;
-const GLint TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES;
-const GLfloat gTriangleVerticesData[] = {
- // X, Y, Z, U, V
- -1.0f, -1.0f, 0, 0.f, 0.f,
- 1.0f, -1.0f, 0, 1.f, 0.f,
- -1.0f, 1.0f, 0, 0.f, 1.f,
- 1.0f, 1.0f, 0, 1.f, 1.f,
-};
-
-void renderFrame(GLint w, GLint h) {
- glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
- checkGlError("glClearColor");
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- // Bind FBO and draw into it
- glBindFramebuffer(GL_FRAMEBUFFER, gFbo);
- checkGlError("glBindFramebuffer");
-
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- checkGlError("glClearColor");
- glClear(GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- glUseProgram(gProgram);
- checkGlError("glUseProgram");
-
- glVertexAttribPointer(gvPositionHandle, 2, GL_FLOAT, GL_FALSE, 0, gTriangleVertices);
- checkGlError("glVertexAttribPointer");
- glEnableVertexAttribArray(gvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
- glDrawArrays(GL_TRIANGLES, 0, 3);
- checkGlError("glDrawArrays");
-
- // Copy content of FBO into a texture
- glBindTexture(GL_TEXTURE_2D, gBufferTexture);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, w / 2, h / 2);
- checkGlError("glCopyTexSubImage2D");
-
- // Back to the display
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- checkGlError("glBindFramebuffer");
-
- // Draw copied content on the screen
- glUseProgram(gTextureProgram);
- checkGlError("glUseProgram");
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-
- glVertexAttribPointer(gvTexturePositionHandle, 3, GL_FLOAT, GL_FALSE,
- TRIANGLE_VERTICES_DATA_STRIDE_BYTES, gTriangleVerticesData);
- checkGlError("glVertexAttribPointer");
- glVertexAttribPointer(gvTextureTexCoordsHandle, 2, GL_FLOAT, GL_FALSE,
- TRIANGLE_VERTICES_DATA_STRIDE_BYTES, &gTriangleVerticesData[3]);
- checkGlError("glVertexAttribPointer");
- glEnableVertexAttribArray(gvTexturePositionHandle);
- glEnableVertexAttribArray(gvTextureTexCoordsHandle);
- checkGlError("glEnableVertexAttribArray");
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- checkGlError("glDrawArrays");
-}
-
-void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute, &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- printf(" %s: ", names[j].name);
- printf("%d (0x%x)", value, value);
- }
- }
- printf("\n");
-}
-
-int printEGLConfigurations(EGLDisplay dpy) {
- EGLint numConfig = 0;
- EGLint returnVal = eglGetConfigs(dpy, NULL, 0, &numConfig);
- checkEglError("eglGetConfigs", returnVal);
- if (!returnVal) {
- return false;
- }
-
- printf("Number of EGL configuration: %d\n", numConfig);
-
- EGLConfig* configs = (EGLConfig*) malloc(sizeof(EGLConfig) * numConfig);
- if (! configs) {
- printf("Could not allocate configs.\n");
- return false;
- }
-
- returnVal = eglGetConfigs(dpy, configs, numConfig, &numConfig);
- checkEglError("eglGetConfigs", returnVal);
- if (!returnVal) {
- free(configs);
- return false;
- }
-
- for(int i = 0; i < numConfig; i++) {
- printf("Configuration %d\n", i);
- printEGLConfiguration(dpy, configs[i]);
- }
-
- free(configs);
- return true;
-}
-
-int main(int argc, char** argv) {
- EGLBoolean returnValue;
- EGLConfig myConfig = {0};
-
- EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
- EGLint s_configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_RED_SIZE, 8,
- EGL_GREEN_SIZE, 8,
- EGL_BLUE_SIZE, 8,
- EGL_ALPHA_SIZE, 8,
- EGL_NONE };
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLSurface surface;
- EGLint w, h;
-
- EGLDisplay dpy;
-
- checkEglError("<init>");
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- checkEglError("eglGetDisplay");
- if (dpy == EGL_NO_DISPLAY) {
- printf("eglGetDisplay returned EGL_NO_DISPLAY.\n");
- return 0;
- }
-
- returnValue = eglInitialize(dpy, &majorVersion, &minorVersion);
- checkEglError("eglInitialize", returnValue);
- fprintf(stderr, "EGL version %d.%d\n", majorVersion, minorVersion);
- if (returnValue != EGL_TRUE) {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- if (!printEGLConfigurations(dpy)) {
- printf("printEGLConfigurations failed\n");
- return 0;
- }
-
- checkEglError("printEGLConfigurations");
-
- EGLNativeWindowType window = android_createDisplaySurface();
- EGLint numConfigs = -1, n = 0;
- eglChooseConfig(dpy, s_configAttribs, 0, 0, &numConfigs);
- if (numConfigs) {
- EGLConfig* const configs = new EGLConfig[numConfigs];
- eglChooseConfig(dpy, s_configAttribs, configs, numConfigs, &n);
- myConfig = configs[0];
- delete[] configs;
- }
-
- checkEglError("EGLUtils::selectConfigForNativeWindow");
-
- printf("Chose this configuration:\n");
- printEGLConfiguration(dpy, myConfig);
-
- surface = eglCreateWindowSurface(dpy, myConfig, window, NULL);
- checkEglError("eglCreateWindowSurface");
- if (surface == EGL_NO_SURFACE) {
- printf("gelCreateWindowSurface failed.\n");
- return 0;
- }
-
- context = eglCreateContext(dpy, myConfig, EGL_NO_CONTEXT, context_attribs);
- checkEglError("eglCreateContext");
- if (context == EGL_NO_CONTEXT) {
- printf("eglCreateContext failed\n");
- return 0;
- }
- returnValue = eglMakeCurrent(dpy, surface, surface, context);
- checkEglError("eglMakeCurrent", returnValue);
- if (returnValue != EGL_TRUE) {
- return 0;
- }
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- checkEglError("eglQuerySurface");
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- checkEglError("eglQuerySurface");
- GLint dim = w < h ? w : h;
-
- fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
-
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- if(!setupGraphics(w, h)) {
- fprintf(stderr, "Could not set up graphics.\n");
- return 0;
- }
-
- for (;;) {
- renderFrame(w, h);
- eglSwapBuffers(dpy, surface);
- checkEglError("eglSwapBuffers");
- }
-
- return 0;
-}
diff --git a/opengl/tests/gl2_java/Android.mk b/opengl/tests/gl2_java/Android.mk
deleted file mode 100644
index 34f4aee..0000000
--- a/opengl/tests/gl2_java/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#########################################################################
-# OpenGL ES 2.0 Java sample
-#########################################################################
-
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := GL2Java
-
-include $(BUILD_PACKAGE)
diff --git a/opengl/tests/gl2_java/AndroidManifest.xml b/opengl/tests/gl2_java/AndroidManifest.xml
deleted file mode 100644
index 8bb6840..0000000
--- a/opengl/tests/gl2_java/AndroidManifest.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.gl2java">
- <uses-feature android:glEsVersion="0x00020000" />
- <application
- android:label="@string/gl2java_activity">
- <activity android:name="GL2JavaActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/gl2_java/res/values/strings.xml b/opengl/tests/gl2_java/res/values/strings.xml
deleted file mode 100644
index 06bd23c..0000000
--- a/opengl/tests/gl2_java/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="gl2java_activity">GL2Java</string>
-
-</resources>
-
diff --git a/opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaActivity.java b/opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaActivity.java
deleted file mode 100644
index 37654fb..0000000
--- a/opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaActivity.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gl2java;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.WindowManager;
-
-import java.io.File;
-
-
-public class GL2JavaActivity extends Activity {
-
- GL2JavaView mView;
-
- @Override protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new GL2JavaView(getApplication());
- setContentView(mView);
- }
-
- @Override protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaView.java b/opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaView.java
deleted file mode 100644
index 7f2bfd3..0000000
--- a/opengl/tests/gl2_java/src/com/android/gl2java/GL2JavaView.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.gl2java;
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.opengl.GLES20;
-
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class GL2JavaView extends GLSurfaceView {
- private static String TAG = "GL2JavaView";
-
- public GL2JavaView(Context context) {
- super(context);
- setEGLContextClientVersion(2);
- setRenderer(new Renderer());
- }
-
- private static class Renderer implements GLSurfaceView.Renderer {
-
- public Renderer() {
- mTriangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length * 4)
- .order(ByteOrder.nativeOrder()).asFloatBuffer();
- mTriangleVertices.put(mTriangleVerticesData).position(0);
- }
-
- public void onDrawFrame(GL10 gl) {
- GLES20.glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
- GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
- GLES20.glUseProgram(mProgram);
- checkGlError("glUseProgram");
-
- GLES20.glVertexAttribPointer(mvPositionHandle, 2, GLES20.GL_FLOAT, false, 0, mTriangleVertices);
- checkGlError("glVertexAttribPointer");
- GLES20.glEnableVertexAttribArray(mvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
- GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
- checkGlError("glDrawArrays");
-
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GLES20.glViewport(0, 0, width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- mProgram = createProgram(mVertexShader, mFragmentShader);
- if (mProgram == 0) {
- return;
- }
- mvPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition");
- checkGlError("glGetAttribLocation");
- if (mvPositionHandle == -1) {
- throw new RuntimeException("Could not get attrib location for vPosition");
- }
- }
-
- private int loadShader(int shaderType, String source) {
- int shader = GLES20.glCreateShader(shaderType);
- if (shader != 0) {
- GLES20.glShaderSource(shader, source);
- GLES20.glCompileShader(shader);
- int[] compiled = new int[1];
- GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0);
- if (compiled[0] == 0) {
- Log.e(TAG, "Could not compile shader " + shaderType + ":");
- Log.e(TAG, GLES20.glGetShaderInfoLog(shader));
- GLES20.glDeleteShader(shader);
- shader = 0;
- }
- }
- return shader;
- }
-
- private int createProgram(String vertexSource, String fragmentSource) {
- int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexSource);
- if (vertexShader == 0) {
- return 0;
- }
-
- int pixelShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource);
- if (pixelShader == 0) {
- return 0;
- }
-
- int program = GLES20.glCreateProgram();
- if (program != 0) {
- GLES20.glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- GLES20.glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- GLES20.glLinkProgram(program);
- int[] linkStatus = new int[1];
- GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0);
- if (linkStatus[0] != GLES20.GL_TRUE) {
- Log.e(TAG, "Could not link program: ");
- Log.e(TAG, GLES20.glGetProgramInfoLog(program));
- GLES20.glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
- }
-
- private void checkGlError(String op) {
- int error;
- while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
- Log.e(TAG, op + ": glError " + error);
- throw new RuntimeException(op + ": glError " + error);
- }
- }
-
- private final float[] mTriangleVerticesData = { 0.0f, 0.5f, -0.5f, -0.5f,
- 0.5f, -0.5f };
-
- private FloatBuffer mTriangleVertices;
-
- private final String mVertexShader = "attribute vec4 vPosition;\n"
- + "void main() {\n"
- + " gl_Position = vPosition;\n"
- + "}\n";
-
- private final String mFragmentShader = "precision mediump float;\n"
- + "void main() {\n"
- + " gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);\n"
- + "}\n";
-
- private int mProgram;
- private int mvPositionHandle;
-
- }
-}
-
diff --git a/opengl/tests/gl2_jni/Android.mk b/opengl/tests/gl2_jni/Android.mk
deleted file mode 100644
index 5d90ff6..0000000
--- a/opengl/tests/gl2_jni/Android.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#########################################################################
-# OpenGL ES JNI sample
-# This makefile builds both an activity and a shared library.
-#########################################################################
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := GL2JNI
-
-LOCAL_JNI_SHARED_LIBRARIES := libgl2jni
-
-include $(BUILD_PACKAGE)
-
-#########################################################################
-# Build JNI Shared Library
-#########################################################################
-
-LOCAL_PATH:= $(LOCAL_PATH)/jni
-
-include $(CLEAR_VARS)
-
-# Optional tag would mean it doesn't get installed by default
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -Werror
-
-LOCAL_SRC_FILES:= \
- gl_code.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libEGL \
- libGLESv2
-
-LOCAL_MODULE := libgl2jni
-
-
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/tests/gl2_jni/AndroidManifest.xml b/opengl/tests/gl2_jni/AndroidManifest.xml
deleted file mode 100644
index 1827e5f..0000000
--- a/opengl/tests/gl2_jni/AndroidManifest.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.gl2jni">
- <application
- android:label="@string/gl2jni_activity">
- <activity android:name="GL2JNIActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp
deleted file mode 100644
index fa6bd93..0000000
--- a/opengl/tests/gl2_jni/jni/gl_code.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-// OpenGL ES 2.0 code
-
-#include <nativehelper/jni.h>
-#define LOG_TAG "GL2JNI gl_code.cpp"
-#include <utils/Log.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-static void printGLString(const char *name, GLenum s) {
- const char *v = (const char *) glGetString(s);
- ALOGI("GL %s = %s\n", name, v);
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- ALOGI("after %s() glError (0x%x)\n", op, error);
- }
-}
-
-static const char gVertexShader[] = "attribute vec4 vPosition;\n"
- "void main() {\n"
- " gl_Position = vPosition;\n"
- "}\n";
-
-static const char gFragmentShader[] = "precision mediump float;\n"
- "void main() {\n"
- " gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);\n"
- "}\n";
-
-GLuint loadShader(GLenum shaderType, const char* pSource) {
- GLuint shader = glCreateShader(shaderType);
- if (shader) {
- glShaderSource(shader, 1, &pSource, NULL);
- glCompileShader(shader);
- GLint compiled = 0;
- glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (infoLen) {
- char* buf = (char*) malloc(infoLen);
- if (buf) {
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- ALOGE("Could not compile shader %d:\n%s\n",
- shaderType, buf);
- free(buf);
- }
- glDeleteShader(shader);
- shader = 0;
- }
- }
- }
- return shader;
-}
-
-GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
- GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
- if (!vertexShader) {
- return 0;
- }
-
- GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
- if (!pixelShader) {
- return 0;
- }
-
- GLuint program = glCreateProgram();
- if (program) {
- glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- glLinkProgram(program);
- GLint linkStatus = GL_FALSE;
- glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
- if (linkStatus != GL_TRUE) {
- GLint bufLength = 0;
- glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
- if (bufLength) {
- char* buf = (char*) malloc(bufLength);
- if (buf) {
- glGetProgramInfoLog(program, bufLength, NULL, buf);
- ALOGE("Could not link program:\n%s\n", buf);
- free(buf);
- }
- }
- glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
-}
-
-GLuint gProgram;
-GLuint gvPositionHandle;
-
-bool setupGraphics(int w, int h) {
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- ALOGI("setupGraphics(%d, %d)", w, h);
- gProgram = createProgram(gVertexShader, gFragmentShader);
- if (!gProgram) {
- ALOGE("Could not create program.");
- return false;
- }
- gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
- checkGlError("glGetAttribLocation");
- ALOGI("glGetAttribLocation(\"vPosition\") = %d\n",
- gvPositionHandle);
-
- glViewport(0, 0, w, h);
- checkGlError("glViewport");
- return true;
-}
-
-const GLfloat gTriangleVertices[] = { 0.0f, 0.5f, -0.5f, -0.5f,
- 0.5f, -0.5f };
-
-void renderFrame() {
- static float grey;
- grey += 0.01f;
- if (grey > 1.0f) {
- grey = 0.0f;
- }
- glClearColor(grey, grey, grey, 1.0f);
- checkGlError("glClearColor");
- glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- glUseProgram(gProgram);
- checkGlError("glUseProgram");
-
- glVertexAttribPointer(gvPositionHandle, 2, GL_FLOAT, GL_FALSE, 0, gTriangleVertices);
- checkGlError("glVertexAttribPointer");
- glEnableVertexAttribArray(gvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
- glDrawArrays(GL_TRIANGLES, 0, 3);
- checkGlError("glDrawArrays");
-}
-
-extern "C" {
- JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height);
- JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj);
-};
-
-JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height)
-{
- setupGraphics(width, height);
-}
-
-JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj)
-{
- renderFrame();
-}
-
diff --git a/opengl/tests/gl2_jni/res/values/strings.xml b/opengl/tests/gl2_jni/res/values/strings.xml
deleted file mode 100644
index a29c74b..0000000
--- a/opengl/tests/gl2_jni/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="gl2jni_activity">GL2JNI</string>
-
-</resources>
-
diff --git a/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIActivity.java b/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIActivity.java
deleted file mode 100644
index c366a2c..0000000
--- a/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIActivity.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gl2jni;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.WindowManager;
-
-import java.io.File;
-
-
-public class GL2JNIActivity extends Activity {
-
- GL2JNIView mView;
-
- @Override protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new GL2JNIView(getApplication());
- setContentView(mView);
- }
-
- @Override protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNILib.java b/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNILib.java
deleted file mode 100644
index 040a984..0000000
--- a/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNILib.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gl2jni;
-
-// Wrapper for native library
-
-public class GL2JNILib {
-
- static {
- System.loadLibrary("gl2jni");
- }
-
- /**
- * @param width the current view width
- * @param height the current view height
- */
- public static native void init(int width, int height);
- public static native void step();
-}
diff --git a/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIView.java b/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIView.java
deleted file mode 100644
index 72b1dfb..0000000
--- a/opengl/tests/gl2_jni/src/com/android/gl2jni/GL2JNIView.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.gl2jni;
-/*
- * Copyright (C) 2008 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.
- */
-
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.opengles.GL10;
-
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class GL2JNIView extends GLSurfaceView {
- private static String TAG = "GL2JNIView";
-
- public GL2JNIView(Context context) {
- super(context);
- init(false, 0, 0);
- }
-
- public GL2JNIView(Context context, boolean translucent, int depth, int stencil) {
- super(context);
- init(translucent, depth, stencil);
- }
-
- private void init(boolean translucent, int depth, int stencil) {
- setEGLContextFactory(new ContextFactory());
- setEGLConfigChooser( translucent ?
- new ConfigChooser(8,8,8,8, depth, stencil) :
- new ConfigChooser(5,6,5,0, depth, stencil));
- setRenderer(new Renderer());
- }
-
- private static class ContextFactory implements GLSurfaceView.EGLContextFactory {
- private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
- public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
- Log.w(TAG, "creating OpenGL ES 2.0 context");
- checkEglError("Before eglCreateContext", egl);
- int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
- EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
- checkEglError("After eglCreateContext", egl);
- return context;
- }
-
- public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
- egl.eglDestroyContext(display, context);
- }
- }
-
- private static void checkEglError(String prompt, EGL10 egl) {
- int error;
- while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
- Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
- }
- }
-
- private static class ConfigChooser implements GLSurfaceView.EGLConfigChooser {
- private static int EGL_OPENGL_ES2_BIT = 4;
- private static int[] s_configAttribs2 =
- {
- EGL10.EGL_RED_SIZE, 4,
- EGL10.EGL_GREEN_SIZE, 4,
- EGL10.EGL_BLUE_SIZE, 4,
- EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL10.EGL_NONE
- };
-
- public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {
- mRedSize = r;
- mGreenSize = g;
- mBlueSize = b;
- mAlphaSize = a;
- mDepthSize = depth;
- mStencilSize = stencil;
- }
-
- public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
-
- int[] num_config = new int[1];
- egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);
-
- int numConfigs = num_config[0];
-
- if (numConfigs <= 0) {
- throw new IllegalArgumentException("No configs match configSpec");
- }
- EGLConfig[] configs = new EGLConfig[numConfigs];
- egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);
- // printConfigs(egl, display, configs);
- return chooseConfig(egl, display, configs);
- }
-
- public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
- EGLConfig[] configs) {
- EGLConfig closestConfig = null;
- int closestDistance = 1000;
- for(EGLConfig config : configs) {
- int d = findConfigAttrib(egl, display, config,
- EGL10.EGL_DEPTH_SIZE, 0);
- int s = findConfigAttrib(egl, display, config,
- EGL10.EGL_STENCIL_SIZE, 0);
- if (d >= mDepthSize && s>= mStencilSize) {
- int r = findConfigAttrib(egl, display, config,
- EGL10.EGL_RED_SIZE, 0);
- int g = findConfigAttrib(egl, display, config,
- EGL10.EGL_GREEN_SIZE, 0);
- int b = findConfigAttrib(egl, display, config,
- EGL10.EGL_BLUE_SIZE, 0);
- int a = findConfigAttrib(egl, display, config,
- EGL10.EGL_ALPHA_SIZE, 0);
- int distance = Math.abs(r - mRedSize)
- + Math.abs(g - mGreenSize)
- + Math.abs(b - mBlueSize)
- + Math.abs(a - mAlphaSize);
- if (distance < closestDistance) {
- closestDistance = distance;
- closestConfig = config;
- }
- }
- }
- return closestConfig;
- }
-
- private int findConfigAttrib(EGL10 egl, EGLDisplay display,
- EGLConfig config, int attribute, int defaultValue) {
-
- if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {
- return mValue[0];
- }
- return defaultValue;
- }
-
- private void printConfigs(EGL10 egl, EGLDisplay display,
- EGLConfig[] configs) {
- int numConfigs = configs.length;
- Log.w(TAG, String.format("%d configurations", numConfigs));
- for (int i = 0; i < numConfigs; i++) {
- Log.w(TAG, String.format("Configuration %d:\n", i));
- printConfig(egl, display, configs[i]);
- }
- }
-
- private void printConfig(EGL10 egl, EGLDisplay display,
- EGLConfig config) {
- int[] attributes = {
- EGL10.EGL_BUFFER_SIZE,
- EGL10.EGL_ALPHA_SIZE,
- EGL10.EGL_BLUE_SIZE,
- EGL10.EGL_GREEN_SIZE,
- EGL10.EGL_RED_SIZE,
- EGL10.EGL_DEPTH_SIZE,
- EGL10.EGL_STENCIL_SIZE,
- EGL10.EGL_CONFIG_CAVEAT,
- EGL10.EGL_CONFIG_ID,
- EGL10.EGL_LEVEL,
- EGL10.EGL_MAX_PBUFFER_HEIGHT,
- EGL10.EGL_MAX_PBUFFER_PIXELS,
- EGL10.EGL_MAX_PBUFFER_WIDTH,
- EGL10.EGL_NATIVE_RENDERABLE,
- EGL10.EGL_NATIVE_VISUAL_ID,
- EGL10.EGL_NATIVE_VISUAL_TYPE,
- 0x3030, // EGL10.EGL_PRESERVED_RESOURCES,
- EGL10.EGL_SAMPLES,
- EGL10.EGL_SAMPLE_BUFFERS,
- EGL10.EGL_SURFACE_TYPE,
- EGL10.EGL_TRANSPARENT_TYPE,
- EGL10.EGL_TRANSPARENT_RED_VALUE,
- EGL10.EGL_TRANSPARENT_GREEN_VALUE,
- EGL10.EGL_TRANSPARENT_BLUE_VALUE,
- 0x3039, // EGL10.EGL_BIND_TO_TEXTURE_RGB,
- 0x303A, // EGL10.EGL_BIND_TO_TEXTURE_RGBA,
- 0x303B, // EGL10.EGL_MIN_SWAP_INTERVAL,
- 0x303C, // EGL10.EGL_MAX_SWAP_INTERVAL,
- EGL10.EGL_LUMINANCE_SIZE,
- EGL10.EGL_ALPHA_MASK_SIZE,
- EGL10.EGL_COLOR_BUFFER_TYPE,
- EGL10.EGL_RENDERABLE_TYPE,
- 0x3042 // EGL10.EGL_CONFORMANT
- };
- String[] names = {
- "EGL_BUFFER_SIZE",
- "EGL_ALPHA_SIZE",
- "EGL_BLUE_SIZE",
- "EGL_GREEN_SIZE",
- "EGL_RED_SIZE",
- "EGL_DEPTH_SIZE",
- "EGL_STENCIL_SIZE",
- "EGL_CONFIG_CAVEAT",
- "EGL_CONFIG_ID",
- "EGL_LEVEL",
- "EGL_MAX_PBUFFER_HEIGHT",
- "EGL_MAX_PBUFFER_PIXELS",
- "EGL_MAX_PBUFFER_WIDTH",
- "EGL_NATIVE_RENDERABLE",
- "EGL_NATIVE_VISUAL_ID",
- "EGL_NATIVE_VISUAL_TYPE",
- "EGL_PRESERVED_RESOURCES",
- "EGL_SAMPLES",
- "EGL_SAMPLE_BUFFERS",
- "EGL_SURFACE_TYPE",
- "EGL_TRANSPARENT_TYPE",
- "EGL_TRANSPARENT_RED_VALUE",
- "EGL_TRANSPARENT_GREEN_VALUE",
- "EGL_TRANSPARENT_BLUE_VALUE",
- "EGL_BIND_TO_TEXTURE_RGB",
- "EGL_BIND_TO_TEXTURE_RGBA",
- "EGL_MIN_SWAP_INTERVAL",
- "EGL_MAX_SWAP_INTERVAL",
- "EGL_LUMINANCE_SIZE",
- "EGL_ALPHA_MASK_SIZE",
- "EGL_COLOR_BUFFER_TYPE",
- "EGL_RENDERABLE_TYPE",
- "EGL_CONFORMANT"
- };
- int[] value = new int[1];
- for (int i = 0; i < attributes.length; i++) {
- int attribute = attributes[i];
- String name = names[i];
- if ( egl.eglGetConfigAttrib(display, config, attribute, value)) {
- Log.w(TAG, String.format(" %s: %d\n", name, value[0]));
- } else {
- // Log.w(TAG, String.format(" %s: failed\n", name));
- while (egl.eglGetError() != EGL10.EGL_SUCCESS);
- }
- }
- }
-
- // Subclasses can adjust these values:
- protected int mRedSize;
- protected int mGreenSize;
- protected int mBlueSize;
- protected int mAlphaSize;
- protected int mDepthSize;
- protected int mStencilSize;
- private int[] mValue = new int[1];
- }
-
- private static class Renderer implements GLSurfaceView.Renderer {
- public void onDrawFrame(GL10 gl) {
- GL2JNILib.step();
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GL2JNILib.init(width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing.
- }
- }
-}
-
diff --git a/opengl/tests/gl2_yuvtex/Android.mk b/opengl/tests/gl2_yuvtex/Android.mk
deleted file mode 100644
index 7d43759..0000000
--- a/opengl/tests/gl2_yuvtex/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gl2_yuvtex.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-gl2_yuvtex
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
deleted file mode 100644
index d3e4932..0000000
--- a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * Copyright (C) 2010 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <utils/Timers.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-static void printGLString(const char *name, GLenum s) {
- // fprintf(stderr, "printGLString %s, %d\n", name, s);
- const char *v = (const char *) glGetString(s);
- // int error = glGetError();
- // fprintf(stderr, "glGetError() = %d, result of glGetString = %x\n", error,
- // (unsigned int) v);
- // if ((v < (const char*) 0) || (v > (const char*) 0x10000))
- // fprintf(stderr, "GL %s = %s\n", name, v);
- // else
- // fprintf(stderr, "GL %s = (null) 0x%08x\n", name, (unsigned int) v);
- fprintf(stderr, "GL %s = %s\n", name, v);
-}
-
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
- if (returnVal != EGL_TRUE) {
- fprintf(stderr, "%s() returned %d\n", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
- error);
- }
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- fprintf(stderr, "after %s() glError (0x%x)\n", op, error);
- }
-}
-
-static const char gVertexShader[] = "attribute vec4 vPosition;\n"
- "varying vec2 yuvTexCoords;\n"
- "void main() {\n"
- " yuvTexCoords = vPosition.xy + vec2(0.5, 0.5);\n"
- " gl_Position = vPosition;\n"
- "}\n";
-
-static const char gFragmentShader[] = "#extension GL_OES_EGL_image_external : require\n"
- "precision mediump float;\n"
- "uniform samplerExternalOES yuvTexSampler;\n"
- "varying vec2 yuvTexCoords;\n"
- "void main() {\n"
- " gl_FragColor = texture2D(yuvTexSampler, yuvTexCoords);\n"
- "}\n";
-
-GLuint loadShader(GLenum shaderType, const char* pSource) {
- GLuint shader = glCreateShader(shaderType);
- if (shader) {
- glShaderSource(shader, 1, &pSource, NULL);
- glCompileShader(shader);
- GLint compiled = 0;
- glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (infoLen) {
- char* buf = (char*) malloc(infoLen);
- if (buf) {
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- fprintf(stderr, "Could not compile shader %d:\n%s\n",
- shaderType, buf);
- free(buf);
- }
- } else {
- fprintf(stderr, "Guessing at GL_INFO_LOG_LENGTH size\n");
- char* buf = (char*) malloc(0x1000);
- if (buf) {
- glGetShaderInfoLog(shader, 0x1000, NULL, buf);
- fprintf(stderr, "Could not compile shader %d:\n%s\n",
- shaderType, buf);
- free(buf);
- }
- }
- glDeleteShader(shader);
- shader = 0;
- }
- }
- return shader;
-}
-
-GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
- GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
- if (!vertexShader) {
- return 0;
- }
-
- GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
- if (!pixelShader) {
- return 0;
- }
-
- GLuint program = glCreateProgram();
- if (program) {
- glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- glLinkProgram(program);
- GLint linkStatus = GL_FALSE;
- glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
- if (linkStatus != GL_TRUE) {
- GLint bufLength = 0;
- glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
- if (bufLength) {
- char* buf = (char*) malloc(bufLength);
- if (buf) {
- glGetProgramInfoLog(program, bufLength, NULL, buf);
- fprintf(stderr, "Could not link program:\n%s\n", buf);
- free(buf);
- }
- }
- glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
-}
-
-GLuint gProgram;
-GLint gvPositionHandle;
-GLint gYuvTexSamplerHandle;
-
-bool setupGraphics(int w, int h) {
- gProgram = createProgram(gVertexShader, gFragmentShader);
- if (!gProgram) {
- return false;
- }
- gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
- checkGlError("glGetAttribLocation");
- fprintf(stderr, "glGetAttribLocation(\"vPosition\") = %d\n",
- gvPositionHandle);
- gYuvTexSamplerHandle = glGetUniformLocation(gProgram, "yuvTexSampler");
- checkGlError("glGetUniformLocation");
- fprintf(stderr, "glGetUniformLocation(\"yuvTexSampler\") = %d\n",
- gYuvTexSamplerHandle);
-
- glViewport(0, 0, w, h);
- checkGlError("glViewport");
- return true;
-}
-
-int align(int x, int a) {
- return (x + (a-1)) & (~(a-1));
-}
-
-const int yuvTexWidth = 608;
-const int yuvTexHeight = 480;
-const int yuvTexUsage = GraphicBuffer::USAGE_HW_TEXTURE |
- GraphicBuffer::USAGE_SW_WRITE_RARELY;
-const int yuvTexFormat = HAL_PIXEL_FORMAT_YV12;
-const int yuvTexOffsetY = 0;
-const bool yuvTexSameUV = false;
-static sp<GraphicBuffer> yuvTexBuffer;
-static GLuint yuvTex;
-
-bool setupYuvTexSurface(EGLDisplay dpy, EGLContext context) {
- int blockWidth = yuvTexWidth > 16 ? yuvTexWidth / 16 : 1;
- int blockHeight = yuvTexHeight > 16 ? yuvTexHeight / 16 : 1;
- yuvTexBuffer = new GraphicBuffer(yuvTexWidth, yuvTexHeight, yuvTexFormat,
- yuvTexUsage);
- int yuvTexStrideY = yuvTexBuffer->getStride();
- int yuvTexOffsetV = yuvTexStrideY * yuvTexHeight;
- int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
- int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * yuvTexHeight/2;
- int yuvTexStrideU = yuvTexStrideV;
- char* buf = NULL;
- status_t err = yuvTexBuffer->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf));
- if (err != 0) {
- fprintf(stderr, "yuvTexBuffer->lock(...) failed: %d\n", err);
- return false;
- }
- for (int x = 0; x < yuvTexWidth; x++) {
- for (int y = 0; y < yuvTexHeight; y++) {
- int parityX = (x / blockWidth) & 1;
- int parityY = (y / blockHeight) & 1;
- unsigned char intensity = (parityX ^ parityY) ? 63 : 191;
- buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity;
- if (x < yuvTexWidth / 2 && y < yuvTexHeight / 2) {
- buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = intensity;
- if (yuvTexSameUV) {
- buf[yuvTexOffsetV + (y * yuvTexStrideV) + x] = intensity;
- } else if (x < yuvTexWidth / 4 && y < yuvTexHeight / 4) {
- buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 0] =
- buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 1] =
- buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 0] =
- buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 1] = intensity;
- }
- }
- }
- }
-
- err = yuvTexBuffer->unlock();
- if (err != 0) {
- fprintf(stderr, "yuvTexBuffer->unlock() failed: %d\n", err);
- return false;
- }
-
- EGLClientBuffer clientBuffer = (EGLClientBuffer)yuvTexBuffer->getNativeBuffer();
- EGLImageKHR img = eglCreateImageKHR(dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
- clientBuffer, 0);
- checkEglError("eglCreateImageKHR");
- if (img == EGL_NO_IMAGE_KHR) {
- return false;
- }
-
- glGenTextures(1, &yuvTex);
- checkGlError("glGenTextures");
- glBindTexture(GL_TEXTURE_EXTERNAL_OES, yuvTex);
- checkGlError("glBindTexture");
- glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)img);
- checkGlError("glEGLImageTargetTexture2DOES");
-
- return true;
-}
-
-const GLfloat gTriangleVertices[] = {
- -0.5f, 0.5f,
- -0.5f, -0.5f,
- 0.5f, -0.5f,
- 0.5f, 0.5f,
-};
-
-void renderFrame() {
- glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
- checkGlError("glClearColor");
- glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- glUseProgram(gProgram);
- checkGlError("glUseProgram");
-
- glVertexAttribPointer(gvPositionHandle, 2, GL_FLOAT, GL_FALSE, 0, gTriangleVertices);
- checkGlError("glVertexAttribPointer");
- glEnableVertexAttribArray(gvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
-
- glUniform1i(gYuvTexSamplerHandle, 0);
- checkGlError("glUniform1i");
- glBindTexture(GL_TEXTURE_EXTERNAL_OES, yuvTex);
- checkGlError("glBindTexture");
-
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
- checkGlError("glDrawArrays");
-}
-
-void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute, &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- printf(" %s: ", names[j].name);
- printf("%d (0x%x)", value, value);
- }
- }
- printf("\n");
-}
-
-int main(int argc, char** argv) {
- EGLBoolean returnValue;
- EGLConfig myConfig = {0};
-
- EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
- EGLint s_configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_NONE };
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLSurface surface;
- EGLint w, h;
-
- EGLDisplay dpy;
-
- checkEglError("<init>");
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- checkEglError("eglGetDisplay");
- if (dpy == EGL_NO_DISPLAY) {
- printf("eglGetDisplay returned EGL_NO_DISPLAY.\n");
- return 0;
- }
-
- returnValue = eglInitialize(dpy, &majorVersion, &minorVersion);
- checkEglError("eglInitialize", returnValue);
- fprintf(stderr, "EGL version %d.%d\n", majorVersion, minorVersion);
- if (returnValue != EGL_TRUE) {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- EGLNativeWindowType window = android_createDisplaySurface();
- returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
- if (returnValue) {
- printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
- return 1;
- }
-
- checkEglError("EGLUtils::selectConfigForNativeWindow");
-
- printf("Chose this configuration:\n");
- printEGLConfiguration(dpy, myConfig);
-
- surface = eglCreateWindowSurface(dpy, myConfig, window, NULL);
- checkEglError("eglCreateWindowSurface");
- if (surface == EGL_NO_SURFACE) {
- printf("gelCreateWindowSurface failed.\n");
- return 1;
- }
-
- context = eglCreateContext(dpy, myConfig, EGL_NO_CONTEXT, context_attribs);
- checkEglError("eglCreateContext");
- if (context == EGL_NO_CONTEXT) {
- printf("eglCreateContext failed\n");
- return 1;
- }
- returnValue = eglMakeCurrent(dpy, surface, surface, context);
- checkEglError("eglMakeCurrent", returnValue);
- if (returnValue != EGL_TRUE) {
- return 1;
- }
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- checkEglError("eglQuerySurface");
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- checkEglError("eglQuerySurface");
- GLint dim = w < h ? w : h;
-
- fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
-
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- if(!setupYuvTexSurface(dpy, context)) {
- fprintf(stderr, "Could not set up texture surface.\n");
- return 1;
- }
-
- if(!setupGraphics(w, h)) {
- fprintf(stderr, "Could not set up graphics.\n");
- return 1;
- }
-
- for (;;) {
- renderFrame();
- eglSwapBuffers(dpy, surface);
- checkEglError("eglSwapBuffers");
- }
-
- return 0;
-}
diff --git a/opengl/tests/gl_basic/Android.mk b/opengl/tests/gl_basic/Android.mk
deleted file mode 100644
index 46bcc60..0000000
--- a/opengl/tests/gl_basic/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gl_basic.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-gl_basic
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl_basic/gl_basic.cpp b/opengl/tests/gl_basic/gl_basic.cpp
deleted file mode 100644
index 23ce934..0000000
--- a/opengl/tests/gl_basic/gl_basic.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-// Simple OpenGL ES 1.x application showing how to initialize and draw something.
-
-#include <EGL/egl.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-#include <stdio.h>
-
-#include <stdlib.h>
-#include <math.h>
-
-using namespace android;
-
-EGLDisplay eglDisplay;
-EGLSurface eglSurface;
-EGLContext eglContext;
-GLuint texture;
-
-#define FIXED_ONE 0x10000
-#define ITERATIONS 50
-
-int init_gl_surface(void);
-void free_gl_surface(void);
-void init_scene(void);
-void render();
-void create_texture(void);
-int readTimer(void);
-
-static void printGLString(const char *name, GLenum s) {
- const char *v = (const char *) glGetString(s);
- fprintf(stderr, "GL %s = %s\n", name, v);
-}
-
-static void gluLookAt(float eyeX, float eyeY, float eyeZ,
- float centerX, float centerY, float centerZ, float upX, float upY,
- float upZ)
-{
- // See the OpenGL GLUT documentation for gluLookAt for a description
- // of the algorithm. We implement it in a straightforward way:
-
- float fx = centerX - eyeX;
- float fy = centerY - eyeY;
- float fz = centerZ - eyeZ;
-
- // Normalize f
- float rlf = 1.0f / sqrtf(fx*fx + fy*fy + fz*fz);
- fx *= rlf;
- fy *= rlf;
- fz *= rlf;
-
- // Normalize up
- float rlup = 1.0f / sqrtf(upX*upX + upY*upY + upZ*upZ);
- upX *= rlup;
- upY *= rlup;
- upZ *= rlup;
-
- // compute s = f x up (x means "cross product")
-
- float sx = fy * upZ - fz * upY;
- float sy = fz * upX - fx * upZ;
- float sz = fx * upY - fy * upX;
-
- // compute u = s x f
- float ux = sy * fz - sz * fy;
- float uy = sz * fx - sx * fz;
- float uz = sx * fy - sy * fx;
-
- float m[16] ;
- m[0] = sx;
- m[1] = ux;
- m[2] = -fx;
- m[3] = 0.0f;
-
- m[4] = sy;
- m[5] = uy;
- m[6] = -fy;
- m[7] = 0.0f;
-
- m[8] = sz;
- m[9] = uz;
- m[10] = -fz;
- m[11] = 0.0f;
-
- m[12] = 0.0f;
- m[13] = 0.0f;
- m[14] = 0.0f;
- m[15] = 1.0f;
-
- glMultMatrixf(m);
- glTranslatef(-eyeX, -eyeY, -eyeZ);
-}
-
-void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute, &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- printf(" %s: ", names[j].name);
- printf("%d (0x%x)", value, value);
- }
- }
- printf("\n");
-}
-
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
- if (returnVal != EGL_TRUE) {
- fprintf(stderr, "%s() returned %d\n", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
- error);
- }
-}
-
-int printEGLConfigurations(EGLDisplay dpy) {
- EGLint numConfig = 0;
- EGLint returnVal = eglGetConfigs(dpy, NULL, 0, &numConfig);
- checkEglError("eglGetConfigs", returnVal);
- if (!returnVal) {
- return false;
- }
-
- printf("Number of EGL configurations: %d\n", numConfig);
-
- EGLConfig* configs = (EGLConfig*) malloc(sizeof(EGLConfig) * numConfig);
- if (! configs) {
- printf("Could not allocate configs.\n");
- return false;
- }
-
- returnVal = eglGetConfigs(dpy, configs, numConfig, &numConfig);
- checkEglError("eglGetConfigs", returnVal);
- if (!returnVal) {
- free(configs);
- return false;
- }
-
- for(int i = 0; i < numConfig; i++) {
- printf("Configuration %d\n", i);
- printEGLConfiguration(dpy, configs[i]);
- }
-
- free(configs);
- return true;
-}
-
-int main(int argc, char **argv)
-{
- int q;
- int start, end;
- printf("Initializing EGL...\n");
- if(!init_gl_surface())
- {
- printf("GL initialisation failed - exiting\n");
- return 0;
- }
- init_scene();
- create_texture();
- printf("Running...\n");
- while(true) {
- render();
- }
- free_gl_surface();
- return 0;
-}
-
-int init_gl_surface(void)
-{
- EGLint numConfigs = 1;
- EGLConfig myConfig = {0};
- EGLint attrib[] =
- {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_NONE
- };
-
- if ( (eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY)) == EGL_NO_DISPLAY )
- {
- printf("eglGetDisplay failed\n");
- return 0;
- }
-
- if ( eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE )
- {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- if (! printEGLConfigurations(eglDisplay)) {
- printf("printEGLConfigurations failed.\n");
- return 0;
- }
-
- EGLNativeWindowType window = android_createDisplaySurface();
- EGLUtils::selectConfigForNativeWindow(eglDisplay, attrib, window, &myConfig);
-
- if ( (eglSurface = eglCreateWindowSurface(eglDisplay, myConfig,
- window, 0)) == EGL_NO_SURFACE )
- {
- printf("eglCreateWindowSurface failed\n");
- return 0;
- }
-
- if ( (eglContext = eglCreateContext(eglDisplay, myConfig, 0, 0)) == EGL_NO_CONTEXT )
- {
- printf("eglCreateContext failed\n");
- return 0;
- }
-
- if ( eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext) != EGL_TRUE )
- {
- printf("eglMakeCurrent failed\n");
- return 0;
- }
-
- int w, h;
-
- eglQuerySurface(eglDisplay, eglSurface, EGL_WIDTH, &w);
- checkEglError("eglQuerySurface");
- eglQuerySurface(eglDisplay, eglSurface, EGL_HEIGHT, &h);
- checkEglError("eglQuerySurface");
- GLint dim = w < h ? w : h;
-
- fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
-
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- return 1;
-}
-
-void free_gl_surface(void)
-{
- if (eglDisplay != EGL_NO_DISPLAY)
- {
- eglMakeCurrent( EGL_NO_DISPLAY, EGL_NO_SURFACE,
- EGL_NO_SURFACE, EGL_NO_CONTEXT );
- eglDestroyContext( eglDisplay, eglContext );
- eglDestroySurface( eglDisplay, eglSurface );
- eglTerminate( eglDisplay );
- eglDisplay = EGL_NO_DISPLAY;
- }
-}
-
-void init_scene(void)
-{
- glDisable(GL_DITHER);
- glEnable(GL_CULL_FACE);
- float ratio = 320.0f / 480.0f;
- glViewport(0, 0, 320, 480);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustumf(-ratio, ratio, -1, 1, 1, 10);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- gluLookAt(
- 0, 0, 3, // eye
- 0, 0, 0, // center
- 0, 1, 0); // up
- glEnable(GL_TEXTURE_2D);
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-void create_texture(void)
-{
- const unsigned int on = 0xff0000ff;
- const unsigned int off = 0xffffffff;
- const unsigned int pixels[] =
- {
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- };
-
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-}
-
-void render()
-{
- int i, j;
- int quads = 1;
-
- const GLfloat vertices[] = {
- -1, -1, 0,
- 1, -1, 0,
- 1, 1, 0,
- -1, 1, 0
- };
-
- const GLfixed texCoords[] = {
- 0, 0,
- FIXED_ONE, 0,
- FIXED_ONE, FIXED_ONE,
- 0, FIXED_ONE
- };
-
- const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
-
- glVertexPointer(3, GL_FLOAT, 0, vertices);
- glTexCoordPointer(2, GL_FIXED, 0, texCoords);
- glClearColor(1.0, 1.0, 1.0, 1.0);
- int nelem = sizeof(indices)/sizeof(indices[0]);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- glDrawElements(GL_TRIANGLES, nelem, GL_UNSIGNED_SHORT, indices);
- eglSwapBuffers(eglDisplay, eglSurface);
-}
diff --git a/opengl/tests/gl_jni/Android.mk b/opengl/tests/gl_jni/Android.mk
deleted file mode 100644
index 3d20e72..0000000
--- a/opengl/tests/gl_jni/Android.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-#########################################################################
-# OpenGL ES JNI sample
-# This makefile builds both an activity and a shared library.
-#########################################################################
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := GLJNI
-
-LOCAL_JNI_SHARED_LIBRARIES := libgljni
-
-include $(BUILD_PACKAGE)
-
-#########################################################################
-# Build JNI Shared Library
-#########################################################################
-
-LOCAL_PATH:= $(LOCAL_PATH)/jni
-
-include $(CLEAR_VARS)
-
-# Optional tag would mean it doesn't get installed by default
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -Werror
-
-LOCAL_SRC_FILES:= \
- gl_code.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libEGL \
- libGLESv1_CM
-
-LOCAL_MODULE := libgljni
-
-LOCAL_ARM_MODE := arm
-
-
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/tests/gl_jni/AndroidManifest.xml b/opengl/tests/gl_jni/AndroidManifest.xml
deleted file mode 100644
index 5d0ec96..0000000
--- a/opengl/tests/gl_jni/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.gljni">
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <application
- android:label="@string/gljni_activity">
- <activity android:name="GLJNIActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:screenOrientation="landscape"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp
deleted file mode 100644
index cf86020..0000000
--- a/opengl/tests/gl_jni/jni/gl_code.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-// OpenGL ES 1.0 code
-
-#include <nativehelper/jni.h>
-#define LOG_TAG "GLJNI gl_code.cpp"
-#include <utils/Log.h>
-
-#include <GLES/gl.h>
-
-#include <stdio.h>
-
-#include <stdlib.h>
-#include <math.h>
-
-GLuint texture;
-GLfloat background;
-
-#define FIXED_ONE 0x10000
-
-static void printGLString(const char *name, GLenum s) {
- const char *v = (const char *) glGetString(s);
- ALOGI("GL %s = %s\n", name, v);
-}
-
-static void gluLookAt(float eyeX, float eyeY, float eyeZ,
- float centerX, float centerY, float centerZ, float upX, float upY,
- float upZ)
-{
- // See the OpenGL GLUT documentation for gluLookAt for a description
- // of the algorithm. We implement it in a straightforward way:
-
- float fx = centerX - eyeX;
- float fy = centerY - eyeY;
- float fz = centerZ - eyeZ;
-
- // Normalize f
- float rlf = 1.0f / sqrtf(fx*fx + fy*fy + fz*fz);
- fx *= rlf;
- fy *= rlf;
- fz *= rlf;
-
- // Normalize up
- float rlup = 1.0f / sqrtf(upX*upX + upY*upY + upZ*upZ);
- upX *= rlup;
- upY *= rlup;
- upZ *= rlup;
-
- // compute s = f x up (x means "cross product")
-
- float sx = fy * upZ - fz * upY;
- float sy = fz * upX - fx * upZ;
- float sz = fx * upY - fy * upX;
-
- // compute u = s x f
- float ux = sy * fz - sz * fy;
- float uy = sz * fx - sx * fz;
- float uz = sx * fy - sy * fx;
-
- float m[16] ;
- m[0] = sx;
- m[1] = ux;
- m[2] = -fx;
- m[3] = 0.0f;
-
- m[4] = sy;
- m[5] = uy;
- m[6] = -fy;
- m[7] = 0.0f;
-
- m[8] = sz;
- m[9] = uz;
- m[10] = -fz;
- m[11] = 0.0f;
-
- m[12] = 0.0f;
- m[13] = 0.0f;
- m[14] = 0.0f;
- m[15] = 1.0f;
-
- glMultMatrixf(m);
- glTranslatef(-eyeX, -eyeY, -eyeZ);
-}
-
-void init_scene(int width, int height)
-{
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- glDisable(GL_DITHER);
- glEnable(GL_CULL_FACE);
-
- float ratio = width / height;
- glViewport(0, 0, width, height);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustumf(-ratio, ratio, -1, 1, 1, 10);
-
- glMatrixMode(GL_MODELVIEW);
-
- glLoadIdentity();
- gluLookAt(
- 0, 0, 3, // eye
- 0, 0, 0, // center
- 0, 1, 0); // up
-
- glEnable(GL_TEXTURE_2D);
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-void create_texture()
-{
- const unsigned int on = 0xff0000ff;
- const unsigned int off = 0xffffffff;
- const unsigned int pixels[] =
- {
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- };
-
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-}
-
-extern "C" {
- JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_init(JNIEnv * env, jobject obj, jint width, jint height);
- JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_step(JNIEnv * env, jobject obj);
- JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * env, jobject obj);
-};
-
-JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_init(JNIEnv * env, jobject obj, jint width, jint height)
-{
- init_scene(width, height);
- create_texture();
-}
-
-JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_step(JNIEnv * env, jobject obj)
-{
- const GLfloat vertices[] = {
- -1, -1, 0,
- 1, -1, 0,
- 1, 1, 0,
- -1, 1, 0
- };
-
- const GLfixed texCoords[] = {
- 0, 0,
- FIXED_ONE, 0,
- FIXED_ONE, FIXED_ONE,
- 0, FIXED_ONE
- };
-
- const GLushort quadIndices[] = { 0, 1, 2, 0, 2, 3 };
- glVertexPointer(3, GL_FLOAT, 0, vertices);
- glTexCoordPointer(2, GL_FIXED, 0, texCoords);
-
- int nelem = sizeof(quadIndices)/sizeof(quadIndices[0]);
- static float grey;
- grey += 0.01f;
- if (grey > 1.0f) {
- grey = 0.0f;
- }
- glClearColor(background, grey, grey, 1.0f);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- glDrawElements(GL_TRIANGLES, nelem, GL_UNSIGNED_SHORT, quadIndices);
-}
-
-JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * env, jobject obj)
-{
- background = 1.0f - background;
-}
diff --git a/opengl/tests/gl_jni/res/values/strings.xml b/opengl/tests/gl_jni/res/values/strings.xml
deleted file mode 100644
index aee9fa0..0000000
--- a/opengl/tests/gl_jni/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="gljni_activity">GLJNI</string>
-
-</resources>
-
diff --git a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java b/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java
deleted file mode 100644
index c6f5313..0000000
--- a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gljni;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class GLJNIActivity extends Activity {
-
- GLJNIView mView;
-
- @Override
- protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new GLJNIView(getApplication());
- mView.setFocusableInTouchMode(true);
- setContentView(mView);
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java b/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java
deleted file mode 100644
index f56d2af..0000000
--- a/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gljni;
-
-// Wrapper for native library
-
-public class GLJNILib {
-
- static {
- System.loadLibrary("gljni");
- }
-
- /**
- * @param width the current view width
- * @param height the current view height
- */
- public static native void init(int width, int height);
- public static native void step();
- public static native void changeBackground();
-}
diff --git a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java b/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java
deleted file mode 100644
index 9a2c8c4..0000000
--- a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.gljni;
-/*
- * Copyright (C) 2008 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.
- */
-
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class GLJNIView extends GLSurfaceView {
- GLJNIView(Context context) {
- super(context);
- init();
- }
-
- public GLJNIView(Context context, AttributeSet attrs) {
- super(context, attrs);
- init();
- }
-
- private void init() {
- setRenderer(new Renderer());
- }
-
- private class Renderer implements GLSurfaceView.Renderer {
- private static final String TAG = "Renderer";
- public void onDrawFrame(GL10 gl) {
- GLJNILib.step();
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GLJNILib.init(width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing.
- }
- }
-
- @Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- GLJNILib.changeBackground();
- return true;
- }
-}
-
diff --git a/opengl/tests/gl_perf/Android.mk b/opengl/tests/gl_perf/Android.mk
deleted file mode 100644
index cfca089..0000000
--- a/opengl/tests/gl_perf/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gl2_perf.cpp \
- filltest.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-gl2_perf
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl_perf/fill_common.cpp b/opengl/tests/gl_perf/fill_common.cpp
deleted file mode 100644
index 389381f..0000000
--- a/opengl/tests/gl_perf/fill_common.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright (C) 2007 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 "fragment_shaders.cpp"
-
-FILE * fOut = NULL;
-void ptSwap();
-
-static char gCurrentTestName[1024];
-static uint32_t gWidth = 0;
-static uint32_t gHeight = 0;
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- ALOGE("after %s() glError (0x%x)\n", op, error);
- }
-}
-
-GLuint loadShader(GLenum shaderType, const char* pSource) {
- GLuint shader = glCreateShader(shaderType);
- if (shader) {
- glShaderSource(shader, 1, &pSource, NULL);
- glCompileShader(shader);
- GLint compiled = 0;
- glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (infoLen) {
- char* buf = (char*) malloc(infoLen);
- if (buf) {
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- ALOGE("Could not compile shader %d:\n%s\n", shaderType, buf);
- free(buf);
- }
- glDeleteShader(shader);
- shader = 0;
- }
- }
- }
- return shader;
-}
-
-enum {
- A_POS,
- A_COLOR,
- A_TEX0,
- A_TEX1
-};
-
-GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
- GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
- if (!vertexShader) {
- return 0;
- }
-
- GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
- if (!pixelShader) {
- return 0;
- }
-
- GLuint program = glCreateProgram();
- if (program) {
- glAttachShader(program, vertexShader);
- checkGlError("glAttachShader v");
- glAttachShader(program, pixelShader);
- checkGlError("glAttachShader p");
-
- glBindAttribLocation(program, A_POS, "a_pos");
- glBindAttribLocation(program, A_COLOR, "a_color");
- glBindAttribLocation(program, A_TEX0, "a_tex0");
- glBindAttribLocation(program, A_TEX1, "a_tex1");
- glLinkProgram(program);
- GLint linkStatus = GL_FALSE;
- glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
- if (linkStatus != GL_TRUE) {
- GLint bufLength = 0;
- glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
- if (bufLength) {
- char* buf = (char*) malloc(bufLength);
- if (buf) {
- glGetProgramInfoLog(program, bufLength, NULL, buf);
- ALOGE("Could not link program:\n%s\n", buf);
- free(buf);
- }
- }
- glDeleteProgram(program);
- program = 0;
- }
- }
- checkGlError("createProgram");
- glUseProgram(program);
- return program;
-}
-
-uint64_t getTime() {
- struct timespec t;
- clock_gettime(CLOCK_MONOTONIC, &t);
- return t.tv_nsec + ((uint64_t)t.tv_sec * 1000 * 1000 * 1000);
-}
-
-uint64_t gTime;
-void startTimer() {
- gTime = getTime();
-}
-
-
-static void endTimer(int count) {
- uint64_t t2 = getTime();
- double delta = ((double)(t2 - gTime)) / 1000000000;
- double pixels = (gWidth * gHeight) * count;
- double mpps = pixels / delta / 1000000;
- double dc60 = ((double)count) / delta / 60;
-
- if (fOut) {
- fprintf(fOut, "%s, %f, %f\r\n", gCurrentTestName, mpps, dc60);
- fflush(fOut);
- } else {
- printf("%s, %f, %f\n", gCurrentTestName, mpps, dc60);
- }
- ALOGI("%s, %f, %f\r\n", gCurrentTestName, mpps, dc60);
-}
-
-
-static const char gVertexShader[] =
- "attribute vec4 a_pos;\n"
- "attribute vec4 a_color;\n"
- "attribute vec2 a_tex0;\n"
- "attribute vec2 a_tex1;\n"
- "varying vec4 v_color;\n"
- "varying vec2 v_tex0;\n"
- "varying vec2 v_tex1;\n"
- "uniform vec2 u_texOff;\n"
-
- "void main() {\n"
- " v_color = a_color;\n"
- " v_tex0 = a_tex0;\n"
- " v_tex1 = a_tex1;\n"
- " v_tex0.x += u_texOff.x;\n"
- " v_tex1.y += u_texOff.y;\n"
- " gl_Position = a_pos;\n"
- "}\n";
-
-static void setupVA() {
- static const float vtx[] = {
- -1.0f,-1.0f,
- 1.0f,-1.0f,
- -1.0f, 1.0f,
- 1.0f, 1.0f };
- static const float color[] = {
- 1.0f,0.0f,1.0f,1.0f,
- 0.0f,0.0f,1.0f,1.0f,
- 1.0f,1.0f,0.0f,1.0f,
- 1.0f,1.0f,1.0f,1.0f };
- static const float tex0[] = {
- 0.0f,0.0f,
- 1.0f,0.0f,
- 0.0f,1.0f,
- 1.0f,1.0f };
- static const float tex1[] = {
- 1.0f,0.0f,
- 1.0f,1.0f,
- 0.0f,1.0f,
- 0.0f,0.0f };
-
- glEnableVertexAttribArray(A_POS);
- glEnableVertexAttribArray(A_COLOR);
- glEnableVertexAttribArray(A_TEX0);
- glEnableVertexAttribArray(A_TEX1);
-
- glVertexAttribPointer(A_POS, 2, GL_FLOAT, false, 8, vtx);
- glVertexAttribPointer(A_COLOR, 4, GL_FLOAT, false, 16, color);
- glVertexAttribPointer(A_TEX0, 2, GL_FLOAT, false, 8, tex0);
- glVertexAttribPointer(A_TEX1, 2, GL_FLOAT, false, 8, tex1);
-}
-
-static void randUniform(int pgm, const char *var) {
- int loc = glGetUniformLocation(pgm, var);
- if (loc >= 0) {
- float x = ((float)rand()) / RAND_MAX;
- float y = ((float)rand()) / RAND_MAX;
- float z = ((float)rand()) / RAND_MAX;
- float w = ((float)rand()) / RAND_MAX;
- glUniform4f(loc, x, y, z, w);
- }
-}
-
-static void doLoop(bool warmup, int pgm, uint32_t passCount) {
- if (warmup) {
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- ptSwap();
- glFinish();
- return;
- }
-
- startTimer();
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- for (uint32_t ct=0; ct < passCount; ct++) {
- int loc = glGetUniformLocation(pgm, "u_texOff");
- glUniform2f(loc, ((float)ct) / passCount, ((float)ct) / 2.f / passCount);
-
- randUniform(pgm, "u_color");
- randUniform(pgm, "u_0");
- randUniform(pgm, "u_1");
- randUniform(pgm, "u_2");
- randUniform(pgm, "u_3");
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- }
- ptSwap();
- glFinish();
- endTimer(passCount);
-}
-
-
-static uint32_t rgb(uint32_t r, uint32_t g, uint32_t b)
-{
- uint32_t ret = 0xff000000;
- ret |= r & 0xff;
- ret |= (g & 0xff) << 8;
- ret |= (b & 0xff) << 16;
- return ret;
-}
-
-void genTextures() {
- uint32_t *m = (uint32_t *)malloc(1024*1024*4);
- for (int y=0; y < 1024; y++){
- for (int x=0; x < 1024; x++){
- m[y*1024 + x] = rgb(x, (((x+y) & 0xff) == 0x7f) * 0xff, y);
- }
- }
- glBindTexture(GL_TEXTURE_2D, 1);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1024, 1024, 0, GL_RGBA, GL_UNSIGNED_BYTE, m);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-
- for (int y=0; y < 16; y++){
- for (int x=0; x < 16; x++){
- m[y*16 + x] = rgb(x << 4, (((x+y) & 0xf) == 0x7) * 0xff, y << 4);
- }
- }
- glBindTexture(GL_TEXTURE_2D, 2);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, m);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- free(m);
-}
-
-static void doSingleTest(uint32_t pgmNum, int tex) {
- const char *pgmTxt = gFragmentTests[pgmNum]->txt;
- int pgm = createProgram(gVertexShader, pgmTxt);
- if (!pgm) {
- printf("error running test\n");
- return;
- }
- int loc = glGetUniformLocation(pgm, "u_tex0");
- if (loc >= 0) glUniform1i(loc, 0);
- loc = glGetUniformLocation(pgm, "u_tex1");
- if (loc >= 0) glUniform1i(loc, 1);
-
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, tex);
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, tex);
- glActiveTexture(GL_TEXTURE0);
-
- glBlendFunc(GL_ONE, GL_ONE);
- glDisable(GL_BLEND);
- //sprintf(str2, "%i, %i, %i, %i, %i, 0",
- //useVarColor, texCount, modulateFirstTex, extraMath, tex0);
- //doLoop(true, pgm, w, h, str2);
- //doLoop(false, pgm, w, h, str2);
-
- glEnable(GL_BLEND);
- sprintf(gCurrentTestName, "%s, %i, %i, 1", gFragmentTests[pgmNum]->name, pgmNum, tex);
- doLoop(true, pgm, 100);
- doLoop(false, pgm, 100);
-}
-
diff --git a/opengl/tests/gl_perf/filltest.cpp b/opengl/tests/gl_perf/filltest.cpp
deleted file mode 100644
index 3f8faca..0000000
--- a/opengl/tests/gl_perf/filltest.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2007 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-#include <string.h>
-
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#include <utils/Timers.h>
-#include <EGL/egl.h>
-#include <utils/Log.h>
-
-
-using namespace android;
-
-
-#include "fill_common.cpp"
-
-
-bool doTest(uint32_t w, uint32_t h) {
- gWidth = w;
- gHeight = h;
- setupVA();
- genTextures();
-
- printf("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n");
-
- for (uint32_t num = 0; num < gFragmentTestCount; num++) {
- doSingleTest(num, 2);
- if (gFragmentTests[num]->texCount) {
- doSingleTest(num, 1);
- }
- }
-
- exit(0);
- return true;
-}
diff --git a/opengl/tests/gl_perf/fragment_shaders.cpp b/opengl/tests/gl_perf/fragment_shaders.cpp
deleted file mode 100644
index 79d5ead..0000000
--- a/opengl/tests/gl_perf/fragment_shaders.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-
-typedef struct FragmentTestRec {
- const char * name;
- uint32_t texCount;
- const char * txt;
-} FragmentTest;
-
-static FragmentTest fpFill = {
- "Solid color", 0,
-
- "precision mediump float;\n"
- "uniform vec4 u_color;\n"
- "void main() {\n"
- " gl_FragColor = u_color;\n"
- "}\n"
-};
-
-static FragmentTest fpGradient = {
- "Solid gradient", 0,
-
- "precision mediump float;\n"
- "varying lowp vec4 v_color;\n"
- "void main() {\n"
- " gl_FragColor = v_color;\n"
- "}\n"
-};
-
-static FragmentTest fpCopyTex = {
- "Texture copy", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "uniform sampler2D u_tex0;\n"
- "void main() {\n"
- " gl_FragColor = texture2D(u_tex0, v_tex0);\n"
- "}\n"
-};
-
-static FragmentTest fpCopyTexGamma = {
- "Texture copy with gamma", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "uniform sampler2D u_tex0;\n"
- "void main() {\n"
- " vec4 t = texture2D(u_tex0, v_tex0);\n"
- " t.rgb = pow(t.rgb, vec3(1.4, 1.4, 1.4));\n"
- " gl_FragColor = t;\n"
- "}\n"
-};
-
-static FragmentTest fpTexSpec = {
- "Texture spec", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "uniform sampler2D u_tex0;\n"
- "void main() {\n"
- " vec4 t = texture2D(u_tex0, v_tex0);\n"
- " float simSpec = dot(gl_FragCoord.xyz, gl_FragCoord.xyz);\n"
- " simSpec = pow(clamp(simSpec, 0.1, 1.0), 40.0);\n"
- " gl_FragColor = t + vec4(simSpec, simSpec, simSpec, simSpec);\n"
- "}\n"
-};
-
-static FragmentTest fpDepTex = {
- "Dependent Lookup", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "uniform sampler2D u_tex0;\n"
- "void main() {\n"
- " vec4 t = texture2D(u_tex0, v_tex0);\n"
- " t += texture2D(u_tex0, t.xy);\n"
- " gl_FragColor = t;\n"
- "}\n"
-};
-
-static FragmentTest fpModulateConstantTex = {
- "Texture modulate constant", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "uniform sampler2D u_tex0;\n"
- "uniform vec4 u_color;\n"
-
- "void main() {\n"
- " lowp vec4 c = texture2D(u_tex0, v_tex0);\n"
- " c *= u_color;\n"
- " gl_FragColor = c;\n"
- "}\n"
-};
-
-static FragmentTest fpModulateVaryingTex = {
- "Texture modulate gradient", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "varying lowp vec4 v_color;\n"
- "uniform sampler2D u_tex0;\n"
-
- "void main() {\n"
- " lowp vec4 c = texture2D(u_tex0, v_tex0);\n"
- " c *= v_color;\n"
- " gl_FragColor = c;\n"
- "}\n"
-};
-
-static FragmentTest fpModulateVaryingConstantTex = {
- "Texture modulate gradient constant", 1,
-
- "precision mediump float;\n"
- "varying vec2 v_tex0;\n"
- "varying lowp vec4 v_color;\n"
- "uniform sampler2D u_tex0;\n"
- "uniform vec4 u_color;\n"
-
- "void main() {\n"
- " lowp vec4 c = texture2D(u_tex0, v_tex0);\n"
- " c *= v_color;\n"
- " c *= u_color;\n"
- " gl_FragColor = c;\n"
- "}\n"
-};
-
-static FragmentTest *gFragmentTests[] = {
- &fpFill,
- &fpGradient,
- &fpCopyTex,
- &fpCopyTexGamma,
- &fpTexSpec,
- &fpDepTex,
- &fpModulateConstantTex,
- &fpModulateVaryingTex,
- &fpModulateVaryingConstantTex,
-
-};
-
-static const size_t gFragmentTestCount = sizeof(gFragmentTests) / sizeof(gFragmentTests[0]);
diff --git a/opengl/tests/gl_perf/gl2_perf.cpp b/opengl/tests/gl_perf/gl2_perf.cpp
deleted file mode 100644
index 224acaf..0000000
--- a/opengl/tests/gl_perf/gl2_perf.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2007 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <utils/Timers.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
- if (returnVal != EGL_TRUE) {
- fprintf(stderr, "%s() returned %d\n", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
- error);
- }
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- fprintf(stderr, "after %s() glError (0x%x)\n", op, error);
- }
-}
-
-bool doTest(uint32_t w, uint32_t h);
-
-static EGLDisplay dpy;
-static EGLSurface surface;
-
-int main(int argc, char** argv) {
- EGLBoolean returnValue;
- EGLConfig myConfig = {0};
-
- EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
- EGLint s_configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_NONE };
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLint w, h;
-
-
- checkEglError("<init>");
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- checkEglError("eglGetDisplay");
- if (dpy == EGL_NO_DISPLAY) {
- printf("eglGetDisplay returned EGL_NO_DISPLAY.\n");
- return 0;
- }
-
- returnValue = eglInitialize(dpy, &majorVersion, &minorVersion);
- checkEglError("eglInitialize", returnValue);
- if (returnValue != EGL_TRUE) {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- EGLNativeWindowType window = android_createDisplaySurface();
- returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
- if (returnValue) {
- printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
- return 0;
- }
-
- checkEglError("EGLUtils::selectConfigForNativeWindow");
-
- surface = eglCreateWindowSurface(dpy, myConfig, window, NULL);
- checkEglError("eglCreateWindowSurface");
- if (surface == EGL_NO_SURFACE) {
- printf("gelCreateWindowSurface failed.\n");
- return 0;
- }
-
- context = eglCreateContext(dpy, myConfig, EGL_NO_CONTEXT, context_attribs);
- checkEglError("eglCreateContext");
- if (context == EGL_NO_CONTEXT) {
- printf("eglCreateContext failed\n");
- return 0;
- }
- returnValue = eglMakeCurrent(dpy, surface, surface, context);
- checkEglError("eglMakeCurrent", returnValue);
- if (returnValue != EGL_TRUE) {
- return 0;
- }
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- checkEglError("eglQuerySurface");
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- checkEglError("eglQuerySurface");
- GLint dim = w < h ? w : h;
-
- glViewport(0, 0, w, h);
-
- for (;;) {
- doTest(w, h);
- eglSwapBuffers(dpy, surface);
- checkEglError("eglSwapBuffers");
- }
-
- return 0;
-}
-
-void ptSwap() {
- eglSwapBuffers(dpy, surface);
-}
-
diff --git a/opengl/tests/gl_perfapp/Android.mk b/opengl/tests/gl_perfapp/Android.mk
deleted file mode 100644
index 65e50e9..0000000
--- a/opengl/tests/gl_perfapp/Android.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-#########################################################################
-# OpenGL ES Perf App
-# This makefile builds both an activity and a shared library.
-#########################################################################
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := GLPerf
-
-LOCAL_JNI_SHARED_LIBRARIES := libglperf
-
-# Run on Eclair
-LOCAL_SDK_VERSION := 7
-
-include $(BUILD_PACKAGE)
-
-#########################################################################
-# Build JNI Shared Library
-#########################################################################
-
-LOCAL_PATH:= $(LOCAL_PATH)/jni
-
-include $(CLEAR_VARS)
-
-# Optional tag would mean it doesn't get installed by default
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -Werror
-
-LOCAL_SRC_FILES:= \
- gl_code.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libEGL \
- libGLESv2
-
-LOCAL_MODULE := libglperf
-
-
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/tests/gl_perfapp/AndroidManifest.xml b/opengl/tests/gl_perfapp/AndroidManifest.xml
deleted file mode 100644
index ee4bd98..0000000
--- a/opengl/tests/gl_perfapp/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.glperf"
- android:versionName="1.0.0" android:versionCode="10000" >
- <uses-sdk android:targetSdkVersion="7" android:minSdkVersion="7" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <application
- android:label="@string/glperf_activity">
- <activity android:name="GLPerfActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp
deleted file mode 100644
index 2f04183..0000000
--- a/opengl/tests/gl_perfapp/jni/gl_code.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// OpenGL ES 2.0 code
-
-#include <nativehelper/jni.h>
-#define LOG_TAG "GLPerf gl_code.cpp"
-#include <utils/Log.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#include <utils/Timers.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include "../../gl_perf/fill_common.cpp"
-
-
-//////////////////////////
-
-// Width and height of the screen
-
-uint32_t w;
-uint32_t h;
-
-// The stateClock starts at zero and increments by 1 every time we draw a frame. It is used to control which phase of the test we are in.
-
-int stateClock;
-const int doLoopStates = 2;
-const int doSingleTestStates = 2;
-bool done;
-
-// Saves the parameters of the test (so we can print them out when we finish the timing.)
-
-
-int pgm;
-
-void ptSwap() {
-}
-
-void doTest() {
- uint32_t testNum = stateClock >> 2;
- int texSize = ((stateClock >> 1) & 0x1) + 1;
-
- if (testNum >= gFragmentTestCount) {
- ALOGI("done\n");
- if (fOut) {
- fclose(fOut);
- fOut = NULL;
- }
- done = true;
- return;
- }
-
- // ALOGI("doTest %d %d %d\n", texCount, extraMath, testSubState);
-
-// for (uint32_t num = 0; num < gFragmentTestCount; num++) {
- doSingleTest(testNum, texSize);
-}
-
-extern "C" {
- JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobject obj, jint width, jint height);
- JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * env, jobject obj);
-};
-
-JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobject obj, jint width, jint height)
-{
- gWidth = width;
- gHeight = height;
- if (!done) {
- stateClock = 0;
- done = false;
- setupVA();
- genTextures();
- const char* fileName = "/sdcard/glperf.csv";
- if (fOut != NULL) {
- ALOGI("Closing partially written output.n");
- fclose(fOut);
- fOut = NULL;
- }
- ALOGI("Writing to: %s\n",fileName);
- fOut = fopen(fileName, "w");
- if (fOut == NULL) {
- ALOGE("Could not open: %s\n", fileName);
- }
-
- ALOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n");
- if (fOut) fprintf(fOut,"varColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\r\n");
- }
-}
-
-JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * env, jobject obj)
-{
- if (! done) {
- if (stateClock > 0 && ((stateClock & 1) == 0)) {
- //endTimer(100);
- }
- doTest();
- stateClock++;
- } else {
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- }
-}
diff --git a/opengl/tests/gl_perfapp/res/values/strings.xml b/opengl/tests/gl_perfapp/res/values/strings.xml
deleted file mode 100644
index 52cd961..0000000
--- a/opengl/tests/gl_perfapp/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="glperf_activity">GLPerf</string>
-
-</resources>
-
diff --git a/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfActivity.java b/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfActivity.java
deleted file mode 100644
index e3f3abf..0000000
--- a/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfActivity.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.glperf;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.WindowManager;
-
-import java.io.File;
-
-
-public class GLPerfActivity extends Activity {
-
- GLPerfView mView;
-
- @Override protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- mView = new GLPerfView(getApplication());
- setContentView(mView);
- }
-
- @Override protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfLib.java b/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfLib.java
deleted file mode 100644
index 89a0e54..0000000
--- a/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfLib.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.glperf;
-
-// Wrapper for native library
-
-public class GLPerfLib {
-
- static {
- System.loadLibrary("glperf");
- }
-
- /**
- * @param width the current view width
- * @param height the current view height
- */
- public static native void init(int width, int height);
- public static native void step();
-}
diff --git a/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfView.java b/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfView.java
deleted file mode 100644
index 4ce4a4d..0000000
--- a/opengl/tests/gl_perfapp/src/com/android/glperf/GLPerfView.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.glperf;
-/*
- * Copyright (C) 2008 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.
- */
-
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.opengles.GL10;
-
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class GLPerfView extends GLSurfaceView {
- private static String TAG = "GLPerfView";
-
- public GLPerfView(Context context) {
- super(context);
- init(false, 0, 0);
- }
-
- public GLPerfView(Context context, boolean translucent, int depth, int stencil) {
- super(context);
- init(translucent, depth, stencil);
- }
-
- private void init(boolean translucent, int depth, int stencil) {
- setEGLContextFactory(new ContextFactory());
- setEGLConfigChooser( translucent ?
- new ConfigChooser(8,8,8,8, depth, stencil) :
- new ConfigChooser(5,6,5,0, depth, stencil));
- setRenderer(new Renderer());
- }
-
- private static class ContextFactory implements GLSurfaceView.EGLContextFactory {
- private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
- public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
- Log.w(TAG, "creating OpenGL ES 2.0 context");
- checkEglError("Before eglCreateContext", egl);
- int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
- EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
- checkEglError("After eglCreateContext", egl);
- return context;
- }
-
- public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
- egl.eglDestroyContext(display, context);
- }
- }
-
- private static void checkEglError(String prompt, EGL10 egl) {
- int error;
- while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
- Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
- }
- }
-
- private static class ConfigChooser implements GLSurfaceView.EGLConfigChooser {
- private static int EGL_OPENGL_ES2_BIT = 4;
- private static int[] s_configAttribs2 =
- {
- EGL10.EGL_RED_SIZE, 4,
- EGL10.EGL_GREEN_SIZE, 4,
- EGL10.EGL_BLUE_SIZE, 4,
- EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL10.EGL_NONE
- };
-
- public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {
- mRedSize = r;
- mGreenSize = g;
- mBlueSize = b;
- mAlphaSize = a;
- mDepthSize = depth;
- mStencilSize = stencil;
- }
-
- public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
-
- int[] num_config = new int[1];
- egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);
-
- int numConfigs = num_config[0];
-
- if (numConfigs <= 0) {
- throw new IllegalArgumentException("No configs match configSpec");
- }
- EGLConfig[] configs = new EGLConfig[numConfigs];
- egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);
- // printConfigs(egl, display, configs);
- return chooseConfig(egl, display, configs);
- }
-
- public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
- EGLConfig[] configs) {
- EGLConfig closestConfig = null;
- int closestDistance = 1000;
- for(EGLConfig config : configs) {
- int d = findConfigAttrib(egl, display, config,
- EGL10.EGL_DEPTH_SIZE, 0);
- int s = findConfigAttrib(egl, display, config,
- EGL10.EGL_STENCIL_SIZE, 0);
- if (d >= mDepthSize && s>= mStencilSize) {
- int r = findConfigAttrib(egl, display, config,
- EGL10.EGL_RED_SIZE, 0);
- int g = findConfigAttrib(egl, display, config,
- EGL10.EGL_GREEN_SIZE, 0);
- int b = findConfigAttrib(egl, display, config,
- EGL10.EGL_BLUE_SIZE, 0);
- int a = findConfigAttrib(egl, display, config,
- EGL10.EGL_ALPHA_SIZE, 0);
- int distance = Math.abs(r - mRedSize)
- + Math.abs(g - mGreenSize)
- + Math.abs(b - mBlueSize)
- + Math.abs(a - mAlphaSize);
- if (distance < closestDistance) {
- closestDistance = distance;
- closestConfig = config;
- }
- }
- }
- return closestConfig;
- }
-
- private int findConfigAttrib(EGL10 egl, EGLDisplay display,
- EGLConfig config, int attribute, int defaultValue) {
-
- if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {
- return mValue[0];
- }
- return defaultValue;
- }
-
- private void printConfigs(EGL10 egl, EGLDisplay display,
- EGLConfig[] configs) {
- int numConfigs = configs.length;
- Log.w(TAG, String.format("%d configurations", numConfigs));
- for (int i = 0; i < numConfigs; i++) {
- Log.w(TAG, String.format("Configuration %d:\n", i));
- printConfig(egl, display, configs[i]);
- }
- }
-
- private void printConfig(EGL10 egl, EGLDisplay display,
- EGLConfig config) {
- int[] attributes = {
- EGL10.EGL_BUFFER_SIZE,
- EGL10.EGL_ALPHA_SIZE,
- EGL10.EGL_BLUE_SIZE,
- EGL10.EGL_GREEN_SIZE,
- EGL10.EGL_RED_SIZE,
- EGL10.EGL_DEPTH_SIZE,
- EGL10.EGL_STENCIL_SIZE,
- EGL10.EGL_CONFIG_CAVEAT,
- EGL10.EGL_CONFIG_ID,
- EGL10.EGL_LEVEL,
- EGL10.EGL_MAX_PBUFFER_HEIGHT,
- EGL10.EGL_MAX_PBUFFER_PIXELS,
- EGL10.EGL_MAX_PBUFFER_WIDTH,
- EGL10.EGL_NATIVE_RENDERABLE,
- EGL10.EGL_NATIVE_VISUAL_ID,
- EGL10.EGL_NATIVE_VISUAL_TYPE,
- 0x3030, // EGL10.EGL_PRESERVED_RESOURCES,
- EGL10.EGL_SAMPLES,
- EGL10.EGL_SAMPLE_BUFFERS,
- EGL10.EGL_SURFACE_TYPE,
- EGL10.EGL_TRANSPARENT_TYPE,
- EGL10.EGL_TRANSPARENT_RED_VALUE,
- EGL10.EGL_TRANSPARENT_GREEN_VALUE,
- EGL10.EGL_TRANSPARENT_BLUE_VALUE,
- 0x3039, // EGL10.EGL_BIND_TO_TEXTURE_RGB,
- 0x303A, // EGL10.EGL_BIND_TO_TEXTURE_RGBA,
- 0x303B, // EGL10.EGL_MIN_SWAP_INTERVAL,
- 0x303C, // EGL10.EGL_MAX_SWAP_INTERVAL,
- EGL10.EGL_LUMINANCE_SIZE,
- EGL10.EGL_ALPHA_MASK_SIZE,
- EGL10.EGL_COLOR_BUFFER_TYPE,
- EGL10.EGL_RENDERABLE_TYPE,
- 0x3042 // EGL10.EGL_CONFORMANT
- };
- String[] names = {
- "EGL_BUFFER_SIZE",
- "EGL_ALPHA_SIZE",
- "EGL_BLUE_SIZE",
- "EGL_GREEN_SIZE",
- "EGL_RED_SIZE",
- "EGL_DEPTH_SIZE",
- "EGL_STENCIL_SIZE",
- "EGL_CONFIG_CAVEAT",
- "EGL_CONFIG_ID",
- "EGL_LEVEL",
- "EGL_MAX_PBUFFER_HEIGHT",
- "EGL_MAX_PBUFFER_PIXELS",
- "EGL_MAX_PBUFFER_WIDTH",
- "EGL_NATIVE_RENDERABLE",
- "EGL_NATIVE_VISUAL_ID",
- "EGL_NATIVE_VISUAL_TYPE",
- "EGL_PRESERVED_RESOURCES",
- "EGL_SAMPLES",
- "EGL_SAMPLE_BUFFERS",
- "EGL_SURFACE_TYPE",
- "EGL_TRANSPARENT_TYPE",
- "EGL_TRANSPARENT_RED_VALUE",
- "EGL_TRANSPARENT_GREEN_VALUE",
- "EGL_TRANSPARENT_BLUE_VALUE",
- "EGL_BIND_TO_TEXTURE_RGB",
- "EGL_BIND_TO_TEXTURE_RGBA",
- "EGL_MIN_SWAP_INTERVAL",
- "EGL_MAX_SWAP_INTERVAL",
- "EGL_LUMINANCE_SIZE",
- "EGL_ALPHA_MASK_SIZE",
- "EGL_COLOR_BUFFER_TYPE",
- "EGL_RENDERABLE_TYPE",
- "EGL_CONFORMANT"
- };
- int[] value = new int[1];
- for (int i = 0; i < attributes.length; i++) {
- int attribute = attributes[i];
- String name = names[i];
- if ( egl.eglGetConfigAttrib(display, config, attribute, value)) {
- Log.w(TAG, String.format(" %s: %d\n", name, value[0]));
- } else {
- // Log.w(TAG, String.format(" %s: failed\n", name));
- while (egl.eglGetError() != EGL10.EGL_SUCCESS);
- }
- }
- }
-
- // Subclasses can adjust these values:
- protected int mRedSize;
- protected int mGreenSize;
- protected int mBlueSize;
- protected int mAlphaSize;
- protected int mDepthSize;
- protected int mStencilSize;
- private int[] mValue = new int[1];
- }
-
- private static class Renderer implements GLSurfaceView.Renderer {
- public void onDrawFrame(GL10 gl) {
- GLPerfLib.step();
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GLPerfLib.init(width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing.
- }
- }
-}
-
diff --git a/opengl/tests/gl_yuvtex/Android.mk b/opengl/tests/gl_yuvtex/Android.mk
deleted file mode 100644
index 9e5dba0..0000000
--- a/opengl/tests/gl_yuvtex/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gl_yuvtex.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-gl_yuvtex
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
deleted file mode 100644
index 7a00f76..0000000
--- a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (C) 2010 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 <stdio.h>
-#include <time.h>
-#include <sched.h>
-#include <sys/resource.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/Timers.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-static void printGLString(const char *name, GLenum s) {
- // fprintf(stderr, "printGLString %s, %d\n", name, s);
- const char *v = (const char *) glGetString(s);
- // int error = glGetError();
- // fprintf(stderr, "glGetError() = %d, result of glGetString = %x\n", error,
- // (unsigned int) v);
- // if ((v < (const char*) 0) || (v > (const char*) 0x10000))
- // fprintf(stderr, "GL %s = %s\n", name, v);
- // else
- // fprintf(stderr, "GL %s = (null) 0x%08x\n", name, (unsigned int) v);
- fprintf(stderr, "GL %s = %s\n", name, v);
-}
-
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE) {
- if (returnVal != EGL_TRUE) {
- fprintf(stderr, "%s() returned %d\n", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- fprintf(stderr, "after %s() eglError %s (0x%x)\n", op, EGLUtils::strerror(error),
- error);
- }
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- fprintf(stderr, "after %s() glError (0x%x)\n", op, error);
- }
-}
-
-bool setupGraphics(int w, int h) {
- glViewport(0, 0, w, h);
- checkGlError("glViewport");
- return true;
-}
-
-int align(int x, int a) {
- return (x + (a-1)) & (~(a-1));
-}
-
-const int yuvTexWidth = 600;
-const int yuvTexHeight = 480;
-const int yuvTexUsage = GraphicBuffer::USAGE_HW_TEXTURE |
- GraphicBuffer::USAGE_SW_WRITE_RARELY;
-const int yuvTexFormat = HAL_PIXEL_FORMAT_YV12;
-const int yuvTexOffsetY = 0;
-const int yuvTexStrideY = (yuvTexWidth + 0xf) & ~0xf;
-const int yuvTexOffsetV = yuvTexStrideY * yuvTexHeight;
-const int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
-const int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * yuvTexHeight/2;
-const int yuvTexStrideU = yuvTexStrideV;
-const bool yuvTexSameUV = false;
-static sp<GraphicBuffer> yuvTexBuffer;
-static GLuint yuvTex;
-
-bool setupYuvTexSurface(EGLDisplay dpy, EGLContext context) {
- int blockWidth = yuvTexWidth > 16 ? yuvTexWidth / 16 : 1;
- int blockHeight = yuvTexHeight > 16 ? yuvTexHeight / 16 : 1;
- yuvTexBuffer = new GraphicBuffer(yuvTexWidth, yuvTexHeight, yuvTexFormat,
- yuvTexUsage);
- char* buf = NULL;
- status_t err = yuvTexBuffer->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf));
- if (err != 0) {
- fprintf(stderr, "yuvTexBuffer->lock(...) failed: %d\n", err);
- return false;
- }
- for (int x = 0; x < yuvTexWidth; x++) {
- for (int y = 0; y < yuvTexHeight; y++) {
- int parityX = (x / blockWidth) & 1;
- int parityY = (y / blockHeight) & 1;
- unsigned char intensity = (parityX ^ parityY) ? 63 : 191;
- buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity;
- if (x < yuvTexWidth / 2 && y < yuvTexHeight / 2) {
- buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = intensity;
- if (yuvTexSameUV) {
- buf[yuvTexOffsetV + (y * yuvTexStrideV) + x] = intensity;
- } else if (x < yuvTexWidth / 4 && y < yuvTexHeight / 4) {
- buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 0] =
- buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 1] =
- buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 0] =
- buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 1] = intensity;
- }
- }
- }
- }
-
- err = yuvTexBuffer->unlock();
- if (err != 0) {
- fprintf(stderr, "yuvTexBuffer->unlock() failed: %d\n", err);
- return false;
- }
-
- EGLClientBuffer clientBuffer = (EGLClientBuffer)yuvTexBuffer->getNativeBuffer();
- EGLImageKHR img = eglCreateImageKHR(dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID,
- clientBuffer, 0);
- checkEglError("eglCreateImageKHR");
- if (img == EGL_NO_IMAGE_KHR) {
- return false;
- }
-
- glGenTextures(1, &yuvTex);
- checkGlError("glGenTextures");
- glBindTexture(GL_TEXTURE_EXTERNAL_OES, yuvTex);
- checkGlError("glBindTexture");
- glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, (GLeglImageOES)img);
- checkGlError("glEGLImageTargetTexture2DOES");
- glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- checkGlError("glTexParameteri");
- glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- checkGlError("glTexParameteri");
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- checkGlError("glTexEnvx");
-
- GLint crop[4] = { 0, 0, yuvTexWidth, yuvTexHeight };
- glTexParameteriv(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_CROP_RECT_OES, crop);
- checkGlError("glTexParameteriv");
-
- return true;
-}
-
-void renderFrame(int w, int h) {
- glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
- checkGlError("glClearColor");
- glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- glBindTexture(GL_TEXTURE_EXTERNAL_OES, yuvTex);
- checkGlError("glBindTexture");
- glEnable(GL_TEXTURE_EXTERNAL_OES);
- checkGlError("glEnable");
-
- glDrawTexiOES(0, 0, 0, w, h);
- checkGlError("glDrawTexiOES");
-}
-
-void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute, &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- printf(" %s: ", names[j].name);
- printf("%d (0x%x)", value, value);
- }
- }
- printf("\n");
-}
-
-int main(int argc, char** argv) {
- EGLBoolean returnValue;
- EGLConfig myConfig = {0};
-
- EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 1, EGL_NONE };
- EGLint s_configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT,
- EGL_NONE };
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLSurface surface;
- EGLint w, h;
-
- EGLDisplay dpy;
-
- checkEglError("<init>");
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- checkEglError("eglGetDisplay");
- if (dpy == EGL_NO_DISPLAY) {
- printf("eglGetDisplay returned EGL_NO_DISPLAY.\n");
- return 0;
- }
-
- returnValue = eglInitialize(dpy, &majorVersion, &minorVersion);
- checkEglError("eglInitialize", returnValue);
- fprintf(stderr, "EGL version %d.%d\n", majorVersion, minorVersion);
- if (returnValue != EGL_TRUE) {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- EGLNativeWindowType window = android_createDisplaySurface();
- returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
- if (returnValue) {
- printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
- return 1;
- }
-
- checkEglError("EGLUtils::selectConfigForNativeWindow");
-
- printf("Chose this configuration:\n");
- printEGLConfiguration(dpy, myConfig);
-
- surface = eglCreateWindowSurface(dpy, myConfig, window, NULL);
- checkEglError("eglCreateWindowSurface");
- if (surface == EGL_NO_SURFACE) {
- printf("gelCreateWindowSurface failed.\n");
- return 1;
- }
-
- context = eglCreateContext(dpy, myConfig, EGL_NO_CONTEXT, context_attribs);
- checkEglError("eglCreateContext");
- if (context == EGL_NO_CONTEXT) {
- printf("eglCreateContext failed\n");
- return 1;
- }
- returnValue = eglMakeCurrent(dpy, surface, surface, context);
- checkEglError("eglMakeCurrent", returnValue);
- if (returnValue != EGL_TRUE) {
- return 1;
- }
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- checkEglError("eglQuerySurface");
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- checkEglError("eglQuerySurface");
- GLint dim = w < h ? w : h;
-
- fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
-
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- if(!setupYuvTexSurface(dpy, context)) {
- fprintf(stderr, "Could not set up texture surface.\n");
- return 1;
- }
-
- if(!setupGraphics(w, h)) {
- fprintf(stderr, "Could not set up graphics.\n");
- return 1;
- }
-
- for (;;) {
- static int dir = -1;
-
- renderFrame(w, h);
- eglSwapBuffers(dpy, surface);
- checkEglError("eglSwapBuffers");
-
- if (w <= 10 || h <= 10)
- {
- dir = -dir;
- }
-
- if (w >= 1300 || h >= 900)
- {
- dir = -dir;
- }
-
-
- w += dir;
- h += dir;
- }
-
- return 0;
-}
diff --git a/opengl/tests/gldual/Android.mk b/opengl/tests/gldual/Android.mk
deleted file mode 100644
index b4b378e..0000000
--- a/opengl/tests/gldual/Android.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#########################################################################
-# OpenGL ES JNI sample
-# This makefile builds both an activity and a shared library.
-#########################################################################
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := GLDual
-
-LOCAL_JNI_SHARED_LIBRARIES := libgldualjni
-
-include $(BUILD_PACKAGE)
-
-#########################################################################
-# Build JNI Shared Library
-#########################################################################
-
-LOCAL_PATH:= $(LOCAL_PATH)/jni
-
-include $(CLEAR_VARS)
-
-# Optional tag would mean it doesn't get installed by default
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -Werror
-
-LOCAL_SRC_FILES:= \
- gl_code.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libutils \
- libEGL \
- libGLESv2
-
-LOCAL_MODULE := libgldualjni
-
-
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/tests/gldual/AndroidManifest.xml b/opengl/tests/gldual/AndroidManifest.xml
deleted file mode 100644
index a36f4f7..0000000
--- a/opengl/tests/gldual/AndroidManifest.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.gldual">
- <application
- android:label="@string/gldual_activity">
- <activity android:name="GLDualActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/gldual/jni/gl_code.cpp b/opengl/tests/gldual/jni/gl_code.cpp
deleted file mode 100644
index 22867ed..0000000
--- a/opengl/tests/gldual/jni/gl_code.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-// OpenGL ES 2.0 code
-
-#include <nativehelper/jni.h>
-#define LOG_TAG "GL2JNI gl_code.cpp"
-#include <utils/Log.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-static void printGLString(const char *name, GLenum s) {
- const char *v = (const char *) glGetString(s);
- ALOGI("GL %s = %s\n", name, v);
-}
-
-static void checkGlError(const char* op) {
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- ALOGI("after %s() glError (0x%x)\n", op, error);
- }
-}
-
-static const char gVertexShader[] = "attribute vec4 vPosition;\n"
- "void main() {\n"
- " gl_Position = vPosition;\n"
- "}\n";
-
-static const char gFragmentShader[] = "precision mediump float;\n"
- "void main() {\n"
- " gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);\n"
- "}\n";
-
-GLuint loadShader(GLenum shaderType, const char* pSource) {
- GLuint shader = glCreateShader(shaderType);
- if (shader) {
- glShaderSource(shader, 1, &pSource, NULL);
- glCompileShader(shader);
- GLint compiled = 0;
- glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (infoLen) {
- char* buf = (char*) malloc(infoLen);
- if (buf) {
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- ALOGE("Could not compile shader %d:\n%s\n",
- shaderType, buf);
- free(buf);
- }
- glDeleteShader(shader);
- shader = 0;
- }
- }
- }
- return shader;
-}
-
-GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
- GLuint vertexShader = loadShader(GL_VERTEX_SHADER, pVertexSource);
- if (!vertexShader) {
- return 0;
- }
-
- GLuint pixelShader = loadShader(GL_FRAGMENT_SHADER, pFragmentSource);
- if (!pixelShader) {
- return 0;
- }
-
- GLuint program = glCreateProgram();
- if (program) {
- glAttachShader(program, vertexShader);
- checkGlError("glAttachShader");
- glAttachShader(program, pixelShader);
- checkGlError("glAttachShader");
- glLinkProgram(program);
- GLint linkStatus = GL_FALSE;
- glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
- if (linkStatus != GL_TRUE) {
- GLint bufLength = 0;
- glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
- if (bufLength) {
- char* buf = (char*) malloc(bufLength);
- if (buf) {
- glGetProgramInfoLog(program, bufLength, NULL, buf);
- ALOGE("Could not link program:\n%s\n", buf);
- free(buf);
- }
- }
- glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
-}
-
-GLuint gProgram;
-GLuint gvPositionHandle;
-
-bool setupGraphics(int w, int h) {
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
-
- ALOGI("setupGraphics(%d, %d)", w, h);
- gProgram = createProgram(gVertexShader, gFragmentShader);
- if (!gProgram) {
- ALOGE("Could not create program.");
- return false;
- }
- gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
- checkGlError("glGetAttribLocation");
- ALOGI("glGetAttribLocation(\"vPosition\") = %d\n",
- gvPositionHandle);
-
- glViewport(0, 0, w, h);
- checkGlError("glViewport");
- return true;
-}
-
-const GLfloat gTriangleVertices[] = { 0.0f, 0.5f, -0.5f, -0.5f,
- 0.5f, -0.5f };
-
-void renderFrame() {
- static float grey;
- grey += 0.01f;
- if (grey > 1.0f) {
- grey = 0.0f;
- }
- glClearColor(grey, grey, grey, 1.0f);
- checkGlError("glClearColor");
- glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- checkGlError("glClear");
-
- glUseProgram(gProgram);
- checkGlError("glUseProgram");
-
- glVertexAttribPointer(gvPositionHandle, 2, GL_FLOAT, GL_FALSE, 0, gTriangleVertices);
- checkGlError("glVertexAttribPointer");
- glEnableVertexAttribArray(gvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
- glDrawArrays(GL_TRIANGLES, 0, 3);
- checkGlError("glDrawArrays");
-}
-
-extern "C" {
- JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_init(JNIEnv * env, jobject obj, jint width, jint height);
- JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_step(JNIEnv * env, jobject obj);
-};
-
-JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_init(JNIEnv * env, jobject obj, jint width, jint height)
-{
- setupGraphics(width, height);
-}
-
-JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_step(JNIEnv * env, jobject obj)
-{
- renderFrame();
-}
-
diff --git a/opengl/tests/gldual/res/layout/gldual_activity.xml b/opengl/tests/gldual/res/layout/gldual_activity.xml
deleted file mode 100644
index d75acbc..0000000
--- a/opengl/tests/gldual/res/layout/gldual_activity.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"
-
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <android.opengl.GLSurfaceView android:id="@+id/gl1"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1" />
- <com.android.gldual.GLDualGL2View android:id="@+id/gl2"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1" />
-</LinearLayout>
diff --git a/opengl/tests/gldual/res/values/strings.xml b/opengl/tests/gldual/res/values/strings.xml
deleted file mode 100644
index b1f535d..0000000
--- a/opengl/tests/gldual/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="gldual_activity">GLDual</string>
-
-</resources>
-
diff --git a/opengl/tests/gldual/src/com/android/gldual/GLDualActivity.java b/opengl/tests/gldual/src/com/android/gldual/GLDualActivity.java
deleted file mode 100644
index 9d88f64..0000000
--- a/opengl/tests/gldual/src/com/android/gldual/GLDualActivity.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gldual;
-
-import android.app.Activity;
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.LinearLayout;
-
-
-public class GLDualActivity extends Activity {
-
- GLSurfaceView mGLView;
- GLDualGL2View mGL2View;
-
- @Override protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- View root = getLayoutInflater().inflate(R.layout.gldual_activity, null);
- mGLView = (GLSurfaceView) root.findViewById(R.id.gl1);
- mGLView.setEGLConfigChooser(5,6,5,0,0,0);
- mGLView.setRenderer(new TriangleRenderer());
- mGL2View = (GLDualGL2View) root.findViewById(R.id.gl2);
- setContentView(root);
- }
-
- @Override protected void onPause() {
- super.onPause();
- mGLView.onPause();
- mGL2View.onPause();
- }
-
- @Override protected void onResume() {
- super.onResume();
- mGLView.onResume();
- mGL2View.onResume();
- }
-}
diff --git a/opengl/tests/gldual/src/com/android/gldual/GLDualGL2View.java b/opengl/tests/gldual/src/com/android/gldual/GLDualGL2View.java
deleted file mode 100644
index 8f5e347..0000000
--- a/opengl/tests/gldual/src/com/android/gldual/GLDualGL2View.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.gldual;
-/*
- * Copyright (C) 2008 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.
- */
-
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class GLDualGL2View extends GLSurfaceView {
- private static String TAG = "GLDualGL2View";
-
- public GLDualGL2View(Context context) {
- super(context);
- init(false, 0, 0);
- }
-
- public GLDualGL2View(Context context, AttributeSet set) {
- super(context, set);
- init(false, 0, 0);
- }
-
- public GLDualGL2View(Context context, boolean translucent, int depth, int stencil) {
- super(context);
- init(translucent, depth, stencil);
- }
-
- private void init(boolean translucent, int depth, int stencil) {
- setEGLContextFactory(new ContextFactory());
- setEGLConfigChooser( translucent ?
- new ConfigChooser(8,8,8,8, depth, stencil) :
- new ConfigChooser(5,6,5,0, depth, stencil));
- setRenderer(new Renderer());
- }
-
- private static class ContextFactory implements GLSurfaceView.EGLContextFactory {
- private static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
- public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
- Log.w(TAG, "creating OpenGL ES 2.0 context");
- checkEglError("Before eglCreateContext", egl);
- int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
- EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
- checkEglError("After eglCreateContext", egl);
- return context;
- }
-
- public void destroyContext(EGL10 egl, EGLDisplay display, EGLContext context) {
- egl.eglDestroyContext(display, context);
- }
- }
-
- private static void checkEglError(String prompt, EGL10 egl) {
- int error;
- while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
- Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
- }
- }
-
- private static class ConfigChooser implements GLSurfaceView.EGLConfigChooser {
- private static int EGL_OPENGL_ES2_BIT = 4;
- private static int[] s_configAttribs2 =
- {
- EGL10.EGL_RED_SIZE, 4,
- EGL10.EGL_GREEN_SIZE, 4,
- EGL10.EGL_BLUE_SIZE, 4,
- EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL10.EGL_NONE
- };
-
- public ConfigChooser(int r, int g, int b, int a, int depth, int stencil) {
- mRedSize = r;
- mGreenSize = g;
- mBlueSize = b;
- mAlphaSize = a;
- mDepthSize = depth;
- mStencilSize = stencil;
- }
-
- public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
-
- int[] num_config = new int[1];
- egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);
-
- int numConfigs = num_config[0];
-
- if (numConfigs <= 0) {
- throw new IllegalArgumentException("No configs match configSpec");
- }
- EGLConfig[] configs = new EGLConfig[numConfigs];
- egl.eglChooseConfig(display, s_configAttribs2, configs, numConfigs, num_config);
- // printConfigs(egl, display, configs);
- return chooseConfig(egl, display, configs);
- }
-
- public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display,
- EGLConfig[] configs) {
- EGLConfig closestConfig = null;
- int closestDistance = 1000;
- for(EGLConfig config : configs) {
- int d = findConfigAttrib(egl, display, config,
- EGL10.EGL_DEPTH_SIZE, 0);
- int s = findConfigAttrib(egl, display, config,
- EGL10.EGL_STENCIL_SIZE, 0);
- if (d >= mDepthSize && s>= mStencilSize) {
- int r = findConfigAttrib(egl, display, config,
- EGL10.EGL_RED_SIZE, 0);
- int g = findConfigAttrib(egl, display, config,
- EGL10.EGL_GREEN_SIZE, 0);
- int b = findConfigAttrib(egl, display, config,
- EGL10.EGL_BLUE_SIZE, 0);
- int a = findConfigAttrib(egl, display, config,
- EGL10.EGL_ALPHA_SIZE, 0);
- int distance = Math.abs(r - mRedSize)
- + Math.abs(g - mGreenSize)
- + Math.abs(b - mBlueSize)
- + Math.abs(a - mAlphaSize);
- if (distance < closestDistance) {
- closestDistance = distance;
- closestConfig = config;
- }
- }
- }
- return closestConfig;
- }
-
- private int findConfigAttrib(EGL10 egl, EGLDisplay display,
- EGLConfig config, int attribute, int defaultValue) {
-
- if (egl.eglGetConfigAttrib(display, config, attribute, mValue)) {
- return mValue[0];
- }
- return defaultValue;
- }
-
- private void printConfigs(EGL10 egl, EGLDisplay display,
- EGLConfig[] configs) {
- int numConfigs = configs.length;
- Log.w(TAG, String.format("%d configurations", numConfigs));
- for (int i = 0; i < numConfigs; i++) {
- Log.w(TAG, String.format("Configuration %d:\n", i));
- printConfig(egl, display, configs[i]);
- }
- }
-
- private void printConfig(EGL10 egl, EGLDisplay display,
- EGLConfig config) {
- int[] attributes = {
- EGL10.EGL_BUFFER_SIZE,
- EGL10.EGL_ALPHA_SIZE,
- EGL10.EGL_BLUE_SIZE,
- EGL10.EGL_GREEN_SIZE,
- EGL10.EGL_RED_SIZE,
- EGL10.EGL_DEPTH_SIZE,
- EGL10.EGL_STENCIL_SIZE,
- EGL10.EGL_CONFIG_CAVEAT,
- EGL10.EGL_CONFIG_ID,
- EGL10.EGL_LEVEL,
- EGL10.EGL_MAX_PBUFFER_HEIGHT,
- EGL10.EGL_MAX_PBUFFER_PIXELS,
- EGL10.EGL_MAX_PBUFFER_WIDTH,
- EGL10.EGL_NATIVE_RENDERABLE,
- EGL10.EGL_NATIVE_VISUAL_ID,
- EGL10.EGL_NATIVE_VISUAL_TYPE,
- 0x3030, // EGL10.EGL_PRESERVED_RESOURCES,
- EGL10.EGL_SAMPLES,
- EGL10.EGL_SAMPLE_BUFFERS,
- EGL10.EGL_SURFACE_TYPE,
- EGL10.EGL_TRANSPARENT_TYPE,
- EGL10.EGL_TRANSPARENT_RED_VALUE,
- EGL10.EGL_TRANSPARENT_GREEN_VALUE,
- EGL10.EGL_TRANSPARENT_BLUE_VALUE,
- 0x3039, // EGL10.EGL_BIND_TO_TEXTURE_RGB,
- 0x303A, // EGL10.EGL_BIND_TO_TEXTURE_RGBA,
- 0x303B, // EGL10.EGL_MIN_SWAP_INTERVAL,
- 0x303C, // EGL10.EGL_MAX_SWAP_INTERVAL,
- EGL10.EGL_LUMINANCE_SIZE,
- EGL10.EGL_ALPHA_MASK_SIZE,
- EGL10.EGL_COLOR_BUFFER_TYPE,
- EGL10.EGL_RENDERABLE_TYPE,
- 0x3042 // EGL10.EGL_CONFORMANT
- };
- String[] names = {
- "EGL_BUFFER_SIZE",
- "EGL_ALPHA_SIZE",
- "EGL_BLUE_SIZE",
- "EGL_GREEN_SIZE",
- "EGL_RED_SIZE",
- "EGL_DEPTH_SIZE",
- "EGL_STENCIL_SIZE",
- "EGL_CONFIG_CAVEAT",
- "EGL_CONFIG_ID",
- "EGL_LEVEL",
- "EGL_MAX_PBUFFER_HEIGHT",
- "EGL_MAX_PBUFFER_PIXELS",
- "EGL_MAX_PBUFFER_WIDTH",
- "EGL_NATIVE_RENDERABLE",
- "EGL_NATIVE_VISUAL_ID",
- "EGL_NATIVE_VISUAL_TYPE",
- "EGL_PRESERVED_RESOURCES",
- "EGL_SAMPLES",
- "EGL_SAMPLE_BUFFERS",
- "EGL_SURFACE_TYPE",
- "EGL_TRANSPARENT_TYPE",
- "EGL_TRANSPARENT_RED_VALUE",
- "EGL_TRANSPARENT_GREEN_VALUE",
- "EGL_TRANSPARENT_BLUE_VALUE",
- "EGL_BIND_TO_TEXTURE_RGB",
- "EGL_BIND_TO_TEXTURE_RGBA",
- "EGL_MIN_SWAP_INTERVAL",
- "EGL_MAX_SWAP_INTERVAL",
- "EGL_LUMINANCE_SIZE",
- "EGL_ALPHA_MASK_SIZE",
- "EGL_COLOR_BUFFER_TYPE",
- "EGL_RENDERABLE_TYPE",
- "EGL_CONFORMANT"
- };
- int[] value = new int[1];
- for (int i = 0; i < attributes.length; i++) {
- int attribute = attributes[i];
- String name = names[i];
- if ( egl.eglGetConfigAttrib(display, config, attribute, value)) {
- Log.w(TAG, String.format(" %s: %d\n", name, value[0]));
- } else {
- // Log.w(TAG, String.format(" %s: failed\n", name));
- while (egl.eglGetError() != EGL10.EGL_SUCCESS);
- }
- }
- }
-
- // Subclasses can adjust these values:
- protected int mRedSize;
- protected int mGreenSize;
- protected int mBlueSize;
- protected int mAlphaSize;
- protected int mDepthSize;
- protected int mStencilSize;
- private int[] mValue = new int[1];
- }
-
- private static class Renderer implements GLSurfaceView.Renderer {
- public void onDrawFrame(GL10 gl) {
- GLDualLib.step();
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GLDualLib.init(width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing.
- }
- }
-}
-
diff --git a/opengl/tests/gldual/src/com/android/gldual/GLDualLib.java b/opengl/tests/gldual/src/com/android/gldual/GLDualLib.java
deleted file mode 100644
index d8f765e..0000000
--- a/opengl/tests/gldual/src/com/android/gldual/GLDualLib.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.gldual;
-
-// Wrapper for native library
-
-public class GLDualLib {
-
- static {
- System.loadLibrary("gldualjni");
- }
-
- /**
- * @param width the current view width
- * @param height the current view height
- */
- public static native void init(int width, int height);
- public static native void step();
-}
diff --git a/opengl/tests/gldual/src/com/android/gldual/TriangleRenderer.java b/opengl/tests/gldual/src/com/android/gldual/TriangleRenderer.java
deleted file mode 100644
index a082d47..0000000
--- a/opengl/tests/gldual/src/com/android/gldual/TriangleRenderer.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.gldual;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-import java.nio.ShortBuffer;
-
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.opengl.GLSurfaceView;
-import android.opengl.GLU;
-import android.os.SystemClock;
-
-public class TriangleRenderer implements GLSurfaceView.Renderer{
-
- public TriangleRenderer() {
- mTriangle = new Triangle();
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- /*
- * By default, OpenGL enables features that improve quality
- * but reduce performance. One might want to tweak that
- * especially on software renderer.
- */
- gl.glDisable(GL10.GL_DITHER);
-
- /*
- * Some one-time OpenGL initialization can be made here
- * probably based on features of this particular context
- */
- gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,
- GL10.GL_FASTEST);
-
- gl.glClearColor(.5f, .5f, .5f, 1);
- gl.glShadeModel(GL10.GL_SMOOTH);
- }
-
- public void onDrawFrame(GL10 gl) {
- /*
- * By default, OpenGL enables features that improve quality
- * but reduce performance. One might want to tweak that
- * especially on software renderer.
- */
- gl.glDisable(GL10.GL_DITHER);
-
- /*
- * Usually, the first thing one might want to do is to clear
- * the screen. The most efficient way of doing this is to use
- * glClear().
- */
-
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
-
- /*
- * Now we're ready to draw some 3D objects
- */
-
- gl.glMatrixMode(GL10.GL_MODELVIEW);
- gl.glLoadIdentity();
-
- GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
-
- gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
-
- long time = SystemClock.uptimeMillis() % 4000L;
- float angle = 0.090f * ((int) time);
-
- gl.glRotatef(angle, 0, 0, 1.0f);
-
- mTriangle.draw(gl);
- }
-
- public void onSurfaceChanged(GL10 gl, int w, int h) {
- gl.glViewport(0, 0, w, h);
-
- /*
- * Set our projection matrix. This doesn't have to be done
- * each time we draw, but usually a new projection needs to
- * be set when the viewport is resized.
- */
-
- float ratio = (float) w / h;
- gl.glMatrixMode(GL10.GL_PROJECTION);
- gl.glLoadIdentity();
- gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7);
-
- }
-
- private Triangle mTriangle;
-}
-
-class Triangle {
- public Triangle() {
-
- // Buffers to be passed to gl*Pointer() functions
- // must be direct, i.e., they must be placed on the
- // native heap where the garbage collector cannot
- // move them.
- //
- // Buffers with multi-byte datatypes (e.g., short, int, float)
- // must have their byte order set to native order
-
- ByteBuffer vbb = ByteBuffer.allocateDirect(VERTS * 3 * 4);
- vbb.order(ByteOrder.nativeOrder());
- mFVertexBuffer = vbb.asFloatBuffer();
-
- ByteBuffer tbb = ByteBuffer.allocateDirect(VERTS * 2 * 4);
- tbb.order(ByteOrder.nativeOrder());
-
- ByteBuffer ibb = ByteBuffer.allocateDirect(VERTS * 2);
- ibb.order(ByteOrder.nativeOrder());
- mIndexBuffer = ibb.asShortBuffer();
-
- // A unit-sided equalateral triangle centered on the origin.
- float[] coords = {
- // X, Y, Z
- -0.5f, -0.25f, 0,
- 0.5f, -0.25f, 0,
- 0.0f, 0.559016994f, 0
- };
-
- for (int i = 0; i < VERTS; i++) {
- for(int j = 0; j < 3; j++) {
- mFVertexBuffer.put(coords[i*3+j] * 2.0f);
- }
- }
-
- for(int i = 0; i < VERTS; i++) {
- mIndexBuffer.put((short) i);
- }
-
- mFVertexBuffer.position(0);
- mIndexBuffer.position(0);
- }
-
- public void draw(GL10 gl) {
- gl.glFrontFace(GL10.GL_CCW);
- gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mFVertexBuffer);
- gl.glDrawElements(GL10.GL_TRIANGLE_STRIP, VERTS,
- GL10.GL_UNSIGNED_SHORT, mIndexBuffer);
- }
-
- private final static int VERTS = 3;
-
- private FloatBuffer mFVertexBuffer;
- private ShortBuffer mIndexBuffer;
-}
diff --git a/opengl/tests/gralloc/Android.mk b/opengl/tests/gralloc/Android.mk
deleted file mode 100644
index d43c39a..0000000
--- a/opengl/tests/gralloc/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- gralloc.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libutils \
- libui
-
-LOCAL_MODULE:= test-opengl-gralloc
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/gralloc/gralloc.cpp b/opengl/tests/gralloc/gralloc.cpp
deleted file mode 100644
index 8987040..0000000
--- a/opengl/tests/gralloc/gralloc.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- **
- ** Copyright 2009, 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.
- */
-
-#define LOG_TAG "StopWatch"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <utils/StopWatch.h>
-#include <utils/Log.h>
-
-#include <ui/GraphicBuffer.h>
-#include <ui/GraphicBufferMapper.h>
-
-using namespace android;
-
-void* lamecpy(void* d, void const* s, size_t size) {
- char* dst = (char*)d;
- char const* src = (char const*)s;
- while (size) {
- *dst++ = *src++;
- size--;
- }
- return d;
-}
-
-int main(int argc, char** argv)
-{
- size_t size = 128*256*4;
- void* temp = malloc(size);
- void* temp2 = malloc(size);
- memset(temp, 0, size);
- memset(temp2, 0, size);
-
-
- sp<GraphicBuffer> buffer = new GraphicBuffer(128, 256, HAL_PIXEL_FORMAT_RGBA_8888,
- GRALLOC_USAGE_SW_READ_OFTEN |
- GRALLOC_USAGE_SW_WRITE_OFTEN);
-
- status_t err = buffer->initCheck();
- if (err != NO_ERROR) {
- printf("%s\n", strerror(-err));
- return 0;
- }
-
- void* vaddr;
- buffer->lock(
- GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN,
- &vaddr);
-
- {
- StopWatch watch("memset");
- for (int i=0 ; i<10 ; i++)
- memset(vaddr, 0, size);
- }
-
- {
- StopWatch watch("memcpy baseline");
- for (int i=0 ; i<10 ; i++)
- memcpy(temp, temp2, size);
- }
-
- {
- StopWatch watch("memcpy from gralloc");
- for (int i=0 ; i<10 ; i++)
- memcpy(temp, vaddr, size);
- }
-
- {
- StopWatch watch("memcpy into gralloc");
- for (int i=0 ; i<10 ; i++)
- memcpy(vaddr, temp, size);
- }
-
-
- {
- StopWatch watch("lamecpy baseline");
- for (int i=0 ; i<10 ; i++)
- lamecpy(temp, temp2, size);
- }
-
- {
- StopWatch watch("lamecpy from gralloc");
- for (int i=0 ; i<10 ; i++)
- lamecpy(temp, vaddr, size);
- }
-
- {
- StopWatch watch("lamecpy into gralloc");
- for (int i=0 ; i<10 ; i++)
- lamecpy(vaddr, temp, size);
- }
-
- buffer->unlock();
-
- return 0;
-}
diff --git a/opengl/tests/hwc/Android.mk b/opengl/tests/hwc/Android.mk
deleted file mode 100644
index 9eb58b1..0000000
--- a/opengl/tests/hwc/Android.mk
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright (C) 2010 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE:= libhwcTest
-LOCAL_SRC_FILES:= hwcTestLib.cpp
-LOCAL_C_INCLUDES += system/extras/tests/include \
- bionic \
- bionic/libstdc++/include \
- external/stlport/stlport \
- $(call include-path-for, opengl-tests-includes)
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-LOCAL_SHARED_LIBRARIES += libcutils libutils libstlport
-LOCAL_STATIC_LIBRARIES += libglTest
-
-
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= hwcStress.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui \
- libhardware \
-
-LOCAL_STATIC_LIBRARIES := \
- libtestUtil \
- libglTest \
- libhwcTest \
-
-LOCAL_C_INCLUDES += \
- system/extras/tests/include \
- hardware/libhardware/include \
- $(call include-path-for, opengl-tests-includes)
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-LOCAL_MODULE:= hwcStress
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativestresstest
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-include $(BUILD_NATIVE_TEST)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= hwcRects.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui \
- libhardware \
-
-LOCAL_STATIC_LIBRARIES := \
- libtestUtil \
- libglTest \
- libhwcTest \
-
-LOCAL_C_INCLUDES += \
- system/extras/tests/include \
- hardware/libhardware/include \
- $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= hwcRects
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativeutil
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-include $(BUILD_NATIVE_TEST)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= hwcColorEquiv.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui \
- libhardware \
-
-LOCAL_STATIC_LIBRARIES := \
- libtestUtil \
- libglTest \
- libhwcTest \
-
-LOCAL_C_INCLUDES += \
- system/extras/tests/include \
- hardware/libhardware/include \
- $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= hwcColorEquiv
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativeutil
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-include $(BUILD_NATIVE_TEST)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= hwcCommit.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv2 \
- libui \
- libhardware \
-
-LOCAL_STATIC_LIBRARIES := \
- libtestUtil \
- libglTest \
- libhwcTest \
-
-LOCAL_C_INCLUDES += \
- system/extras/tests/include \
- hardware/libhardware/include \
- $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= hwcCommit
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativebenchmark
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-include $(BUILD_NATIVE_TEST)
diff --git a/opengl/tests/hwc/hwcColorEquiv.cpp b/opengl/tests/hwc/hwcColorEquiv.cpp
deleted file mode 100644
index bb305dc..0000000
--- a/opengl/tests/hwc/hwcColorEquiv.cpp
+++ /dev/null
@@ -1,437 +0,0 @@
-/*
- * 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.
- *
- */
-
-/*
- * Hardware Composer Color Equivalence
- *
- * Synopsis
- * hwc_colorequiv [options] eFmt
- *
- * options:
- -v - verbose
- * -s <0.##, 0.##, 0.##> - Start color (default: <0.0, 0.0, 0.0>
- * -e <0.##, 0.##, 0.##> - Ending color (default: <1.0, 1.0, 1.0>
- * -r fmt - reference graphic format
- * -D #.## - End of test delay
- *
- * graphic formats:
- * RGBA8888 (reference frame default)
- * RGBX8888
- * RGB888
- * RGB565
- * BGRA8888
- * RGBA5551
- * RGBA4444
- * YV12
- *
- * Description
- * Renders a horizontal blend in two frames. The first frame is rendered
- * in the upper third of the display and is called the reference frame.
- * The second frame is displayed in the middle third and is called the
- * equivalence frame. The primary purpose of this utility is to verify
- * that the colors produced in the reference and equivalence frames are
- * the same. The colors are the same when the colors are the same
- * vertically between the reference and equivalence frames.
- *
- * By default the reference frame is rendered through the use of the
- * RGBA8888 graphic format. The -r option can be used to specify a
- * non-default reference frame graphic format. The graphic format of
- * the equivalence frame is determined by a single required positional
- * parameter. Intentionally there is no default for the graphic format
- * of the equivalence frame.
- *
- * The horizontal blend in the reference frame is produced from a linear
- * interpolation from a start color (default: <0.0, 0.0, 0.0> on the left
- * side to an end color (default <1.0, 1.0, 1.0> on the right side. Where
- * possible the equivalence frame is rendered with the equivalent color
- * from the reference frame. A color of black is used in the equivalence
- * frame for cases where an equivalent color does not exist.
- */
-
-#include <algorithm>
-#include <assert.h>
-#include <cerrno>
-#include <cmath>
-#include <cstdlib>
-#include <ctime>
-#include <libgen.h>
-#include <sched.h>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-#include <vector>
-
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-
-#define LOG_TAG "hwcColorEquivTest"
-#include <utils/Log.h>
-#include <testUtil.h>
-
-#include <hardware/hwcomposer.h>
-
-#include "hwcTestLib.h"
-
-using namespace std;
-using namespace android;
-
-// Defaults for command-line options
-const bool defaultVerbose = false;
-const ColorFract defaultStartColor(0.0, 0.0, 0.0);
-const ColorFract defaultEndColor(1.0, 1.0, 1.0);
-const char *defaultRefFormat = "RGBA8888";
-const float defaultEndDelay = 2.0; // Default delay after rendering graphics
-
-// Defines
-#define MAXSTR 100
-#define MAXCMD 200
-#define BITSPERBYTE 8 // TODO: Obtain from <values.h>, once
- // it has been added
-
-#define CMD_STOP_FRAMEWORK "stop 2>&1"
-#define CMD_START_FRAMEWORK "start 2>&1"
-
-// Macros
-#define NUMA(a) (sizeof(a) / sizeof(a [0])) // Num elements in an array
-#define MEMCLR(addr, size) do { \
- memset((addr), 0, (size)); \
- } while (0)
-
-// Globals
-static const int texUsage = GraphicBuffer::USAGE_HW_TEXTURE |
- GraphicBuffer::USAGE_SW_WRITE_RARELY;
-static hwc_composer_device_t *hwcDevice;
-static EGLDisplay dpy;
-static EGLSurface surface;
-static EGLint width, height;
-
-// Functions prototypes
-void init(void);
-void printSyntax(const char *cmd);
-
-// Command-line option settings
-static bool verbose = defaultVerbose;
-static ColorFract startRefColor = defaultStartColor;
-static ColorFract endRefColor = defaultEndColor;
-static float endDelay = defaultEndDelay;
-static const struct hwcTestGraphicFormat *refFormat
- = hwcTestGraphicFormatLookup(defaultRefFormat);
-static const struct hwcTestGraphicFormat *equivFormat;
-
-/*
- * Main
- *
- * Performs the following high-level sequence of operations:
- *
- * 1. Command-line parsing
- *
- * 2. Stop framework
- *
- * 3. Initialization
- *
- * 4. Create Hardware Composer description of reference and equivalence frames
- *
- * 5. Have Hardware Composer render the reference and equivalence frames
- *
- * 6. Delay for amount of time given by endDelay
- *
- * 7. Start framework
- */
-int
-main(int argc, char *argv[])
-{
- int rv, opt;
- bool error;
- char *chptr;
- unsigned int pass;
- char cmd[MAXCMD];
- string str;
-
- testSetLogCatTag(LOG_TAG);
-
- assert(refFormat != NULL);
-
- testSetLogCatTag(LOG_TAG);
-
- // Parse command line arguments
- while ((opt = getopt(argc, argv, "vs:e:r:D:?h")) != -1) {
- switch (opt) {
- case 'D': // End of test delay
- // Delay between completion of final pass and restart
- // of framework
- endDelay = strtod(optarg, &chptr);
- if ((*chptr != '\0') || (endDelay < 0.0)) {
- testPrintE("Invalid command-line specified end of test delay "
- "of: %s", optarg);
- exit(1);
- }
- break;
-
- case 's': // Starting reference color
- str = optarg;
- while (optind < argc) {
- if (*argv[optind] == '-') { break; }
- char endChar = (str.length() > 1) ? str[str.length() - 1] : 0;
- if ((endChar == '>') || (endChar == ']')) { break; }
- str += " " + string(argv[optind++]);
- }
- {
- istringstream in(str);
- startRefColor = hwcTestParseColor(in, error);
- // Any parse error or characters not used by parser
- if (error
- || (((unsigned int) in.tellg() != in.str().length())
- && (in.tellg() != (streampos) -1))) {
- testPrintE("Invalid command-line specified start "
- "reference color of: %s", str.c_str());
- exit(2);
- }
- }
- break;
-
- case 'e': // Ending reference color
- str = optarg;
- while (optind < argc) {
- if (*argv[optind] == '-') { break; }
- char endChar = (str.length() > 1) ? str[str.length() - 1] : 0;
- if ((endChar == '>') || (endChar == ']')) { break; }
- str += " " + string(argv[optind++]);
- }
- {
- istringstream in(str);
- endRefColor = hwcTestParseColor(in, error);
- // Any parse error or characters not used by parser
- if (error
- || (((unsigned int) in.tellg() != in.str().length())
- && (in.tellg() != (streampos) -1))) {
- testPrintE("Invalid command-line specified end "
- "reference color of: %s", str.c_str());
- exit(3);
- }
- }
- break;
-
- case 'r': // Reference graphic format
- refFormat = hwcTestGraphicFormatLookup(optarg);
- if (refFormat == NULL) {
- testPrintE("Unkown command-line specified reference graphic "
- "format of: %s", optarg);
- printSyntax(basename(argv[0]));
- exit(4);
- }
- break;
-
- case 'v': // Verbose
- verbose = true;
- break;
-
- case 'h': // Help
- case '?':
- default:
- printSyntax(basename(argv[0]));
- exit(((optopt == 0) || (optopt == '?')) ? 0 : 5);
- }
- }
-
- // Expect a single positional parameter, which specifies the
- // equivalence graphic format.
- if (argc != (optind + 1)) {
- testPrintE("Expected a single command-line postional parameter");
- printSyntax(basename(argv[0]));
- exit(6);
- }
- equivFormat = hwcTestGraphicFormatLookup(argv[optind]);
- if (equivFormat == NULL) {
- testPrintE("Unkown command-line specified equivalence graphic "
- "format of: %s", argv[optind]);
- printSyntax(basename(argv[0]));
- exit(7);
- }
-
- testPrintI("refFormat: %u %s", refFormat->format, refFormat->desc);
- testPrintI("equivFormat: %u %s", equivFormat->format, equivFormat->desc);
- testPrintI("startRefColor: %s", ((string) startRefColor).c_str());
- testPrintI("endRefColor: %s", ((string) endRefColor).c_str());
- testPrintI("endDelay: %f", endDelay);
-
- // Stop framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STOP_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_STOP_FRAMEWORK);
- exit(8);
- }
- testExecCmd(cmd);
- testDelay(1.0); // TODO - needs means to query whether asynchronous stop
- // framework operation has completed. For now, just wait
- // a long time.
-
- init();
-
- // Use the upper third of the display for the reference frame and
- // the middle third for the equivalence frame.
- unsigned int refHeight = height / 3;
- unsigned int refPosY = 0; // Reference frame Y position
- unsigned int refPosX = 0; // Reference frame X position
- unsigned int refWidth = width - refPosX;
- if ((refWidth & refFormat->wMod) != 0) {
- refWidth += refFormat->wMod - (refWidth % refFormat->wMod);
- }
- unsigned int equivHeight = height / 3;
- unsigned int equivPosY = refHeight; // Equivalence frame Y position
- unsigned int equivPosX = 0; // Equivalence frame X position
- unsigned int equivWidth = width - equivPosX;
- if ((equivWidth & equivFormat->wMod) != 0) {
- equivWidth += equivFormat->wMod - (equivWidth % equivFormat->wMod);
- }
-
- // Create reference and equivalence graphic buffers
- const unsigned int numFrames = 2;
- sp<GraphicBuffer> refFrame;
- refFrame = new GraphicBuffer(refWidth, refHeight,
- refFormat->format, texUsage);
- if ((rv = refFrame->initCheck()) != NO_ERROR) {
- testPrintE("refFrame initCheck failed, rv: %i", rv);
- testPrintE(" width %u height: %u format: %u %s", refWidth, refHeight,
- refFormat->format,
- hwcTestGraphicFormat2str(refFormat->format));
- exit(9);
- }
- testPrintI("refFrame width: %u height: %u format: %u %s",
- refWidth, refHeight, refFormat->format,
- hwcTestGraphicFormat2str(refFormat->format));
-
- sp<GraphicBuffer> equivFrame;
- equivFrame = new GraphicBuffer(equivWidth, equivHeight,
- equivFormat->format, texUsage);
- if ((rv = refFrame->initCheck()) != NO_ERROR) {
- testPrintE("refFrame initCheck failed, rv: %i", rv);
- testPrintE(" width %u height: %u format: %u %s", refWidth, refHeight,
- refFormat->format,
- hwcTestGraphicFormat2str(refFormat->format));
- exit(10);
- }
- testPrintI("equivFrame width: %u height: %u format: %u %s",
- equivWidth, equivHeight, equivFormat->format,
- hwcTestGraphicFormat2str(equivFormat->format));
-
- // Fill the frames with a horizontal blend
- hwcTestFillColorHBlend(refFrame.get(), refFormat->format,
- startRefColor, endRefColor);
- hwcTestFillColorHBlend(equivFrame.get(), refFormat->format,
- startRefColor, endRefColor);
-
- hwc_layer_list_t *list;
- size_t size = sizeof(hwc_layer_list) + numFrames * sizeof(hwc_layer_t);
- if ((list = (hwc_layer_list_t *) calloc(1, size)) == NULL) {
- testPrintE("Allocate list failed");
- exit(11);
- }
- list->flags = HWC_GEOMETRY_CHANGED;
- list->numHwLayers = numFrames;
-
- hwc_layer_t *layer = &list->hwLayers[0];
- layer->handle = refFrame->handle;
- layer->blending = HWC_BLENDING_NONE;
- layer->sourceCrop.left = 0;
- layer->sourceCrop.top = 0;
- layer->sourceCrop.right = width;
- layer->sourceCrop.bottom = refHeight;
- layer->displayFrame.left = 0;
- layer->displayFrame.top = 0;
- layer->displayFrame.right = width;
- layer->displayFrame.bottom = refHeight;
- layer->visibleRegionScreen.numRects = 1;
- layer->visibleRegionScreen.rects = &layer->displayFrame;
-
- layer++;
- layer->handle = equivFrame->handle;
- layer->blending = HWC_BLENDING_NONE;
- layer->sourceCrop.left = 0;
- layer->sourceCrop.top = 0;
- layer->sourceCrop.right = width;
- layer->sourceCrop.bottom = equivHeight;
- layer->displayFrame.left = 0;
- layer->displayFrame.top = refHeight;
- layer->displayFrame.right = width;
- layer->displayFrame.bottom = layer->displayFrame.top + equivHeight;
- layer->visibleRegionScreen.numRects = 1;
- layer->visibleRegionScreen.rects = &layer->displayFrame;
-
- // Perform prepare operation
- if (verbose) { testPrintI("Prepare:"); hwcTestDisplayList(list); }
- hwcDevice->prepare(hwcDevice, list);
- if (verbose) {
- testPrintI("Post Prepare:");
- hwcTestDisplayListPrepareModifiable(list);
- }
-
- // Turn off the geometry changed flag
- list->flags &= ~HWC_GEOMETRY_CHANGED;
-
- if (verbose) {hwcTestDisplayListHandles(list); }
- hwcDevice->set(hwcDevice, dpy, surface, list);
-
- testDelay(endDelay);
-
- // Start framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_START_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_START_FRAMEWORK);
- exit(12);
- }
- testExecCmd(cmd);
-
- return 0;
-}
-
-void init(void)
-{
- // Seed pseudo random number generator
- // Seeding causes fill horizontal blend to fill the pad area with
- // a deterministic set of values.
- srand48(0);
-
- hwcTestInitDisplay(verbose, &dpy, &surface, &width, &height);
-
- hwcTestOpenHwc(&hwcDevice);
-}
-
-void printSyntax(const char *cmd)
-{
- testPrintE(" %s [options] graphicFormat", cmd);
- testPrintE(" options:");
- testPrintE(" -s <0.##, 0.##, 0.##> - Starting reference color");
- testPrintE(" -e <0.##, 0.##, 0.##> - Ending reference color");
- testPrintE(" -r format - Reference graphic format");
- testPrintE(" -D #.## - End of test delay");
- testPrintE(" -v Verbose");
- testPrintE("");
- testPrintE(" graphic formats:");
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- testPrintE(" %s", hwcTestGraphicFormat[n1].desc);
- }
-}
diff --git a/opengl/tests/hwc/hwcCommit.cpp b/opengl/tests/hwc/hwcCommit.cpp
deleted file mode 100644
index efa646c..0000000
--- a/opengl/tests/hwc/hwcCommit.cpp
+++ /dev/null
@@ -1,1561 +0,0 @@
-/*
- * 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.
- *
- */
-
-/*
- * Hardware Composer Commit Points
- *
- * Synopsis
- * hwcCommit [options] graphicFormat ...
- * options:
- * -s [width, height] - Starting dimension
- * -v - Verbose
- *
- * graphic formats:
- * RGBA8888 (reference frame default)
- * RGBX8888
- * RGB888
- * RGB565
- * BGRA8888
- * RGBA5551
- * RGBA4444
- * YV12
- *
- * Description
- * The Hardware Composer (HWC) Commit test is a benchmark that
- * discovers the points at which the HWC will commit to rendering an
- * overlay(s). Before rendering a set of overlays, the HWC is shown
- * the list through a prepare call. During the prepare call the HWC
- * is able to examine the list and specify which overlays it is able
- * to handle. The overlays that it can't handle are typically composited
- * by a higher level (e.g. Surface Flinger) and then the original list
- * plus a composit of what HWC passed on are provided back to the HWC
- * for rendering.
- *
- * Once an implementation of the HWC has been shipped, a regression would
- * likely occur if a latter implementation started passing on conditions
- * that it used to commit to. The primary purpose of this benchmark
- * is the automated discovery of the commit points, where an implementation
- * is on the edge between committing and not committing. These are commonly
- * referred to as commit points. Between implementations changes to the
- * commit points are allowed, as long as they improve what the HWC commits
- * to. Once an implementation of the HWC is shipped, the commit points are
- * not allowed to regress in future implementations.
- *
- * This benchmark takes a sampling and then adjusts until it finds a
- * commit point. It doesn't exhaustively check all possible conditions,
- * which do to the number of combinations would be impossible. Instead
- * it starts its search from a starting dimension, that can be changed
- * via the -s option. The search is also bounded by a set of search
- * limits, that are hard-coded into a structure of constants named
- * searchLimits. Results that happen to reach a searchLimit are prefixed
- * with >=, so that it is known that the value could possibly be larger.
- *
- * Measurements are made for each of the graphic formats specified as
- * positional parameters on the command-line. If no graphic formats
- * are specified on the command line, then by default measurements are
- * made and reported for each of the known graphic format.
- */
-
-#include <algorithm>
-#include <assert.h>
-#include <cerrno>
-#include <cmath>
-#include <cstdlib>
-#include <ctime>
-#include <iomanip>
-#include <istream>
-#include <libgen.h>
-#include <list>
-#include <sched.h>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-#include <vector>
-
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-
-#define LOG_TAG "hwcCommitTest"
-#include <utils/Log.h>
-#include <testUtil.h>
-
-#include <hardware/hwcomposer.h>
-
-#include <glTestLib.h>
-#include "hwcTestLib.h"
-
-using namespace std;
-using namespace android;
-
-// Defaults
-const HwcTestDim defaultStartDim = HwcTestDim(100, 100);
-const bool defaultVerbose = false;
-
-const uint32_t defaultFormat = HAL_PIXEL_FORMAT_RGBA_8888;
-const int32_t defaultTransform = 0;
-const uint32_t defaultBlend = HWC_BLENDING_NONE;
-const ColorFract defaultColor(0.5, 0.5, 0.5);
-const float defaultAlpha = 1.0; // Opaque
-const HwcTestDim defaultSourceDim(1, 1);
-const struct hwc_rect defaultSourceCrop = {0, 0, 1, 1};
-const struct hwc_rect defaultDisplayFrame = {0, 0, 100, 100};
-
-// Global Constants
-const uint32_t printFieldWidth = 2;
-const struct searchLimits {
- uint32_t numOverlays;
- HwcTestDim sourceCrop;
-} searchLimits = {
- 10,
- HwcTestDim(3000, 2000),
-};
-const struct transformType {
- const char *desc;
- uint32_t id;
-} transformType[] = {
- {"fliph", HWC_TRANSFORM_FLIP_H},
- {"flipv", HWC_TRANSFORM_FLIP_V},
- {"rot90", HWC_TRANSFORM_ROT_90},
- {"rot180", HWC_TRANSFORM_ROT_180},
- {"rot270", HWC_TRANSFORM_ROT_270},
-};
-const struct blendType {
- const char *desc;
- uint32_t id;
-} blendType[] = {
- {"none", HWC_BLENDING_NONE},
- {"premult", HWC_BLENDING_PREMULT},
- {"coverage", HWC_BLENDING_COVERAGE},
-};
-
-// Defines
-#define MAXCMD 200
-#define CMD_STOP_FRAMEWORK "stop 2>&1"
-#define CMD_START_FRAMEWORK "start 2>&1"
-
-// Macros
-#define NUMA(a) (sizeof(a) / sizeof(a [0])) // Num elements in an array
-
-// Local types
-class Rectangle {
-public:
- Rectangle(uint32_t graphicFormat = defaultFormat,
- HwcTestDim dfDim = HwcTestDim(1, 1),
- HwcTestDim sDim = HwcTestDim(1, 1));
- void setSourceDim(HwcTestDim dim);
-
- uint32_t format;
- uint32_t transform;
- int32_t blend;
- ColorFract color;
- float alpha;
- HwcTestDim sourceDim;
- struct hwc_rect sourceCrop;
- struct hwc_rect displayFrame;
-};
-
-class Range {
-public:
- Range(void) : _l(0), _u(0) {}
- Range(uint32_t lower, uint32_t upper) : _l(lower), _u(upper) {}
- uint32_t lower(void) { return _l; }
- uint32_t upper(void) { return _u; }
-
- operator string();
-
-private:
- uint32_t _l; // lower
- uint32_t _u; // upper
-};
-
-Range::operator string()
-{
- ostringstream out;
-
- out << '[' << _l << ", " << _u << ']';
-
- return out.str();
-}
-
-class Rational {
-public:
- Rational(void) : _n(0), _d(1) {}
- Rational(uint32_t n, uint32_t d) : _n(n), _d(d) {}
- uint32_t numerator(void) { return _n; }
- uint32_t denominator(void) { return _d; }
- void setNumerator(uint32_t numerator) { _n = numerator; }
-
- bool operator==(const Rational& other) const;
- bool operator!=(const Rational& other) const { return !(*this == other); }
- bool operator<(const Rational& other) const;
- bool operator>(const Rational& other) const {
- return (!(*this == other) && !(*this < other));
- }
- static void double2Rational(double f, Range nRange, Range dRange,
- Rational& lower, Rational& upper);
-
- operator string() const;
- operator double() const { return (double) _n / (double) _d; }
-
-
-private:
- uint32_t _n;
- uint32_t _d;
-};
-
-// Globals
-static const int texUsage = GraphicBuffer::USAGE_HW_TEXTURE |
- GraphicBuffer::USAGE_SW_WRITE_RARELY;
-static hwc_composer_device_t *hwcDevice;
-static EGLDisplay dpy;
-static EGLSurface surface;
-static EGLint width, height;
-static size_t maxHeadingLen;
-static vector<string> formats;
-
-// Measurements
-struct meas {
- uint32_t format;
- uint32_t startDimOverlays;
- uint32_t maxNonOverlapping;
- uint32_t maxOverlapping;
- list<uint32_t> transforms;
- list<uint32_t> blends;
- struct displayFrame {
- uint32_t minWidth;
- uint32_t minHeight;
- HwcTestDim minDim;
- uint32_t maxWidth;
- uint32_t maxHeight;
- HwcTestDim maxDim;
- } df;
- struct sourceCrop {
- uint32_t minWidth;
- uint32_t minHeight;
- HwcTestDim minDim;
- uint32_t maxWidth;
- uint32_t maxHeight;
- HwcTestDim maxDim;
- Rational hScale;
- HwcTestDim hScaleBestDf;
- HwcTestDim hScaleBestSc;
- Rational vScale;
- HwcTestDim vScaleBestDf;
- HwcTestDim vScaleBestSc;
- } sc;
- vector<uint32_t> overlapBlendNone;
- vector<uint32_t> overlapBlendPremult;
- vector<uint32_t> overlapBlendCoverage;
-};
-vector<meas> measurements;
-
-// Function prototypes
-uint32_t numOverlays(list<Rectangle>& rectList);
-uint32_t maxOverlays(uint32_t format, bool allowOverlap);
-list<uint32_t> supportedTransforms(uint32_t format);
-list<uint32_t> supportedBlends(uint32_t format);
-uint32_t dfMinWidth(uint32_t format);
-uint32_t dfMinHeight(uint32_t format);
-uint32_t dfMaxWidth(uint32_t format);
-uint32_t dfMaxHeight(uint32_t format);
-HwcTestDim dfMinDim(uint32_t format);
-HwcTestDim dfMaxDim(uint32_t format);
-uint32_t scMinWidth(uint32_t format, const HwcTestDim& dfDim);
-uint32_t scMinHeight(uint32_t format, const HwcTestDim& dfDim);
-uint32_t scMaxWidth(uint32_t format, const HwcTestDim& dfDim);
-uint32_t scMaxHeight(uint32_t format, const HwcTestDim& dfDim);
-HwcTestDim scMinDim(uint32_t format, const HwcTestDim& dfDim);
-HwcTestDim scMaxDim(uint32_t format, const HwcTestDim& dfDim);
-Rational scHScale(uint32_t format,
- const HwcTestDim& dfMin, const HwcTestDim& dfMax,
- const HwcTestDim& scMin, const HwcTestDim& scMax,
- HwcTestDim& outBestDf, HwcTestDim& outBestSc);
-Rational scVScale(uint32_t format,
- const HwcTestDim& dfMin, const HwcTestDim& dfMax,
- const HwcTestDim& scMin, const HwcTestDim& scMax,
- HwcTestDim& outBestDf, HwcTestDim& outBestSc);
-uint32_t numOverlapping(uint32_t backgroundFormat, uint32_t foregroundFormat,
- uint32_t backgroundBlend, uint32_t foregroundBlend);
-string transformList2str(const list<uint32_t>& transformList);
-string blendList2str(const list<uint32_t>& blendList);
-void init(void);
-void printFormatHeadings(size_t indent);
-void printOverlapLine(size_t indent, const string formatStr,
- const vector<uint32_t>& results);
-void printSyntax(const char *cmd);
-
-// Command-line option settings
-static bool verbose = defaultVerbose;
-static HwcTestDim startDim = defaultStartDim;
-
-/*
- * Main
- *
- * Performs the following high-level sequence of operations:
- *
- * 1. Command-line parsing
- *
- * 2. Form a list of command-line specified graphic formats. If
- * no formats are specified, then form a list of all known formats.
- *
- * 3. Stop framework
- * Only one user at a time is allowed to use the HWC. Surface
- * Flinger uses the HWC and is part of the framework. Need to
- * stop the framework so that Surface Flinger will stop using
- * the HWC.
- *
- * 4. Initialization
- *
- * 5. For each graphic format in the previously formed list perform
- * measurements on that format and report the results.
- *
- * 6. Start framework
- */
-int
-main(int argc, char *argv[])
-{
- int rv, opt;
- char *chptr;
- bool error;
- string str;
- char cmd[MAXCMD];
- list<Rectangle> rectList;
-
- testSetLogCatTag(LOG_TAG);
-
- // Parse command line arguments
- while ((opt = getopt(argc, argv, "s:v?h")) != -1) {
- switch (opt) {
-
- case 's': // Start Dimension
- // Use arguments until next starts with a dash
- // or current ends with a > or ]
- str = optarg;
- while (optind < argc) {
- if (*argv[optind] == '-') { break; }
- char endChar = (str.length() > 1) ? str[str.length() - 1] : 0;
- if ((endChar == '>') || (endChar == ']')) { break; }
- str += " " + string(argv[optind++]);
- }
- {
- istringstream in(str);
- startDim = hwcTestParseDim(in, error);
- // Any parse error or characters not used by parser
- if (error
- || (((unsigned int) in.tellg() != in.str().length())
- && (in.tellg() != (streampos) -1))) {
- testPrintE("Invalid command-line specified start "
- "dimension of: %s", str.c_str());
- exit(8);
- }
- }
- break;
-
- case 'v': // Verbose
- verbose = true;
- break;
-
- case 'h': // Help
- case '?':
- default:
- printSyntax(basename(argv[0]));
- exit(((optopt == 0) || (optopt == '?')) ? 0 : 11);
- }
- }
-
- // Positional parameters
- // Positional parameters provide the names of graphic formats that
- // measurements are to be made on. Measurements are made on all
- // known graphic formats when no positional parameters are provided.
- if (optind == argc) {
- // No command-line specified graphic formats
- // Add all graphic formats to the list of formats to be measured
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- formats.push_back(hwcTestGraphicFormat[n1].desc);
- }
- } else {
- // Add names of command-line specified graphic formats to the
- // list of formats to be tested
- for (; argv[optind] != NULL; optind++) {
- formats.push_back(argv[optind]);
- }
- }
-
- // Determine length of longest specified graphic format.
- // This value is used for output formating
- for (vector<string>::iterator it = formats.begin();
- it != formats.end(); ++it) {
- maxHeadingLen = max(maxHeadingLen, it->length());
- }
-
- // Stop framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STOP_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_STOP_FRAMEWORK);
- exit(14);
- }
- testExecCmd(cmd);
- testDelay(1.0); // TODO - needs means to query whether asynchronous stop
- // framework operation has completed. For now, just wait
- // a long time.
-
- testPrintI("startDim: %s", ((string) startDim).c_str());
-
- init();
-
- // For each of the graphic formats
- for (vector<string>::iterator itFormat = formats.begin();
- itFormat != formats.end(); ++itFormat) {
-
- // Locate hwcTestLib structure that describes this format
- const struct hwcTestGraphicFormat *format;
- format = hwcTestGraphicFormatLookup((*itFormat).c_str());
- if (format == NULL) {
- testPrintE("Unknown graphic format of: %s", (*itFormat).c_str());
- exit(1);
- }
-
- // Display format header
- testPrintI("format: %s", format->desc);
-
- // Create area to hold the measurements
- struct meas meas;
- struct meas *measPtr;
- meas.format = format->format;
- measurements.push_back(meas);
- measPtr = &measurements[measurements.size() - 1];
-
- // Start dimension num overlays
- Rectangle rect(format->format, startDim);
- rectList.clear();
- rectList.push_back(rect);
- measPtr->startDimOverlays = numOverlays(rectList);
- testPrintI(" startDimOverlays: %u", measPtr->startDimOverlays);
-
- // Skip the rest of the measurements, when the start dimension
- // doesn't produce an overlay
- if (measPtr->startDimOverlays == 0) { continue; }
-
- // Max Overlays
- measPtr->maxNonOverlapping = maxOverlays(format->format, false);
- testPrintI(" max nonOverlapping overlays: %s%u",
- (measPtr->maxNonOverlapping == searchLimits.numOverlays)
- ? ">= " : "",
- measPtr->maxNonOverlapping);
- measPtr->maxOverlapping = maxOverlays(format->format, true);
- testPrintI(" max Overlapping overlays: %s%u",
- (measPtr->maxOverlapping == searchLimits.numOverlays)
- ? ">= " : "",
- measPtr->maxOverlapping);
-
- // Transforms and blends
- measPtr->transforms = supportedTransforms(format->format);
- testPrintI(" transforms: %s",
- transformList2str(measPtr->transforms).c_str());
- measPtr->blends = supportedBlends(format->format);
- testPrintI(" blends: %s",
- blendList2str(measPtr->blends).c_str());
-
- // Display frame measurements
- measPtr->df.minWidth = dfMinWidth(format->format);
- testPrintI(" dfMinWidth: %u", measPtr->df.minWidth);
-
- measPtr->df.minHeight = dfMinHeight(format->format);
- testPrintI(" dfMinHeight: %u", measPtr->df.minHeight);
-
- measPtr->df.maxWidth = dfMaxWidth(format->format);
- testPrintI(" dfMaxWidth: %u", measPtr->df.maxWidth);
-
- measPtr->df.maxHeight = dfMaxHeight(format->format);
- testPrintI(" dfMaxHeight: %u", measPtr->df.maxHeight);
-
- measPtr->df.minDim = dfMinDim(format->format);
- testPrintI(" dfMinDim: %s", ((string) measPtr->df.minDim).c_str());
-
- measPtr->df.maxDim = dfMaxDim(format->format);
- testPrintI(" dfMaxDim: %s", ((string) measPtr->df.maxDim).c_str());
-
- // Source crop measurements
- measPtr->sc.minWidth = scMinWidth(format->format, measPtr->df.minDim);
- testPrintI(" scMinWidth: %u", measPtr->sc.minWidth);
-
- measPtr->sc.minHeight = scMinHeight(format->format, measPtr->df.minDim);
- testPrintI(" scMinHeight: %u", measPtr->sc.minHeight);
-
- measPtr->sc.maxWidth = scMaxWidth(format->format, measPtr->df.maxDim);
- testPrintI(" scMaxWidth: %s%u", (measPtr->sc.maxWidth
- == searchLimits.sourceCrop.width()) ? ">= " : "",
- measPtr->sc.maxWidth);
-
- measPtr->sc.maxHeight = scMaxHeight(format->format, measPtr->df.maxDim);
- testPrintI(" scMaxHeight: %s%u", (measPtr->sc.maxHeight
- == searchLimits.sourceCrop.height()) ? ">= " : "",
- measPtr->sc.maxHeight);
-
- measPtr->sc.minDim = scMinDim(format->format, measPtr->df.minDim);
- testPrintI(" scMinDim: %s", ((string) measPtr->sc.minDim).c_str());
-
- measPtr->sc.maxDim = scMaxDim(format->format, measPtr->df.maxDim);
- testPrintI(" scMaxDim: %s%s", ((measPtr->sc.maxDim.width()
- >= searchLimits.sourceCrop.width())
- || (measPtr->sc.maxDim.width() >=
- searchLimits.sourceCrop.height())) ? ">= " : "",
- ((string) measPtr->sc.maxDim).c_str());
-
- measPtr->sc.hScale = scHScale(format->format,
- measPtr->df.minDim, measPtr->df.maxDim,
- measPtr->sc.minDim, measPtr->sc.maxDim,
- measPtr->sc.hScaleBestDf,
- measPtr->sc.hScaleBestSc);
- testPrintI(" scHScale: %s%f",
- (measPtr->sc.hScale
- >= Rational(searchLimits.sourceCrop.width(),
- measPtr->df.minDim.width())) ? ">= " : "",
- (double) measPtr->sc.hScale);
- testPrintI(" HScale Best Display Frame: %s",
- ((string) measPtr->sc.hScaleBestDf).c_str());
- testPrintI(" HScale Best Source Crop: %s",
- ((string) measPtr->sc.hScaleBestSc).c_str());
-
- measPtr->sc.vScale = scVScale(format->format,
- measPtr->df.minDim, measPtr->df.maxDim,
- measPtr->sc.minDim, measPtr->sc.maxDim,
- measPtr->sc.vScaleBestDf,
- measPtr->sc.vScaleBestSc);
- testPrintI(" scVScale: %s%f",
- (measPtr->sc.vScale
- >= Rational(searchLimits.sourceCrop.height(),
- measPtr->df.minDim.height())) ? ">= " : "",
- (double) measPtr->sc.vScale);
- testPrintI(" VScale Best Display Frame: %s",
- ((string) measPtr->sc.vScaleBestDf).c_str());
- testPrintI(" VScale Best Source Crop: %s",
- ((string) measPtr->sc.vScaleBestSc).c_str());
-
- // Overlap two graphic formats and different blends
- // Results displayed after all overlap measurments with
- // current format in the foreground
- // TODO: make measurments with background blend other than
- // none. All of these measurements are done with a
- // background blend of HWC_BLENDING_NONE, with the
- // blend type of the foregound being varied.
- uint32_t foregroundFormat = format->format;
- for (vector<string>::iterator it = formats.begin();
- it != formats.end(); ++it) {
- uint32_t num;
-
- const struct hwcTestGraphicFormat *backgroundFormatPtr
- = hwcTestGraphicFormatLookup((*it).c_str());
- uint32_t backgroundFormat = backgroundFormatPtr->format;
-
- num = numOverlapping(backgroundFormat, foregroundFormat,
- HWC_BLENDING_NONE, HWC_BLENDING_NONE);
- measPtr->overlapBlendNone.push_back(num);
-
- num = numOverlapping(backgroundFormat, foregroundFormat,
- HWC_BLENDING_NONE, HWC_BLENDING_PREMULT);
- measPtr->overlapBlendPremult.push_back(num);
-
- num = numOverlapping(backgroundFormat, foregroundFormat,
- HWC_BLENDING_NONE, HWC_BLENDING_COVERAGE);
- measPtr->overlapBlendCoverage.push_back(num);
- }
-
- }
-
- // Display overlap results
- size_t indent = 2;
- testPrintI("overlapping blend: none");
- printFormatHeadings(indent);
- for (vector<string>::iterator it = formats.begin();
- it != formats.end(); ++it) {
- printOverlapLine(indent, *it, measurements[it
- - formats.begin()].overlapBlendNone);
- }
- testPrintI("");
-
- testPrintI("overlapping blend: premult");
- printFormatHeadings(indent);
- for (vector<string>::iterator it = formats.begin();
- it != formats.end(); ++it) {
- printOverlapLine(indent, *it, measurements[it
- - formats.begin()].overlapBlendPremult);
- }
- testPrintI("");
-
- testPrintI("overlapping blend: coverage");
- printFormatHeadings(indent);
- for (vector<string>::iterator it = formats.begin();
- it != formats.end(); ++it) {
- printOverlapLine(indent, *it, measurements[it
- - formats.begin()].overlapBlendCoverage);
- }
- testPrintI("");
-
- // Start framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_START_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_START_FRAMEWORK);
- exit(21);
- }
- testExecCmd(cmd);
-
- return 0;
-}
-
-// Determine the maximum number of overlays that are all of the same format
-// that the HWC will commit to. If allowOverlap is true, then the rectangles
-// are laid out on a diagonal starting from the upper left corner. With
-// each rectangle adjust one pixel to the right and one pixel down.
-// When allowOverlap is false, the rectangles are tiled in column major
-// order. Note, column major ordering is used so that the initial rectangles
-// are all on different horizontal scan rows. It is common that hardware
-// has limits on the number of objects it can handle on any single row.
-uint32_t maxOverlays(uint32_t format, bool allowOverlap)
-{
- unsigned int max = 0;
-
- for (unsigned int numRects = 1; numRects <= searchLimits.numOverlays;
- numRects++) {
- list<Rectangle> rectList;
-
- for (unsigned int x = 0;
- (x + startDim.width()) < (unsigned int) width;
- x += (allowOverlap) ? 1 : startDim.width()) {
- for (unsigned int y = 0;
- (y + startDim.height()) < (unsigned int) height;
- y += (allowOverlap) ? 1 : startDim.height()) {
- Rectangle rect(format, startDim, startDim);
- rect.displayFrame.left = x;
- rect.displayFrame.top = y;
- rect.displayFrame.right = x + startDim.width();
- rect.displayFrame.bottom = y + startDim.height();
-
- rectList.push_back(rect);
-
- if (rectList.size() >= numRects) { break; }
- }
- if (rectList.size() >= numRects) { break; }
- }
-
- uint32_t num = numOverlays(rectList);
- if (num > max) { max = num; }
- }
-
- return max;
-}
-
-// Measures what transforms (i.e. flip horizontal, rotate 180) are
-// supported by the specified format
-list<uint32_t> supportedTransforms(uint32_t format)
-{
- list<uint32_t> rv;
- list<Rectangle> rectList;
- Rectangle rect(format, startDim);
-
- // For each of the transform types
- for (unsigned int idx = 0; idx < NUMA(transformType); idx++) {
- unsigned int id = transformType[idx].id;
-
- rect.transform = id;
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
-
- if (num == 1) {
- rv.push_back(id);
- }
- }
-
- return rv;
-}
-
-// Determines which types of blends (i.e. none, premult, coverage) are
-// supported by the specified format
-list<uint32_t> supportedBlends(uint32_t format)
-{
- list<uint32_t> rv;
- list<Rectangle> rectList;
- Rectangle rect(format, startDim);
-
- // For each of the blend types
- for (unsigned int idx = 0; idx < NUMA(blendType); idx++) {
- unsigned int id = blendType[idx].id;
-
- rect.blend = id;
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
-
- if (num == 1) {
- rv.push_back(id);
- }
- }
-
- return rv;
-}
-
-// Determines the minimum width of any display frame of the given format
-// that the HWC will commit to.
-uint32_t dfMinWidth(uint32_t format)
-{
- uint32_t w;
- list<Rectangle> rectList;
-
- for (w = 1; w <= startDim.width(); w++) {
- HwcTestDim dim(w, startDim.height());
- Rectangle rect(format, dim);
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return w;
- }
- }
- if (w > startDim.width()) {
- testPrintE("Failed to locate display frame min width");
- exit(33);
- }
-
- return w;
-}
-
-// Display frame minimum height
-uint32_t dfMinHeight(uint32_t format)
-{
- uint32_t h;
- list<Rectangle> rectList;
-
- for (h = 1; h <= startDim.height(); h++) {
- HwcTestDim dim(startDim.width(), h);
- Rectangle rect(format, dim);
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return h;
- }
- }
- if (h > startDim.height()) {
- testPrintE("Failed to locate display frame min height");
- exit(34);
- }
-
- return h;
-}
-
-// Display frame maximum width
-uint32_t dfMaxWidth(uint32_t format)
-{
- uint32_t w;
- list<Rectangle> rectList;
-
- for (w = width; w >= startDim.width(); w--) {
- HwcTestDim dim(w, startDim.height());
- Rectangle rect(format, dim);
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return w;
- }
- }
- if (w < startDim.width()) {
- testPrintE("Failed to locate display frame max width");
- exit(35);
- }
-
- return w;
-}
-
-// Display frame maximum height
-uint32_t dfMaxHeight(uint32_t format)
-{
- uint32_t h;
-
- for (h = height; h >= startDim.height(); h--) {
- HwcTestDim dim(startDim.width(), h);
- Rectangle rect(format, dim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return h;
- }
- }
- if (h < startDim.height()) {
- testPrintE("Failed to locate display frame max height");
- exit(36);
- }
-
- return h;
-}
-
-// Determine the minimum number of pixels that the HWC will ever commit to.
-// Note, this might be different that dfMinWidth * dfMinHeight, in that this
-// function adjusts both the width and height from the starting dimension.
-HwcTestDim dfMinDim(uint32_t format)
-{
- uint64_t bestMinPixels = 0;
- HwcTestDim bestDim;
- bool bestSet = false; // True when value has been assigned to
- // bestMinPixels and bestDim
-
- bool origVerbose = verbose; // Temporarily turn off verbose
- verbose = false;
- for (uint32_t w = 1; w <= startDim.width(); w++) {
- for (uint32_t h = 1; h <= startDim.height(); h++) {
- if (bestSet && ((w > bestMinPixels) || (h > bestMinPixels))) {
- break;
- }
-
- HwcTestDim dim(w, h);
- Rectangle rect(format, dim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- uint64_t pixels = dim.width() * dim.height();
- if (!bestSet || (pixels < bestMinPixels)) {
- bestMinPixels = pixels;
- bestDim = dim;
- bestSet = true;
- }
- }
- }
- }
- verbose = origVerbose;
-
- if (!bestSet) {
- testPrintE("Unable to locate display frame min dimension");
- exit(20);
- }
-
- return bestDim;
-}
-
-// Display frame maximum dimension
-HwcTestDim dfMaxDim(uint32_t format)
-{
- uint64_t bestMaxPixels = 0;
- HwcTestDim bestDim;
- bool bestSet = false; // True when value has been assigned to
- // bestMaxPixels and bestDim;
-
- // Potentially increase benchmark performance by first checking
- // for the common case of supporting a full display frame.
- HwcTestDim dim(width, height);
- Rectangle rect(format, dim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num == 1) { return dim; }
-
- // TODO: Use a binary search
- bool origVerbose = verbose; // Temporarily turn off verbose
- verbose = false;
- for (uint32_t w = startDim.width(); w <= (uint32_t) width; w++) {
- for (uint32_t h = startDim.height(); h <= (uint32_t) height; h++) {
- if (bestSet && ((w * h) <= bestMaxPixels)) { continue; }
-
- HwcTestDim dim(w, h);
- Rectangle rect(format, dim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- uint64_t pixels = dim.width() * dim.height();
- if (!bestSet || (pixels > bestMaxPixels)) {
- bestMaxPixels = pixels;
- bestDim = dim;
- bestSet = true;
- }
- }
- }
- }
- verbose = origVerbose;
-
- if (!bestSet) {
- testPrintE("Unable to locate display frame max dimension");
- exit(21);
- }
-
- return bestDim;
-}
-
-// Source crop minimum width
-uint32_t scMinWidth(uint32_t format, const HwcTestDim& dfDim)
-{
- uint32_t w;
- list<Rectangle> rectList;
-
- // Source crop frame min width
- for (w = 1; w <= dfDim.width(); w++) {
- Rectangle rect(format, dfDim, HwcTestDim(w, dfDim.height()));
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return w;
- }
- }
- testPrintE("Failed to locate source crop min width");
- exit(35);
-}
-
-// Source crop minimum height
-uint32_t scMinHeight(uint32_t format, const HwcTestDim& dfDim)
-{
- uint32_t h;
- list<Rectangle> rectList;
-
- for (h = 1; h <= dfDim.height(); h++) {
- Rectangle rect(format, dfDim, HwcTestDim(dfDim.width(), h));
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return h;
- }
- }
- testPrintE("Failed to locate source crop min height");
- exit(36);
-}
-
-// Source crop maximum width
-uint32_t scMaxWidth(uint32_t format, const HwcTestDim& dfDim)
-{
- uint32_t w;
- list<Rectangle> rectList;
-
- for (w = searchLimits.sourceCrop.width(); w >= dfDim.width(); w--) {
- Rectangle rect(format, dfDim, HwcTestDim(w, dfDim.height()));
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return w;
- }
- }
- testPrintE("Failed to locate source crop max width");
- exit(35);
-}
-
-// Source crop maximum height
-uint32_t scMaxHeight(uint32_t format, const HwcTestDim& dfDim)
-{
- uint32_t h;
- list<Rectangle> rectList;
-
- for (h = searchLimits.sourceCrop.height(); h >= dfDim.height(); h--) {
- Rectangle rect(format, dfDim, HwcTestDim(dfDim.width(), h));
- rectList.clear();
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- return h;
- }
- }
- testPrintE("Failed to locate source crop max height");
- exit(36);
-}
-
-// Source crop minimum dimension
-// Discovers the source crop with the least number of pixels that the
-// HWC will commit to. Note, this may be different from scMinWidth
-// * scMinHeight, in that this function searches for a combination of
-// width and height. While the other routines always keep one of the
-// dimensions equal to the corresponding start dimension.
-HwcTestDim scMinDim(uint32_t format, const HwcTestDim& dfDim)
-{
- uint64_t bestMinPixels = 0;
- HwcTestDim bestDim;
- bool bestSet = false; // True when value has been assigned to
- // bestMinPixels and bestDim
-
- bool origVerbose = verbose; // Temporarily turn off verbose
- verbose = false;
- for (uint32_t w = 1; w <= dfDim.width(); w++) {
- for (uint32_t h = 1; h <= dfDim.height(); h++) {
- if (bestSet && ((w > bestMinPixels) || (h > bestMinPixels))) {
- break;
- }
-
- HwcTestDim dim(w, h);
- Rectangle rect(format, dfDim, HwcTestDim(w, h));
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- uint64_t pixels = dim.width() * dim.height();
- if (!bestSet || (pixels < bestMinPixels)) {
- bestMinPixels = pixels;
- bestDim = dim;
- bestSet = true;
- }
- }
- }
- }
- verbose = origVerbose;
-
- if (!bestSet) {
- testPrintE("Unable to locate source crop min dimension");
- exit(20);
- }
-
- return bestDim;
-}
-
-// Source crop maximum dimension
-HwcTestDim scMaxDim(uint32_t format, const HwcTestDim& dfDim)
-{
- uint64_t bestMaxPixels = 0;
- HwcTestDim bestDim;
- bool bestSet = false; // True when value has been assigned to
- // bestMaxPixels and bestDim;
-
- // Potentially increase benchmark performance by first checking
- // for the common case of supporting the maximum checked source size
- HwcTestDim dim = searchLimits.sourceCrop;
- Rectangle rect(format, dfDim, searchLimits.sourceCrop);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num == 1) { return dim; }
-
- // TODO: Use a binary search
- bool origVerbose = verbose; // Temporarily turn off verbose
- verbose = false;
- for (uint32_t w = dfDim.width();
- w <= searchLimits.sourceCrop.width(); w++) {
- for (uint32_t h = dfDim.height();
- h <= searchLimits.sourceCrop.height(); h++) {
- if (bestSet && ((w * h) <= bestMaxPixels)) { continue; }
-
- HwcTestDim dim(w, h);
- Rectangle rect(format, dfDim, dim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
- if (num > 0) {
- uint64_t pixels = dim.width() * dim.height();
- if (!bestSet || (pixels > bestMaxPixels)) {
- bestMaxPixels = pixels;
- bestDim = dim;
- bestSet = true;
- }
- }
- }
- }
- verbose = origVerbose;
-
- if (!bestSet) {
- testPrintE("Unable to locate source crop max dimension");
- exit(21);
- }
-
- return bestDim;
-}
-
-// Source crop horizontal scale
-// Determines the maximum factor by which the source crop can be larger
-// that the display frame. The commit point is discovered through a
-// binary search of rational numbers. The numerator in each of the
-// rational numbers contains the dimension for the source crop, while
-// the denominator specifies the dimension for the display frame. On
-// each pass of the binary search the mid-point between the greatest
-// point committed to (best) and the smallest point in which a commit
-// has failed is calculated. This mid-point is then passed to a function
-// named double2Rational, which determines the closest rational numbers
-// just below and above the mid-point. By default the lower rational
-// number is used for the scale factor on the next pass of the binary
-// search. The upper value is only used when best is already equal
-// to the lower value. This only occurs when the lower value has already
-// been tried.
-Rational scHScale(uint32_t format,
- const HwcTestDim& dfMin, const HwcTestDim& dfMax,
- const HwcTestDim& scMin, const HwcTestDim& scMax,
- HwcTestDim& outBestDf, HwcTestDim& outBestSc)
-{
- HwcTestDim scDim, dfDim; // Source crop and display frame dimension
- Rational best(0, 1), minBad; // Current bounds for a binary search
- // MinGood is set below the lowest
- // possible scale. The value of minBad,
- // will be set by the first pass
- // of the binary search.
-
- // Perform the passes of the binary search
- bool firstPass = true;
- do {
- // On first pass try the maximum scale within the search limits
- if (firstPass) {
- // Try the maximum possible scale, within the search limits
- scDim = HwcTestDim(searchLimits.sourceCrop.width(), scMin.height());
- dfDim = dfMin;
- } else {
- // Subsequent pass
- // Halve the difference between best and minBad.
- Rational lower, upper, selected;
-
- // Try the closest ratio halfway between minBood and minBad;
- // TODO: Avoid rounding issue by using Rational type for
- // midpoint. For now will use double, which should
- // have more than sufficient resolution.
- double mid = (double) best
- + ((double) minBad - (double) best) / 2.0;
- Rational::double2Rational(mid,
- Range(scMin.width(), scMax.width()),
- Range(dfMin.width(), dfMax.width()),
- lower, upper);
- if (((lower == best) && (upper == minBad))) {
- return best;
- }
-
- // Use lower value unless its already been tried
- selected = (lower != best) ? lower : upper;
-
- // Assign the size of the source crop and display frame
- // from the selected ratio of source crop to display frame.
- scDim = HwcTestDim(selected.numerator(), scMin.height());
- dfDim = HwcTestDim(selected.denominator(), dfMin.height());
- }
-
- // See if the HWC will commit to this combination
- Rectangle rect(format, dfDim, scDim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
-
- if (verbose) {
- testPrintI(" scHscale num: %u scale: %f dfDim: %s scDim: %s",
- num, (float) Rational(scDim.width(), dfDim.width()),
- ((string) dfDim).c_str(), ((string) scDim).c_str());
- }
- if (num == 1) {
- // HWC committed to the combination
- // This is the best scale factor seen so far. Report the
- // dimensions to the caller, in case nothing better is seen.
- outBestDf = dfDim;
- outBestSc = scDim;
-
- // Success on the first pass means the largest possible scale
- // is supported, in which case no need to search any further.
- if (firstPass) { return Rational(scDim.width(), dfDim.width()); }
-
- // Update the lower bound of the binary search
- best = Rational(scDim.width(), dfDim.width());
- } else {
- // HWC didn't commit to this combination, so update the
- // upper bound of the binary search.
- minBad = Rational(scDim.width(), dfDim.width());
- }
-
- firstPass = false;
- } while (best != minBad);
-
- return best;
-}
-
-// Source crop vertical scale
-// Determines the maximum factor by which the source crop can be larger
-// that the display frame. The commit point is discovered through a
-// binary search of rational numbers. The numerator in each of the
-// rational numbers contains the dimension for the source crop, while
-// the denominator specifies the dimension for the display frame. On
-// each pass of the binary search the mid-point between the greatest
-// point committed to (best) and the smallest point in which a commit
-// has failed is calculated. This mid-point is then passed to a function
-// named double2Rational, which determines the closest rational numbers
-// just below and above the mid-point. By default the lower rational
-// number is used for the scale factor on the next pass of the binary
-// search. The upper value is only used when best is already equal
-// to the lower value. This only occurs when the lower value has already
-// been tried.
-Rational scVScale(uint32_t format,
- const HwcTestDim& dfMin, const HwcTestDim& dfMax,
- const HwcTestDim& scMin, const HwcTestDim& scMax,
- HwcTestDim& outBestDf, HwcTestDim& outBestSc)
-{
- HwcTestDim scDim, dfDim; // Source crop and display frame dimension
- Rational best(0, 1), minBad; // Current bounds for a binary search
- // MinGood is set below the lowest
- // possible scale. The value of minBad,
- // will be set by the first pass
- // of the binary search.
-
- // Perform the passes of the binary search
- bool firstPass = true;
- do {
- // On first pass try the maximum scale within the search limits
- if (firstPass) {
- // Try the maximum possible scale, within the search limits
- scDim = HwcTestDim(scMin.width(), searchLimits.sourceCrop.height());
- dfDim = dfMin;
- } else {
- // Subsequent pass
- // Halve the difference between best and minBad.
- Rational lower, upper, selected;
-
- // Try the closest ratio halfway between minBood and minBad;
- // TODO: Avoid rounding issue by using Rational type for
- // midpoint. For now will use double, which should
- // have more than sufficient resolution.
- double mid = (double) best
- + ((double) minBad - (double) best) / 2.0;
- Rational::double2Rational(mid,
- Range(scMin.height(), scMax.height()),
- Range(dfMin.height(), dfMax.height()),
- lower, upper);
- if (((lower == best) && (upper == minBad))) {
- return best;
- }
-
- // Use lower value unless its already been tried
- selected = (lower != best) ? lower : upper;
-
- // Assign the size of the source crop and display frame
- // from the selected ratio of source crop to display frame.
- scDim = HwcTestDim(scMin.width(), selected.numerator());
- dfDim = HwcTestDim(dfMin.width(), selected.denominator());
- }
-
- // See if the HWC will commit to this combination
- Rectangle rect(format, dfDim, scDim);
- list<Rectangle> rectList;
- rectList.push_back(rect);
- uint32_t num = numOverlays(rectList);
-
- if (verbose) {
- testPrintI(" scHscale num: %u scale: %f dfDim: %s scDim: %s",
- num, (float) Rational(scDim.height(), dfDim.height()),
- ((string) dfDim).c_str(), ((string) scDim).c_str());
- }
- if (num == 1) {
- // HWC committed to the combination
- // This is the best scale factor seen so far. Report the
- // dimensions to the caller, in case nothing better is seen.
- outBestDf = dfDim;
- outBestSc = scDim;
-
- // Success on the first pass means the largest possible scale
- // is supported, in which case no need to search any further.
- if (firstPass) { return Rational(scDim.height(), dfDim.height()); }
-
- // Update the lower bound of the binary search
- best = Rational(scDim.height(), dfDim.height());
- } else {
- // HWC didn't commit to this combination, so update the
- // upper bound of the binary search.
- minBad = Rational(scDim.height(), dfDim.height());
- }
-
- firstPass = false;
- } while (best != minBad);
-
- return best;
-}
-
-uint32_t numOverlapping(uint32_t backgroundFormat, uint32_t foregroundFormat,
- uint32_t backgroundBlend, uint32_t foregroundBlend)
-{
- list<Rectangle> rectList;
-
- Rectangle background(backgroundFormat, startDim, startDim);
- background.blend = backgroundBlend;
- rectList.push_back(background);
-
- // TODO: Handle cases where startDim is so small that adding 5
- // causes frames not to overlap.
- // TODO: Handle cases where startDim is so large that adding 5
- // cause a portion or all of the foreground displayFrame
- // to be off the display.
- Rectangle foreground(foregroundFormat, startDim, startDim);
- foreground.displayFrame.left += 5;
- foreground.displayFrame.top += 5;
- foreground.displayFrame.right += 5;
- foreground.displayFrame.bottom += 5;
- background.blend = foregroundBlend;
- rectList.push_back(foreground);
-
- uint32_t num = numOverlays(rectList);
-
- return num;
-}
-
-Rectangle::Rectangle(uint32_t graphicFormat, HwcTestDim dfDim,
- HwcTestDim sDim) :
- format(graphicFormat), transform(defaultTransform),
- blend(defaultBlend), color(defaultColor), alpha(defaultAlpha),
- sourceCrop(sDim), displayFrame(dfDim)
-{
- // Set source dimension
- // Can't use a base initializer, because the setting of format
- // must be done before setting the sourceDimension.
- setSourceDim(sDim);
-}
-
-void Rectangle::setSourceDim(HwcTestDim dim)
-{
- this->sourceDim = dim;
-
- const struct hwcTestGraphicFormat *attrib;
- attrib = hwcTestGraphicFormatLookup(this->format);
- if (attrib != NULL) {
- if (sourceDim.width() % attrib->wMod) {
- sourceDim.setWidth(sourceDim.width() + attrib->wMod
- - (sourceDim.width() % attrib->wMod));
- }
- if (sourceDim.height() % attrib->hMod) {
- sourceDim.setHeight(sourceDim.height() + attrib->hMod
- - (sourceDim.height() % attrib->hMod));
- }
- }
-}
-
-// Rational member functions
-bool Rational::operator==(const Rational& other) const
-{
- if (((uint64_t) _n * other._d)
- == ((uint64_t) _d * other._n)) { return true; }
-
- return false;
-}
-
-bool Rational::operator<(const Rational& other) const
-{
- if (((uint64_t) _n * other._d)
- < ((uint64_t) _d * other._n)) { return true; }
-
- return false;
-}
-
-Rational::operator string() const
-{
- ostringstream out;
-
- out << _n << '/' << _d;
-
- return out.str();
-}
-
-void Rational::double2Rational(double f, Range nRange, Range dRange,
- Rational& lower, Rational& upper)
-{
- Rational bestLower(nRange.lower(), dRange.upper());
- Rational bestUpper(nRange.upper(), dRange.lower());
-
- // Search for a better solution
- for (uint32_t d = dRange.lower(); d <= dRange.upper(); d++) {
- Rational val(d * f, d); // Lower, because double to int cast truncates
-
- if ((val.numerator() < nRange.lower())
- || (val.numerator() > nRange.upper())) { continue; }
-
- if (((double) val > (double) bestLower) && ((double) val <= f)) {
- bestLower = val;
- }
-
- val.setNumerator(val.numerator() + 1);
- if (val.numerator() > nRange.upper()) { continue; }
-
- if (((double) val < (double) bestUpper) && ((double) val >= f)) {
- bestUpper = val;
- }
- }
-
- lower = bestLower;
- upper = bestUpper;
-}
-
-// Local functions
-
-// Num Overlays
-// Given a list of rectangles, determine how many HWC will commit to render
-uint32_t numOverlays(list<Rectangle>& rectList)
-{
- hwc_layer_list_t *hwcList;
- list<sp<GraphicBuffer> > buffers;
-
- hwcList = hwcTestCreateLayerList(rectList.size());
- if (hwcList == NULL) {
- testPrintE("numOverlays create hwcList failed");
- exit(30);
- }
-
- hwc_layer_t *layer = &hwcList->hwLayers[0];
- for (std::list<Rectangle>::iterator it = rectList.begin();
- it != rectList.end(); ++it, ++layer) {
- // Allocate the texture for the source frame
- // and push it onto the buffers list, so that it
- // stays in scope until a return from this function.
- sp<GraphicBuffer> texture;
- texture = new GraphicBuffer(it->sourceDim.width(),
- it->sourceDim.height(),
- it->format, texUsage);
- buffers.push_back(texture);
-
- layer->handle = texture->handle;
- layer->blending = it->blend;
- layer->transform = it->transform;
- layer->sourceCrop = it->sourceCrop;
- layer->displayFrame = it->displayFrame;
-
- layer->visibleRegionScreen.numRects = 1;
- layer->visibleRegionScreen.rects = &layer->displayFrame;
- }
-
- // Perform prepare operation
- if (verbose) { testPrintI("Prepare:"); hwcTestDisplayList(hwcList); }
- hwcDevice->prepare(hwcDevice, hwcList);
- if (verbose) {
- testPrintI("Post Prepare:");
- hwcTestDisplayListPrepareModifiable(hwcList);
- }
-
- // Count the number of overlays
- uint32_t total = 0;
- for (unsigned int n1 = 0; n1 < hwcList->numHwLayers; n1++) {
- if (hwcList->hwLayers[n1].compositionType == HWC_OVERLAY) {
- total++;
- }
- }
-
- // Free the layer list and graphic buffers
- hwcTestFreeLayerList(hwcList);
-
- return total;
-}
-
-string transformList2str(const list<uint32_t>& transformList)
-{
- ostringstream out;
-
- for (list<uint32_t>::const_iterator it = transformList.begin();
- it != transformList.end(); ++it) {
- uint32_t id = *it;
-
- if (it != transformList.begin()) {
- out << ", ";
- }
- out << id;
-
- for (unsigned int idx = 0; idx < NUMA(transformType); idx++) {
- if (id == transformType[idx].id) {
- out << " (" << transformType[idx].desc << ')';
- break;
- }
- }
- }
-
- return out.str();
-}
-
-string blendList2str(const list<uint32_t>& blendList)
-{
- ostringstream out;
-
- for (list<uint32_t>::const_iterator it = blendList.begin();
- it != blendList.end(); ++it) {
- uint32_t id = *it;
-
- if (it != blendList.begin()) {
- out << ", ";
- }
- out << id;
-
- for (unsigned int idx = 0; idx < NUMA(blendType); idx++) {
- if (id == blendType[idx].id) {
- out << " (" << blendType[idx].desc << ')';
- break;
- }
- }
- }
-
- return out.str();
-}
-
-void init(void)
-{
- srand48(0);
-
- hwcTestInitDisplay(verbose, &dpy, &surface, &width, &height);
-
- hwcTestOpenHwc(&hwcDevice);
-}
-
-void printFormatHeadings(size_t indent)
-{
- for (size_t row = 0; row <= maxHeadingLen; row++) {
- ostringstream line;
- for(vector<string>::iterator it = formats.begin();
- it != formats.end(); ++it) {
- if ((maxHeadingLen - row) <= it->length()) {
- if (row != maxHeadingLen) {
- char ch = (*it)[it->length() - (maxHeadingLen - row)];
- line << ' ' << setw(printFieldWidth) << ch;
- } else {
- line << ' ' << string(printFieldWidth, '-');
- }
- } else {
- line << ' ' << setw(printFieldWidth) << "";
- }
- }
- testPrintI("%*s%s", indent + maxHeadingLen, "",
- line.str().c_str());
- }
-}
-
-void printOverlapLine(size_t indent, const string formatStr,
- const vector<uint32_t>& results)
-{
- ostringstream line;
-
- line << setw(indent + maxHeadingLen - formatStr.length()) << "";
-
- line << formatStr;
-
- for (vector<uint32_t>::const_iterator it = results.begin();
- it != results.end(); ++it) {
- line << ' ' << setw(printFieldWidth) << *it;
- }
-
- testPrintI("%s", line.str().c_str());
-}
-
-void printSyntax(const char *cmd)
-{
- testPrintE(" %s [options] [graphicFormat] ...",
- cmd);
- testPrintE(" options:");
- testPrintE(" -s [width, height] - start dimension");
- testPrintE(" -v - Verbose");
- testPrintE("");
- testPrintE(" graphic formats:");
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- testPrintE(" %s", hwcTestGraphicFormat[n1].desc);
- }
-}
diff --git a/opengl/tests/hwc/hwcRects.cpp b/opengl/tests/hwc/hwcRects.cpp
deleted file mode 100644
index 906c169..0000000
--- a/opengl/tests/hwc/hwcRects.cpp
+++ /dev/null
@@ -1,576 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * Hardware Composer Rectangles
- *
- * Synopsis
- * hwcRects [options] (graphicFormat displayFrame [attributes],)...
- * options:
- * -D #.## - End of test delay
- * -v - Verbose
- *
- * graphic formats:
- * RGBA8888 (reference frame default)
- * RGBX8888
- * RGB888
- * RGB565
- * BGRA8888
- * RGBA5551
- * RGBA4444
- * YV12
- *
- * displayFrame
- * [left, top, right, bottom]
- *
- * attributes:
- * transform: none | fliph | flipv | rot90 | rot180 | rot270
- * blend: none | premult | coverage
- * color: [0.##, 0.##, 0.##]
- * alpha: 0.##
- * sourceDim: [width, height]
- * sourceCrop: [left, top, right, bottom]
- *
- * Example:
- * # White YV12 rectangle, with overlapping turquoise
- * # RGBA8888 rectangle at 30%% (alpha: 0.7) transparency
- * hwcRects -v -D 30.0 \
- * YV12 [50, 80, 200, 300] transform: none \
- * color: [1.0, 0.5, 0.5], \
- * RGBA8888 [100, 150, 300, 400] blend: coverage \
- * color: [0.251, 0.878, 0.816] alpha: 0.7 \
- * sourceDim: [50, 60] sourceCrop: [5, 8, 12, 15]
- *
- * Description
- * Constructs a Hardware Composer (HWC) list of frames from
- * command-line specified parameters. Then sends it to the HWC
- * be rendered. The intended purpose of this tool is as a means to
- * reproduce and succinctly specify an observed HWC operation, with
- * no need to modify/compile a program.
- *
- * The command-line syntax consists of a few standard command-line
- * options and then a description of one or more frames. The frame
- * descriptions are separated from one another via a comma. The
- * beginning of a frame description requires the specification
- * of the graphic format and then the display frame rectangle where
- * the frame will be displayed. The display frame rectangle is
- * specified as follows, with the right and bottom coordinates being
- * exclusive values:
- *
- * [left, top, right, bottom]
- *
- * After these two required parameters each frame description can
- * specify 1 or more optional attributes. The name of each optional
- * attribute is preceded by a colon. The current implementation
- * then requires white space after the colon and then the value of
- * the attribute is specified. See the synopsis section above for
- * a list of attributes and the format of their expected value.
- */
-
-#include <algorithm>
-#include <assert.h>
-#include <cerrno>
-#include <cmath>
-#include <cstdlib>
-#include <ctime>
-#include <istream>
-#include <libgen.h>
-#include <list>
-#include <sched.h>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-
-#define LOG_TAG "hwcRectsTest"
-#include <utils/Log.h>
-#include <testUtil.h>
-
-#include <hardware/hwcomposer.h>
-
-#include <glTestLib.h>
-#include "hwcTestLib.h"
-
-using namespace std;
-using namespace android;
-
-// Defaults
-const bool defaultVerbose = false;
-const float defaultEndDelay = 2.0; // Default delay after rendering graphics
-
-const uint32_t defaultFormat = HAL_PIXEL_FORMAT_RGBA_8888;
-const int32_t defaultTransform = 0;
-const uint32_t defaultBlend = HWC_BLENDING_NONE;
-const ColorFract defaultColor(0.5, 0.5, 0.5);
-const float defaultAlpha = 1.0; // Opaque
-const HwcTestDim defaultSourceDim(1, 1);
-const struct hwc_rect defaultSourceCrop = {0, 0, 1, 1};
-const struct hwc_rect defaultDisplayFrame = {0, 0, 100, 100};
-
-// Defines
-#define MAXCMD 200
-#define CMD_STOP_FRAMEWORK "stop 2>&1"
-#define CMD_START_FRAMEWORK "start 2>&1"
-
-// Macros
-#define NUMA(a) (sizeof(a) / sizeof(a [0])) // Num elements in an array
-
-// Local types
-class Rectangle {
-public:
- Rectangle() : format(defaultFormat), transform(defaultTransform),
- blend(defaultBlend), color(defaultColor),
- alpha(defaultAlpha), sourceDim(defaultSourceDim),
- sourceCrop(defaultSourceCrop),
- displayFrame(defaultDisplayFrame) {};
-
- uint32_t format;
- uint32_t transform;
- int32_t blend;
- ColorFract color;
- float alpha;
- HwcTestDim sourceDim;
- struct hwc_rect sourceCrop;
- struct hwc_rect displayFrame;
-
- sp<GraphicBuffer> texture;
-};
-
-// Globals
-list<Rectangle> rectangle;
-static const int texUsage = GraphicBuffer::USAGE_HW_TEXTURE |
- GraphicBuffer::USAGE_SW_WRITE_RARELY;
-static hwc_composer_device_t *hwcDevice;
-static EGLDisplay dpy;
-static EGLSurface surface;
-static EGLint width, height;
-
-// Function prototypes
-static Rectangle parseRect(string rectStr);
-void init(void);
-void printSyntax(const char *cmd);
-
-// Command-line option settings
-static bool verbose = defaultVerbose;
-static float endDelay = defaultEndDelay;
-
-/*
- * Main
- *
- * Performs the following high-level sequence of operations:
- *
- * 1. Parse command-line options
- *
- * 2. Stop framework
- *
- * 3. Initialization
- *
- * 4. Parse frame descriptions
- *
- * 5. Create HWC list from frame descriptions
- *
- * 6. Have HWC render the list description of the frames
- *
- * 7. Delay for amount of time given by endDelay
- *
- * 8. Start framework
- */
-int
-main(int argc, char *argv[])
-{
- int rv, opt;
- char *chptr;
- bool error;
- string str;
- char cmd[MAXCMD];
-
- testSetLogCatTag(LOG_TAG);
-
- // Parse command line arguments
- while ((opt = getopt(argc, argv, "D:v?h")) != -1) {
- switch (opt) {
- case 'D': // End of test delay
- endDelay = strtod(optarg, &chptr);
- if ((*chptr != '\0') || (endDelay < 0.0)) {
- testPrintE("Invalid command-line specified end of test delay "
- "of: %s", optarg);
- exit(1);
- }
- break;
-
- case 'v': // Verbose
- verbose = true;
- break;
-
- case 'h': // Help
- case '?':
- default:
- printSyntax(basename(argv[0]));
- exit(((optopt == 0) || (optopt == '?')) ? 0 : 2);
- }
- }
-
- // Stop framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STOP_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_STOP_FRAMEWORK);
- exit(3);
- }
- testExecCmd(cmd);
- testDelay(1.0); // TODO - needs means to query whether asyncronous stop
- // framework operation has completed. For now, just wait
- // a long time.
-
- init();
-
- // Parse rectangle descriptions
- int numOpen = 0; // Current number of unmatched <[
- string rectDesc(""); // String description of a single rectangle
- while (optind < argc) {
- string argNext = string(argv[optind++]);
-
- if (rectDesc.length()) { rectDesc += ' '; }
- rectDesc += argNext;
-
- // Count number of opening <[ and matching >]
- // At this point not worried about an opening character being
- // matched by it's corresponding closing character. For example,
- // "<1.0, 2.0]" is incorrect because the opening < should be matched
- // with a closing >, instead of the closing ]. Such errors are
- // detected when the actual value is parsed.
- for (unsigned int n1 = 0; n1 < argNext.length(); n1++) {
- switch(argNext[n1]) {
- case '[':
- case '<':
- numOpen++;
- break;
-
- case ']':
- case '>':
- numOpen--;
- break;
- }
-
- // Error anytime there is more closing then opening characters
- if (numOpen < 0) {
- testPrintI("Mismatched number of opening <[ with "
- "closing >] in: %s", rectDesc.c_str());
- exit(4);
- }
- }
-
- // Description of a rectangle is complete when all opening
- // <[ are closed with >] and the string ends with a comma or
- // there are no more args.
- if ((numOpen == 0) && rectDesc.length()
- && ((rectDesc[rectDesc.length() - 1] == ',')
- || (optind == argc))) {
- // Remove trailing comma if it is present
- if (rectDesc[rectDesc.length() - 1] == ',') {
- rectDesc.erase(rectDesc.length() - 1);
- }
-
- // Parse string description of rectangle
- Rectangle rect = parseRect(rectDesc);
-
- // Add to the list of rectangles
- rectangle.push_back(rect);
-
- // Prepare for description of another rectangle
- rectDesc = string("");
- }
- }
-
- // Create list of frames
- hwc_layer_list_t *list;
- list = hwcTestCreateLayerList(rectangle.size());
- if (list == NULL) {
- testPrintE("hwcTestCreateLayerList failed");
- exit(5);
- }
-
- hwc_layer_t *layer = &list->hwLayers[0];
- for (std::list<Rectangle>::iterator it = rectangle.begin();
- it != rectangle.end(); ++it, ++layer) {
- layer->handle = it->texture->handle;
- layer->blending = it->blend;
- layer->transform = it->transform;
- layer->sourceCrop = it->sourceCrop;
- layer->displayFrame = it->displayFrame;
-
- layer->visibleRegionScreen.numRects = 1;
- layer->visibleRegionScreen.rects = &layer->displayFrame;
- }
-
- // Perform prepare operation
- if (verbose) { testPrintI("Prepare:"); hwcTestDisplayList(list); }
- hwcDevice->prepare(hwcDevice, list);
- if (verbose) {
- testPrintI("Post Prepare:");
- hwcTestDisplayListPrepareModifiable(list);
- }
-
- // Turn off the geometry changed flag
- list->flags &= ~HWC_GEOMETRY_CHANGED;
-
- // Perform the set operation(s)
- if (verbose) {testPrintI("Set:"); }
- if (verbose) { hwcTestDisplayListHandles(list); }
- hwcDevice->set(hwcDevice, dpy, surface, list);
-
- testDelay(endDelay);
-
- // Start framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_START_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_START_FRAMEWORK);
- exit(6);
- }
- testExecCmd(cmd);
-
- return 0;
-}
-
-// Parse string description of rectangle and add it to list of rectangles
-// to be rendered.
-static Rectangle parseRect(string rectStr)
-{
- int rv;
- string str;
- bool error;
- istringstream in(rectStr);
- const struct hwcTestGraphicFormat *format;
- Rectangle rect;
- struct hwc_rect hwcRect;
-
- // Graphic Format
- in >> str;
- if (!in) {
- testPrintE("Error parsing format from: %s", rectStr.c_str());
- exit(20);
- }
- format = hwcTestGraphicFormatLookup(str.c_str());
- if (format == NULL) {
- testPrintE("Unknown graphic format in: %s", rectStr.c_str());
- exit(21);
- }
- rect.format = format->format;
-
- // Display Frame
- rect.displayFrame = hwcTestParseHwcRect(in, error);
- if (error) {
- testPrintE("Invalid display frame in: %s", rectStr.c_str());
- exit(22);
- }
-
- // Set default sourceDim and sourceCrop based on size of display frame.
- // Default is source size equal to the size of the display frame, with
- // the source crop being the entire size of the source frame.
- rect.sourceDim = HwcTestDim(rect.displayFrame.right
- - rect.displayFrame.left,
- rect.displayFrame.bottom
- - rect.displayFrame.top);
- rect.sourceCrop.left = 0;
- rect.sourceCrop.top = 0;
- rect.sourceCrop.right = rect.sourceDim.width();
- rect.sourceCrop.bottom = rect.sourceDim.height();
-
- // Optional settings
- while ((in.tellg() < (streampos) in.str().length())
- && (in.tellg() != (streampos) -1)) {
- string attrName;
-
- in >> attrName;
- if (in.eof()) { break; }
- if (!in) {
- testPrintE("Error reading attribute name in: %s",
- rectStr.c_str());
- exit(23);
- }
-
- // Transform
- if (attrName == "transform:") { // Transform
- string str;
-
- in >> str;
- if (str == "none") {
- rect.transform = 0;
- } else if (str == "fliph") {
- rect.transform = HWC_TRANSFORM_FLIP_H;
- } else if (str == "flipv") {
- rect.transform = HWC_TRANSFORM_FLIP_V;
- } else if (str == "rot90") {
- rect.transform = HWC_TRANSFORM_ROT_90;
- } else if (str == "rot180") {
- rect.transform = HWC_TRANSFORM_ROT_180;
- } else if (str == "rot270") {
- rect.transform = HWC_TRANSFORM_ROT_270;
- } else {
- testPrintE("Unknown transform of \"%s\" in: %s", str.c_str(),
- rectStr.c_str());
- exit(24);
- }
- } else if (attrName == "blend:") { // Blend
- string str;
-
- in >> str;
- if (str == string("none")) {
- rect.blend = HWC_BLENDING_NONE;
- } else if (str == "premult") {
- rect.blend = HWC_BLENDING_PREMULT;
- } else if (str == "coverage") {
- rect.blend = HWC_BLENDING_COVERAGE;
- } else {
- testPrintE("Unknown blend of \"%s\" in: %s", str.c_str(),
- rectStr.c_str());
- exit(25);
- }
- } else if (attrName == "color:") { // Color
- rect.color = hwcTestParseColor(in, error);
- if (error) {
- testPrintE("Error parsing color in: %s", rectStr.c_str());
- exit(26);
- }
- } else if (attrName == "alpha:") { // Alpha
- in >> rect.alpha;
- if (!in) {
- testPrintE("Error parsing value for alpha attribute in: %s",
- rectStr.c_str());
- exit(27);
- }
- } else if (attrName == "sourceDim:") { // Source Dimension
- rect.sourceDim = hwcTestParseDim(in, error);
- if (error) {
- testPrintE("Error parsing source dimenision in: %s",
- rectStr.c_str());
- exit(28);
- }
- } else if (attrName == "sourceCrop:") { // Source Crop
- rect.sourceCrop = hwcTestParseHwcRect(in, error);
- if (error) {
- testPrintE("Error parsing source crop in: %s",
- rectStr.c_str());
- exit(29);
- }
- } else { // Unknown attribute
- testPrintE("Unknown attribute of \"%s\" in: %s", attrName.c_str(),
- rectStr.c_str());
- exit(30);
- }
- }
-
- // Validate
- if (((uint32_t) rect.sourceCrop.left >= rect.sourceDim.width())
- || ((uint32_t) rect.sourceCrop.right > rect.sourceDim.width())
- || ((uint32_t) rect.sourceCrop.top >= rect.sourceDim.height())
- || ((uint32_t) rect.sourceCrop.bottom > rect.sourceDim.height())) {
- testPrintE("Invalid source crop in: %s", rectStr.c_str());
- exit(31);
- }
- if ((rect.displayFrame.left >= width)
- || (rect.displayFrame.right > width)
- || (rect.displayFrame.top >= height)
- || (rect.displayFrame.bottom > height)) {
- testPrintE("Invalid display frame in: %s", rectStr.c_str());
- exit(32);
- }
- if ((rect.alpha < 0.0) || (rect.alpha > 1.0)) {
- testPrintE("Invalid alpha in: %s", rectStr.c_str());
- exit(33);
- }
-
- // Create source texture
- rect.texture = new GraphicBuffer(rect.sourceDim.width(),
- rect.sourceDim.height(),
- rect.format, texUsage);
- if ((rv = rect.texture->initCheck()) != NO_ERROR) {
- testPrintE("source texture initCheck failed, rv: %i", rv);
- testPrintE(" %s", rectStr.c_str());
-
- }
-
- // Fill with uniform color
- hwcTestFillColor(rect.texture.get(), rect.color, rect.alpha);
- if (verbose) {
- testPrintI(" buf: %p handle: %p format: %s width: %u height: %u "
- "color: %s alpha: %f",
- rect.texture.get(), rect.texture->handle, format->desc,
- rect.sourceDim.width(), rect.sourceDim.height(),
- string(rect.color).c_str(), rect.alpha);
- }
-
- return rect;
-}
-
-void init(void)
-{
- // Seed pseudo random number generator
- // Needed so that the pad areas of frames are filled with a deterministic
- // pseudo random value.
- srand48(0);
-
- hwcTestInitDisplay(verbose, &dpy, &surface, &width, &height);
-
- hwcTestOpenHwc(&hwcDevice);
-}
-
-void printSyntax(const char *cmd)
-{
- testPrintE(" %s [options] (graphicFormat displayFrame [attributes],)...",
- cmd);
- testPrintE(" options:");
- testPrintE(" -D End of test delay");
- testPrintE(" -v Verbose");
- testPrintE("");
- testPrintE(" graphic formats:");
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- testPrintE(" %s", hwcTestGraphicFormat[n1].desc);
- }
- testPrintE("");
- testPrintE(" displayFrame");
- testPrintE(" [left, top, right, bottom]");
- testPrintE("");
- testPrintE(" attributes:");
- testPrintE(" transform: none | fliph | flipv | rot90 | rot180 "
- " | rot270");
- testPrintE(" blend: none | premult | coverage");
- testPrintE(" color: [0.##, 0.##, 0.##]");
- testPrintE(" alpha: 0.##");
- testPrintE(" sourceDim: [width, height]");
- testPrintE(" sourceCrop: [left, top, right, bottom]");
- testPrintE("");
- testPrintE(" Example:");
- testPrintE(" # White YV12 rectangle, with overlapping turquoise ");
- testPrintE(" # RGBA8888 rectangle at 30%% (alpha: 0.7) transparency");
- testPrintE(" %s -v -D 30.0 \\", cmd);
- testPrintE(" YV12 [50, 80, 200, 300] transform: none \\");
- testPrintE(" color: [1.0, 0.5, 0.5], \\");
- testPrintE(" RGBA8888 [100, 150, 300, 400] blend: coverage \\");
- testPrintE(" color: [0.251, 0.878, 0.816] alpha: 0.7 \\");
- testPrintE(" sourceDim: [50, 60] sourceCrop: [5, 8, 12, 15]");
-}
diff --git a/opengl/tests/hwc/hwcStress.cpp b/opengl/tests/hwc/hwcStress.cpp
deleted file mode 100644
index b02a424..0000000
--- a/opengl/tests/hwc/hwcStress.cpp
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- *
- */
-
-/*
- * Hardware Composer stress test
- *
- * Performs a pseudo-random (prandom) sequence of operations to the
- * Hardware Composer (HWC), for a specified number of passes or for
- * a specified period of time. By default the period of time is FLT_MAX,
- * so that the number of passes will take precedence.
- *
- * The passes are grouped together, where (pass / passesPerGroup) specifies
- * which group a particular pass is in. This causes every passesPerGroup
- * worth of sequential passes to be within the same group. Computationally
- * intensive operations are performed just once at the beginning of a group
- * of passes and then used by all the passes in that group. This is done
- * so as to increase both the average and peak rate of graphic operations,
- * by moving computationally intensive operations to the beginning of a group.
- * In particular, at the start of each group of passes a set of
- * graphic buffers are created, then used by the first and remaining
- * passes of that group of passes.
- *
- * The per-group initialization of the graphic buffers is performed
- * by a function called initFrames. This function creates an array
- * of smart pointers to the graphic buffers, in the form of a vector
- * of vectors. The array is accessed in row major order, so each
- * row is a vector of smart pointers. All the pointers of a single
- * row point to graphic buffers which use the same pixel format and
- * have the same dimension, although it is likely that each one is
- * filled with a different color. This is done so that after doing
- * the first HWC prepare then set call, subsequent set calls can
- * be made with each of the layer handles changed to a different
- * graphic buffer within the same row. Since the graphic buffers
- * in a particular row have the same pixel format and dimension,
- * additional HWC set calls can be made, without having to perform
- * an HWC prepare call.
- *
- * This test supports the following command-line options:
- *
- * -v Verbose
- * -s num Starting pass
- * -e num Ending pass
- * -p num Execute the single pass specified by num
- * -n num Number of set operations to perform after each prepare operation
- * -t float Maximum time in seconds to execute the test
- * -d float Delay in seconds performed after each set operation
- * -D float Delay in seconds performed after the last pass is executed
- *
- * Typically the test is executed for a large range of passes. By default
- * passes 0 through 99999 (100,000 passes) are executed. Although this test
- * does not validate the generated image, at times it is useful to reexecute
- * a particular pass and leave the displayed image on the screen for an
- * extended period of time. This can be done either by setting the -s
- * and -e options to the desired pass, along with a large value for -D.
- * This can also be done via the -p option, again with a large value for
- * the -D options.
- *
- * So far this test only contains code to create graphic buffers with
- * a continuous solid color. Although this test is unable to validate the
- * image produced, any image that contains other than rectangles of a solid
- * color are incorrect. Note that the rectangles may use a transparent
- * color and have a blending operation that causes the color in overlapping
- * rectangles to be mixed. In such cases the overlapping portions may have
- * a different color from the rest of the rectangle.
- */
-
-#include <algorithm>
-#include <assert.h>
-#include <cerrno>
-#include <cmath>
-#include <cstdlib>
-#include <ctime>
-#include <libgen.h>
-#include <sched.h>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-#include <vector>
-
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-
-#define LOG_TAG "hwcStressTest"
-#include <utils/Log.h>
-#include <testUtil.h>
-
-#include <hardware/hwcomposer.h>
-
-#include <glTestLib.h>
-#include "hwcTestLib.h"
-
-using namespace std;
-using namespace android;
-
-const float maxSizeRatio = 1.3; // Graphic buffers can be upto this munch
- // larger than the default screen size
-const unsigned int passesPerGroup = 10; // A group of passes all use the same
- // graphic buffers
-
-// Ratios at which rare and frequent conditions should be produced
-const float rareRatio = 0.1;
-const float freqRatio = 0.9;
-
-// Defaults for command-line options
-const bool defaultVerbose = false;
-const unsigned int defaultStartPass = 0;
-const unsigned int defaultEndPass = 99999;
-const unsigned int defaultPerPassNumSet = 10;
-const float defaultPerSetDelay = 0.0; // Default delay after each set
- // operation. Default delay of
- // zero used so as to perform the
- // the set operations as quickly
- // as possible.
-const float defaultEndDelay = 2.0; // Default delay between completion of
- // final pass and restart of framework
-const float defaultDuration = FLT_MAX; // A fairly long time, so that
- // range of passes will have
- // precedence
-
-// Command-line option settings
-static bool verbose = defaultVerbose;
-static unsigned int startPass = defaultStartPass;
-static unsigned int endPass = defaultEndPass;
-static unsigned int numSet = defaultPerPassNumSet;
-static float perSetDelay = defaultPerSetDelay;
-static float endDelay = defaultEndDelay;
-static float duration = defaultDuration;
-
-// Command-line mutual exclusion detection flags.
-// Corresponding flag set true once an option is used.
-bool eFlag, sFlag, pFlag;
-
-#define MAXSTR 100
-#define MAXCMD 200
-#define BITSPERBYTE 8 // TODO: Obtain from <values.h>, once
- // it has been added
-
-#define CMD_STOP_FRAMEWORK "stop 2>&1"
-#define CMD_START_FRAMEWORK "start 2>&1"
-
-#define NUMA(a) (sizeof(a) / sizeof(a [0]))
-#define MEMCLR(addr, size) do { \
- memset((addr), 0, (size)); \
- } while (0)
-
-// File scope constants
-const unsigned int blendingOps[] = {
- HWC_BLENDING_NONE,
- HWC_BLENDING_PREMULT,
- HWC_BLENDING_COVERAGE,
-};
-const unsigned int layerFlags[] = {
- HWC_SKIP_LAYER,
-};
-const vector<unsigned int> vecLayerFlags(layerFlags,
- layerFlags + NUMA(layerFlags));
-
-const unsigned int transformFlags[] = {
- HWC_TRANSFORM_FLIP_H,
- HWC_TRANSFORM_FLIP_V,
- HWC_TRANSFORM_ROT_90,
- // ROT_180 & ROT_270 intentionally not listed, because they
- // they are formed from combinations of the flags already listed.
-};
-const vector<unsigned int> vecTransformFlags(transformFlags,
- transformFlags + NUMA(transformFlags));
-
-// File scope globals
-static const int texUsage = GraphicBuffer::USAGE_HW_TEXTURE |
- GraphicBuffer::USAGE_SW_WRITE_RARELY;
-static hwc_composer_device_t *hwcDevice;
-static EGLDisplay dpy;
-static EGLSurface surface;
-static EGLint width, height;
-static vector <vector <sp<GraphicBuffer> > > frames;
-
-// File scope prototypes
-void init(void);
-void initFrames(unsigned int seed);
-template <class T> vector<T> vectorRandSelect(const vector<T>& vec, size_t num);
-template <class T> T vectorOr(const vector<T>& vec);
-
-/*
- * Main
- *
- * Performs the following high-level sequence of operations:
- *
- * 1. Command-line parsing
- *
- * 2. Initialization
- *
- * 3. For each pass:
- *
- * a. If pass is first pass or in a different group from the
- * previous pass, initialize the array of graphic buffers.
- *
- * b. Create a HWC list with room to specify a prandomly
- * selected number of layers.
- *
- * c. Select a subset of the rows from the graphic buffer array,
- * such that there is a unique row to be used for each
- * of the layers in the HWC list.
- *
- * d. Prandomly fill in the HWC list with handles
- * selected from any of the columns of the selected row.
- *
- * e. Pass the populated list to the HWC prepare call.
- *
- * f. Pass the populated list to the HWC set call.
- *
- * g. If additional set calls are to be made, then for each
- * additional set call, select a new set of handles and
- * perform the set call.
- */
-int
-main(int argc, char *argv[])
-{
- int rv, opt;
- char *chptr;
- unsigned int pass;
- char cmd[MAXCMD];
- struct timeval startTime, currentTime, delta;
-
- testSetLogCatTag(LOG_TAG);
-
- // Parse command line arguments
- while ((opt = getopt(argc, argv, "vp:d:D:n:s:e:t:?h")) != -1) {
- switch (opt) {
- case 'd': // Delay after each set operation
- perSetDelay = strtod(optarg, &chptr);
- if ((*chptr != '\0') || (perSetDelay < 0.0)) {
- testPrintE("Invalid command-line specified per pass delay of: "
- "%s", optarg);
- exit(1);
- }
- break;
-
- case 'D': // End of test delay
- // Delay between completion of final pass and restart
- // of framework
- endDelay = strtod(optarg, &chptr);
- if ((*chptr != '\0') || (endDelay < 0.0)) {
- testPrintE("Invalid command-line specified end of test delay "
- "of: %s", optarg);
- exit(2);
- }
- break;
-
- case 't': // Duration
- duration = strtod(optarg, &chptr);
- if ((*chptr != '\0') || (duration < 0.0)) {
- testPrintE("Invalid command-line specified duration of: %s",
- optarg);
- exit(3);
- }
- break;
-
- case 'n': // Num set operations per pass
- numSet = strtoul(optarg, &chptr, 10);
- if (*chptr != '\0') {
- testPrintE("Invalid command-line specified num set per pass "
- "of: %s", optarg);
- exit(4);
- }
- break;
-
- case 's': // Starting Pass
- sFlag = true;
- if (pFlag) {
- testPrintE("Invalid combination of command-line options.");
- testPrintE(" The -p option is mutually exclusive from the");
- testPrintE(" -s and -e options.");
- exit(5);
- }
- startPass = strtoul(optarg, &chptr, 10);
- if (*chptr != '\0') {
- testPrintE("Invalid command-line specified starting pass "
- "of: %s", optarg);
- exit(6);
- }
- break;
-
- case 'e': // Ending Pass
- eFlag = true;
- if (pFlag) {
- testPrintE("Invalid combination of command-line options.");
- testPrintE(" The -p option is mutually exclusive from the");
- testPrintE(" -s and -e options.");
- exit(7);
- }
- endPass = strtoul(optarg, &chptr, 10);
- if (*chptr != '\0') {
- testPrintE("Invalid command-line specified ending pass "
- "of: %s", optarg);
- exit(8);
- }
- break;
-
- case 'p': // Run a single specified pass
- pFlag = true;
- if (sFlag || eFlag) {
- testPrintE("Invalid combination of command-line options.");
- testPrintE(" The -p option is mutually exclusive from the");
- testPrintE(" -s and -e options.");
- exit(9);
- }
- startPass = endPass = strtoul(optarg, &chptr, 10);
- if (*chptr != '\0') {
- testPrintE("Invalid command-line specified pass of: %s",
- optarg);
- exit(10);
- }
- break;
-
- case 'v': // Verbose
- verbose = true;
- break;
-
- case 'h': // Help
- case '?':
- default:
- testPrintE(" %s [options]", basename(argv[0]));
- testPrintE(" options:");
- testPrintE(" -p Execute specified pass");
- testPrintE(" -s Starting pass");
- testPrintE(" -e Ending pass");
- testPrintE(" -t Duration");
- testPrintE(" -d Delay after each set operation");
- testPrintE(" -D End of test delay");
- testPrintE(" -n Num set operations per pass");
- testPrintE(" -v Verbose");
- exit(((optopt == 0) || (optopt == '?')) ? 0 : 11);
- }
- }
- if (endPass < startPass) {
- testPrintE("Unexpected ending pass before starting pass");
- testPrintE(" startPass: %u endPass: %u", startPass, endPass);
- exit(12);
- }
- if (argc != optind) {
- testPrintE("Unexpected command-line postional argument");
- testPrintE(" %s [-s start_pass] [-e end_pass] [-t duration]",
- basename(argv[0]));
- exit(13);
- }
- testPrintI("duration: %g", duration);
- testPrintI("startPass: %u", startPass);
- testPrintI("endPass: %u", endPass);
- testPrintI("numSet: %u", numSet);
-
- // Stop framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STOP_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_STOP_FRAMEWORK);
- exit(14);
- }
- testExecCmd(cmd);
- testDelay(1.0); // TODO - need means to query whether asyncronous stop
- // framework operation has completed. For now, just wait
- // a long time.
-
- init();
-
- // For each pass
- gettimeofday(&startTime, NULL);
- for (pass = startPass; pass <= endPass; pass++) {
- // Stop if duration of work has already been performed
- gettimeofday(&currentTime, NULL);
- delta = tvDelta(&startTime, &currentTime);
- if (tv2double(&delta) > duration) { break; }
-
- // Regenerate a new set of test frames when this pass is
- // either the first pass or is in a different group then
- // the previous pass. A group of passes are passes that
- // all have the same quotient when their pass number is
- // divided by passesPerGroup.
- if ((pass == startPass)
- || ((pass / passesPerGroup) != ((pass - 1) / passesPerGroup))) {
- initFrames(pass / passesPerGroup);
- }
-
- testPrintI("==== Starting pass: %u", pass);
-
- // Cause deterministic sequence of prandom numbers to be
- // generated for this pass.
- srand48(pass);
-
- hwc_layer_list_t *list;
- list = hwcTestCreateLayerList(testRandMod(frames.size()) + 1);
- if (list == NULL) {
- testPrintE("hwcTestCreateLayerList failed");
- exit(20);
- }
-
- // Prandomly select a subset of frames to be used by this pass.
- vector <vector <sp<GraphicBuffer> > > selectedFrames;
- selectedFrames = vectorRandSelect(frames, list->numHwLayers);
-
- // Any transform tends to create a layer that the hardware
- // composer is unable to support and thus has to leave for
- // SurfaceFlinger. Place heavy bias on specifying no transforms.
- bool noTransform = testRandFract() > rareRatio;
-
- for (unsigned int n1 = 0; n1 < list->numHwLayers; n1++) {
- unsigned int idx = testRandMod(selectedFrames[n1].size());
- sp<GraphicBuffer> gBuf = selectedFrames[n1][idx];
- hwc_layer_t *layer = &list->hwLayers[n1];
- layer->handle = gBuf->handle;
-
- layer->blending = blendingOps[testRandMod(NUMA(blendingOps))];
- layer->flags = (testRandFract() > rareRatio) ? 0
- : vectorOr(vectorRandSelect(vecLayerFlags,
- testRandMod(vecLayerFlags.size() + 1)));
- layer->transform = (noTransform || testRandFract() > rareRatio) ? 0
- : vectorOr(vectorRandSelect(vecTransformFlags,
- testRandMod(vecTransformFlags.size() + 1)));
- layer->sourceCrop.left = testRandMod(gBuf->getWidth());
- layer->sourceCrop.top = testRandMod(gBuf->getHeight());
- layer->sourceCrop.right = layer->sourceCrop.left
- + testRandMod(gBuf->getWidth() - layer->sourceCrop.left) + 1;
- layer->sourceCrop.bottom = layer->sourceCrop.top
- + testRandMod(gBuf->getHeight() - layer->sourceCrop.top) + 1;
- layer->displayFrame.left = testRandMod(width);
- layer->displayFrame.top = testRandMod(height);
- layer->displayFrame.right = layer->displayFrame.left
- + testRandMod(width - layer->displayFrame.left) + 1;
- layer->displayFrame.bottom = layer->displayFrame.top
- + testRandMod(height - layer->displayFrame.top) + 1;
-
- // Increase the frequency that a scale factor of 1.0 from
- // the sourceCrop to displayFrame occurs. This is the
- // most common scale factor used by applications and would
- // be rarely produced by this stress test without this
- // logic.
- if (testRandFract() <= freqRatio) {
- // Only change to scale factor to 1.0 if both the
- // width and height will fit.
- int sourceWidth = layer->sourceCrop.right
- - layer->sourceCrop.left;
- int sourceHeight = layer->sourceCrop.bottom
- - layer->sourceCrop.top;
- if (((layer->displayFrame.left + sourceWidth) <= width)
- && ((layer->displayFrame.top + sourceHeight) <= height)) {
- layer->displayFrame.right = layer->displayFrame.left
- + sourceWidth;
- layer->displayFrame.bottom = layer->displayFrame.top
- + sourceHeight;
- }
- }
-
- layer->visibleRegionScreen.numRects = 1;
- layer->visibleRegionScreen.rects = &layer->displayFrame;
- }
-
- // Perform prepare operation
- if (verbose) { testPrintI("Prepare:"); hwcTestDisplayList(list); }
- hwcDevice->prepare(hwcDevice, list);
- if (verbose) {
- testPrintI("Post Prepare:");
- hwcTestDisplayListPrepareModifiable(list);
- }
-
- // Turn off the geometry changed flag
- list->flags &= ~HWC_GEOMETRY_CHANGED;
-
- // Perform the set operation(s)
- if (verbose) {testPrintI("Set:"); }
- for (unsigned int n1 = 0; n1 < numSet; n1++) {
- if (verbose) { hwcTestDisplayListHandles(list); }
- hwcDevice->set(hwcDevice, dpy, surface, list);
-
- // Prandomly select a new set of handles
- for (unsigned int n1 = 0; n1 < list->numHwLayers; n1++) {
- unsigned int idx = testRandMod(selectedFrames[n1].size());
- sp<GraphicBuffer> gBuf = selectedFrames[n1][idx];
- hwc_layer_t *layer = &list->hwLayers[n1];
- layer->handle = (native_handle_t *) gBuf->handle;
- }
-
- testDelay(perSetDelay);
- }
-
- hwcTestFreeLayerList(list);
- testPrintI("==== Completed pass: %u", pass);
- }
-
- testDelay(endDelay);
-
- // Start framework
- rv = snprintf(cmd, sizeof(cmd), "%s", CMD_START_FRAMEWORK);
- if (rv >= (signed) sizeof(cmd) - 1) {
- testPrintE("Command too long for: %s", CMD_START_FRAMEWORK);
- exit(21);
- }
- testExecCmd(cmd);
-
- testPrintI("Successfully completed %u passes", pass - startPass);
-
- return 0;
-}
-
-void init(void)
-{
- srand48(0); // Defensively set pseudo random number generator.
- // Should not need to set this, because a stress test
- // sets the seed on each pass. Defensively set it here
- // so that future code that uses pseudo random numbers
- // before the first pass will be deterministic.
-
- hwcTestInitDisplay(verbose, &dpy, &surface, &width, &height);
-
- hwcTestOpenHwc(&hwcDevice);
-}
-
-/*
- * Initialize Frames
- *
- * Creates an array of graphic buffers, within the global variable
- * named frames. The graphic buffers are contained within a vector of
- * vectors. All the graphic buffers in a particular row are of the same
- * format and dimension. Each graphic buffer is uniformly filled with a
- * prandomly selected color. It is likely that each buffer, even
- * in the same row, will be filled with a unique color.
- */
-void initFrames(unsigned int seed)
-{
- int rv;
- const size_t maxRows = 5;
- const size_t minCols = 2; // Need at least double buffering
- const size_t maxCols = 4; // One more than triple buffering
-
- if (verbose) { testPrintI("initFrames seed: %u", seed); }
- srand48(seed);
- size_t rows = testRandMod(maxRows) + 1;
-
- frames.clear();
- frames.resize(rows);
-
- for (unsigned int row = 0; row < rows; row++) {
- // All frames within a row have to have the same format and
- // dimensions. Width and height need to be >= 1.
- unsigned int formatIdx = testRandMod(NUMA(hwcTestGraphicFormat));
- const struct hwcTestGraphicFormat *formatPtr
- = &hwcTestGraphicFormat[formatIdx];
- int format = formatPtr->format;
-
- // Pick width and height, which must be >= 1 and the size
- // mod the wMod/hMod value must be equal to 0.
- size_t w = (width * maxSizeRatio) * testRandFract();
- size_t h = (height * maxSizeRatio) * testRandFract();
- w = max(1u, w);
- h = max(1u, h);
- if ((w % formatPtr->wMod) != 0) {
- w += formatPtr->wMod - (w % formatPtr->wMod);
- }
- if ((h % formatPtr->hMod) != 0) {
- h += formatPtr->hMod - (h % formatPtr->hMod);
- }
- if (verbose) {
- testPrintI(" frame %u width: %u height: %u format: %u %s",
- row, w, h, format, hwcTestGraphicFormat2str(format));
- }
-
- size_t cols = testRandMod((maxCols + 1) - minCols) + minCols;
- frames[row].resize(cols);
- for (unsigned int col = 0; col < cols; col++) {
- ColorFract color(testRandFract(), testRandFract(), testRandFract());
- float alpha = testRandFract();
-
- frames[row][col] = new GraphicBuffer(w, h, format, texUsage);
- if ((rv = frames[row][col]->initCheck()) != NO_ERROR) {
- testPrintE("GraphicBuffer initCheck failed, rv: %i", rv);
- testPrintE(" frame %u width: %u height: %u format: %u %s",
- row, w, h, format, hwcTestGraphicFormat2str(format));
- exit(80);
- }
-
- hwcTestFillColor(frames[row][col].get(), color, alpha);
- if (verbose) {
- testPrintI(" buf: %p handle: %p color: %s alpha: %f",
- frames[row][col].get(), frames[row][col]->handle,
- string(color).c_str(), alpha);
- }
- }
- }
-}
-
-/*
- * Vector Random Select
- *
- * Prandomly selects and returns num elements from vec.
- */
-template <class T>
-vector<T> vectorRandSelect(const vector<T>& vec, size_t num)
-{
- vector<T> rv = vec;
-
- while (rv.size() > num) {
- rv.erase(rv.begin() + testRandMod(rv.size()));
- }
-
- return rv;
-}
-
-/*
- * Vector Or
- *
- * Or's togethen the values of each element of vec and returns the result.
- */
-template <class T>
-T vectorOr(const vector<T>& vec)
-{
- T rv = 0;
-
- for (size_t n1 = 0; n1 < vec.size(); n1++) {
- rv |= vec[n1];
- }
-
- return rv;
-}
diff --git a/opengl/tests/hwc/hwcTestLib.cpp b/opengl/tests/hwc/hwcTestLib.cpp
deleted file mode 100644
index 28e0c3f..0000000
--- a/opengl/tests/hwc/hwcTestLib.cpp
+++ /dev/null
@@ -1,1030 +0,0 @@
-/*
- * 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.
- *
- */
-
-/*
- * Hardware Composer Test Library
- * Utility library functions for use by the Hardware Composer test cases
- */
-
-#include <sstream>
-#include <string>
-
-#include <arpa/inet.h> // For ntohl() and htonl()
-
-#include "hwcTestLib.h"
-
-#include "EGLUtils.h"
-
-// Defines
-#define NUMA(a) (sizeof(a) / sizeof(a [0]))
-
-// Function Prototypes
-static void printGLString(const char *name, GLenum s);
-static void checkEglError(const char* op, EGLBoolean returnVal = EGL_TRUE);
-static void checkGlError(const char* op);
-static void printEGLConfiguration(EGLDisplay dpy, EGLConfig config);
-
-using namespace std;
-using namespace android;
-
-
-#define BITSPERBYTE 8 // TODO: Obtain from <values.h>, once
- // it has been added
-
-// Initialize Display
-void hwcTestInitDisplay(bool verbose, EGLDisplay *dpy, EGLSurface *surface,
- EGLint *width, EGLint *height)
-{
- static EGLContext context;
-
- int rv;
-
- EGLBoolean returnValue;
- EGLConfig myConfig = {0};
- EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
- EGLint sConfigAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
- EGL_NONE };
- EGLint majorVersion, minorVersion;
-
- checkEglError("<init>");
- *dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- checkEglError("eglGetDisplay");
- if (*dpy == EGL_NO_DISPLAY) {
- testPrintE("eglGetDisplay returned EGL_NO_DISPLAY");
- exit(70);
- }
-
- returnValue = eglInitialize(*dpy, &majorVersion, &minorVersion);
- checkEglError("eglInitialize", returnValue);
- if (verbose) {
- testPrintI("EGL version %d.%d", majorVersion, minorVersion);
- }
- if (returnValue != EGL_TRUE) {
- testPrintE("eglInitialize failed");
- exit(71);
- }
-
- EGLNativeWindowType window = android_createDisplaySurface();
- if (window == NULL) {
- testPrintE("android_createDisplaySurface failed");
- exit(72);
- }
- returnValue = EGLUtils::selectConfigForNativeWindow(*dpy,
- sConfigAttribs, window, &myConfig);
- if (returnValue) {
- testPrintE("EGLUtils::selectConfigForNativeWindow() returned %d",
- returnValue);
- exit(73);
- }
- checkEglError("EGLUtils::selectConfigForNativeWindow");
-
- if (verbose) {
- testPrintI("Chose this configuration:");
- printEGLConfiguration(*dpy, myConfig);
- }
-
- *surface = eglCreateWindowSurface(*dpy, myConfig, window, NULL);
- checkEglError("eglCreateWindowSurface");
- if (*surface == EGL_NO_SURFACE) {
- testPrintE("gelCreateWindowSurface failed.");
- exit(74);
- }
-
- context = eglCreateContext(*dpy, myConfig, EGL_NO_CONTEXT, contextAttribs);
- checkEglError("eglCreateContext");
- if (context == EGL_NO_CONTEXT) {
- testPrintE("eglCreateContext failed");
- exit(75);
- }
- returnValue = eglMakeCurrent(*dpy, *surface, *surface, context);
- checkEglError("eglMakeCurrent", returnValue);
- if (returnValue != EGL_TRUE) {
- testPrintE("eglMakeCurrent failed");
- exit(76);
- }
- eglQuerySurface(*dpy, *surface, EGL_WIDTH, width);
- checkEglError("eglQuerySurface");
- eglQuerySurface(*dpy, *surface, EGL_HEIGHT, height);
- checkEglError("eglQuerySurface");
-
- if (verbose) {
- testPrintI("Window dimensions: %d x %d", *width, *height);
-
- printGLString("Version", GL_VERSION);
- printGLString("Vendor", GL_VENDOR);
- printGLString("Renderer", GL_RENDERER);
- printGLString("Extensions", GL_EXTENSIONS);
- }
-}
-
-// Open Hardware Composer Device
-void hwcTestOpenHwc(hwc_composer_device_t **hwcDevicePtr)
-{
- int rv;
- hw_module_t const *hwcModule;
-
- if ((rv = hw_get_module(HWC_HARDWARE_MODULE_ID, &hwcModule)) != 0) {
- testPrintE("hw_get_module failed, rv: %i", rv);
- errno = -rv;
- perror(NULL);
- exit(77);
- }
- if ((rv = hwc_open(hwcModule, hwcDevicePtr)) != 0) {
- testPrintE("hwc_open failed, rv: %i", rv);
- errno = -rv;
- perror(NULL);
- exit(78);
- }
-}
-
-// Color fraction class to string conversion
-ColorFract::operator string()
-{
- ostringstream out;
-
- out << '[' << this->c1() << ", "
- << this->c2() << ", "
- << this->c3() << ']';
-
- return out.str();
-}
-
-// Dimension class to string conversion
-HwcTestDim::operator string()
-{
- ostringstream out;
-
- out << '[' << this->width() << ", "
- << this->height() << ']';
-
- return out.str();
-}
-
-// Dimension class to hwc_rect conversion
-HwcTestDim::operator hwc_rect() const
-{
- hwc_rect rect;
-
- rect.left = rect.top = 0;
-
- rect.right = this->_w;
- rect.bottom = this->_h;
-
- return rect;
-}
-
-// Hardware Composer rectangle to string conversion
-string hwcTestRect2str(const struct hwc_rect& rect)
-{
- ostringstream out;
-
- out << '[';
- out << rect.left << ", ";
- out << rect.top << ", ";
- out << rect.right << ", ";
- out << rect.bottom;
- out << ']';
-
- return out.str();
-}
-
-// Parse HWC rectangle description of form [left, top, right, bottom]
-struct hwc_rect hwcTestParseHwcRect(istringstream& in, bool& error)
-{
- struct hwc_rect rect;
- char chStart, ch;
-
- // Defensively specify that an error occurred. Will clear
- // error flag if all of parsing succeeds.
- error = true;
-
- // First character should be a [ or <
- in >> chStart;
- if (!in || ((chStart != '<') && (chStart != '['))) { return rect; }
-
- // Left
- in >> rect.left;
- if (!in) { return rect; }
- in >> ch;
- if (!in || (ch != ',')) { return rect; }
-
- // Top
- in >> rect.top;
- if (!in) { return rect; }
- in >> ch;
- if (!in || (ch != ',')) { return rect; }
-
- // Right
- in >> rect.right;
- if (!in) { return rect; }
- in >> ch;
- if (!in || (ch != ',')) { return rect; }
-
- // Bottom
- in >> rect.bottom;
- if (!in) { return rect; }
-
- // Closing > or ]
- in >> ch;
- if (!in) { return rect; }
- if (((chStart == '<') && (ch != '>'))
- || ((chStart == '[') && (ch != ']'))) { return rect; }
-
- // Validate right and bottom are greater than left and top
- if ((rect.right <= rect.left) || (rect.bottom <= rect.top)) { return rect; }
-
- // Made It, clear error indicator
- error = false;
-
- return rect;
-}
-
-// Parse dimension of form [width, height]
-HwcTestDim hwcTestParseDim(istringstream& in, bool& error)
-{
- HwcTestDim dim;
- char chStart, ch;
- uint32_t val;
-
- // Defensively specify that an error occurred. Will clear
- // error flag if all of parsing succeeds.
- error = true;
-
- // First character should be a [ or <
- in >> chStart;
- if (!in || ((chStart != '<') && (chStart != '['))) { return dim; }
-
- // Width
- in >> val;
- if (!in) { return dim; }
- dim.setWidth(val);
- in >> ch;
- if (!in || (ch != ',')) { return dim; }
-
- // Height
- in >> val;
- if (!in) { return dim; }
- dim.setHeight(val);
-
- // Closing > or ]
- in >> ch;
- if (!in) { return dim; }
- if (((chStart == '<') && (ch != '>'))
- || ((chStart == '[') && (ch != ']'))) { return dim; }
-
- // Validate width and height greater than 0
- if ((dim.width() <= 0) || (dim.height() <= 0)) { return dim; }
-
- // Made It, clear error indicator
- error = false;
- return dim;
-}
-
-// Parse fractional color of form [0.##, 0.##, 0.##]
-// Fractional values can be from 0.0 to 1.0 inclusive. Note, integer
-// values of 0.0 and 1.0, which are non-fractional, are considered valid.
-// They are an exception, all other valid inputs are fractions.
-ColorFract hwcTestParseColor(istringstream& in, bool& error)
-{
- ColorFract color;
- char chStart, ch;
- float c1, c2, c3;
-
- // Defensively specify that an error occurred. Will clear
- // error flag if all of parsing succeeds.
- error = true;
-
- // First character should be a [ or <
- in >> chStart;
- if (!in || ((chStart != '<') && (chStart != '['))) { return color; }
-
- // 1st Component
- in >> c1;
- if (!in) { return color; }
- if ((c1 < 0.0) || (c1 > 1.0)) { return color; }
- in >> ch;
- if (!in || (ch != ',')) { return color; }
-
- // 2nd Component
- in >> c2;
- if (!in) { return color; }
- if ((c2 < 0.0) || (c2 > 1.0)) { return color; }
- in >> ch;
- if (!in || (ch != ',')) { return color; }
-
- // 3rd Component
- in >> c3;
- if (!in) { return color; }
- if ((c3 < 0.0) || (c3 > 1.0)) { return color; }
-
- // Closing > or ]
- in >> ch;
- if (!in) { return color; }
- if (((chStart == '<') && (ch != '>'))
- || ((chStart == '[') && (ch != ']'))) { return color; }
-
- // Are all the components fractional
- if ((c1 < 0.0) || (c1 > 1.0)
- || (c2 < 0.0) || (c2 > 1.0)
- || (c3 < 0.0) || (c3 > 1.0)) { return color; }
-
- // Made It, clear error indicator
- error = false;
-
- return ColorFract(c1, c2, c3);
-}
-
-// Look up and return pointer to structure with the characteristics
-// of the graphic format named by the desc parameter. Search failure
-// indicated by the return of NULL.
-const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(const char *desc)
-{
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- if (string(desc) == string(hwcTestGraphicFormat[n1].desc)) {
- return &hwcTestGraphicFormat[n1];
- }
- }
-
- return NULL;
-}
-
-// Look up and return pointer to structure with the characteristics
-// of the graphic format specified by the id parameter. Search failure
-// indicated by the return of NULL.
-const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(uint32_t id)
-{
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- if (id == hwcTestGraphicFormat[n1].format) {
- return &hwcTestGraphicFormat[n1];
- }
- }
-
- return NULL;
-}
-
-
-// Given the integer ID of a graphic format, return a pointer to
-// a string that describes the format.
-const char *hwcTestGraphicFormat2str(uint32_t format)
-{
- const static char *unknown = "unknown";
-
- for (unsigned int n1 = 0; n1 < NUMA(hwcTestGraphicFormat); n1++) {
- if (format == hwcTestGraphicFormat[n1].format) {
- return hwcTestGraphicFormat[n1].desc;
- }
- }
-
- return unknown;
-}
-
-/*
- * hwcTestCreateLayerList
- * Dynamically creates layer list with numLayers worth
- * of hwLayers entries.
- */
-hwc_layer_list_t *hwcTestCreateLayerList(size_t numLayers)
-{
- hwc_layer_list_t *list;
-
- size_t size = sizeof(hwc_layer_list) + numLayers * sizeof(hwc_layer_t);
- if ((list = (hwc_layer_list_t *) calloc(1, size)) == NULL) {
- return NULL;
- }
- list->flags = HWC_GEOMETRY_CHANGED;
- list->numHwLayers = numLayers;
-
- return list;
-}
-
-/*
- * hwcTestFreeLayerList
- * Frees memory previous allocated via hwcTestCreateLayerList().
- */
-void hwcTestFreeLayerList(hwc_layer_list_t *list)
-{
- free(list);
-}
-
-// Display the settings of the layer list pointed to by list
-void hwcTestDisplayList(hwc_layer_list_t *list)
-{
- testPrintI(" flags: %#x%s", list->flags,
- (list->flags & HWC_GEOMETRY_CHANGED) ? " GEOMETRY_CHANGED" : "");
- testPrintI(" numHwLayers: %u", list->numHwLayers);
-
- for (unsigned int layer = 0; layer < list->numHwLayers; layer++) {
- testPrintI(" layer %u compositionType: %#x%s%s", layer,
- list->hwLayers[layer].compositionType,
- (list->hwLayers[layer].compositionType == HWC_FRAMEBUFFER)
- ? " FRAMEBUFFER" : "",
- (list->hwLayers[layer].compositionType == HWC_OVERLAY)
- ? " OVERLAY" : "");
-
- testPrintI(" hints: %#x",
- list->hwLayers[layer].hints,
- (list->hwLayers[layer].hints & HWC_HINT_TRIPLE_BUFFER)
- ? " TRIPLE_BUFFER" : "",
- (list->hwLayers[layer].hints & HWC_HINT_CLEAR_FB)
- ? " CLEAR_FB" : "");
-
- testPrintI(" flags: %#x%s",
- list->hwLayers[layer].flags,
- (list->hwLayers[layer].flags & HWC_SKIP_LAYER)
- ? " SKIP_LAYER" : "");
-
- testPrintI(" handle: %p",
- list->hwLayers[layer].handle);
-
- // Intentionally skipped display of ROT_180 & ROT_270,
- // which are formed from combinations of the other flags.
- testPrintI(" transform: %#x%s%s%s",
- list->hwLayers[layer].transform,
- (list->hwLayers[layer].transform & HWC_TRANSFORM_FLIP_H)
- ? " FLIP_H" : "",
- (list->hwLayers[layer].transform & HWC_TRANSFORM_FLIP_V)
- ? " FLIP_V" : "",
- (list->hwLayers[layer].transform & HWC_TRANSFORM_ROT_90)
- ? " ROT_90" : "");
-
- testPrintI(" blending: %#x%s%s%s",
- list->hwLayers[layer].blending,
- (list->hwLayers[layer].blending == HWC_BLENDING_NONE)
- ? " NONE" : "",
- (list->hwLayers[layer].blending == HWC_BLENDING_PREMULT)
- ? " PREMULT" : "",
- (list->hwLayers[layer].blending == HWC_BLENDING_COVERAGE)
- ? " COVERAGE" : "");
-
- testPrintI(" sourceCrop: %s",
- hwcTestRect2str(list->hwLayers[layer].sourceCrop).c_str());
- testPrintI(" displayFrame: %s",
- hwcTestRect2str(list->hwLayers[layer].displayFrame).c_str());
- testPrintI(" scaleFactor: [%f, %f]",
- (float) (list->hwLayers[layer].sourceCrop.right
- - list->hwLayers[layer].sourceCrop.left)
- / (float) (list->hwLayers[layer].displayFrame.right
- - list->hwLayers[layer].displayFrame.left),
- (float) (list->hwLayers[layer].sourceCrop.bottom
- - list->hwLayers[layer].sourceCrop.top)
- / (float) (list->hwLayers[layer].displayFrame.bottom
- - list->hwLayers[layer].displayFrame.top));
- }
-}
-
-/*
- * Display List Prepare Modifiable
- *
- * Displays the portions of a list that are meant to be modified by
- * a prepare call.
- */
-void hwcTestDisplayListPrepareModifiable(hwc_layer_list_t *list)
-{
- uint32_t numOverlays = 0;
- for (unsigned int layer = 0; layer < list->numHwLayers; layer++) {
- if (list->hwLayers[layer].compositionType == HWC_OVERLAY) {
- numOverlays++;
- }
- testPrintI(" layer %u compositionType: %#x%s%s", layer,
- list->hwLayers[layer].compositionType,
- (list->hwLayers[layer].compositionType == HWC_FRAMEBUFFER)
- ? " FRAMEBUFFER" : "",
- (list->hwLayers[layer].compositionType == HWC_OVERLAY)
- ? " OVERLAY" : "");
- testPrintI(" hints: %#x%s%s",
- list->hwLayers[layer].hints,
- (list->hwLayers[layer].hints & HWC_HINT_TRIPLE_BUFFER)
- ? " TRIPLE_BUFFER" : "",
- (list->hwLayers[layer].hints & HWC_HINT_CLEAR_FB)
- ? " CLEAR_FB" : "");
- }
- testPrintI(" numOverlays: %u", numOverlays);
-}
-
-/*
- * Display List Handles
- *
- * Displays the handles of all the graphic buffers in the list.
- */
-void hwcTestDisplayListHandles(hwc_layer_list_t *list)
-{
- const unsigned int maxLayersPerLine = 6;
-
- ostringstream str(" layers:");
- for (unsigned int layer = 0; layer < list->numHwLayers; layer++) {
- str << ' ' << list->hwLayers[layer].handle;
- if (((layer % maxLayersPerLine) == (maxLayersPerLine - 1))
- && (layer != list->numHwLayers - 1)) {
- testPrintI("%s", str.str().c_str());
- str.str(" ");
- }
- }
- testPrintI("%s", str.str().c_str());
-}
-
-// Returns a uint32_t that contains a format specific representation of a
-// single pixel of the given color and alpha values.
-uint32_t hwcTestColor2Pixel(uint32_t format, ColorFract color, float alpha)
-{
- const struct attrib {
- uint32_t format;
- bool hostByteOrder;
- size_t bytes;
- size_t c1Offset;
- size_t c1Size;
- size_t c2Offset;
- size_t c2Size;
- size_t c3Offset;
- size_t c3Size;
- size_t aOffset;
- size_t aSize;
- } attributes[] = {
- {HAL_PIXEL_FORMAT_RGBA_8888, false, 4, 0, 8, 8, 8, 16, 8, 24, 8},
- {HAL_PIXEL_FORMAT_RGBX_8888, false, 4, 0, 8, 8, 8, 16, 8, 0, 0},
- {HAL_PIXEL_FORMAT_RGB_888, false, 3, 0, 8, 8, 8, 16, 8, 0, 0},
- {HAL_PIXEL_FORMAT_RGB_565, true, 2, 0, 5, 5, 6, 11, 5, 0, 0},
- {HAL_PIXEL_FORMAT_BGRA_8888, false, 4, 16, 8, 8, 8, 0, 8, 24, 8},
- {HAL_PIXEL_FORMAT_RGBA_5551, true , 2, 0, 5, 5, 5, 10, 5, 15, 1},
- {HAL_PIXEL_FORMAT_RGBA_4444, false, 2, 12, 4, 0, 4, 4, 4, 8, 4},
- {HAL_PIXEL_FORMAT_YV12, true, 3, 16, 8, 8, 8, 0, 8, 0, 0},
- };
-
- const struct attrib *attrib;
- for (attrib = attributes; attrib < attributes + NUMA(attributes);
- attrib++) {
- if (attrib->format == format) { break; }
- }
- if (attrib >= attributes + NUMA(attributes)) {
- testPrintE("colorFract2Pixel unsupported format of: %u", format);
- exit(80);
- }
-
- uint32_t pixel;
- pixel = htonl((uint32_t) round((((1 << attrib->c1Size) - 1) * color.c1()))
- << ((sizeof(pixel) * BITSPERBYTE)
- - (attrib->c1Offset + attrib->c1Size)));
- pixel |= htonl((uint32_t) round((((1 << attrib->c2Size) - 1) * color.c2()))
- << ((sizeof(pixel) * BITSPERBYTE)
- - (attrib->c2Offset + attrib->c2Size)));
- pixel |= htonl((uint32_t) round((((1 << attrib->c3Size) - 1) * color.c3()))
- << ((sizeof(pixel) * BITSPERBYTE)
- - (attrib->c3Offset + attrib->c3Size)));
- if (attrib->aSize) {
- pixel |= htonl((uint32_t) round((((1 << attrib->aSize) - 1) * alpha))
- << ((sizeof(pixel) * BITSPERBYTE)
- - (attrib->aOffset + attrib->aSize)));
- }
- if (attrib->hostByteOrder) {
- pixel = ntohl(pixel);
- pixel >>= sizeof(pixel) * BITSPERBYTE - attrib->bytes * BITSPERBYTE;
- }
-
- return pixel;
-}
-
-// Sets the pixel at the given x and y coordinates to the color and alpha
-// value given by pixel. The contents of pixel is format specific. It's
-// value should come from a call to hwcTestColor2Pixel().
-void hwcTestSetPixel(GraphicBuffer *gBuf, unsigned char *buf,
- uint32_t x, uint32_t y, uint32_t pixel)
-{
-
- const struct attrib {
- int format;
- size_t bytes;
- } attributes[] = {
- {HAL_PIXEL_FORMAT_RGBA_8888, 4},
- {HAL_PIXEL_FORMAT_RGBX_8888, 4},
- {HAL_PIXEL_FORMAT_RGB_888, 3},
- {HAL_PIXEL_FORMAT_RGB_565, 2},
- {HAL_PIXEL_FORMAT_BGRA_8888, 4},
- {HAL_PIXEL_FORMAT_RGBA_5551, 2},
- {HAL_PIXEL_FORMAT_RGBA_4444, 2},
- };
-
- if (gBuf->getPixelFormat() == HAL_PIXEL_FORMAT_YV12) {
- uint32_t yPlaneOffset, uPlaneOffset, vPlaneOffset;
- uint32_t yPlaneStride = gBuf->getStride();
- uint32_t uPlaneStride = ((gBuf->getStride() / 2) + 0xf) & ~0xf;
- uint32_t vPlaneStride = uPlaneStride;
- yPlaneOffset = 0;
- vPlaneOffset = yPlaneOffset + yPlaneStride * gBuf->getHeight();
- uPlaneOffset = vPlaneOffset
- + vPlaneStride * (gBuf->getHeight() / 2);
- *(buf + yPlaneOffset + y * yPlaneStride + x) = pixel & 0xff;
- *(buf + uPlaneOffset + (y / 2) * uPlaneStride + (x / 2))
- = (pixel & 0xff00) >> 8;
- *(buf + vPlaneOffset + (y / 2) * vPlaneStride + (x / 2))
- = (pixel & 0xff0000) >> 16;
-
- return;
- }
-
- const struct attrib *attrib;
- for (attrib = attributes; attrib < attributes + NUMA(attributes);
- attrib++) {
- if (attrib->format == gBuf->getPixelFormat()) { break; }
- }
- if (attrib >= attributes + NUMA(attributes)) {
- testPrintE("setPixel unsupported format of: %u",
- gBuf->getPixelFormat());
- exit(90);
- }
-
- memmove(buf + ((gBuf->getStride() * attrib->bytes) * y)
- + (attrib->bytes * x), &pixel, attrib->bytes);
-}
-
-// Fill a given graphic buffer with a uniform color and alpha
-void hwcTestFillColor(GraphicBuffer *gBuf, ColorFract color, float alpha)
-{
- unsigned char* buf = NULL;
- status_t err;
- uint32_t pixel;
-
- pixel = hwcTestColor2Pixel(gBuf->getPixelFormat(), color, alpha);
-
- err = gBuf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf));
- if (err != 0) {
- testPrintE("hwcTestFillColor lock failed: %d", err);
- exit(100);
- }
-
- for (unsigned int x = 0; x < gBuf->getStride(); x++) {
- for (unsigned int y = 0; y < gBuf->getHeight(); y++) {
- uint32_t val = pixel;
- hwcTestSetPixel(gBuf, buf, x, y, (x < gBuf->getWidth())
- ? pixel : testRand());
- }
- }
-
- err = gBuf->unlock();
- if (err != 0) {
- testPrintE("hwcTestFillColor unlock failed: %d", err);
- exit(101);
- }
-}
-
-// Fill the given buffer with a horizontal blend of colors, with the left
-// side color given by startColor and the right side color given by
-// endColor. The startColor and endColor values are specified in the format
-// given by colorFormat, which might be different from the format of the
-// graphic buffer. When different, a color conversion is done when possible
-// to the graphic format of the graphic buffer. A color of black is
-// produced for cases where the conversion is impossible (e.g. out of gamut
-// values).
-void hwcTestFillColorHBlend(GraphicBuffer *gBuf, uint32_t colorFormat,
- ColorFract startColor, ColorFract endColor)
-{
- status_t err;
- unsigned char* buf = NULL;
- const uint32_t width = gBuf->getWidth();
- const uint32_t height = gBuf->getHeight();
- const uint32_t stride = gBuf->getStride();
-
- err = gBuf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf));
- if (err != 0) {
- testPrintE("hwcTestFillColorHBlend lock failed: %d", err);
- exit(110);
- }
-
- for (unsigned int x = 0; x < stride; x++) {
- uint32_t pixel;
- if (x < width) {
- ColorFract color(startColor.c1() + (endColor.c1() - startColor.c1())
- * ((float) x / (float) (width - 1)),
- startColor.c2() + (endColor.c2() - startColor.c2())
- * ((float) x / (float) (width - 1)),
- startColor.c3() + (endColor.c3() - startColor.c3())
- * ((float) x / (float) (width - 1)));
-
- // When formats differ, convert colors.
- // Important to not convert when formats are the same, since
- // out of gamut colors are always converted to black.
- if (colorFormat != (uint32_t) gBuf->getPixelFormat()) {
- hwcTestColorConvert(colorFormat, gBuf->getPixelFormat(), color);
- }
- pixel = hwcTestColor2Pixel(gBuf->getPixelFormat(), color, 1.0);
- } else {
- // Fill pad with random values
- pixel = testRand();
- }
-
- for (unsigned int y = 0; y < height; y++) {
- hwcTestSetPixel(gBuf, buf, x, y, pixel);
- }
- }
-
- err = gBuf->unlock();
- if (err != 0) {
- testPrintE("hwcTestFillColorHBlend unlock failed: %d", err);
- exit(111);
- }
-}
-
-/*
- * When possible, converts color specified as a full range value in
- * the fromFormat, into an equivalent full range color in the toFormat.
- * When conversion is impossible (e.g. out of gamut color) a color
- * or black in the full range output format is produced. The input
- * color is given as a fractional color in the parameter named color.
- * The produced color is written over the same parameter used to
- * provide the input color.
- *
- * Each graphic format has 3 color components and each of these
- * components has both a full and in gamut range. This function uses
- * a table that provides the full and in gamut ranges of each of the
- * supported graphic formats. The full range is given by members named
- * c[123]Min to c[123]Max, while the in gamut range is given by members
- * named c[123]Low to c[123]High. In most cases the full and in gamut
- * ranges are equivalent. This occurs when the c[123]Min == c[123]Low and
- * c[123]High == c[123]Max.
- *
- * The input and produced colors are both specified as a fractional amount
- * of the full range. The diagram below provides an overview of the
- * conversion process. The main steps are:
- *
- * 1. Produce black if the input color is out of gamut.
- *
- * 2. Convert the in gamut color into the fraction of the fromFromat
- * in gamut range.
- *
- * 3. Convert from the fraction of the in gamut from format range to
- * the fraction of the in gamut to format range. Produce black
- * if an equivalent color does not exists.
- *
- * 4. Covert from the fraction of the in gamut to format to the
- * fraction of the full range to format.
- *
- * From Format To Format
- * max high high max
- * ----+ +-----------+
- * high \ / \ high
- * ------\-------------+ +-------->
- * \
- * \ +--- black --+
- * \ / \
- * \ / +-->
- * low \ / low
- * -------- ---+-- black --+
- * min low low min
- * ^ ^ ^ ^ ^
- * | | | | |
- * | | | | +-- fraction of full range
- * | | | +-- fraction of valid range
- * | | +-- fromFormat to toFormat color conversion
- * | +-- fraction of valid range
- * +-- fraction of full range
- */
-void hwcTestColorConvert(uint32_t fromFormat, uint32_t toFormat,
- ColorFract& color)
-{
- const struct attrib {
- uint32_t format;
- bool rgb;
- bool yuv;
- int c1Min, c1Low, c1High, c1Max;
- int c2Min, c2Low, c2High, c2Max;
- int c3Min, c3Low, c3High, c3Max;
- } attributes[] = {
- {HAL_PIXEL_FORMAT_RGBA_8888, true, false,
- 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255},
- {HAL_PIXEL_FORMAT_RGBX_8888, true, false,
- 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255},
- {HAL_PIXEL_FORMAT_RGB_888, true, false,
- 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255},
- {HAL_PIXEL_FORMAT_RGB_565, true, false,
- 0, 0, 31, 31, 0, 0, 63, 63, 0, 0, 31, 31},
- {HAL_PIXEL_FORMAT_BGRA_8888, true, false,
- 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255},
- {HAL_PIXEL_FORMAT_RGBA_5551, true, false,
- 0, 0, 31, 31, 0, 0, 31, 31, 0, 0, 31, 31},
- {HAL_PIXEL_FORMAT_RGBA_4444, true, false,
- 0, 0, 15, 15, 0, 0, 15, 15, 0, 0, 15, 15},
- {HAL_PIXEL_FORMAT_YV12, false, true,
- 0, 16, 235, 255, 0, 16, 240, 255, 0, 16, 240, 255},
- };
-
- const struct attrib *fromAttrib;
- for (fromAttrib = attributes; fromAttrib < attributes + NUMA(attributes);
- fromAttrib++) {
- if (fromAttrib->format == fromFormat) { break; }
- }
- if (fromAttrib >= attributes + NUMA(attributes)) {
- testPrintE("hwcTestColorConvert unsupported from format of: %u",
- fromFormat);
- exit(120);
- }
-
- const struct attrib *toAttrib;
- for (toAttrib = attributes; toAttrib < attributes + NUMA(attributes);
- toAttrib++) {
- if (toAttrib->format == toFormat) { break; }
- }
- if (toAttrib >= attributes + NUMA(attributes)) {
- testPrintE("hwcTestColorConvert unsupported to format of: %u",
- toFormat);
- exit(121);
- }
-
- // Produce black if any of the from components are outside the
- // valid color range
- float c1Val = fromAttrib->c1Min
- + ((float) (fromAttrib->c1Max - fromAttrib->c1Min) * color.c1());
- float c2Val = fromAttrib->c2Min
- + ((float) (fromAttrib->c2Max - fromAttrib->c2Min) * color.c2());
- float c3Val = fromAttrib->c3Min
- + ((float) (fromAttrib->c3Max - fromAttrib->c3Min) * color.c3());
- if ((c1Val < fromAttrib->c1Low) || (c1Val > fromAttrib->c1High)
- || (c2Val < fromAttrib->c2Low) || (c2Val > fromAttrib->c2High)
- || (c3Val < fromAttrib->c3Low) || (c3Val > fromAttrib->c3High)) {
-
- // Return black
- // Will use representation of black from RGBA8888 graphic format
- // and recursively convert it to the requested graphic format.
- color = ColorFract(0.0, 0.0, 0.0);
- hwcTestColorConvert(HAL_PIXEL_FORMAT_RGBA_8888, toFormat, color);
- return;
- }
-
- // Within from format, convert from fraction of full range
- // to fraction of valid range
- color = ColorFract((c1Val - fromAttrib->c1Low)
- / (fromAttrib->c1High - fromAttrib->c1Low),
- (c2Val - fromAttrib->c2Low)
- / (fromAttrib->c2High - fromAttrib->c2Low),
- (c3Val - fromAttrib->c3Low)
- / (fromAttrib->c3High - fromAttrib->c3Low));
-
- // If needed perform RGB to YUV conversion
- float wr = 0.2126, wg = 0.7152, wb = 0.0722; // ITU709 recommended constants
- if (fromAttrib->rgb && toAttrib->yuv) {
- float r = color.c1(), g = color.c2(), b = color.c3();
- float y = wr * r + wg * g + wb * b;
- float u = 0.5 * ((b - y) / (1.0 - wb)) + 0.5;
- float v = 0.5 * ((r - y) / (1.0 - wr)) + 0.5;
-
- // Produce black if color is outside the YUV gamut
- if ((y < 0.0) || (y > 1.0)
- || (u < 0.0) || (u > 1.0)
- || (v < 0.0) || (v > 1.0)) {
- y = 0.0;
- u = v = 0.5;
- }
-
- color = ColorFract(y, u, v);
- }
-
- // If needed perform YUV to RGB conversion
- // Equations determined from the ITU709 equations for RGB to YUV
- // conversion, plus the following algebra:
- //
- // u = 0.5 * ((b - y) / (1.0 - wb)) + 0.5
- // 0.5 * ((b - y) / (1.0 - wb)) = u - 0.5
- // (b - y) / (1.0 - wb) = 2 * (u - 0.5)
- // b - y = 2 * (u - 0.5) * (1.0 - wb)
- // b = 2 * (u - 0.5) * (1.0 - wb) + y
- //
- // v = 0.5 * ((r -y) / (1.0 - wr)) + 0.5
- // 0.5 * ((r - y) / (1.0 - wr)) = v - 0.5
- // (r - y) / (1.0 - wr) = 2 * (v - 0.5)
- // r - y = 2 * (v - 0.5) * (1.0 - wr)
- // r = 2 * (v - 0.5) * (1.0 - wr) + y
- //
- // y = wr * r + wg * g + wb * b
- // wr * r + wg * g + wb * b = y
- // wg * g = y - wr * r - wb * b
- // g = (y - wr * r - wb * b) / wg
- if (fromAttrib->yuv && toAttrib->rgb) {
- float y = color.c1(), u = color.c2(), v = color.c3();
- float r = 2.0 * (v - 0.5) * (1.0 - wr) + y;
- float b = 2.0 * (u - 0.5) * (1.0 - wb) + y;
- float g = (y - wr * r - wb * b) / wg;
-
- // Produce black if color is outside the RGB gamut
- if ((r < 0.0) || (r > 1.0)
- || (g < 0.0) || (g > 1.0)
- || (b < 0.0) || (b > 1.0)) {
- r = g = b = 0.0;
- }
-
- color = ColorFract(r, g, b);
- }
-
- // Within to format, convert from fraction of valid range
- // to fraction of full range
- c1Val = (toAttrib->c1Low
- + (float) (toAttrib->c1High - toAttrib->c1Low) * color.c1());
- c2Val = (toAttrib->c1Low
- + (float) (toAttrib->c2High - toAttrib->c2Low) * color.c2());
- c3Val = (toAttrib->c1Low
- + (float) (toAttrib->c3High - toAttrib->c3Low) * color.c3());
- color = ColorFract((float) (c1Val - toAttrib->c1Min)
- / (float) (toAttrib->c1Max - toAttrib->c1Min),
- (float) (c2Val - toAttrib->c2Min)
- / (float) (toAttrib->c2Max - toAttrib->c2Min),
- (float) (c3Val - toAttrib->c3Min)
- / (float) (toAttrib->c3Max - toAttrib->c3Min));
-}
-
-// TODO: Use PrintGLString, CechckGlError, and PrintEGLConfiguration
-// from libglTest
-static void printGLString(const char *name, GLenum s)
-{
- const char *v = (const char *) glGetString(s);
-
- if (v == NULL) {
- testPrintI("GL %s unknown", name);
- } else {
- testPrintI("GL %s = %s", name, v);
- }
-}
-
-static void checkEglError(const char* op, EGLBoolean returnVal)
-{
- if (returnVal != EGL_TRUE) {
- testPrintE("%s() returned %d", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- testPrintE("after %s() eglError %s (0x%x)",
- op, EGLUtils::strerror(error), error);
- }
-}
-
-static void checkGlError(const char* op)
-{
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- testPrintE("after %s() glError (0x%x)", op, error);
- }
-}
-
-static void printEGLConfiguration(EGLDisplay dpy, EGLConfig config)
-{
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute,
- &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- testPrintI(" %s: %d (%#x)", names[j].name, value, value);
- }
- }
- testPrintI("");
-}
diff --git a/opengl/tests/hwc/hwcTestLib.h b/opengl/tests/hwc/hwcTestLib.h
deleted file mode 100644
index b0c3012..0000000
--- a/opengl/tests/hwc/hwcTestLib.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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.
- *
- */
-
-/*
- * Hardware Composer Test Library Header
- */
-
-#include <sstream>
-#include <string>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <ui/GraphicBuffer.h>
-
-#include <utils/Log.h>
-#include <testUtil.h>
-
-#include <hardware/hwcomposer.h>
-
-// Characteristics of known graphic formats
-const struct hwcTestGraphicFormat {
- uint32_t format;
- const char *desc;
- uint32_t wMod, hMod; // Width/height mod this value must equal zero
-} hwcTestGraphicFormat[] = {
- {HAL_PIXEL_FORMAT_RGBA_8888, "RGBA8888", 1, 1},
- {HAL_PIXEL_FORMAT_RGBX_8888, "RGBX8888", 1, 1},
- {HAL_PIXEL_FORMAT_RGB_888, "RGB888", 1, 1},
- {HAL_PIXEL_FORMAT_RGB_565, "RGB565", 1, 1},
- {HAL_PIXEL_FORMAT_BGRA_8888, "BGRA8888", 1, 1},
- {HAL_PIXEL_FORMAT_RGBA_5551, "RGBA5551", 1, 1},
- {HAL_PIXEL_FORMAT_RGBA_4444, "RGBA4444", 1, 1},
- {HAL_PIXEL_FORMAT_YV12, "YV12", 2, 2},
-};
-
-// Represent RGB color as fraction of color components.
-// Each of the color components are expected in the range [0.0, 1.0]
-class ColorFract {
- public:
- ColorFract(): _c1(0.0), _c2(0.0), _c3(0.0) {};
- ColorFract(float c1, float c2, float c3): _c1(c1), _c2(c2), _c3(c3) {};
- float c1(void) const { return _c1; }
- float c2(void) const { return _c2; }
- float c3(void) const { return _c3; }
-
- operator std::string();
-
- private:
- float _c1;
- float _c2;
- float _c3;
-};
-
-// Represent RGB color as fraction of color components.
-// Each of the color components are expected in the range [0.0, 1.0]
-class ColorRGB {
- public:
- ColorRGB(): _r(0.0), _g(0.0), _b(0.0) {};
- ColorRGB(float f): _r(f), _g(f), _b(f) {}; // Gray
- ColorRGB(float r, float g, float b): _r(r), _g(g), _b(b) {};
- float r(void) const { return _r; }
- float g(void) const { return _g; }
- float b(void) const { return _b; }
-
- private:
- float _r;
- float _g;
- float _b;
-};
-
-// Dimension - width and height of a rectanguler area
-class HwcTestDim {
- public:
- HwcTestDim(): _w(0), _h(0) {};
- HwcTestDim(uint32_t w, uint32_t h) : _w(w), _h(h) {}
- uint32_t width(void) const { return _w; }
- uint32_t height(void) const { return _h; }
- void setWidth(uint32_t w) { _w = w; }
- void setHeight(uint32_t h) { _h = h; }
-
- operator std::string();
- operator hwc_rect() const;
-
- private:
- uint32_t _w;
- uint32_t _h;
-};
-
-// Function Prototypes
-void hwcTestInitDisplay(bool verbose, EGLDisplay *dpy, EGLSurface *surface,
- EGLint *width, EGLint *height);
-void hwcTestOpenHwc(hwc_composer_device_t **hwcDevicePtr);
-const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(const char *desc);
-const struct hwcTestGraphicFormat *hwcTestGraphicFormatLookup(uint32_t id);
-const char *hwcTestGraphicFormat2str(uint32_t format);
-std::string hwcTestRect2str(const struct hwc_rect& rect);
-
-hwc_layer_list_t *hwcTestCreateLayerList(size_t numLayers);
-void hwcTestFreeLayerList(hwc_layer_list_t *list);
-void hwcTestDisplayList(hwc_layer_list_t *list);
-void hwcTestDisplayListPrepareModifiable(hwc_layer_list_t *list);
-void hwcTestDisplayListHandles(hwc_layer_list_t *list);
-
-uint32_t hwcTestColor2Pixel(uint32_t format, ColorFract color, float alpha);
-void hwcTestColorConvert(uint32_t fromFormat, uint32_t toFormat,
- ColorFract& color);
-void hwcTestSetPixel(android::GraphicBuffer *gBuf, unsigned char *buf,
- uint32_t x, uint32_t y, uint32_t pixel);
-void hwcTestFillColor(android::GraphicBuffer *gBuf, ColorFract color,
- float alpha);
-void hwcTestFillColorHBlend(android::GraphicBuffer *gBuf,
- uint32_t colorFormat,
- ColorFract startColor, ColorFract endColor);
-ColorFract hwcTestParseColor(std::istringstream& in, bool& error);
-struct hwc_rect hwcTestParseHwcRect(std::istringstream& in, bool& error);
-HwcTestDim hwcTestParseDim(std::istringstream& in, bool& error);
diff --git a/opengl/tests/include/EGLUtils.h b/opengl/tests/include/EGLUtils.h
deleted file mode 100644
index 014c261..0000000
--- a/opengl/tests/include/EGLUtils.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2009 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 ANDROID_UI_EGLUTILS_H
-#define ANDROID_UI_EGLUTILS_H
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <system/window.h>
-#include <utils/Errors.h>
-#include <EGL/egl.h>
-
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-class EGLUtils
-{
-public:
-
- static inline const char *strerror(EGLint err);
-
- static inline status_t selectConfigForPixelFormat(
- EGLDisplay dpy,
- EGLint const* attrs,
- int32_t format,
- EGLConfig* outConfig);
-
- static inline status_t selectConfigForNativeWindow(
- EGLDisplay dpy,
- EGLint const* attrs,
- EGLNativeWindowType window,
- EGLConfig* outConfig);
-};
-
-// ----------------------------------------------------------------------------
-
-const char *EGLUtils::strerror(EGLint err)
-{
- switch (err){
- case EGL_SUCCESS: return "EGL_SUCCESS";
- case EGL_NOT_INITIALIZED: return "EGL_NOT_INITIALIZED";
- case EGL_BAD_ACCESS: return "EGL_BAD_ACCESS";
- case EGL_BAD_ALLOC: return "EGL_BAD_ALLOC";
- case EGL_BAD_ATTRIBUTE: return "EGL_BAD_ATTRIBUTE";
- case EGL_BAD_CONFIG: return "EGL_BAD_CONFIG";
- case EGL_BAD_CONTEXT: return "EGL_BAD_CONTEXT";
- case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE";
- case EGL_BAD_DISPLAY: return "EGL_BAD_DISPLAY";
- case EGL_BAD_MATCH: return "EGL_BAD_MATCH";
- case EGL_BAD_NATIVE_PIXMAP: return "EGL_BAD_NATIVE_PIXMAP";
- case EGL_BAD_NATIVE_WINDOW: return "EGL_BAD_NATIVE_WINDOW";
- case EGL_BAD_PARAMETER: return "EGL_BAD_PARAMETER";
- case EGL_BAD_SURFACE: return "EGL_BAD_SURFACE";
- case EGL_CONTEXT_LOST: return "EGL_CONTEXT_LOST";
- default: return "UNKNOWN";
- }
-}
-
-status_t EGLUtils::selectConfigForPixelFormat(
- EGLDisplay dpy,
- EGLint const* attrs,
- int32_t format,
- EGLConfig* outConfig)
-{
- EGLint numConfigs = -1, n=0;
-
- if (!attrs)
- return BAD_VALUE;
-
- if (outConfig == NULL)
- return BAD_VALUE;
-
- // Get all the "potential match" configs...
- if (eglGetConfigs(dpy, NULL, 0, &numConfigs) == EGL_FALSE)
- return BAD_VALUE;
-
- EGLConfig* const configs = (EGLConfig*)malloc(sizeof(EGLConfig)*numConfigs);
- if (eglChooseConfig(dpy, attrs, configs, numConfigs, &n) == EGL_FALSE) {
- free(configs);
- return BAD_VALUE;
- }
-
- int i;
- EGLConfig config = NULL;
- for (i=0 ; i<n ; i++) {
- EGLint nativeVisualId = 0;
- eglGetConfigAttrib(dpy, configs[i], EGL_NATIVE_VISUAL_ID, &nativeVisualId);
- if (nativeVisualId>0 && format == nativeVisualId) {
- config = configs[i];
- break;
- }
- }
-
- free(configs);
-
- if (i<n) {
- *outConfig = config;
- return NO_ERROR;
- }
-
- return NAME_NOT_FOUND;
-}
-
-status_t EGLUtils::selectConfigForNativeWindow(
- EGLDisplay dpy,
- EGLint const* attrs,
- EGLNativeWindowType window,
- EGLConfig* outConfig)
-{
- int err;
- int format;
-
- if (!window)
- return BAD_VALUE;
-
- if ((err = window->query(window, NATIVE_WINDOW_FORMAT, &format)) < 0) {
- return err;
- }
-
- return selectConfigForPixelFormat(dpy, attrs, format, outConfig);
-}
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif /* ANDROID_UI_EGLUTILS_H */
diff --git a/opengl/tests/include/glTestLib.h b/opengl/tests/include/glTestLib.h
deleted file mode 100644
index c91c594..0000000
--- a/opengl/tests/include/glTestLib.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- *
- */
-
-/*
- * Graphics Test Library Header
- */
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include "EGLUtils.h"
-
-void glTestPrintGLString(const char *name, GLenum s);
-void glTestCheckEglError(const char* op, EGLBoolean returnVal = EGL_TRUE);
-void glTestCheckGlError(const char* op);
-void glTestPrintEGLConfiguration(EGLDisplay dpy, EGLConfig config);
diff --git a/opengl/tests/lib/Android.mk b/opengl/tests/lib/Android.mk
deleted file mode 100644
index 0352a37..0000000
--- a/opengl/tests/lib/Android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2010 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE:= libglTest
-LOCAL_SRC_FILES:= glTestLib.cpp
-LOCAL_C_INCLUDES += system/extras/tests/include \
- bionic \
- bionic/libstdc++/include \
- external/stlport/stlport \
- $(call include-path-for, opengl-tests-includes)
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-
-LOCAL_SHARED_LIBRARIES += libcutils libutils libstlport
-
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/opengl/tests/lib/glTestLib.cpp b/opengl/tests/lib/glTestLib.cpp
deleted file mode 100644
index b434fc7..0000000
--- a/opengl/tests/lib/glTestLib.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.
- *
- */
-
-/*
- * Graphics Test Library
- */
-
-#include <glTestLib.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include "EGLUtils.h"
-
-#include <utils/Log.h>
-#include <testUtil.h>
-
-using namespace std;
-using namespace android;
-
-void glTestPrintGLString(const char *name, GLenum s)
-{
- const char *v = (const char *) glGetString(s);
-
- if (v == NULL) {
- testPrintI("GL %s unknown", name);
- } else {
- testPrintI("GL %s = %s", name, v);
- }
-}
-
-void glTestCheckEglError(const char* op, EGLBoolean returnVal)
-{
- if (returnVal != EGL_TRUE) {
- testPrintE("%s() returned %d", op, returnVal);
- }
-
- for (EGLint error = eglGetError(); error != EGL_SUCCESS; error
- = eglGetError()) {
- testPrintE("after %s() eglError %s (0x%x)",
- op, EGLUtils::strerror(error), error);
- }
-}
-
-void glTestCheckGlError(const char* op)
-{
- for (GLint error = glGetError(); error; error
- = glGetError()) {
- testPrintE("after %s() glError (0x%x)", op, error);
- }
-}
-
-void glTestPrintEGLConfiguration(EGLDisplay dpy, EGLConfig config)
-{
-
-#define X(VAL) {VAL, #VAL}
- struct {EGLint attribute; const char* name;} names[] = {
- X(EGL_BUFFER_SIZE),
- X(EGL_ALPHA_SIZE),
- X(EGL_BLUE_SIZE),
- X(EGL_GREEN_SIZE),
- X(EGL_RED_SIZE),
- X(EGL_DEPTH_SIZE),
- X(EGL_STENCIL_SIZE),
- X(EGL_CONFIG_CAVEAT),
- X(EGL_CONFIG_ID),
- X(EGL_LEVEL),
- X(EGL_MAX_PBUFFER_HEIGHT),
- X(EGL_MAX_PBUFFER_PIXELS),
- X(EGL_MAX_PBUFFER_WIDTH),
- X(EGL_NATIVE_RENDERABLE),
- X(EGL_NATIVE_VISUAL_ID),
- X(EGL_NATIVE_VISUAL_TYPE),
- X(EGL_SAMPLES),
- X(EGL_SAMPLE_BUFFERS),
- X(EGL_SURFACE_TYPE),
- X(EGL_TRANSPARENT_TYPE),
- X(EGL_TRANSPARENT_RED_VALUE),
- X(EGL_TRANSPARENT_GREEN_VALUE),
- X(EGL_TRANSPARENT_BLUE_VALUE),
- X(EGL_BIND_TO_TEXTURE_RGB),
- X(EGL_BIND_TO_TEXTURE_RGBA),
- X(EGL_MIN_SWAP_INTERVAL),
- X(EGL_MAX_SWAP_INTERVAL),
- X(EGL_LUMINANCE_SIZE),
- X(EGL_ALPHA_MASK_SIZE),
- X(EGL_COLOR_BUFFER_TYPE),
- X(EGL_RENDERABLE_TYPE),
- X(EGL_CONFORMANT),
- };
-#undef X
-
- for (size_t j = 0; j < sizeof(names) / sizeof(names[0]); j++) {
- EGLint value = -1;
- EGLint returnVal = eglGetConfigAttrib(dpy, config, names[j].attribute,
- &value);
- EGLint error = eglGetError();
- if (returnVal && error == EGL_SUCCESS) {
- testPrintI(" %s: %d (%#x)", names[j].name, value, value);
- }
- }
- testPrintI("");
-}
diff --git a/opengl/tests/lighting1709/Android.mk b/opengl/tests/lighting1709/Android.mk
deleted file mode 100644
index 9563e61..0000000
--- a/opengl/tests/lighting1709/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := LightingTest
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
diff --git a/opengl/tests/lighting1709/AndroidManifest.xml b/opengl/tests/lighting1709/AndroidManifest.xml
deleted file mode 100644
index 6c23d42..0000000
--- a/opengl/tests/lighting1709/AndroidManifest.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.lightingtest">
-
- <application>
- <activity android:name="ClearActivity" android:label="LightingTest">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/lighting1709/src/com/android/lightingtest/ClearActivity.java b/opengl/tests/lighting1709/src/com/android/lightingtest/ClearActivity.java
deleted file mode 100644
index 3ae8c5c..0000000
--- a/opengl/tests/lighting1709/src/com/android/lightingtest/ClearActivity.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.lightingtest;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.app.Activity;
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.MotionEvent;
-
-public class ClearActivity extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- mGLView = new ClearGLSurfaceView(this);
- setContentView(mGLView);
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- mGLView.onPause();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mGLView.onResume();
- }
- private GLSurfaceView mGLView;
-}
-
-class ClearGLSurfaceView extends GLSurfaceView {
- public ClearGLSurfaceView(Context context) {
- super(context);
- mRenderer = new ClearRenderer();
- setRenderer(mRenderer);
- }
-
- ClearRenderer mRenderer;
-}
-
-class ClearRenderer implements GLSurfaceView.Renderer {
- public ClearRenderer() {
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing special.
- }
-
- public void onSurfaceChanged(GL10 gl, int w, int h) {
- // Compute the projection matrix
- gl.glMatrixMode(GL10.GL_PROJECTION);
- gl.glLoadIdentity();
-
- // Compute the boundaries of the frustum
- float fl = (float) (-(w / 2)) / 288;
- float fr = (float) (w / 2) / 288;
- float ft = (float) (h / 2) / 288;
- float fb = (float) (-(h / 2)) / 288;
-
- // Set the view frustum
- gl.glFrustumf(fl, fr, fb, ft, 1.0f, 2000.0f);
-
- // Set the viewport dimensions
- gl.glMatrixMode(GL10.GL_MODELVIEW);
- gl.glLoadIdentity();
- gl.glViewport(0, 0, w, h);
- }
-
- public void onDrawFrame(GL10 gl) {
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
-
- final float lightOff[] = {0.0f, 0.0f, 0.0f, 1.0f};
- final float lightAmbient[] = {5.0f, 0.0f, 0.0f, 1.0f};
- final float lightDiffuse[] = {0.0f, 2.0f, 0.0f, 0.0f};
- final float lightPosSpot[] = {0.0f, 0.0f, -8.0f, 1.0f};
-
- final float pos[] = {
- -5.0f, -1.5f, 0.0f,
- 0.0f, -1.5f, 0.0f,
- 5.0f, -1.5f, 0.0f,
- };
-
- final float v[] = new float[9];
- ByteBuffer vbb = ByteBuffer.allocateDirect(v.length*4);
- vbb.order(ByteOrder.nativeOrder());
- FloatBuffer vb = vbb.asFloatBuffer();
-
- gl.glDisable(GL10.GL_DITHER);
-
- gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, lightAmbient, 0);
- gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, lightDiffuse, 0);
- gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, lightOff, 0);
- gl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, lightPosSpot, 0);
- gl.glEnable(GL10.GL_LIGHT0);
-
- gl.glEnable(GL10.GL_LIGHTING);
-
-
- gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
- gl.glNormal3f(0, 0, 1);
-
-
- // draw first 3 triangles, without using transforms
- for (int i=0 ; i<3 ; i++) {
- v[0] = -1; v[1] =-1; v[2] = -10;
- v[3] = 0; v[4] = 1; v[5] = -10;
- v[6] = 1; v[7] =-1; v[8] = -10;
- for (int j=0 ; j<3 ; j++) {
- v[j*3+0] -= pos[i*3+0];
- v[j*3+1] -= pos[i*3+1];
- v[j*3+2] -= pos[i*3+2];
- }
- vb.put(v).position(0);
- gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vb);
- gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 3);
- }
-
- // draw the 2nd batch this time with transforms
- v[0] = -1; v[1] =-1; v[2] = -10;
- v[3] = 0; v[4] = 1; v[5] = -10;
- v[6] = 1; v[7] =-1; v[8] = -10;
- vb.put(v).position(0);
- gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vb);
-
- // draw lower left triangle
- gl.glPushMatrix();
- gl.glTranslatef(pos[0], pos[1], pos[2]);
- gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 3);
- gl.glPopMatrix();
-
- // draw lower middle triangle
- gl.glPushMatrix();
- gl.glTranslatef(pos[3], pos[4], pos[5]);
- gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 3);
- gl.glPopMatrix();
-
- // draw lower right triangle
- gl.glPushMatrix();
- gl.glTranslatef(pos[6], pos[7], pos[8]);
- gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 3);
- gl.glPopMatrix();
- }
-
- public int[] getConfigSpec() {
- int[] configSpec = { EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE };
- return configSpec;
- }
-}
-
diff --git a/opengl/tests/linetex/Android.mk b/opengl/tests/linetex/Android.mk
deleted file mode 100644
index 5b6384e..0000000
--- a/opengl/tests/linetex/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- linetex.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-linetex
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/linetex/linetex.cpp b/opengl/tests/linetex/linetex.cpp
deleted file mode 100644
index 8669492..0000000
--- a/opengl/tests/linetex/linetex.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-**
-** Copyright 2006, 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.
-*/
-
-#define LOG_TAG "fillrate"
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/StopWatch.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-int main(int argc, char** argv)
-{
- EGLint configAttribs[] = {
- EGL_DEPTH_SIZE, 0,
- EGL_NONE
- };
-
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLConfig config;
- EGLSurface surface;
- EGLint w, h;
- EGLDisplay dpy;
-
- EGLNativeWindowType window = android_createDisplaySurface();
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
-
- status_t err = EGLUtils::selectConfigForNativeWindow(
- dpy, configAttribs, window, &config);
- if (err) {
- fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n");
- return 0;
- }
-
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- context = eglCreateContext(dpy, config, NULL, NULL);
- eglMakeCurrent(dpy, surface, surface, context);
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
-
- printf("w=%d, h=%d\n", w, h);
-
- glBindTexture(GL_TEXTURE_2D, 0);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glDisable(GL_DITHER);
- glDisable(GL_BLEND);
- glEnable(GL_TEXTURE_2D);
- glColor4f(1,1,1,1);
-
-
- // default pack-alignment is 4
- const uint16_t t16[64] = { 0xFFFF, 0, 0xF800, 0, 0x07E0, 0, 0x001F, 0 };
-
- const GLfloat vertices[4][2] = {
- { w/2, 0 },
- { w/2, h }
- };
-
- const GLfloat texCoords[4][2] = {
- { 0, 0 },
- { 1, 1 }
- };
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1, 4, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, t16);
-
- glViewport(0, 0, w, h);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrthof(0, w, 0, h, 0, 1);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glVertexPointer(2, GL_FLOAT, 0, vertices);
- glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
-
- glClearColor(0,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- glDrawArrays(GL_LINES, 0, 2);
- eglSwapBuffers(dpy, surface);
-
- usleep(5*1000000);
-
- eglTerminate(dpy);
-
- return 0;
-}
diff --git a/opengl/tests/swapinterval/Android.mk b/opengl/tests/swapinterval/Android.mk
deleted file mode 100644
index 5517f60..0000000
--- a/opengl/tests/swapinterval/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- swapinterval.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-swapinterval
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/swapinterval/swapinterval.cpp b/opengl/tests/swapinterval/swapinterval.cpp
deleted file mode 100644
index a0f4bc4..0000000
--- a/opengl/tests/swapinterval/swapinterval.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- **
- ** Copyright 2006, 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 <stdio.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <utils/StopWatch.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-int main(int argc, char** argv)
-{
- EGLint configAttribs[] = {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_NONE
- };
-
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLConfig config;
- EGLint numConfigs=0;
- EGLSurface surface;
- EGLint w, h;
- EGLDisplay dpy;
-
-
- EGLNativeWindowType window = android_createDisplaySurface();
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
- eglGetConfigs(dpy, NULL, 0, &numConfigs);
- printf("# configs = %d\n", numConfigs);
-
- status_t err = EGLUtils::selectConfigForNativeWindow(
- dpy, configAttribs, window, &config);
- if (err) {
- fprintf(stderr, "error: %s", EGLUtils::strerror(eglGetError()));
- eglTerminate(dpy);
- return 0;
- }
-
- EGLint r,g,b,a, vid;
- eglGetConfigAttrib(dpy, config, EGL_RED_SIZE, &r);
- eglGetConfigAttrib(dpy, config, EGL_GREEN_SIZE, &g);
- eglGetConfigAttrib(dpy, config, EGL_BLUE_SIZE, &b);
- eglGetConfigAttrib(dpy, config, EGL_ALPHA_SIZE, &a);
- eglGetConfigAttrib(dpy, config, EGL_NATIVE_VISUAL_ID, &vid);
-
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- if (surface == EGL_NO_SURFACE) {
- EGLint err = eglGetError();
- fprintf(stderr, "error: %s, config=%p, format = %d-%d-%d-%d, visual-id = %d\n",
- EGLUtils::strerror(err), config, r,g,b,a, vid);
- eglTerminate(dpy);
- return 0;
- } else {
- printf("config=%p, format = %d-%d-%d-%d, visual-id = %d\n",
- config, r,g,b,a, vid);
- }
-
- context = eglCreateContext(dpy, config, NULL, NULL);
- eglMakeCurrent(dpy, surface, surface, context);
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
-
- printf("w=%d, h=%d\n", w, h);
-
- glDisable(GL_DITHER);
- glEnable(GL_BLEND);
-
- glViewport(0, 0, w, h);
- glOrthof(0, w, 0, h, 0, 1);
-
- eglSwapInterval(dpy, 1);
-
- glClearColor(1,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(dpy, surface);
-
-
- int time = 10;
- printf("screen should flash red/green quickly for %d s...\n", time);
-
- int c = 0;
- nsecs_t start = systemTime();
- nsecs_t t;
- do {
- glClearColor(1,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(dpy, surface);
- glClearColor(0,1,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(dpy, surface);
- t = systemTime() - start;
- c += 2;
- } while (int(ns2s(t))<=time);
-
- double p = (double(t) / c) / 1000000000.0;
- printf("refresh-rate is %f fps (%f ms)\n", 1.0f/p, p*1000.0);
-
- eglTerminate(dpy);
-
- return 0;
-}
diff --git a/opengl/tests/testFramerate/Android.mk b/opengl/tests/testFramerate/Android.mk
deleted file mode 100644
index 500abf3..0000000
--- a/opengl/tests/testFramerate/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#########################################################################
-# Test framerate and look for hiccups
-#########################################################################
-
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := TestFramerate
-
-include $(BUILD_PACKAGE)
diff --git a/opengl/tests/testFramerate/AndroidManifest.xml b/opengl/tests/testFramerate/AndroidManifest.xml
deleted file mode 100644
index 85617f4..0000000
--- a/opengl/tests/testFramerate/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.testframerate">
- <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8" />
-
- <application
- android:label="@string/testFramerate_activity">
- <activity android:name="TestFramerateActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/testFramerate/res/values/strings.xml b/opengl/tests/testFramerate/res/values/strings.xml
deleted file mode 100644
index baadf0e..0000000
--- a/opengl/tests/testFramerate/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="testFramerate_activity">TestFramerate</string>
-
-</resources>
-
diff --git a/opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateActivity.java b/opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateActivity.java
deleted file mode 100644
index cbe279b..0000000
--- a/opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateActivity.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.testframerate;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.WindowManager;
-
-import java.io.File;
-
-
-public class TestFramerateActivity extends Activity {
-
- TestFramerateView mView;
-
- @Override protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new TestFramerateView(getApplication());
- setContentView(mView);
- mView.setFocusableInTouchMode(true);
- }
-
- @Override protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateView.java b/opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateView.java
deleted file mode 100644
index f3fb5de..0000000
--- a/opengl/tests/testFramerate/src/com/android/testframerate/TestFramerateView.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.testframerate;
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.os.SystemProperties;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.opengl.GLES20;
-
-class TestFramerateView extends GLSurfaceView {
- private static String TAG = "TestFramerateView";
-
- public TestFramerateView(Context context) {
- super(context);
- setEGLContextClientVersion(2);
- setRenderer(new Renderer());
- }
-
- private long mLastTime_us = 0;
- private long mNumShortFramesElapsed = 0;
- private void registerTime(long now_us) {
- long longFrameTime_ms = Integer.parseInt(SystemProperties.get("debug.longframe_ms", "16"));
- long elapsedTime_us = now_us - mLastTime_us;
- float fps = 1000000.f / elapsedTime_us;
- if (mLastTime_us > 0 && elapsedTime_us > longFrameTime_ms*1000) {
- Log.v(TAG, "Long frame: " + elapsedTime_us/1000.f + " ms (" + fps + " fps)");
- if (mNumShortFramesElapsed > 0) {
- Log.v(TAG, " Short frames since last long frame: " + mNumShortFramesElapsed);
- mNumShortFramesElapsed = 0;
- }
- } else {
- ++mNumShortFramesElapsed;
- }
-
- mLastTime_us = now_us;
- }
-
- private class Renderer implements GLSurfaceView.Renderer {
- public Renderer() {
- }
-
-
- public void onDrawFrame(GL10 gl) {
- long now_us = System.nanoTime() / 1000;
- registerTime(now_us);
-
- float red = (now_us % 1000000) / 1000000.f;
- float green = (now_us % 2000000) / 2000000.f;
- float blue = (now_us % 3000000) / 3000000.f;
- GLES20.glClearColor(red, green, blue, 1.0f);
- GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GLES20.glViewport(0, 0, width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- }
-
- }
-}
diff --git a/opengl/tests/testLatency/Android.mk b/opengl/tests/testLatency/Android.mk
deleted file mode 100644
index 96417c7..0000000
--- a/opengl/tests/testLatency/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-#########################################################################
-# Test end-to-end latency.
-#########################################################################
-
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SDK_VERSION := 8
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := TestLatency
-
-include $(BUILD_PACKAGE)
diff --git a/opengl/tests/testLatency/AndroidManifest.xml b/opengl/tests/testLatency/AndroidManifest.xml
deleted file mode 100644
index 59f2643..0000000
--- a/opengl/tests/testLatency/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.testlatency">
- <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8" />
-
- <application
- android:label="@string/testLatency_activity">
- <activity android:name="TestLatencyActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/testLatency/res/values/strings.xml b/opengl/tests/testLatency/res/values/strings.xml
deleted file mode 100644
index d80b77c..0000000
--- a/opengl/tests/testLatency/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="testLatency_activity">TestLatency</string>
-
-</resources>
-
diff --git a/opengl/tests/testLatency/src/com/android/testlatency/TestLatencyActivity.java b/opengl/tests/testLatency/src/com/android/testlatency/TestLatencyActivity.java
deleted file mode 100644
index ed993cb..0000000
--- a/opengl/tests/testLatency/src/com/android/testlatency/TestLatencyActivity.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.testlatency;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.WindowManager;
-
-import java.io.File;
-
-
-public class TestLatencyActivity extends Activity {
-
- TestLatencyView mView;
-
- @Override protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new TestLatencyView(getApplication());
- setContentView(mView);
- mView.setFocusableInTouchMode(true);
- }
-
- @Override protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/testLatency/src/com/android/testlatency/TestLatencyView.java b/opengl/tests/testLatency/src/com/android/testlatency/TestLatencyView.java
deleted file mode 100644
index d62bf17..0000000
--- a/opengl/tests/testLatency/src/com/android/testlatency/TestLatencyView.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.testlatency;
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.FloatBuffer;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.egl.EGLContext;
-import javax.microedition.khronos.egl.EGLDisplay;
-import javax.microedition.khronos.opengles.GL10;
-
-import android.opengl.GLES20;
-
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class TestLatencyView extends GLSurfaceView {
- private static String TAG = "TestLatencyiew";
- private float mX;
- private float mY;
- private float mDX;
- private float mDY;
- private long mT;
- private long mDT;
-
- public TestLatencyView(Context context) {
- super(context);
- setEGLContextClientVersion(2);
- setRenderer(new Renderer());
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- switch (event.getAction()) {
- case MotionEvent.ACTION_MOVE:
- float x = event.getX();
- float y = event.getY();
- long t = event.getEventTime();
- synchronized(this) {
- mDT = t - mT;
- mT = t;
- mDX = x - mX;
- mX = x;
- mDY = y - mY;
- mY = y;
- }
- break;
- default:
- break;
- }
- return true;
- }
-
- private class Renderer implements GLSurfaceView.Renderer {
- private float mScaleX, mScaleY, mOffsetX, mOffsetY;
- private final float MS_PER_FRAME = 1000 / 60;
- public Renderer() {
- mTriangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length * 4)
- .order(ByteOrder.nativeOrder()).asFloatBuffer();
- }
-
-
- public void onDrawFrame(GL10 gl) {
- GLES20.glClearColor(0.4f, 0.4f, 0.4f, 1.0f);
- GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
- GLES20.glUseProgram(mProgram);
- checkGlError("glUseProgram");
-
- float x, y, dx, dy;
- long t, dt;
- synchronized(TestLatencyView.this) {
- x = mX;
- y = mY;
- dx = mDX;
- dy = mDY;
- dt = mDT;
- }
-
- if (dt > 0) {
- dx = dx * MS_PER_FRAME / dt;
- dy = dy * MS_PER_FRAME / dt;
- }
-
- GLES20.glEnableVertexAttribArray(mvPositionHandle);
- checkGlError("glEnableVertexAttribArray");
- GLES20.glEnableVertexAttribArray(mvColorHandle);
- checkGlError("glEnableVertexAttribArray");
- for(int step = 0; step < 8; step++) {
- float sx = (x + dx * step) * mScaleX + mOffsetX;
- float sy = (y + dy * step) * mScaleY + mOffsetY;
- int cbase = step * 4;
-
- for (int i = 0; i < mTriangleVerticesData.length; i += 6) {
- mTriangleVerticesData2[i] = sx + mTriangleVerticesData[i];
- mTriangleVerticesData2[i+1] = -sy + mTriangleVerticesData[i+1];
- mTriangleVerticesData2[i+2] = mColors[cbase];
- mTriangleVerticesData2[i+3] = mColors[cbase+1];
- mTriangleVerticesData2[i+4] = mColors[cbase+2];
- mTriangleVerticesData2[i+5] = mColors[cbase+3];
- }
- mTriangleVertices.position(0);
- mTriangleVertices.put(mTriangleVerticesData2).position(0);
-
- GLES20.glVertexAttribPointer(mvPositionHandle, 2, GLES20.GL_FLOAT, false, 6*4, mTriangleVertices);
- checkGlError("glVertexAttribPointer mvPosition");
- mTriangleVertices.put(mTriangleVerticesData2).position(2);
- GLES20.glVertexAttribPointer(mvColorHandle, 4, GLES20.GL_FLOAT, false, 6*4, mTriangleVertices);
- checkGlError("glVertexAttribPointer mvColor");
- GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
- checkGlError("glDrawArrays");
- }
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- GLES20.glViewport(0, 0, width, height);
- mScaleX = 2.0f / width;
- mScaleY = 2.0f / height;
- mOffsetX = -1f;
- mOffsetY = -1f;
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- mProgram = createProgram(mVertexShader, mFragmentShader);
- if (mProgram == 0) {
- return;
- }
- mvPositionHandle = GLES20.glGetAttribLocation(mProgram, "aPosition");
- checkGlError("glGetAttribLocation");
- if (mvPositionHandle == -1) {
- throw new RuntimeException("Could not get attrib location for vPosition");
- }
- mvColorHandle = GLES20.glGetAttribLocation(mProgram, "aColor");
- checkGlError("glGetAttribLocation");
- if (mvColorHandle == -1) {
- throw new RuntimeException("Could not get attrib location for vColor");
- }
- }
-
- private int loadShader(int shaderType, String source) {
- int shader = GLES20.glCreateShader(shaderType);
- if (shader != 0) {
- GLES20.glShaderSource(shader, source);
- GLES20.glCompileShader(shader);
- int[] compiled = new int[1];
- GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0);
- if (compiled[0] == 0) {
- Log.e(TAG, "Could not compile shader " + shaderType + ":");
- Log.e(TAG, GLES20.glGetShaderInfoLog(shader));
- GLES20.glDeleteShader(shader);
- shader = 0;
- }
- }
- return shader;
- }
-
- private int createProgram(String vertexSource, String fragmentSource) {
- int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexSource);
- if (vertexShader == 0) {
- return 0;
- }
-
- int pixelShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource);
- if (pixelShader == 0) {
- return 0;
- }
-
- int program = GLES20.glCreateProgram();
- if (program != 0) {
- GLES20.glAttachShader(program, vertexShader);
- checkGlError("glAttachShader vertexShader");
- GLES20.glAttachShader(program, pixelShader);
- checkGlError("glAttachShader pixelShader");
- GLES20.glLinkProgram(program);
- int[] linkStatus = new int[1];
- GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0);
- if (linkStatus[0] != GLES20.GL_TRUE) {
- Log.e(TAG, "Could not link program: ");
- Log.e(TAG, GLES20.glGetProgramInfoLog(program));
- GLES20.glDeleteProgram(program);
- program = 0;
- }
- }
- return program;
- }
-
- private void checkGlError(String op) {
- int error;
- while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
- Log.e(TAG, op + ": glError " + error);
- throw new RuntimeException(op + ": glError " + error);
- }
- }
-
- // X, Y, R G B A
- private final float[] mTriangleVerticesData = {
- -0.025f, 0.3f, 0.0f, 1.0f, 0.0f, 1.0f,
- 0.0f , 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
- 0.025f, 0.3f, 1.0f, 1.0f, 255.0f, 1.0f
- };
-
- // Color cascade:
- private final float[] mColors = {
- 0.0f, 0.0f, 0.0f, 1.0f,
- 0.5f, 0.0f, 0.0f, 1.0f,
- 0.0f, 0.5f, 0.0f, 1.0f,
- 0.5f, 0.5f, 0.0f, 1.0f,
-
- 0.0f, 0.0f, 0.5f, 1.0f,
- 1.0f, 0.0f, 0.0f, 1.0f,
- 1.0f, 1.0f, 1.0f, 1.0f,
- 0.0f, 1.0f, 0.0f, 1.0f
- };
-
- private float[] mTriangleVerticesData2 = new float[mTriangleVerticesData.length];
- private FloatBuffer mTriangleVertices;
-
- private final String mVertexShader = "attribute vec4 aPosition;\n"
- + "attribute vec4 aColor;\n"
- + "varying vec4 vColor;\n"
- + "void main() {\n"
- + " gl_Position = aPosition;\n"
- + " vColor = aColor;\n"
- + "}\n";
-
- private final String mFragmentShader = "precision mediump float;\n"
- + "varying vec4 vColor;\n"
- + "void main() {\n"
- + " gl_FragColor = vColor;\n"
- + "}\n";
-
- private int mProgram;
- private int mvPositionHandle;
- private int mvColorHandle;
-
- }
-}
-
diff --git a/opengl/tests/testPauseResume/Android.mk b/opengl/tests/testPauseResume/Android.mk
deleted file mode 100644
index cf8bdc3..0000000
--- a/opengl/tests/testPauseResume/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#########################################################################
-# OpenGL ES JNI sample
-# This makefile builds both an activity and a shared library.
-#########################################################################
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := TestEGL
-
-include $(BUILD_PACKAGE)
diff --git a/opengl/tests/testPauseResume/AndroidManifest.xml b/opengl/tests/testPauseResume/AndroidManifest.xml
deleted file mode 100644
index 1879bc3..0000000
--- a/opengl/tests/testPauseResume/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.test">
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <application
- android:label="@string/test_activity">
- <activity android:name="TestActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:launchMode="singleTask"
- android:screenOrientation="landscape"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/testPauseResume/README b/opengl/tests/testPauseResume/README
deleted file mode 100644
index 87db74a..0000000
--- a/opengl/tests/testPauseResume/README
+++ /dev/null
@@ -1,37 +0,0 @@
-Repro steps:
-
-build, install and run the attached test program TestEgl.apk
-
-The program does not draw anything to the screen, it just prints to the log, so use adb logcat to watch the output.
-
-Expected behavior:
-
-constantly increasing "step" count:
-
-
-W/TestActivity( 1885): ****** step 235 resume
-W/TestActivity( 1885): step 236 pause
-W/TestActivity( 1885): ****** step 236 resume
-
-and so on.
-
-Actual behavior:
-
-W/TestActivity( 1466): ****** step 25 resume
-W/TestActivity( 1466): step 26 pause
-W/TestActivity( 1466): ****** step 26 resume
-W/dalvikvm( 1466): threadid=8: thread exiting with uncaught exception (group=0x4001d7f0)
-E/AndroidRuntime( 1466): FATAL EXCEPTION: GLThread 9
-E/AndroidRuntime( 1466): java.lang.RuntimeException: createContext failed: EGL_BAD_ALLOC
-E/AndroidRuntime( 1466): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1067)
-E/AndroidRuntime( 1466): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1059)
-E/AndroidRuntime( 1466): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:925)
-E/AndroidRuntime( 1466): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1236)
-E/AndroidRuntime( 1466): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1106)
-W/TestActivity( 1466): step 27 pause
-W/TestActivity( 1466): ****** step 27 resume
-W/TestActivity( 1466): step 28 pause
-W/TestActivity( 1466): ****** step 28 resume
-
-
-See http://b/issue?id=2550745 for further details.
diff --git a/opengl/tests/testPauseResume/res/values/strings.xml b/opengl/tests/testPauseResume/res/values/strings.xml
deleted file mode 100644
index b4c98fe..0000000
--- a/opengl/tests/testPauseResume/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="test_activity">Test Egl</string>
-
-</resources>
-
diff --git a/opengl/tests/testPauseResume/src/com/android/test/TestActivity.java b/opengl/tests/testPauseResume/src/com/android/test/TestActivity.java
deleted file mode 100644
index 9dc7132..0000000
--- a/opengl/tests/testPauseResume/src/com/android/test/TestActivity.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.test;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-
-public class TestActivity extends Activity {
- private final static String TAG = "TestActivity";
- TestView mView;
- boolean mToggle;
- int mCount;
- final static int PAUSE_DELAY = 100;
- Runnable mRunnable = new Runnable() {
- public void run() {
- if (mToggle) {
- Log.w(TAG, "****** step " + mCount + " resume");
- mCount++;
- mView.onResume();
- } else {
- Log.w(TAG, "step " + mCount + " pause");
- mView.onPause();
- }
- mToggle = ! mToggle;
- mView.postDelayed(mRunnable, PAUSE_DELAY);
- }
- };
-
- @Override
- protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new TestView(getApplication());
- mView.setFocusableInTouchMode(true);
- setContentView(mView);
- mView.postDelayed(mRunnable, PAUSE_DELAY);
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/testPauseResume/src/com/android/test/TestView.java b/opengl/tests/testPauseResume/src/com/android/test/TestView.java
deleted file mode 100644
index 8c28f13..0000000
--- a/opengl/tests/testPauseResume/src/com/android/test/TestView.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.test;
-/*
- * Copyright (C) 2008 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.
- */
-
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class TestView extends GLSurfaceView {
- TestView(Context context) {
- super(context);
- init();
- }
-
- public TestView(Context context, AttributeSet attrs) {
- super(context, attrs);
- init();
- }
-
- private void init() {
- setRenderer(new Renderer());
- }
-
- private class Renderer implements GLSurfaceView.Renderer {
- private static final String TAG = "Renderer";
- public void onDrawFrame(GL10 gl) {
- // Do nothing.
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- // Do nothing.
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- // Do nothing.
- }
- }
-}
-
diff --git a/opengl/tests/testViewport/Android.mk b/opengl/tests/testViewport/Android.mk
deleted file mode 100644
index 9980e7d..0000000
--- a/opengl/tests/testViewport/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#########################################################################
-# OpenGL ES JNI sample
-# This makefile builds both an activity and a shared library.
-#########################################################################
-TOP_LOCAL_PATH:= $(call my-dir)
-
-# Build activity
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := TestViewport
-
-# Set a specific SDK version so we can run on Froyo.
-
-LOCAL_SDK_VERSION := 8
-
-include $(BUILD_PACKAGE)
diff --git a/opengl/tests/testViewport/AndroidManifest.xml b/opengl/tests/testViewport/AndroidManifest.xml
deleted file mode 100644
index ba178bb..0000000
--- a/opengl/tests/testViewport/AndroidManifest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.test">
- <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <application
- android:label="@string/test_activity">
- <activity android:name="TestActivity"
- android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-</manifest>
diff --git a/opengl/tests/testViewport/README b/opengl/tests/testViewport/README
deleted file mode 100644
index c06abc9..0000000
--- a/opengl/tests/testViewport/README
+++ /dev/null
@@ -1,28 +0,0 @@
-Repro steps:
-
-build, install and run the attached test program TestViewport.apk
-
-Run on Sapphire with Froyo.
-
-The program clears the screen to blue, then draws a full screen white quad that
-is alligned to the screen.
-(Therefore the whole screen should appear to be white.)
-
-
-Note that screen is all white.
-
-Rotate screen 90 degrees.
-
-Expected: screen is still all white.
-
-Actual: screen is blue with offset white rectangle.
-
-This bug only happens on Sapphire, it works correctly on Passion.
-
-What happens:
-
-I think the bug is that the gl.glViewport() call in onSurfaceChanged() is
-being ignored by the OpenGL driver.
-
-NOTE: If a gl.glViewport call is added at the beginning of the onDrawFrame()
-call (which means it is called before every draw), the program runs correctly.
diff --git a/opengl/tests/testViewport/res/values/strings.xml b/opengl/tests/testViewport/res/values/strings.xml
deleted file mode 100644
index c037a7c..0000000
--- a/opengl/tests/testViewport/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 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 contains resource definitions for displayed strings, allowing
- them to be changed based on the locale and options. -->
-
-<resources>
- <!-- Simple strings. -->
- <string name="test_activity">Test Viewport</string>
-
-</resources>
-
diff --git a/opengl/tests/testViewport/src/com/android/test/TestActivity.java b/opengl/tests/testViewport/src/com/android/test/TestActivity.java
deleted file mode 100644
index cc7e450..0000000
--- a/opengl/tests/testViewport/src/com/android/test/TestActivity.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.test;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.Log;
-
-public class TestActivity extends Activity {
- private final static String TAG = "TestActivity";
- TestView mView;
-
- @Override
- protected void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- mView = new TestView(getApplication());
- mView.setFocusableInTouchMode(true);
- setContentView(mView);
- }
-
- @Override
- protected void onPause() {
- super.onPause();
- mView.onPause();
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- mView.onResume();
- }
-}
diff --git a/opengl/tests/testViewport/src/com/android/test/TestView.java b/opengl/tests/testViewport/src/com/android/test/TestView.java
deleted file mode 100644
index 23cc37d..0000000
--- a/opengl/tests/testViewport/src/com/android/test/TestView.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.test;
-/*
- * Copyright (C) 2008 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.
- */
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.CharBuffer;
-import java.nio.FloatBuffer;
-
-import android.content.Context;
-import android.opengl.GLSurfaceView;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-import javax.microedition.khronos.egl.EGL10;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL;
-import javax.microedition.khronos.opengles.GL10;
-import javax.microedition.khronos.opengles.GL11;
-/**
- * An implementation of SurfaceView that uses the dedicated surface for
- * displaying an OpenGL animation. This allows the animation to run in a
- * separate thread, without requiring that it be driven by the update mechanism
- * of the view hierarchy.
- *
- * The application-specific rendering code is delegated to a GLView.Renderer
- * instance.
- */
-class TestView extends GLSurfaceView {
- TestView(Context context) {
- super(context);
- init();
- }
-
- public TestView(Context context, AttributeSet attrs) {
- super(context, attrs);
- init();
- }
-
- private void init() {
- setRenderer(new Renderer());
- setRenderMode(RENDERMODE_WHEN_DIRTY);
- }
-
- /** A grid is a topologically rectangular array of vertices.
- *
- * The vertex and index data are held in VBO objects because on most
- * GPUs VBO objects are the fastest way of rendering static vertex
- * and index data.
- *
- */
-
- private static class Grid {
- // Size of vertex data elements in bytes:
- final static int FLOAT_SIZE = 4;
- final static int CHAR_SIZE = 2;
-
- // Vertex structure:
- // float x, y, z;
-
- final static int VERTEX_SIZE = 3 * FLOAT_SIZE;
-
- private int mVertexBufferObjectId;
- private int mElementBufferObjectId;
-
- // These buffers are used to hold the vertex and index data while
- // constructing the grid. Once createBufferObjects() is called
- // the buffers are nulled out to save memory.
-
- private ByteBuffer mVertexByteBuffer;
- private FloatBuffer mVertexBuffer;
- private CharBuffer mIndexBuffer;
-
- private int mW;
- private int mH;
- private int mIndexCount;
-
- public Grid(int w, int h) {
- if (w < 0 || w >= 65536) {
- throw new IllegalArgumentException("w");
- }
- if (h < 0 || h >= 65536) {
- throw new IllegalArgumentException("h");
- }
- if (w * h >= 65536) {
- throw new IllegalArgumentException("w * h >= 65536");
- }
-
- mW = w;
- mH = h;
- int size = w * h;
-
- mVertexByteBuffer = ByteBuffer.allocateDirect(VERTEX_SIZE * size)
- .order(ByteOrder.nativeOrder());
- mVertexBuffer = mVertexByteBuffer.asFloatBuffer();
-
- int quadW = mW - 1;
- int quadH = mH - 1;
- int quadCount = quadW * quadH;
- int indexCount = quadCount * 6;
- mIndexCount = indexCount;
- mIndexBuffer = ByteBuffer.allocateDirect(CHAR_SIZE * indexCount)
- .order(ByteOrder.nativeOrder()).asCharBuffer();
-
- /*
- * Initialize triangle list mesh.
- *
- * [0]-----[ 1] ...
- * | / |
- * | / |
- * | / |
- * [w]-----[w+1] ...
- * | |
- *
- */
-
- {
- int i = 0;
- for (int y = 0; y < quadH; y++) {
- for (int x = 0; x < quadW; x++) {
- char a = (char) (y * mW + x);
- char b = (char) (y * mW + x + 1);
- char c = (char) ((y + 1) * mW + x);
- char d = (char) ((y + 1) * mW + x + 1);
-
- mIndexBuffer.put(i++, a);
- mIndexBuffer.put(i++, c);
- mIndexBuffer.put(i++, b);
-
- mIndexBuffer.put(i++, b);
- mIndexBuffer.put(i++, c);
- mIndexBuffer.put(i++, d);
- }
- }
- }
-
- }
-
- public void set(int i, int j, float x, float y, float z) {
- if (i < 0 || i >= mW) {
- throw new IllegalArgumentException("i");
- }
- if (j < 0 || j >= mH) {
- throw new IllegalArgumentException("j");
- }
-
- int index = mW * j + i;
-
- mVertexBuffer.position(index * VERTEX_SIZE / FLOAT_SIZE);
- mVertexBuffer.put(x);
- mVertexBuffer.put(y);
- mVertexBuffer.put(z);
- }
-
- public void createBufferObjects(GL gl) {
- // Generate a the vertex and element buffer IDs
- int[] vboIds = new int[2];
- GL11 gl11 = (GL11) gl;
- gl11.glGenBuffers(2, vboIds, 0);
- mVertexBufferObjectId = vboIds[0];
- mElementBufferObjectId = vboIds[1];
-
- // Upload the vertex data
- gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mVertexBufferObjectId);
- mVertexByteBuffer.position(0);
- gl11.glBufferData(GL11.GL_ARRAY_BUFFER, mVertexByteBuffer.capacity(), mVertexByteBuffer, GL11.GL_STATIC_DRAW);
-
- gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, mElementBufferObjectId);
- mIndexBuffer.position(0);
- gl11.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, mIndexBuffer.capacity() * CHAR_SIZE, mIndexBuffer, GL11.GL_STATIC_DRAW);
-
- // We don't need the in-memory data any more
- mVertexBuffer = null;
- mVertexByteBuffer = null;
- mIndexBuffer = null;
- }
-
- public void draw(GL10 gl) {
- GL11 gl11 = (GL11) gl;
-
- gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
-
- gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mVertexBufferObjectId);
- gl11.glVertexPointer(3, GL10.GL_FLOAT, VERTEX_SIZE, 0);
-
- gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, mElementBufferObjectId);
- gl11.glDrawElements(GL10.GL_TRIANGLES, mIndexCount, GL10.GL_UNSIGNED_SHORT, 0);
- gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
- gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
- gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, 0);
- }
- }
-
-
- private class Renderer implements GLSurfaceView.Renderer {
- private static final String TAG = "Renderer";
- private Grid mGrid;
-
- public void onDrawFrame(GL10 gl) {
- gl.glClearColor(0,0,1,1);
- gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
- mGrid.draw(gl);
- }
-
- public void onSurfaceChanged(GL10 gl, int width, int height) {
- gl.glViewport(0, 0, width, height);
- gl.glMatrixMode(GL11.GL_PROJECTION);
- gl.glLoadIdentity();
- gl.glOrthof(0, width, height, 0, -1, 1);
- gl.glMatrixMode(GL11.GL_MODELVIEW);
- createGrid(gl, width, height);
- }
-
- public void onSurfaceCreated(GL10 gl, EGLConfig config) {
- }
-
- private void createGrid(GL10 gl, float w, float h) {
- mGrid = new Grid(2, 2);
- for (int j = 0; j < 2; j++) {
- for (int i = 0; i < 2; i++) {
- float x = w * i;
- float y = h * j;
- float z = 0.0f;
- mGrid.set(i,j, x, y, z);
- }
- }
- mGrid.createBufferObjects(gl);
- }
- }
-}
-
diff --git a/opengl/tests/textures/Android.mk b/opengl/tests/textures/Android.mk
deleted file mode 100644
index 97697d7..0000000
--- a/opengl/tests/textures/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- textures.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-textures
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/textures/textures.cpp b/opengl/tests/textures/textures.cpp
deleted file mode 100644
index 5d3d94e..0000000
--- a/opengl/tests/textures/textures.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-**
-** Copyright 2006, 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 <stdio.h>
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-using namespace android;
-
-int main(int argc, char** argv)
-{
- EGLint configAttribs[] = {
- EGL_DEPTH_SIZE, 0,
- EGL_NONE
- };
-
- EGLint majorVersion;
- EGLint minorVersion;
- EGLContext context;
- EGLConfig config;
- EGLSurface surface;
- EGLint w, h;
- EGLDisplay dpy;
-
- EGLNativeWindowType window = android_createDisplaySurface();
-
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglInitialize(dpy, &majorVersion, &minorVersion);
-
- status_t err = EGLUtils::selectConfigForNativeWindow(
- dpy, configAttribs, window, &config);
- if (err) {
- fprintf(stderr, "couldn't find an EGLConfig matching the screen format\n");
- return 0;
- }
-
- surface = eglCreateWindowSurface(dpy, config, window, NULL);
- context = eglCreateContext(dpy, config, NULL, NULL);
- eglMakeCurrent(dpy, surface, surface, context);
- eglQuerySurface(dpy, surface, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surface, EGL_HEIGHT, &h);
- GLint dim = w<h ? w : h;
-
-
- GLint crop[4] = { 0, 4, 4, -4 };
- glBindTexture(GL_TEXTURE_2D, 0);
- glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
- glEnable(GL_TEXTURE_2D);
- glColor4f(1,1,1,1);
-
- // packing is always 4
- uint8_t t8[] = {
- 0x00, 0x55, 0x00, 0x55,
- 0xAA, 0xFF, 0xAA, 0xFF,
- 0x00, 0x55, 0x00, 0x55,
- 0xAA, 0xFF, 0xAA, 0xFF };
-
- uint16_t t16[] = {
- 0x0000, 0x5555, 0x0000, 0x5555,
- 0xAAAA, 0xFFFF, 0xAAAA, 0xFFFF,
- 0x0000, 0x5555, 0x0000, 0x5555,
- 0xAAAA, 0xFFFF, 0xAAAA, 0xFFFF };
-
- uint16_t t5551[] = {
- 0x0000, 0xFFFF, 0x0000, 0xFFFF,
- 0xFFFF, 0x0000, 0xFFFF, 0x0000,
- 0x0000, 0xFFFF, 0x0000, 0xFFFF,
- 0xFFFF, 0x0000, 0xFFFF, 0x0000 };
-
- uint32_t t32[] = {
- 0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFFFF0000,
- 0xFF00FF00, 0xFFFF0000, 0xFF000000, 0xFF0000FF,
- 0xFF00FFFF, 0xFF00FF00, 0x00FF00FF, 0xFFFFFF00,
- 0xFF000000, 0xFFFF00FF, 0xFF00FFFF, 0xFFFFFFFF
- };
-
-
- glClear(GL_COLOR_BUFFER_BIT);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 4, 4, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, t8);
- glDrawTexiOES(0, 0, 0, dim/2, dim/2);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, t16);
- glDrawTexiOES(dim/2, 0, 0, dim/2, dim/2);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, t16);
- glDrawTexiOES(0, dim/2, 0, dim/2, dim/2);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, t32);
- glDrawTexiOES(dim/2, dim/2, 0, dim/2, dim/2);
-
- eglSwapBuffers(dpy, surface);
- return 0;
-}
diff --git a/opengl/tests/tritex/Android.mk b/opengl/tests/tritex/Android.mk
deleted file mode 100644
index 89faa87..0000000
--- a/opengl/tests/tritex/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
- tritex.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libEGL \
- libGLESv1_CM \
- libui
-
-LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
-
-LOCAL_MODULE:= test-opengl-tritex
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/tritex/tritex.cpp b/opengl/tests/tritex/tritex.cpp
deleted file mode 100644
index f183483..0000000
--- a/opengl/tests/tritex/tritex.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-// Calls glDrawElements() the number of times specified by
-// ITERATIONS. Should draw a checkerboard on the screen after
-// a few seconds.
-//
-// Ported from a Java version by Google.
-
-#include <EGL/egl.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-using namespace android;
-
-EGLDisplay eglDisplay;
-EGLSurface eglSurface;
-EGLContext eglContext;
-GLuint texture;
-
-#define FIXED_ONE 0x10000
-#define ITERATIONS 50
-
-int init_gl_surface(void);
-void free_gl_surface(void);
-void init_scene(void);
-void render(int quads);
-void create_texture(void);
-int readTimer(void);
-
-static void gluLookAt(float eyeX, float eyeY, float eyeZ,
- float centerX, float centerY, float centerZ, float upX, float upY,
- float upZ)
-{
- // See the OpenGL GLUT documentation for gluLookAt for a description
- // of the algorithm. We implement it in a straightforward way:
-
- float fx = centerX - eyeX;
- float fy = centerY - eyeY;
- float fz = centerZ - eyeZ;
-
- // Normalize f
- float rlf = 1.0f / sqrtf(fx*fx + fy*fy + fz*fz);
- fx *= rlf;
- fy *= rlf;
- fz *= rlf;
-
- // Normalize up
- float rlup = 1.0f / sqrtf(upX*upX + upY*upY + upZ*upZ);
- upX *= rlup;
- upY *= rlup;
- upZ *= rlup;
-
- // compute s = f x up (x means "cross product")
-
- float sx = fy * upZ - fz * upY;
- float sy = fz * upX - fx * upZ;
- float sz = fx * upY - fy * upX;
-
- // compute u = s x f
- float ux = sy * fz - sz * fy;
- float uy = sz * fx - sx * fz;
- float uz = sx * fy - sy * fx;
-
- float m[16] ;
- m[0] = sx;
- m[1] = ux;
- m[2] = -fx;
- m[3] = 0.0f;
-
- m[4] = sy;
- m[5] = uy;
- m[6] = -fy;
- m[7] = 0.0f;
-
- m[8] = sz;
- m[9] = uz;
- m[10] = -fz;
- m[11] = 0.0f;
-
- m[12] = 0.0f;
- m[13] = 0.0f;
- m[14] = 0.0f;
- m[15] = 1.0f;
-
- glMultMatrixf(m);
- glTranslatef(-eyeX, -eyeY, -eyeZ);
-}
-
-int main(int argc, char **argv)
-{
- int q;
- int start, end;
-
- printf("Initializing EGL...\n");
-
- if(!init_gl_surface())
- {
- printf("GL initialisation failed - exiting\n");
- return 0;
- }
-
- init_scene();
-
- create_texture();
-
- printf("Start test...\n");
-
- render(argc==2 ? atoi(argv[1]) : ITERATIONS);
-
- free_gl_surface();
-
- return 0;
-}
-
-int init_gl_surface(void)
-{
- EGLint numConfigs = 1;
- EGLConfig myConfig = {0};
- EGLint attrib[] =
- {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_DEPTH_SIZE, 16,
- EGL_NONE
- };
-
- if ( (eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY)) == EGL_NO_DISPLAY )
- {
- printf("eglGetDisplay failed\n");
- return 0;
- }
-
- if ( eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE )
- {
- printf("eglInitialize failed\n");
- return 0;
- }
-
- EGLNativeWindowType window = android_createDisplaySurface();
- EGLUtils::selectConfigForNativeWindow(eglDisplay, attrib, window, &myConfig);
-
- if ( (eglSurface = eglCreateWindowSurface(eglDisplay, myConfig,
- window, 0)) == EGL_NO_SURFACE )
- {
- printf("eglCreateWindowSurface failed\n");
- return 0;
- }
-
- if ( (eglContext = eglCreateContext(eglDisplay, myConfig, 0, 0)) == EGL_NO_CONTEXT )
- {
- printf("eglCreateContext failed\n");
- return 0;
- }
-
- if ( eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext) != EGL_TRUE )
- {
- printf("eglMakeCurrent failed\n");
- return 0;
- }
-
- return 1;
-}
-
-void free_gl_surface(void)
-{
- if (eglDisplay != EGL_NO_DISPLAY)
- {
- eglMakeCurrent( EGL_NO_DISPLAY, EGL_NO_SURFACE,
- EGL_NO_SURFACE, EGL_NO_CONTEXT );
- eglDestroyContext( eglDisplay, eglContext );
- eglDestroySurface( eglDisplay, eglSurface );
- eglTerminate( eglDisplay );
- eglDisplay = EGL_NO_DISPLAY;
- }
-}
-
-void init_scene(void)
-{
- glDisable(GL_DITHER);
- glEnable(GL_CULL_FACE);
-
- float ratio = 320.0f / 480.0f;
- glViewport(0, 0, 320, 480);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glFrustumf(-ratio, ratio, -1, 1, 1, 10);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- gluLookAt(
- 0, 0, 3, // eye
- 0, 0, 0, // center
- 0, 1, 0); // up
-
- glEnable(GL_TEXTURE_2D);
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-void create_texture(void)
-{
- const unsigned int on = 0xff0000ff;
- const unsigned int off = 0xffffffff;
- const unsigned int pixels[] =
- {
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- on, off, on, off, on, off, on, off,
- off, on, off, on, off, on, off, on,
- };
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-}
-
-void render(int quads)
-{
- int i, j;
-
- const GLfloat vertices[] = {
- -1, -1, 0,
- 1, -1, 0,
- 1, 1, 0,
- -1, 1, 0
- };
-
- const GLfixed texCoords[] = {
- 0, 0,
- FIXED_ONE, 0,
- FIXED_ONE, FIXED_ONE,
- 0, FIXED_ONE
- };
-
- const GLushort quadIndices[] = { 0, 1, 2, 0, 2, 3 };
-
-
- GLushort* indices = (GLushort*)malloc(quads*sizeof(quadIndices));
- for (i=0 ; i<quads ; i++)
- memcpy(indices+(sizeof(quadIndices)/sizeof(indices[0]))*i, quadIndices, sizeof(quadIndices));
-
- glVertexPointer(3, GL_FLOAT, 0, vertices);
- glTexCoordPointer(2, GL_FIXED, 0, texCoords);
-
- // make sure to do a couple eglSwapBuffers to make sure there are
- // no problems with the very first ones (who knows)
- glClearColor(0.4, 0.4, 0.4, 0.4);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(eglDisplay, eglSurface);
- glClearColor(0.6, 0.6, 0.6, 0.6);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(eglDisplay, eglSurface);
- glClearColor(1.0, 1.0, 1.0, 1.0);
-
- for (j=0 ; j<10 ; j++) {
- printf("loop %d / 10 (%d quads / loop)\n", j, quads);
-
- int nelem = sizeof(quadIndices)/sizeof(quadIndices[0]);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- glDrawElements(GL_TRIANGLES, nelem*quads, GL_UNSIGNED_SHORT, indices);
- eglSwapBuffers(eglDisplay, eglSurface);
- }
-
- free(indices);
-}
-
diff --git a/opengl/tools/glgen/.gitignore b/opengl/tools/glgen/.gitignore
deleted file mode 100644
index 007ec65..0000000
--- a/opengl/tools/glgen/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-generated
-out
diff --git a/opengl/tools/glgen/gen b/opengl/tools/glgen/gen
deleted file mode 100755
index 31f4190..0000000
--- a/opengl/tools/glgen/gen
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/bash
-set -u
-set -e
-rm -rf out generated
-
-mkdir out
-
-# Create dummy Java files for Android APIs that are used by the code we generate.
-# This allows us to test the generated code without building the rest of Android.
-
-mkdir -p out/javax/microedition/khronos/opengles
-mkdir -p out/com/google/android/gles_jni
-mkdir -p out/android/app
-mkdir -p out/android/graphics
-mkdir -p out/android/opengl
-mkdir -p out/android/content
-mkdir -p out/android/content/pm
-mkdir -p out/android/os
-mkdir -p out/android/util
-
-echo "package android.graphics;" > out/android/graphics/Canvas.java
-echo "public interface Canvas {}" >> out/android/graphics/Canvas.java
-
-echo "package android.app; import android.content.pm.IPackageManager; public class AppGlobals { public static IPackageManager getPackageManager() { return null;} }" > out/android/app/AppGlobals.java
-# echo "package android.content; import android.content.pm.PackageManager; public interface Context { public PackageManager getPackageManager(); }" > out/android/content/Context.java
-echo "package android.content.pm; public class ApplicationInfo {public int targetSdkVersion;}" > out/android/content/pm/ApplicationInfo.java
-echo "package android.content.pm; public interface IPackageManager {ApplicationInfo getApplicationInfo(java.lang.String packageName, int flags) throws android.os.RemoteException;}" > out/android/content/pm/IPackageManager.java
-echo "package android.os; public class Build {public static class VERSION_CODES { public static final int CUPCAKE = 3;}; }" > out/android/os/Build.java
-echo "package android.os; public class RemoteException extends Exception {}" > out/android/os/RemoteException.java
-echo "package android.util; public class Log {public static void w(String a, String b) {} public static void e(String a, String b) {}}" > out/android/util/Log.java
-
-GLFILE=out/javax/microedition/khronos/opengles/GL.java
-cp stubs/jsr239/GLHeader.java-if $GLFILE
-
-GLGEN_FILES="CFunc.java CType.java CodeEmitter.java GenerateGL.java GenerateGLES.java GLESCodeEmitter.java JFunc.java JniCodeEmitter.java JType.java Jsr239CodeEmitter.java ParameterChecker.java"
-
-pushd src > /dev/null
-javac ${GLGEN_FILES}
-JAVAC_RESULT=$?
-if [ $JAVAC_RESULT -ne 0 ]; then
- echo "Could not compile glgen."
- exit $JAVAC_RESULT
-fi
-popd > /dev/null
-
-echo "Generating JSR239-like APIs"
-java -classpath src GenerateGL -c specs/jsr239/glspec-1.0 specs/jsr239/glspec-1.0ext specs/jsr239/glspec-1.1 specs/jsr239/glspec-1.1ext specs/jsr239/glspec-1.1extpack specs/jsr239/glspec-checks
-JAVA_RESULT=$?
-if [ $JAVA_RESULT -ne 0 ]; then
- echo "Could not run GenerateGL."
- exit $JAVA_RESULT
-fi
-
-echo "Generating static OpenGLES 1.1 bindings"
-java -classpath src GenerateGLES
-JAVA_RESULT=$?
-if [ $JAVA_RESULT -ne 0 ]; then
- echo "Could not run GenerateGLES."
- exit $JAVA_RESULT
-fi
-
-rm src/*.class
-
-pushd out > /dev/null
-mkdir classes
-javac -d classes com/google/android/gles_jni/GLImpl.java javax/microedition/khronos/opengles/GL10.java javax/microedition/khronos/opengles/GL10Ext.java javax/microedition/khronos/opengles/GL11.java javax/microedition/khronos/opengles/GL11Ext.java javax/microedition/khronos/opengles/GL11ExtensionPack.java android/opengl/GLES10.java android/opengl/GLES10Ext.java android/opengl/GLES11.java android/opengl/GLES11Ext.java android/opengl/GLES20.java
-popd > /dev/null
-JAVA_RESULT=$?
-if [ $JAVA_RESULT -ne 0 ]; then
- echo "Could not compile generated classes."
- exit $JAVA_RESULT
-fi
-
-rm -rf generated
-mkdir -p generated/C
-cp out/com_google_android_gles_jni_GLImpl.cpp generated/C
-cp -r out/com generated
-cp -r out/javax generated
-
-cp out/android_opengl_*.cpp generated/C
-mkdir -p generated/android/opengl
-cp -r out/android/opengl generated/android
-
-rm -rf out
-KEEP_GENERATED=0
-SAID_PLEASE=0
-
-# compareGenerated destDir generatedDir file
-compareGenerated() {
- if cmp -s $1/$3 $2/$3 ; then
- echo "# " $3 unchanged
- else
- if [ $SAID_PLEASE == "0" ] ; then
- echo Please evaluate the following commands:
- echo
- SAID_PLEASE=1
- fi
- echo " " cp $2/$3 $1
- echo " " git add $1/$3
- KEEP_GENERATED=1
- fi
-}
-
-compareGenerated ../../../core/jni generated/C com_google_android_gles_jni_GLImpl.cpp
-compareGenerated ../../java/com/google/android/gles_jni generated/com/google/android/gles_jni GLImpl.java
-
-for x in GL.java GL10.java GL10Ext.java GL11.java GL11Ext.java GL11ExtensionPack.java
-do
- compareGenerated ../../java/javax/microedition/khronos/opengles generated/javax/microedition/khronos/opengles $x
-done
-
-for x in GLES10 GLES10Ext GLES11 GLES11Ext GLES20
-do
- compareGenerated ../../java/android/opengl generated/android/opengl ${x}.java
- compareGenerated ../../../core/jni generated/C android_opengl_${x}.cpp
-done
-
-if [ $KEEP_GENERATED == "0" ] ; then
- rm -rf generated
-fi
diff --git a/opengl/tools/glgen/specs/gles11/GLES10.spec b/opengl/tools/glgen/specs/gles11/GLES10.spec
deleted file mode 100644
index 8e1152d..0000000
--- a/opengl/tools/glgen/specs/gles11/GLES10.spec
+++ /dev/null
@@ -1,106 +0,0 @@
-void glActiveTexture ( GLenum texture )
-void glAlphaFunc ( GLenum func, GLclampf ref )
-void glAlphaFuncx ( GLenum func, GLclampx ref )
-void glBindTexture ( GLenum target, GLuint texture )
-void glBlendFunc ( GLenum sfactor, GLenum dfactor )
-void glClear ( GLbitfield mask )
-void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
-void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha )
-void glClearDepthf ( GLclampf depth )
-void glClearDepthx ( GLclampx depth )
-void glClearStencil ( GLint s )
-void glClientActiveTexture ( GLenum texture )
-void glColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
-void glColor4x ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha )
-void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
-void glColorPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data )
-void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data )
-void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
-void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height )
-void glCullFace ( GLenum mode )
-void glDeleteTextures ( GLsizei n, const GLuint *textures )
-void glDepthFunc ( GLenum func )
-void glDepthMask ( GLboolean flag )
-void glDepthRangef ( GLclampf zNear, GLclampf zFar )
-void glDepthRangex ( GLclampx zNear, GLclampx zFar )
-void glDisable ( GLenum cap )
-void glDisableClientState ( GLenum array )
-void glDrawArrays ( GLenum mode, GLint first, GLsizei count )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
-void glEnable ( GLenum cap )
-void glEnableClientState ( GLenum array )
-void glFinish ( void )
-void glFlush ( void )
-void glFogf ( GLenum pname, GLfloat param )
-void glFogfv ( GLenum pname, const GLfloat *params )
-void glFogx ( GLenum pname, GLfixed param )
-void glFogxv ( GLenum pname, const GLfixed *params )
-void glFrontFace ( GLenum mode )
-void glFrustumf ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
-void glFrustumx ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar )
-void glGenTextures ( GLsizei n, GLuint *textures )
-GLenum glGetError ( void )
-void glGetIntegerv ( GLenum pname, GLint *params )
-const GLubyte * glGetString ( GLenum name )
-void glHint ( GLenum target, GLenum mode )
-void glLightModelf ( GLenum pname, GLfloat param )
-void glLightModelfv ( GLenum pname, const GLfloat *params )
-void glLightModelx ( GLenum pname, GLfixed param )
-void glLightModelxv ( GLenum pname, const GLfixed *params )
-void glLightf ( GLenum light, GLenum pname, GLfloat param )
-void glLightfv ( GLenum light, GLenum pname, const GLfloat *params )
-void glLightx ( GLenum light, GLenum pname, GLfixed param )
-void glLightxv ( GLenum light, GLenum pname, const GLfixed *params )
-void glLineWidth ( GLfloat width )
-void glLineWidthx ( GLfixed width )
-void glLoadIdentity ( void )
-void glLoadMatrixf ( const GLfloat *m )
-void glLoadMatrixx ( const GLfixed *m )
-void glLogicOp ( GLenum opcode )
-void glMaterialf ( GLenum face, GLenum pname, GLfloat param )
-void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params )
-void glMaterialx ( GLenum face, GLenum pname, GLfixed param )
-void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params )
-void glMatrixMode ( GLenum mode )
-void glMultMatrixf ( const GLfloat *m )
-void glMultMatrixx ( const GLfixed *m )
-void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q )
-void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q )
-void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz )
-void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz )
-void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer )
-void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
-void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar )
-void glPixelStorei ( GLenum pname, GLint param )
-void glPointSize ( GLfloat size )
-void glPointSizex ( GLfixed size )
-void glPolygonOffset ( GLfloat factor, GLfloat units )
-void glPolygonOffsetx ( GLfixed factor, GLfixed units )
-void glPopMatrix ( void )
-void glPushMatrix ( void )
-void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )
-void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
-void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z )
-void glSampleCoverage ( GLclampf value, GLboolean invert )
-void glSampleCoveragex ( GLclampx value, GLboolean invert )
-void glScalef ( GLfloat x, GLfloat y, GLfloat z )
-void glScalex ( GLfixed x, GLfixed y, GLfixed z )
-void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height )
-void glShadeModel ( GLenum mode )
-void glStencilFunc ( GLenum func, GLint ref, GLuint mask )
-void glStencilMask ( GLuint mask )
-void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass )
-void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glTexEnvf ( GLenum target, GLenum pname, GLfloat param )
-void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params )
-void glTexEnvx ( GLenum target, GLenum pname, GLfixed param )
-void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params )
-void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels )
-void glTexParameterf ( GLenum target, GLenum pname, GLfloat param )
-void glTexParameterx ( GLenum target, GLenum pname, GLfixed param )
-void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels )
-void glTranslatef ( GLfloat x, GLfloat y, GLfloat z )
-void glTranslatex ( GLfixed x, GLfixed y, GLfixed z )
-void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
diff --git a/opengl/tools/glgen/specs/gles11/GLES10Ext.spec b/opengl/tools/glgen/specs/gles11/GLES10Ext.spec
deleted file mode 100644
index 53f6c65..0000000
--- a/opengl/tools/glgen/specs/gles11/GLES10Ext.spec
+++ /dev/null
@@ -1 +0,0 @@
-GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent )
diff --git a/opengl/tools/glgen/specs/gles11/GLES11.spec b/opengl/tools/glgen/specs/gles11/GLES11.spec
deleted file mode 100644
index 5527c18..0000000
--- a/opengl/tools/glgen/specs/gles11/GLES11.spec
+++ /dev/null
@@ -1,44 +0,0 @@
-void glBindBuffer ( GLenum target, GLuint buffer )
-void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage )
-void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data )
-void glClipPlanef ( GLenum plane, const GLfloat *equation )
-void glClipPlanex ( GLenum plane, const GLfixed *equation )
-void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
-void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset )
-void glDeleteBuffers ( GLsizei n, const GLuint *buffers )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
-void glGenBuffers ( GLsizei n, GLuint *buffers )
-void glGetBooleanv ( GLenum pname, GLboolean *params )
-void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetClipPlanef ( GLenum pname, GLfloat *eqn )
-void glGetClipPlanex ( GLenum pname, GLfixed *eqn )
-void glGetFixedv ( GLenum pname, GLfixed *params )
-void glGetFloatv ( GLenum pname, GLfloat *params )
-void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params )
-void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params )
-void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params )
-void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params )
-// void glGetPointerv ( GLenum pname, void **params )
-void glGetTexEnvfv ( GLenum env, GLenum pname, GLfloat *params )
-void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params )
-void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params )
-void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params )
-void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params )
-GLboolean glIsBuffer ( GLuint buffer )
-GLboolean glIsEnabled ( GLenum cap )
-GLboolean glIsTexture ( GLuint texture )
-void glNormalPointer ( GLenum type, GLsizei stride, GLint offset )
-void glPointParameterf ( GLenum pname, GLfloat param )
-void glPointParameterfv ( GLenum pname, const GLfloat *params )
-void glPointParameterx ( GLenum pname, GLfixed param )
-void glPointParameterxv ( GLenum pname, const GLfixed *params )
-void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer )
-void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset )
-void glTexEnvi ( GLenum target, GLenum pname, GLint param )
-void glTexEnviv ( GLenum target, GLenum pname, const GLint *params )
-void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params )
-void glTexParameteri ( GLenum target, GLenum pname, GLint param )
-void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params )
-void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params )
-void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset )
diff --git a/opengl/tools/glgen/specs/gles11/GLES11Ext.spec b/opengl/tools/glgen/specs/gles11/GLES11Ext.spec
deleted file mode 100644
index cd7333a..0000000
--- a/opengl/tools/glgen/specs/gles11/GLES11Ext.spec
+++ /dev/null
@@ -1,90 +0,0 @@
-void glBlendEquationSeparateOES ( GLenum modeRGB, GLenum modeAlpha )
-void glBlendFuncSeparateOES ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
-void glBlendEquationOES ( GLenum mode )
-void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height )
-void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height )
-void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height )
-void glDrawTexsvOES ( const GLshort *coords )
-void glDrawTexivOES ( const GLint *coords )
-void glDrawTexxvOES ( const GLfixed *coords )
-void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height )
-void glDrawTexfvOES ( const GLfloat *coords )
-void glEGLImageTargetTexture2DOES ( GLenum target, GLeglImageOES image )
-void glEGLImageTargetRenderbufferStorageOES ( GLenum target, GLeglImageOES image )
-void glAlphaFuncxOES ( GLenum func, GLclampx ref )
-void glClearColorxOES ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha )
-void glClearDepthxOES ( GLclampx depth )
-void glClipPlanexOES ( GLenum plane, const GLfixed *equation )
-void glColor4xOES ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha )
-void glDepthRangexOES ( GLclampx zNear, GLclampx zFar )
-void glFogxOES ( GLenum pname, GLfixed param )
-void glFogxvOES ( GLenum pname, const GLfixed *params )
-void glFrustumxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar )
-void glGetClipPlanexOES ( GLenum pname, GLfixed *eqn )
-void glGetFixedvOES ( GLenum pname, GLfixed *params )
-void glGetLightxvOES ( GLenum light, GLenum pname, GLfixed *params )
-void glGetMaterialxvOES ( GLenum face, GLenum pname, GLfixed *params )
-void glGetTexEnvxvOES ( GLenum env, GLenum pname, GLfixed *params )
-void glGetTexParameterxvOES ( GLenum target, GLenum pname, GLfixed *params )
-void glLightModelxOES ( GLenum pname, GLfixed param )
-void glLightModelxvOES ( GLenum pname, const GLfixed *params )
-void glLightxOES ( GLenum light, GLenum pname, GLfixed param )
-void glLightxvOES ( GLenum light, GLenum pname, const GLfixed *params )
-void glLineWidthxOES ( GLfixed width )
-void glLoadMatrixxOES ( const GLfixed *m )
-void glMaterialxOES ( GLenum face, GLenum pname, GLfixed param )
-void glMaterialxvOES ( GLenum face, GLenum pname, const GLfixed *params )
-void glMultMatrixxOES ( const GLfixed *m )
-void glMultiTexCoord4xOES ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q )
-void glNormal3xOES ( GLfixed nx, GLfixed ny, GLfixed nz )
-void glOrthoxOES ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar )
-void glPointParameterxOES ( GLenum pname, GLfixed param )
-void glPointParameterxvOES ( GLenum pname, const GLfixed *params )
-void glPointSizexOES ( GLfixed size )
-void glPolygonOffsetxOES ( GLfixed factor, GLfixed units )
-void glRotatexOES ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z )
-void glSampleCoveragexOES ( GLclampx value, GLboolean invert )
-void glScalexOES ( GLfixed x, GLfixed y, GLfixed z )
-void glTexEnvxOES ( GLenum target, GLenum pname, GLfixed param )
-void glTexEnvxvOES ( GLenum target, GLenum pname, const GLfixed *params )
-void glTexParameterxOES ( GLenum target, GLenum pname, GLfixed param )
-void glTexParameterxvOES ( GLenum target, GLenum pname, const GLfixed *params )
-void glTranslatexOES ( GLfixed x, GLfixed y, GLfixed z )
-GLboolean glIsRenderbufferOES ( GLuint renderbuffer )
-void glBindRenderbufferOES ( GLenum target, GLuint renderbuffer )
-void glDeleteRenderbuffersOES ( GLsizei n, const GLuint *renderbuffers )
-void glGenRenderbuffersOES ( GLsizei n, GLuint *renderbuffers )
-void glRenderbufferStorageOES ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height )
-void glGetRenderbufferParameterivOES ( GLenum target, GLenum pname, GLint *params )
-GLboolean glIsFramebufferOES ( GLuint framebuffer )
-void glBindFramebufferOES ( GLenum target, GLuint framebuffer )
-void glDeleteFramebuffersOES ( GLsizei n, const GLuint *framebuffers )
-void glGenFramebuffersOES ( GLsizei n, GLuint *framebuffers )
-GLenum glCheckFramebufferStatusOES ( GLenum target )
-void glFramebufferRenderbufferOES ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer )
-void glFramebufferTexture2DOES ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level )
-void glGetFramebufferAttachmentParameterivOES ( GLenum target, GLenum attachment, GLenum pname, GLint *params )
-void glGenerateMipmapOES ( GLenum target )
-// Hard to export to Java:
-// void *glMapBufferOES ( GLenum target, GLenum access )
-// GLboolean glUnmapBufferOES ( GLenum target )
-// void glGetBufferPointervOES ( GLenum target, GLenum pname, void **params )
-void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex )
-void glLoadPaletteFromModelViewMatrixOES ( void )
-void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glDepthRangefOES ( GLclampf zNear, GLclampf zFar )
-void glFrustumfOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
-void glOrthofOES ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
-void glClipPlanefOES ( GLenum plane, const GLfloat *equation )
-void glGetClipPlanefOES ( GLenum pname, GLfloat *eqn )
-void glClearDepthfOES ( GLclampf depth )
-void glTexGenfOES ( GLenum coord, GLenum pname, GLfloat param )
-void glTexGenfvOES ( GLenum coord, GLenum pname, const GLfloat *params )
-void glTexGeniOES ( GLenum coord, GLenum pname, GLint param )
-void glTexGenivOES ( GLenum coord, GLenum pname, const GLint *params )
-void glTexGenxOES ( GLenum coord, GLenum pname, GLfixed param )
-void glTexGenxvOES ( GLenum coord, GLenum pname, const GLfixed *params )
-void glGetTexGenfvOES ( GLenum coord, GLenum pname, GLfloat *params )
-void glGetTexGenivOES ( GLenum coord, GLenum pname, GLint *params )
-void glGetTexGenxvOES ( GLenum coord, GLenum pname, GLfixed *params )
diff --git a/opengl/tools/glgen/specs/gles11/GLES20.spec b/opengl/tools/glgen/specs/gles11/GLES20.spec
deleted file mode 100644
index ee88f59..0000000
--- a/opengl/tools/glgen/specs/gles11/GLES20.spec
+++ /dev/null
@@ -1,144 +0,0 @@
-void glActiveTexture ( GLenum texture )
-void glAttachShader ( GLuint program, GLuint shader )
-void glBindAttribLocation ( GLuint program, GLuint index, const char *name )
-void glBindBuffer ( GLenum target, GLuint buffer )
-void glBindFramebuffer ( GLenum target, GLuint framebuffer )
-void glBindRenderbuffer ( GLenum target, GLuint renderbuffer )
-void glBindTexture ( GLenum target, GLuint texture )
-void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
-void glBlendEquation ( GLenum mode )
-void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha )
-void glBlendFunc ( GLenum sfactor, GLenum dfactor )
-void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
-void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage )
-void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data )
-GLenum glCheckFramebufferStatus ( GLenum target )
-void glClear ( GLbitfield mask )
-void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
-void glClearDepthf ( GLclampf depth )
-void glClearStencil ( GLint s )
-void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
-void glCompileShader ( GLuint shader )
-void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data )
-void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data )
-void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
-void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height )
-GLuint glCreateProgram ( void )
-GLuint glCreateShader ( GLenum type )
-void glCullFace ( GLenum mode )
-void glDeleteBuffers ( GLsizei n, const GLuint *buffers )
-void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers )
-void glDeleteProgram ( GLuint program )
-void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers )
-void glDeleteShader ( GLuint shader )
-void glDeleteTextures ( GLsizei n, const GLuint *textures )
-void glDepthFunc ( GLenum func )
-void glDepthMask ( GLboolean flag )
-void glDepthRangef ( GLclampf zNear, GLclampf zFar )
-void glDetachShader ( GLuint program, GLuint shader )
-void glDisable ( GLenum cap )
-void glDisableVertexAttribArray ( GLuint index )
-void glDrawArrays ( GLenum mode, GLint first, GLsizei count )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
-void glEnable ( GLenum cap )
-void glEnableVertexAttribArray ( GLuint index )
-void glFinish ( void )
-void glFlush ( void )
-void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer )
-void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level )
-void glFrontFace ( GLenum mode )
-void glGenBuffers ( GLsizei n, GLuint *buffers )
-void glGenerateMipmap ( GLenum target )
-void glGenFramebuffers ( GLsizei n, GLuint *framebuffers )
-void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers )
-void glGenTextures ( GLsizei n, GLuint *textures )
-void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
-void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
-void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders )
-int glGetAttribLocation ( GLuint program, const char *name )
-void glGetBooleanv ( GLenum pname, GLboolean *params )
-void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params )
-GLenum glGetError ( void )
-void glGetFloatv ( GLenum pname, GLfloat *params )
-void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params )
-void glGetIntegerv ( GLenum pname, GLint *params )
-void glGetProgramiv ( GLuint program, GLenum pname, GLint *params )
-void glGetProgramInfoLog ( GLuint program, GLsizei bufsize, GLsizei *length, char *infolog )
-void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params )
-void glGetShaderInfoLog ( GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog )
-void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision )
-void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
-const GLubyte * glGetString ( GLenum name )
-void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params )
-void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetUniformfv ( GLuint program, GLint location, GLfloat *params )
-void glGetUniformiv ( GLuint program, GLint location, GLint *params )
-int glGetUniformLocation ( GLuint program, const char *name )
-void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params )
-void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params )
-// void glGetVertexAttribPointerv ( GLuint index, GLenum pname, void **pointer )
-void glHint ( GLenum target, GLenum mode )
-GLboolean glIsBuffer ( GLuint buffer )
-GLboolean glIsEnabled ( GLenum cap )
-GLboolean glIsFramebuffer ( GLuint framebuffer )
-GLboolean glIsProgram ( GLuint program )
-GLboolean glIsRenderbuffer ( GLuint renderbuffer )
-GLboolean glIsShader ( GLuint shader )
-GLboolean glIsTexture ( GLuint texture )
-void glLineWidth ( GLfloat width )
-void glLinkProgram ( GLuint program )
-void glPixelStorei ( GLenum pname, GLint param )
-void glPolygonOffset ( GLfloat factor, GLfloat units )
-void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )
-void glReleaseShaderCompiler ( void )
-void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height )
-void glSampleCoverage ( GLclampf value, GLboolean invert )
-void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height )
-void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length )
-void glShaderSource ( GLuint shader )
-void glStencilFunc ( GLenum func, GLint ref, GLuint mask )
-void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask )
-void glStencilMask ( GLuint mask )
-void glStencilMaskSeparate ( GLenum face, GLuint mask )
-void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass )
-void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass )
-void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels )
-void glTexParameterf ( GLenum target, GLenum pname, GLfloat param )
-void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params )
-void glTexParameteri ( GLenum target, GLenum pname, GLint param )
-void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params )
-void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels )
-void glUniform1f ( GLint location, GLfloat x )
-void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform1i ( GLint location, GLint x )
-void glUniform1iv ( GLint location, GLsizei count, const GLint *v )
-void glUniform2f ( GLint location, GLfloat x, GLfloat y )
-void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform2i ( GLint location, GLint x, GLint y )
-void glUniform2iv ( GLint location, GLsizei count, const GLint *v )
-void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z )
-void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform3i ( GLint location, GLint x, GLint y, GLint z )
-void glUniform3iv ( GLint location, GLsizei count, const GLint *v )
-void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w )
-void glUniform4iv ( GLint location, GLsizei count, const GLint *v )
-void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
-void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
-void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
-void glUseProgram ( GLuint program )
-void glValidateProgram ( GLuint program )
-void glVertexAttrib1f ( GLuint indx, GLfloat x )
-void glVertexAttrib1fv ( GLuint indx, const GLfloat *values )
-void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y )
-void glVertexAttrib2fv ( GLuint indx, const GLfloat *values )
-void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z )
-void glVertexAttrib3fv ( GLuint indx, const GLfloat *values )
-void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-void glVertexAttrib4fv ( GLuint indx, const GLfloat *values )
-void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset )
-void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
-void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
diff --git a/opengl/tools/glgen/specs/gles11/checks.spec b/opengl/tools/glgen/specs/gles11/checks.spec
deleted file mode 100644
index f478a32..0000000
--- a/opengl/tools/glgen/specs/gles11/checks.spec
+++ /dev/null
@@ -1,42 +0,0 @@
-glClipPlanef check eqn 4
-glClipPlanex check eqn 4
-glGetClipPlanefOES check eqn 4
-glGetClipPlanexOES check eqn 4
-glDeleteBuffers check buffers n
-glDeleteTextures check textures n
-glDrawElements check_AIOOBE indices count
-glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR
-glGenBuffers check buffers n
-glGenTextures check textures n
-glGetClipPlane check eqn 4
-glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS
-glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glGetTexParameter check params 1
-glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT
-glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glLoadMatrix check m 16
-glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glMultMatrix check m 16
-glPointParameter check params 1
-glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glTexImage2D nullAllowed
-glTexSubImage2D nullAllowed
-glBufferData nullAllowed check data size
-glBufferSubData check data size
-glTexParameter check params 1
-glQueryMatrixxOES check mantissa 16 check exponent 16 return -1
-glDrawTexfvOES check coords 5
-glDrawTexivOES check coords 5
-glDrawTexsvOES check coords 5
-glDrawTexxvOES check coords 5
-glDeleteFramebuffersOES check framebuffers n
-glDeleteRenderbuffersOES check renderbuffers n
-glGenFramebuffersOES check framebuffers n
-glGenRenderbuffersOES check renderbuffers n
-glGetBufferParameter check params 1
-glGetFramebufferAttachmentParameterivOES check params 1
-glGetRenderbufferParameterivOES check params 1
-glGetTexGen ifcheck params 1 pname GL_TEXTURE_GEN_MODE ifcheck params 4 pname GL_OBJECT_PLANE,GL_EYE_PLANE
-
diff --git a/opengl/tools/glgen/specs/jsr239/glspec-1.0 b/opengl/tools/glgen/specs/jsr239/glspec-1.0
deleted file mode 100644
index c442320..0000000
--- a/opengl/tools/glgen/specs/jsr239/glspec-1.0
+++ /dev/null
@@ -1,106 +0,0 @@
-void glActiveTexture ( GLenum texture )
-void glAlphaFunc ( GLenum func, GLclampf ref )
-void glAlphaFuncx ( GLenum func, GLclampx ref )
-void glBindTexture ( GLenum target, GLuint texture )
-void glBlendFunc ( GLenum sfactor, GLenum dfactor )
-void glClear ( GLbitfield mask )
-void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
-void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha )
-void glClearDepthf ( GLclampf depth )
-void glClearDepthx ( GLclampx depth )
-void glClearStencil ( GLint s )
-void glClientActiveTexture ( GLenum texture )
-void glColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
-void glColor4x ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha )
-void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
-void glColorPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data )
-void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data )
-void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
-void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height )
-void glCullFace ( GLenum mode )
-void glDeleteTextures ( GLsizei n, const GLuint *textures )
-void glDepthFunc ( GLenum func )
-void glDepthMask ( GLboolean flag )
-void glDepthRangef ( GLclampf zNear, GLclampf zFar )
-void glDepthRangex ( GLclampx zNear, GLclampx zFar )
-void glDisable ( GLenum cap )
-void glDisableClientState ( GLenum array )
-void glDrawArrays ( GLenum mode, GLint first, GLsizei count )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
-void glEnable ( GLenum cap )
-void glEnableClientState ( GLenum array )
-void glFinish ( void )
-void glFlush ( void )
-void glFogf ( GLenum pname, GLfloat param )
-void glFogfv ( GLenum pname, const GLfloat *params )
-void glFogx ( GLenum pname, GLfixed param )
-void glFogxv ( GLenum pname, const GLfixed *params )
-void glFrontFace ( GLenum mode )
-void glFrustumf ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
-void glFrustumx ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar )
-void glGenTextures ( GLsizei n, GLuint *textures )
-GLenum glGetError ( void )
-void glGetIntegerv ( GLenum pname, GLint *params )
-const GLubyte * glGetString ( GLenum name )
-void glHint ( GLenum target, GLenum mode )
-void glLightModelf ( GLenum pname, GLfloat param )
-void glLightModelfv ( GLenum pname, const GLfloat *params )
-void glLightModelx ( GLenum pname, GLfixed param )
-void glLightModelxv ( GLenum pname, const GLfixed *params )
-void glLightf ( GLenum light, GLenum pname, GLfloat param )
-void glLightfv ( GLenum light, GLenum pname, const GLfloat *params )
-void glLightx ( GLenum light, GLenum pname, GLfixed param )
-void glLightxv ( GLenum light, GLenum pname, const GLfixed *params )
-void glLineWidth ( GLfloat width )
-void glLineWidthx ( GLfixed width )
-void glLoadIdentity ( void )
-void glLoadMatrixf ( const GLfloat *m )
-void glLoadMatrixx ( const GLfixed *m )
-void glLogicOp ( GLenum opcode )
-void glMaterialf ( GLenum face, GLenum pname, GLfloat param )
-void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params )
-void glMaterialx ( GLenum face, GLenum pname, GLfixed param )
-void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params )
-void glMatrixMode ( GLenum mode )
-void glMultMatrixf ( const GLfloat *m )
-void glMultMatrixx ( const GLfixed *m )
-void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q )
-void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q )
-void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz )
-void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz )
-void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer )
-void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
-void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar )
-void glPixelStorei ( GLenum pname, GLint param )
-void glPointSize ( GLfloat size )
-void glPointSizex ( GLfixed size )
-void glPolygonOffset ( GLfloat factor, GLfloat units )
-void glPolygonOffsetx ( GLfixed factor, GLfixed units )
-void glPopMatrix ( void )
-void glPushMatrix ( void )
-void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )
-void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
-void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z )
-void glSampleCoverage ( GLclampf value, GLboolean invert )
-void glSampleCoveragex ( GLclampx value, GLboolean invert )
-void glScalef ( GLfloat x, GLfloat y, GLfloat z )
-void glScalex ( GLfixed x, GLfixed y, GLfixed z )
-void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height )
-void glShadeModel ( GLenum mode )
-void glStencilFunc ( GLenum func, GLint ref, GLuint mask )
-void glStencilMask ( GLuint mask )
-void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass )
-void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glTexEnvf ( GLenum target, GLenum pname, GLfloat param )
-void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params )
-void glTexEnvx ( GLenum target, GLenum pname, GLfixed param )
-void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params )
-void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels )
-void glTexParameterf ( GLenum target, GLenum pname, GLfloat param )
-void glTexParameterx ( GLenum target, GLenum pname, GLfixed param )
-void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels )
-void glTranslatef ( GLfloat x, GLfloat y, GLfloat z )
-void glTranslatex ( GLfixed x, GLfixed y, GLfixed z )
-void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
diff --git a/opengl/tools/glgen/specs/jsr239/glspec-1.0ext b/opengl/tools/glgen/specs/jsr239/glspec-1.0ext
deleted file mode 100644
index 7d19758..0000000
--- a/opengl/tools/glgen/specs/jsr239/glspec-1.0ext
+++ /dev/null
@@ -1 +0,0 @@
-GLbitfield glQueryMatrixxOES ( GLfixed *mantissa, GLint *exponent )
diff --git a/opengl/tools/glgen/specs/jsr239/glspec-1.1 b/opengl/tools/glgen/specs/jsr239/glspec-1.1
deleted file mode 100644
index 9149a7f..0000000
--- a/opengl/tools/glgen/specs/jsr239/glspec-1.1
+++ /dev/null
@@ -1,42 +0,0 @@
-void glBindBuffer ( GLenum target, GLuint buffer )
-void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage )
-void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data )
-void glClipPlanef ( GLenum plane, const GLfloat *equation )
-void glClipPlanex ( GLenum plane, const GLfixed *equation )
-void glColor4ub ( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
-void glColorPointer ( GLint size, GLenum type, GLsizei stride, GLint offset )
-void glDeleteBuffers ( GLsizei n, const GLuint *buffers )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
-void glGenBuffers ( GLsizei n, GLuint *buffers )
-void glGetBooleanv ( GLenum pname, GLboolean *params )
-void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetClipPlanef ( GLenum pname, GLfloat *eqn )
-void glGetClipPlanex ( GLenum pname, GLfixed *eqn )
-void glGetFixedv ( GLenum pname, GLfixed *params )
-void glGetFloatv ( GLenum pname, GLfloat *params )
-void glGetLightfv ( GLenum light, GLenum pname, GLfloat *params )
-void glGetLightxv ( GLenum light, GLenum pname, GLfixed *params )
-void glGetMaterialfv ( GLenum face, GLenum pname, GLfloat *params )
-void glGetMaterialxv ( GLenum face, GLenum pname, GLfixed *params )
-void glGetTexEnviv ( GLenum env, GLenum pname, GLint *params )
-void glGetTexEnvxv ( GLenum env, GLenum pname, GLfixed *params )
-void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params )
-void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetTexParameterxv ( GLenum target, GLenum pname, GLfixed *params )
-GLboolean glIsBuffer ( GLuint buffer )
-GLboolean glIsEnabled ( GLenum cap )
-GLboolean glIsTexture ( GLuint texture )
-void glNormalPointer ( GLenum type, GLsizei stride, GLint offset )
-void glPointParameterf ( GLenum pname, GLfloat param )
-void glPointParameterfv ( GLenum pname, const GLfloat *params )
-void glPointParameterx ( GLenum pname, GLfixed param )
-void glPointParameterxv ( GLenum pname, const GLfixed *params )
-void glPointSizePointerOES ( GLenum type, GLsizei stride, const GLvoid *pointer )
-void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, GLint offset )
-void glTexEnvi ( GLenum target, GLenum pname, GLint param )
-void glTexEnviv ( GLenum target, GLenum pname, const GLint *params )
-void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params )
-void glTexParameteri ( GLenum target, GLenum pname, GLint param )
-void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params )
-void glTexParameterxv ( GLenum target, GLenum pname, const GLfixed *params )
-void glVertexPointer ( GLint size, GLenum type, GLsizei stride, GLint offset )
diff --git a/opengl/tools/glgen/specs/jsr239/glspec-1.1ext b/opengl/tools/glgen/specs/jsr239/glspec-1.1ext
deleted file mode 100644
index cc08c73..0000000
--- a/opengl/tools/glgen/specs/jsr239/glspec-1.1ext
+++ /dev/null
@@ -1,16 +0,0 @@
-void glCurrentPaletteMatrixOES ( GLuint matrixpaletteindex )
-void glDrawTexfOES ( GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height )
-void glDrawTexfvOES ( const GLfloat *coords )
-void glDrawTexiOES ( GLint x, GLint y, GLint z, GLint width, GLint height )
-void glDrawTexivOES ( const GLint *coords )
-void glDrawTexsOES ( GLshort x, GLshort y, GLshort z, GLshort width, GLshort height )
-void glDrawTexsvOES ( const GLshort *coords )
-void glDrawTexxOES ( GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height )
-void glDrawTexxvOES ( const GLfixed *coords )
-void glEnable ( GLenum cap )
-void glEnableClientState ( GLenum array )
-void glLoadPaletteFromModelViewMatrixOES ( void )
-void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glMatrixIndexPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset )
-void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer )
-void glWeightPointerOES ( GLint size, GLenum type, GLsizei stride, GLint offset )
diff --git a/opengl/tools/glgen/specs/jsr239/glspec-1.1extpack b/opengl/tools/glgen/specs/jsr239/glspec-1.1extpack
deleted file mode 100644
index d6012d9..0000000
--- a/opengl/tools/glgen/specs/jsr239/glspec-1.1extpack
+++ /dev/null
@@ -1,38 +0,0 @@
-void glBindFramebufferOES ( GLint target, GLint framebuffer )
-void glBindRenderbufferOES ( GLint target, GLint renderbuffer )
-void glBindTexture ( GLint target, GLint texture )
-void glBlendEquation ( GLint mode )
-void glBlendEquationSeparate ( GLint modeRGB, GLint modeAlpha )
-void glBlendFuncSeparate ( GLint srcRGB, GLint dstRGB, GLint srcAlpha, GLint dstAlpha )
-GLint glCheckFramebufferStatusOES ( GLint target )
-void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data )
-void glCopyTexImage2D ( GLint target, GLint level, GLint internalformat, GLint x, GLint y, GLint width, GLint height, GLint border )
-void glDeleteFramebuffersOES ( GLint n, GLuint *framebuffers )
-void glDeleteRenderbuffersOES ( GLint n, GLuint *renderbuffers )
-void glEnable ( GLint cap )
-void glFramebufferRenderbufferOES ( GLint target, GLint attachment, GLint renderbuffertarget, GLint renderbuffer )
-void glFramebufferTexture2DOES ( GLint target, GLint attachment, GLint textarget, GLint texture, GLint level )
-void glGenerateMipmapOES ( GLint target )
-void glGenFramebuffersOES ( GLint n, GLuint *framebuffers )
-void glGenRenderbuffersOES ( GLint n, GLuint *renderbuffers )
-void glGetFramebufferAttachmentParameterivOES ( GLint target, GLint attachment, GLint pname, GLint *params )
-void glGetIntegerv ( GLint pname, GLint *params )
-void glGetRenderbufferParameterivOES ( GLint target, GLint pname, GLint *params )
-void glGetTexGenfv ( GLint coord, GLint pname, GLfloat *params )
-void glGetTexGeniv ( GLint coord, GLint pname, GLint *params )
-void glGetTexGenxv ( GLint coord, GLint pname, GLint *params )
-GLboolean glIsFramebufferOES ( GLint framebuffer )
-GLboolean glIsRenderbufferOES ( GLint renderbuffer )
-void glRenderbufferStorageOES ( GLint target, GLint internalformat, GLint width, GLint height )
-void glStencilOp ( GLint fail, GLint zfail, GLint zpass )
-void glTexEnvf ( GLint target, GLint pname, GLfloat param )
-void glTexEnvfv ( GLint target, GLint pname, GLfloat *params )
-void glTexEnvx ( GLint target, GLint pname, GLint param )
-void glTexEnvxv ( GLint target, GLint pname, GLint *params )
-void glTexGenf ( GLint coord, GLint pname, GLfloat param )
-void glTexGenfv ( GLint coord, GLint pname, GLfloat *params )
-void glTexGeni ( GLint coord, GLint pname, GLint param )
-void glTexGeniv ( GLint coord, GLint pname, GLint *params )
-void glTexGenx ( GLint coord, GLint pname, GLint param )
-void glTexGenxv ( GLint coord, GLint pname, GLint *params )
-void glTexParameterf ( GLint target, GLint pname, GLfloat param )
diff --git a/opengl/tools/glgen/specs/jsr239/glspec-checks b/opengl/tools/glgen/specs/jsr239/glspec-checks
deleted file mode 100644
index 9f8a793..0000000
--- a/opengl/tools/glgen/specs/jsr239/glspec-checks
+++ /dev/null
@@ -1,56 +0,0 @@
-glClipPlanef check equation 4
-glClipPlanex check equation 4
-glDeleteBuffers check buffers n
-glDeleteTextures check textures n
-glDrawElements check_AIOOBE indices count
-glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR
-glGenBuffers check buffers n
-glGenTextures check textures n
-glGetClipPlane check eqn 4
-glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS
-glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glGetTexParameter check params 1
-glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT
-glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION
-glLoadMatrix check m 16
-glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE
-glMultMatrix check m 16
-glPointParameter check params 1
-glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR
-glTexImage2D nullAllowed
-glTexSubImage2D nullAllowed
-glBufferData nullAllowed check data size
-glBufferSubData check data size
-glTexParameter check params 1
-glQueryMatrixxOES check mantissa 16 check exponent 16 return -1
-glDrawTexfvOES check coords 5
-glDrawTexivOES check coords 5
-glDrawTexsvOES check coords 5
-glDrawTexxvOES check coords 5
-glBindFramebufferOES requires OES_framebuffer_object
-glBindRenderbufferOES requires OES_framebuffer_object
-glBlendEquation requires OES_blend_subtract
-glBlendEquationSeparate requires OES_blend_equation_separate
-glBlendFuncSeparate requires OES_blend_equation_separate
-glCheckFramebufferStatusOES requires OES_framebuffer_object return 0
-glDeleteFramebuffersOES requires OES_framebuffer_object check framebuffers n
-glDeleteRenderbuffersOES requires OES_framebuffer_object check renderbuffers n
-glFramebufferRenderbufferOES requires OES_framebuffer_object
-glFramebufferStorageOES requires OES_framebuffer_object
-glFramebufferTexture2DOES requires OES_framebuffer_object
-glGenFramebuffersOES requires OES_framebuffer_object check framebuffers n
-glGenRenderbuffersOES requires OES_framebuffer_object check renderbuffers n
-glGenerateMipmapOES requires OES_framebuffer_object
-glGetFramebufferAttachmentParameterivOES requires OES_framebuffer_object
-glGetRenderbufferParameterivOES requires OES_framebuffer_object
-glIsFramebufferOES requires OES_framebuffer_object return JNI_FALSE
-glIsRenderbufferOES requires OES_framebuffer_object return JNI_FALSE
-glRenderbufferStorageOES requires OES_framebuffer_object
-glGetTexGen requires OES_texture_cube_map
-glTexGen requires OES_texture_cube_map
-glTexGenf requires OES_texture_cube_map
-glTexGeni requires OES_texture_cube_map
-glTexGenx requires OES_texture_cube_map
-glGetBufferParameter unsupported
diff --git a/opengl/tools/glgen/src/.gitignore b/opengl/tools/glgen/src/.gitignore
deleted file mode 100644
index 6b468b6..0000000
--- a/opengl/tools/glgen/src/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.class
diff --git a/opengl/tools/glgen/src/CFunc.java b/opengl/tools/glgen/src/CFunc.java
deleted file mode 100644
index 4847694..0000000
--- a/opengl/tools/glgen/src/CFunc.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-import java.util.*;
-
-public class CFunc {
-
- String original;
-
- CType ftype;
- String fname;
-
- List<String> argNames = new ArrayList<String>();
- List<CType> argTypes = new ArrayList<CType>();
-
- boolean hasPointerArg = false;
- boolean hasTypedPointerArg = false;
-
- public CFunc(String original) {
- this.original = original;
- }
-
- public String getOriginal() {
- return original;
- }
-
- public void setName(String fname) {
- this.fname = fname;
- }
-
- public String getName() {
- return fname;
- }
-
- public void setType(CType ftype) {
- this.ftype = ftype;
- }
-
- public CType getType() {
- return ftype;
- }
-
- public void addArgument(String argName, CType argType) {
- argNames.add(argName);
- argTypes.add(argType);
-
- if (argType.isPointer()) {
- hasPointerArg = true;
- }
- if (argType.isTypedPointer()) {
- hasTypedPointerArg = true;
- }
- }
-
- public int getNumArgs() {
- return argNames.size();
- }
-
- public int getArgIndex(String name) {
- int len = argNames.size();
- for (int i = 0; i < len; i++) {
- if (name.equals(argNames.get(i))) {
- return i;
- }
- }
- return -1;
- }
-
- public String getArgName(int index) {
- return argNames.get(index);
- }
-
- public CType getArgType(int index) {
- return argTypes.get(index);
- }
-
- public boolean hasPointerArg() {
- return hasPointerArg;
- }
-
- public boolean hasTypedPointerArg() {
- return hasTypedPointerArg;
- }
-
- @Override
- public String toString() {
- String s = "Function " + fname + " returns " + ftype + ": ";
- for (int i = 0; i < argNames.size(); i++) {
- if (i > 0) {
- s += ", ";
- }
- s += argTypes.get(i) + " " + argNames.get(i);
- }
- return s;
- }
-
- public static CFunc parseCFunc(String s) {
- CFunc cfunc = new CFunc(s);
- String[] tokens = s.split("\\s");
-
- int i = 0;
- CType ftype = new CType();
- String ftypeName = tokens[i++];
- if (ftypeName.equals("const")) {
- ftype.setIsConst(true);
- ftypeName = tokens[i++];
- }
- ftype.setBaseType(ftypeName);
-
- String fname = tokens[i++];
- if (fname.equals("*")) {
- ftype.setIsPointer(true);
- fname = tokens[i++];
- }
-
- cfunc.setName(fname);
- cfunc.setType(ftype);
-
- while (i < tokens.length) {
- String tok = tokens[i++];
-
- if (tok.equals("(")) {
- continue;
- }
- if (tok.equals(")")) {
- break;
- }
-
- CType argType = new CType();
-
- String argTypeName = tok;
- String argName = "";
-
- if (argTypeName.equals("const")) {
- argType.setIsConst(true);
- argTypeName = tokens[i++];
- }
- argType.setBaseType(argTypeName);
-
- if (argTypeName.equals("void")) {
- break;
- }
-
- argName = tokens[i++];
- if (argName.startsWith("*")) {
- argType.setIsPointer(true);
- argName = argName.substring(1, argName.length());
- }
- if (argName.endsWith(",")) {
- argName = argName.substring(0, argName.length() - 1);
- }
-
- cfunc.addArgument(argName, argType);
- }
-
- return cfunc;
- }
-}
diff --git a/opengl/tools/glgen/src/CType.java b/opengl/tools/glgen/src/CType.java
deleted file mode 100644
index e0f0ca6..0000000
--- a/opengl/tools/glgen/src/CType.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-public class CType {
-
- String baseType;
- boolean isConst;
- boolean isPointer;
-
- public CType() {
- }
-
- public CType(String baseType) {
- setBaseType(baseType);
- }
-
- public CType(String baseType, boolean isConst, boolean isPointer) {
- setBaseType(baseType);
- setIsConst(isConst);
- setIsPointer(isPointer);
- }
-
- public String getDeclaration() {
- return baseType + (isPointer ? " *" : "");
- }
-
- public void setIsConst(boolean isConst) {
- this.isConst = isConst;
- }
-
- public boolean isConst() {
- return isConst;
- }
-
- public void setIsPointer(boolean isPointer) {
- this.isPointer = isPointer;
- }
-
- public boolean isPointer() {
- return isPointer;
- }
-
- boolean isVoid() {
- String baseType = getBaseType();
- return baseType.equals("GLvoid") ||
- baseType.equals("void");
- }
-
- public boolean isConstCharPointer() {
- return isConst && isPointer && baseType.equals("char");
- }
-
- public boolean isTypedPointer() {
- return isPointer() && !isVoid() && !isConstCharPointer();
- }
-
- public void setBaseType(String baseType) {
- this.baseType = baseType;
- }
-
- public String getBaseType() {
- return baseType;
- }
-
- @Override
- public String toString() {
- String s = "";
- if (isConst()) {
- s += "const ";
- }
- s += baseType;
- if (isPointer()) {
- s += "*";
- }
-
- return s;
- }
-
- @Override
- public int hashCode() {
- return baseType.hashCode() ^ (isPointer ? 2 : 0) ^ (isConst ? 1 : 0);
- }
-
- @Override
- public boolean equals(Object o) {
- if (o != null && o instanceof CType) {
- CType c = (CType)o;
- return baseType.equals(c.baseType) &&
- isPointer() == c.isPointer() &&
- isConst() == c.isConst();
- }
- return false;
- }
-}
diff --git a/opengl/tools/glgen/src/CodeEmitter.java b/opengl/tools/glgen/src/CodeEmitter.java
deleted file mode 100644
index 3a4834e..0000000
--- a/opengl/tools/glgen/src/CodeEmitter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-public interface CodeEmitter {
-
- void setVersion(int version, boolean ext, boolean pack);
- void emitCode(CFunc cfunc, String original);
- void addNativeRegistration(String fname);
- void emitNativeRegistration();
-}
diff --git a/opengl/tools/glgen/src/GLESCodeEmitter.java b/opengl/tools/glgen/src/GLESCodeEmitter.java
deleted file mode 100644
index d138250..0000000
--- a/opengl/tools/glgen/src/GLESCodeEmitter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-import java.io.PrintStream;
-
-/**
- * Emits a Java interface and Java & C implementation for a C function.
- *
- * <p> The Java interface will have Buffer and array variants for functions that
- * have a typed pointer argument. The array variant will convert a single "<type> *data"
- * argument to a pair of arguments "<type>[] data, int offset".
- */
-public class GLESCodeEmitter extends JniCodeEmitter {
-
- PrintStream mJavaImplStream;
- PrintStream mCStream;
-
- PrintStream mJavaInterfaceStream;
-
- /**
- */
- public GLESCodeEmitter(String classPathName,
- ParameterChecker checker,
- PrintStream javaImplStream,
- PrintStream cStream) {
- mClassPathName = classPathName;
- mChecker = checker;
-
- mJavaImplStream = javaImplStream;
- mCStream = cStream;
- mUseContextPointer = false;
- mUseStaticMethods = true;
- }
-
- public void emitCode(CFunc cfunc, String original) {
- emitCode(cfunc, original, null, mJavaImplStream,
- mCStream);
- }
-
- public void emitNativeRegistration(String nativeRegistrationName) {
- emitNativeRegistration(nativeRegistrationName, mCStream);
- }
-}
diff --git a/opengl/tools/glgen/src/GenerateGL.java b/opengl/tools/glgen/src/GenerateGL.java
deleted file mode 100644
index 500cf0b..0000000
--- a/opengl/tools/glgen/src/GenerateGL.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-
-public class GenerateGL {
-
- static void copy(String filename, PrintStream out) throws IOException {
- BufferedReader br = new BufferedReader(new FileReader(filename));
- String s;
- while ((s = br.readLine()) != null) {
- out.println(s);
- }
- }
-
- private static void emit(int version, boolean ext, boolean pack,
- CodeEmitter emitter,
- BufferedReader specReader,
- PrintStream glStream,
- PrintStream glImplStream,
- PrintStream cStream) throws Exception {
- String s = null;
- while ((s = specReader.readLine()) != null) {
- if (s.trim().startsWith("//")) {
- continue;
- }
-
- CFunc cfunc = CFunc.parseCFunc(s);
-
- String fname = cfunc.getName();
- File f = new File("stubs/jsr239/" + fname +
- ".java-1" + version + "-if");
- if (f.exists()) {
- System.out.println("Special-casing function " + fname);
- copy("stubs/jsr239/" + fname +
- ".java-1" + version + "-if", glStream);
- copy("stubs/jsr239/" + fname + ".java-impl", glImplStream);
- copy("stubs/jsr239/" + fname + ".cpp", cStream);
-
- // Register native function names
- // This should be improved to require fewer discrete files
- String filename = "stubs/jsr239/" + fname + ".nativeReg";
- BufferedReader br =
- new BufferedReader(new FileReader(filename));
- String nfunc;
- while ((nfunc = br.readLine()) != null) {
- emitter.addNativeRegistration(nfunc);
- }
- } else {
- emitter.setVersion(version, ext, pack);
- emitter.emitCode(cfunc, s);
- }
- }
- }
-
- public static void main(String[] args) throws Exception {
- String classPathName = "com/google/android/gles_jni/GLImpl";
- boolean useContextPointer = true;
-
- int aidx = 0;
- while (args[aidx].charAt(0) == '-') {
- switch (args[aidx].charAt(1)) {
- case 'c':
- useContextPointer = false;
- break;
-
- default:
- System.err.println("Unknown flag: " + args[aidx]);
- System.exit(1);
- }
-
- aidx++;
- }
-
- System.out.println("useContextPointer = " + useContextPointer);
-
- BufferedReader spec10Reader =
- new BufferedReader(new FileReader(args[aidx++]));
- BufferedReader spec10ExtReader =
- new BufferedReader(new FileReader(args[aidx++]));
- BufferedReader spec11Reader =
- new BufferedReader(new FileReader(args[aidx++]));
- BufferedReader spec11ExtReader =
- new BufferedReader(new FileReader(args[aidx++]));
- BufferedReader spec11ExtPackReader =
- new BufferedReader(new FileReader(args[aidx++]));
- BufferedReader checksReader =
- new BufferedReader(new FileReader(args[aidx++]));
-
- String gl10Filename = "javax/microedition/khronos/opengles/GL10.java";
- String gl10ExtFilename =
- "javax/microedition/khronos/opengles/GL10Ext.java";
- String gl11Filename = "javax/microedition/khronos/opengles/GL11.java";
- String gl11ExtFilename =
- "javax/microedition/khronos/opengles/GL11Ext.java";
- String gl11ExtPackFilename =
- "javax/microedition/khronos/opengles/GL11ExtensionPack.java";
- String glImplFilename = "com/google/android/gles_jni/GLImpl.java";
- String cFilename = "com_google_android_gles_jni_GLImpl.cpp";
-
- PrintStream gl10Stream =
- new PrintStream(new FileOutputStream("out/" + gl10Filename));
- PrintStream gl10ExtStream =
- new PrintStream(new FileOutputStream("out/" + gl10ExtFilename));
- PrintStream gl11Stream =
- new PrintStream(new FileOutputStream("out/" + gl11Filename));
- PrintStream gl11ExtStream =
- new PrintStream(new FileOutputStream("out/" + gl11ExtFilename));
- PrintStream gl11ExtPackStream =
- new PrintStream(new FileOutputStream("out/" + gl11ExtPackFilename));
- PrintStream glImplStream =
- new PrintStream(new FileOutputStream("out/" + glImplFilename));
- PrintStream cStream =
- new PrintStream(new FileOutputStream("out/" + cFilename));
-
- ParameterChecker checker = new ParameterChecker(checksReader);
-
- CodeEmitter emitter =
- new Jsr239CodeEmitter(classPathName,
- checker,
- gl10Stream, gl10ExtStream,
- gl11Stream, gl11ExtStream, gl11ExtPackStream,
- glImplStream, cStream,
- useContextPointer);
-
- gl10Stream.println("/* //device/java/android/" + gl10Filename);
- gl10ExtStream.println("/* //device/java/android/" + gl10ExtFilename);
- gl11Stream.println("/* //device/java/android/" + gl11Filename);
- gl11ExtStream.println("/* //device/java/android/" + gl11ExtFilename);
- gl11ExtPackStream.println("/* //device/java/android/" +
- gl11ExtPackFilename);
- glImplStream.println("/* //device/java/android/" + glImplFilename);
- cStream.println("/* //device/libs/android_runtime/" + cFilename);
-
- copy("stubs/jsr239/GL10Header.java-if", gl10Stream);
- copy("stubs/jsr239/GL10ExtHeader.java-if", gl10ExtStream);
- copy("stubs/jsr239/GL11Header.java-if", gl11Stream);
- copy("stubs/jsr239/GL11ExtHeader.java-if", gl11ExtStream);
- copy("stubs/jsr239/GL11ExtensionPackHeader.java-if", gl11ExtPackStream);
- copy("stubs/jsr239/GLImplHeader.java-impl", glImplStream);
- copy("stubs/jsr239/GLCHeader.cpp", cStream);
-
- emit(0, false, false,
- emitter, spec10Reader, gl10Stream, glImplStream, cStream);
- emit(0, true, false,
- emitter, spec10ExtReader, gl10ExtStream, glImplStream, cStream);
- emit(1, false, false,
- emitter, spec11Reader, gl11Stream, glImplStream, cStream);
- emit(1, true, false,
- emitter, spec11ExtReader, gl11ExtStream, glImplStream, cStream);
- emit(1, true, true,
- emitter, spec11ExtPackReader, gl11ExtPackStream, glImplStream,
- cStream);
-
- emitter.emitNativeRegistration();
-
- gl10Stream.println("}");
- gl10ExtStream.println("}");
- gl11Stream.println("}");
- gl11ExtStream.println("}");
- gl11ExtPackStream.println("}");
- glImplStream.println("}");
- }
-}
diff --git a/opengl/tools/glgen/src/GenerateGLES.java b/opengl/tools/glgen/src/GenerateGLES.java
deleted file mode 100644
index 6468957..0000000
--- a/opengl/tools/glgen/src/GenerateGLES.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-
-public class GenerateGLES {
-
- static void copy(String filename, PrintStream out) throws IOException {
- BufferedReader br = new BufferedReader(new FileReader(filename));
- String s;
- while ((s = br.readLine()) != null) {
- out.println(s);
- }
- }
-
- private static void emit(GLESCodeEmitter emitter,
- BufferedReader specReader,
- PrintStream glStream,
- PrintStream cStream) throws Exception {
- String s = null;
- while ((s = specReader.readLine()) != null) {
- if (s.trim().startsWith("//")) {
- continue;
- }
-
- CFunc cfunc = CFunc.parseCFunc(s);
-
- String fname = cfunc.getName();
- String stubRoot = "stubs/gles11/" + fname;
- String javaPath = stubRoot + ".java";
- File f = new File(javaPath);
- if (f.exists()) {
- System.out.println("Special-casing function " + fname);
- copy(javaPath, glStream);
- copy(stubRoot + ".cpp", cStream);
-
- // Register native function names
- // This should be improved to require fewer discrete files
- String filename = stubRoot + ".nativeReg";
- BufferedReader br =
- new BufferedReader(new FileReader(filename));
- String nfunc;
- while ((nfunc = br.readLine()) != null) {
- emitter.addNativeRegistration(nfunc);
- }
- } else {
- emitter.emitCode(cfunc, s);
- }
- }
- }
-
- public static void main(String[] args) throws Exception {
- int aidx = 0;
- while ((aidx < args.length) && (args[aidx].charAt(0) == '-')) {
- switch (args[aidx].charAt(1)) {
- default:
- System.err.println("Unknown flag: " + args[aidx]);
- System.exit(1);
- }
-
- aidx++;
- }
-
- BufferedReader checksReader =
- new BufferedReader(new FileReader("specs/gles11/checks.spec"));
- ParameterChecker checker = new ParameterChecker(checksReader);
-
- // Generate files
- for(String suffix: new String[] {"GLES10", "GLES10Ext",
- "GLES11", "GLES11Ext", "GLES20"})
- {
- BufferedReader spec11Reader =
- new BufferedReader(new FileReader("specs/gles11/"
- + suffix + ".spec"));
- String gl11Filename = "android/opengl/" + suffix + ".java";
- String gl11cFilename = "android_opengl_" + suffix + ".cpp";
- PrintStream gl11Stream =
- new PrintStream(new FileOutputStream("out/" + gl11Filename));
- PrintStream gl11cStream =
- new PrintStream(new FileOutputStream("out/" + gl11cFilename));
- gl11Stream.println("/*");
- gl11cStream.println("/*");
- copy("stubs/gles11/" + suffix + "Header.java-if", gl11Stream);
- copy("stubs/gles11/" + suffix + "cHeader.cpp", gl11cStream);
- GLESCodeEmitter emitter = new GLESCodeEmitter(
- "android/opengl/" + suffix,
- checker, gl11Stream, gl11cStream);
- emit(emitter, spec11Reader, gl11Stream, gl11cStream);
- emitter.emitNativeRegistration("register_android_opengl_jni_"
- + suffix);
- gl11Stream.println("}");
- gl11Stream.close();
- gl11cStream.close();
- }
- }
-}
diff --git a/opengl/tools/glgen/src/JFunc.java b/opengl/tools/glgen/src/JFunc.java
deleted file mode 100644
index e3d73b6..0000000
--- a/opengl/tools/glgen/src/JFunc.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class JFunc {
-
- String className = "com.google.android.gles_jni.GL11Impl";
-
- CFunc cfunc;
- JType ftype;
- String fname;
-
- List<String> argNames = new ArrayList<String>();
- List<JType> argTypes = new ArrayList<JType>();
- List<Integer> argCIndices = new ArrayList<Integer>();
-
- boolean hasBufferArg = false;
- boolean hasTypedBufferArg = false;
- ArrayList<String> bufferArgNames = new ArrayList<String>();
-
- public JFunc(CFunc cfunc) {
- this.cfunc = cfunc;
- }
-
- public CFunc getCFunc() {
- return cfunc;
- }
-
- public void setName(String fname) {
- this.fname = fname;
- }
-
- public String getName() {
- return fname;
- }
-
- public void setType(JType ftype) {
- this.ftype = ftype;
- }
-
- public JType getType() {
- return ftype;
- }
-
- public void setClassName(String className) {
- this.className = className;
- }
-
- public String getClassName() {
- return className;
- }
-
- public boolean hasBufferArg() {
- return hasBufferArg;
- }
-
- public boolean hasTypedBufferArg() {
- return hasTypedBufferArg;
- }
-
- public String getBufferArgName(int index) {
- return bufferArgNames.get(index);
- }
-
- public void addArgument(String argName, JType argType, int cindex) {
- argNames.add(argName);
- argTypes.add(argType);
- argCIndices.add(new Integer(cindex));
-
- if (argType.isBuffer()) {
- hasBufferArg = true;
- bufferArgNames.add(argName);
- }
- if (argType.isTypedBuffer()) {
- hasTypedBufferArg = true;
- bufferArgNames.add(argName);
- }
- }
-
- public int getNumArgs() {
- return argNames.size();
- }
-
- public int getArgIndex(String name) {
- int len = argNames.size();
- for (int i = 0; i < len; i++) {
- if (name.equals(argNames.get(i))) {
- return i;
- }
- }
- return -1;
- }
-
- public String getArgName(int index) {
- return argNames.get(index);
- }
-
- public JType getArgType(int index) {
- return argTypes.get(index);
- }
-
- public int getArgCIndex(int index) {
- return argCIndices.get(index).intValue();
- }
-
- public static JFunc convert(CFunc cfunc, boolean useArray) {
- try {
- JFunc jfunc = new JFunc(cfunc);
- jfunc.setName(cfunc.getName());
- jfunc.setType(JType.convert(cfunc.getType(), false));
-
- int numArgs = cfunc.getNumArgs();
- int numOffsets = 0;
- for (int i = 0; i < numArgs; i++) {
- CType cArgType = cfunc.getArgType(i);
- if (cArgType.isTypedPointer() && useArray) {
- ++numOffsets;
- }
- }
-
- for (int i = 0; i < numArgs; i++) {
- String cArgName = cfunc.getArgName(i);
- CType cArgType = cfunc.getArgType(i);
-
- jfunc.addArgument(cArgName, JType.convert(cArgType, useArray), i);
- if (cArgType.isTypedPointer() && useArray) {
- if (numOffsets > 1) {
- jfunc.addArgument(cArgName + "Offset", new JType("int"), i);
- } else {
- jfunc.addArgument("offset", new JType("int"), i);
- }
- }
- }
-
- return jfunc;
- } catch (RuntimeException e) {
- System.err.println("Failed to convert function " + cfunc);
- throw e;
- }
- }
-
- @Override
- public String toString() {
- String s = "Function " + fname + " returns " + ftype + ": ";
- for (int i = 0; i < argNames.size(); i++) {
- if (i > 0) {
- s += ", ";
- }
- s += argTypes.get(i) + " " + argNames.get(i);
- }
- return s;
- }
-
-}
diff --git a/opengl/tools/glgen/src/JType.java b/opengl/tools/glgen/src/JType.java
deleted file mode 100644
index deb2f01..0000000
--- a/opengl/tools/glgen/src/JType.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-import java.util.HashMap;
-
-public class JType {
-
- String baseType;
- boolean isArray;
- boolean isClass;
- boolean isString;
-
- static HashMap<CType,JType> typeMapping = new HashMap<CType,JType>();
- static HashMap<CType,JType> arrayTypeMapping = new HashMap<CType,JType>();
-
- static {
- // Primitive types
- typeMapping.put(new CType("GLbitfield"), new JType("int"));
- typeMapping.put(new CType("GLboolean"), new JType("boolean"));
- typeMapping.put(new CType("GLclampf"), new JType("float"));
- typeMapping.put(new CType("GLclampx"), new JType("int"));
- typeMapping.put(new CType("GLenum"), new JType("int"));
- typeMapping.put(new CType("GLfloat"), new JType("float"));
- typeMapping.put(new CType("GLfixed"), new JType("int"));
- typeMapping.put(new CType("GLint"), new JType("int"));
- typeMapping.put(new CType("GLintptr"), new JType("int"));
- typeMapping.put(new CType("GLshort"), new JType("short"));
- typeMapping.put(new CType("GLsizei"), new JType("int"));
- typeMapping.put(new CType("GLsizeiptr"), new JType("int"));
- typeMapping.put(new CType("GLubyte"), new JType("byte"));
- typeMapping.put(new CType("GLuint"), new JType("int"));
- typeMapping.put(new CType("void"), new JType("void"));
- typeMapping.put(new CType("GLubyte", true, true), new JType("String", false, false));
- typeMapping.put(new CType("char", false, true), new JType("byte"));
- typeMapping.put(new CType("char", true, true), new JType("String", false, false));
- typeMapping.put(new CType("int"), new JType("int"));
-
- // Untyped pointers map to untyped Buffers
- typeMapping.put(new CType("GLvoid", true, true),
- new JType("java.nio.Buffer", true, false));
- typeMapping.put(new CType("GLvoid", false, true),
- new JType("java.nio.Buffer", true, false));
- typeMapping.put(new CType("void", false, true),
- new JType("java.nio.Buffer", true, false));
- typeMapping.put(new CType("GLeglImageOES", false, false),
- new JType("java.nio.Buffer", true, false));
-
- // Typed pointers map to typed Buffers
- typeMapping.put(new CType("GLboolean", false, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLenum", false, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLfixed", false, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLfixed", true, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLfloat", false, true),
- new JType("java.nio.FloatBuffer", true, false));
- typeMapping.put(new CType("GLfloat", true, true),
- new JType("java.nio.FloatBuffer", true, false));
- typeMapping.put(new CType("GLint", false, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLint", true, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLsizei", false, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLuint", false, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLuint", true, true),
- new JType("java.nio.IntBuffer", true, false));
- typeMapping.put(new CType("GLshort", true, true),
- new JType("java.nio.ShortBuffer", true, false));
-
- // Typed pointers map to arrays + offsets
- arrayTypeMapping.put(new CType("char", false, true),
- new JType("byte", false, true));
- arrayTypeMapping.put(new CType("GLboolean", false, true),
- new JType("boolean", false, true));
- arrayTypeMapping.put(new CType("GLenum", false, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLfixed", true, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLfixed", false, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLfloat", false, true), new JType("float", false, true));
- arrayTypeMapping.put(new CType("GLfloat", true, true), new JType("float", false, true));
- arrayTypeMapping.put(new CType("GLint", false, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLint", true, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLshort", true, true), new JType("short", false, true));
- arrayTypeMapping.put(new CType("GLsizei", false, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLsizei", true, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLuint", false, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLuint", true, true), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLintptr"), new JType("int", false, true));
- arrayTypeMapping.put(new CType("GLsizeiptr"), new JType("int", false, true));
- }
-
- public JType() {
- }
-
- public JType(String primitiveTypeName) {
- this.baseType = primitiveTypeName;
- this.isClass = false;
- this.isArray = false;
- }
-
- public JType(String primitiveTypeName, boolean isClass, boolean isArray) {
- this.baseType = primitiveTypeName;
- this.isClass = isClass;
- this.isArray = isArray;
- }
-
- public String getBaseType() {
- return baseType;
- }
-
- @Override
- public String toString() {
- return baseType + (isArray ? "[]" : "");
- }
-
- public boolean isArray() {
- return isArray;
- }
-
- public boolean isClass() {
- return isClass;
- }
-
- public boolean isString() {
- return baseType.equals("String");
- }
-
- public boolean isPrimitive() {
- return !isClass() && !isArray();
- }
-
- public boolean isVoid() {
- return baseType.equals("void");
- }
-
- public boolean isBuffer() {
- return baseType.indexOf("Buffer") != -1;
- }
-
- public boolean isTypedBuffer() {
- return !baseType.equals("java.nio.Buffer") &&
- (baseType.indexOf("Buffer") != -1);
- }
-
- public static JType convert(CType ctype, boolean useArray) {
- JType javaType = null;
- if (useArray) {
- javaType = arrayTypeMapping.get(ctype);
- }
- if (javaType == null) {
- javaType = typeMapping.get(ctype);
- }
- if (javaType == null) {
- throw new RuntimeException("Unsupported C type: " + ctype);
- }
- return javaType;
- }
-}
diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java
deleted file mode 100644
index 9fa2b74..0000000
--- a/opengl/tools/glgen/src/JniCodeEmitter.java
+++ /dev/null
@@ -1,1180 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-public class JniCodeEmitter {
-
- static final boolean mUseCPlusPlus = true;
- protected boolean mUseContextPointer = true;
- protected boolean mUseStaticMethods = false;
- protected String mClassPathName;
- protected ParameterChecker mChecker;
- protected List<String> nativeRegistrations = new ArrayList<String>();
- boolean needsExit;
- protected static String indent = " ";
- HashSet<String> mFunctionsEmitted = new HashSet<String>();
-
- public static String getJniName(JType jType) {
- String jniName = "";
- if (jType.isClass()) {
- return "L" + jType.getBaseType() + ";";
- } else if (jType.isArray()) {
- jniName = "[";
- }
-
- String baseType = jType.getBaseType();
- if (baseType.equals("int")) {
- jniName += "I";
- } else if (baseType.equals("float")) {
- jniName += "F";
- } else if (baseType.equals("boolean")) {
- jniName += "Z";
- } else if (baseType.equals("short")) {
- jniName += "S";
- } else if (baseType.equals("long")) {
- jniName += "L";
- } else if (baseType.equals("byte")) {
- jniName += "B";
- } else if (baseType.equals("String")) {
- jniName += "Ljava/lang/String;";
- } else if (baseType.equals("void")) {
- // nothing.
- } else {
- throw new RuntimeException("Unknown primitive basetype " + baseType);
- }
- return jniName;
- }
-
-
- public void emitCode(CFunc cfunc, String original,
- PrintStream javaInterfaceStream,
- PrintStream javaImplStream,
- PrintStream cStream) {
- JFunc jfunc;
- String signature;
- boolean duplicate;
-
- if (cfunc.hasTypedPointerArg()) {
- jfunc = JFunc.convert(cfunc, true);
-
- // Don't emit duplicate functions
- // These may appear because they are defined in multiple
- // Java interfaces (e.g., GL11/GL11ExtensionPack)
- signature = jfunc.toString();
- duplicate = false;
- if (mFunctionsEmitted.contains(signature)) {
- duplicate = true;
- } else {
- mFunctionsEmitted.add(signature);
- }
-
- if (!duplicate) {
- emitNativeDeclaration(jfunc, javaImplStream);
- emitJavaCode(jfunc, javaImplStream);
- }
- if (javaInterfaceStream != null) {
- emitJavaInterfaceCode(jfunc, javaInterfaceStream);
- }
- if (!duplicate) {
- emitJniCode(jfunc, cStream);
- }
- }
-
- jfunc = JFunc.convert(cfunc, false);
-
- signature = jfunc.toString();
- duplicate = false;
- if (mFunctionsEmitted.contains(signature)) {
- duplicate = true;
- } else {
- mFunctionsEmitted.add(signature);
- }
-
- if (!duplicate) {
- emitNativeDeclaration(jfunc, javaImplStream);
- }
- if (javaInterfaceStream != null) {
- emitJavaInterfaceCode(jfunc, javaInterfaceStream);
- }
- if (!duplicate) {
- emitJavaCode(jfunc, javaImplStream);
- emitJniCode(jfunc, cStream);
- }
- }
-
- public void emitNativeDeclaration(JFunc jfunc, PrintStream out) {
- out.println(" // C function " + jfunc.getCFunc().getOriginal());
- out.println();
-
- emitFunction(jfunc, out, true, false);
- }
-
- public void emitJavaInterfaceCode(JFunc jfunc, PrintStream out) {
- emitFunction(jfunc, out, false, true);
- }
-
- public void emitJavaCode(JFunc jfunc, PrintStream out) {
- emitFunction(jfunc, out, false, false);
- }
-
- boolean isPointerFunc(JFunc jfunc) {
- String name = jfunc.getName();
- return (name.endsWith("Pointer") || name.endsWith("PointerOES"))
- && jfunc.getCFunc().hasPointerArg();
- }
-
- void emitFunctionCall(JFunc jfunc, PrintStream out, String iii, boolean grabArray) {
- boolean isVoid = jfunc.getType().isVoid();
- boolean isPointerFunc = isPointerFunc(jfunc);
-
- if (!isVoid) {
- out.println(iii +
- jfunc.getType() + " _returnValue;");
- }
- out.println(iii +
- (isVoid ? "" : "_returnValue = ") +
- jfunc.getName() +
- (isPointerFunc ? "Bounds" : "" ) +
- "(");
-
- int numArgs = jfunc.getNumArgs();
- for (int i = 0; i < numArgs; i++) {
- String argName = jfunc.getArgName(i);
- JType argType = jfunc.getArgType(i);
-
- if (grabArray && argType.isTypedBuffer()) {
- String typeName = argType.getBaseType();
- typeName = typeName.substring(9, typeName.length() - 6);
- out.println(iii + indent + "get" + typeName + "Array(" + argName + "),");
- out.print(iii + indent + "getOffset(" + argName + ")");
- } else {
- out.print(iii + indent + argName);
- }
- if (i == numArgs - 1) {
- if (isPointerFunc) {
- out.println(",");
- out.println(iii + indent + argName + ".remaining()");
- } else {
- out.println();
- }
- } else {
- out.println(",");
- }
- }
-
- out.println(iii + ");");
- }
-
- void printIfcheckPostamble(PrintStream out, boolean isBuffer, boolean emitExceptionCheck,
- String iii) {
- printIfcheckPostamble(out, isBuffer, emitExceptionCheck,
- "offset", "_remaining", iii);
- }
-
- void printIfcheckPostamble(PrintStream out, boolean isBuffer, boolean emitExceptionCheck,
- String offset, String remaining, String iii) {
- out.println(iii + " default:");
- out.println(iii + " _needed = 0;");
- out.println(iii + " break;");
- out.println(iii + "}");
-
- out.println(iii + "if (" + remaining + " < _needed) {");
- if (emitExceptionCheck) {
- out.println(iii + indent + "_exception = 1;");
- }
- out.println(iii + indent + "jniThrowException(_env, " +
- "\"java/lang/IllegalArgumentException\", " +
- "\"" + (isBuffer ? "remaining()" : "length - " + offset) + " < needed\");");
- out.println(iii + indent + "goto exit;");
- needsExit = true;
- out.println(iii + "}");
- }
-
- boolean isNullAllowed(CFunc cfunc) {
- String[] checks = mChecker.getChecks(cfunc.getName());
- int index = 1;
- if (checks != null) {
- while (index < checks.length) {
- if (checks[index].equals("return")) {
- index += 2;
- } else if (checks[index].startsWith("check")) {
- index += 3;
- } else if (checks[index].equals("ifcheck")) {
- index += 5;
- } else if (checks[index].equals("unsupported")) {
- index += 1;
- } else if (checks[index].equals("requires")) {
- index += 2;
- } else if (checks[index].equals("nullAllowed")) {
- return true;
- } else {
- System.out.println("Error: unknown keyword \"" +
- checks[index] + "\"");
- System.exit(0);
- }
- }
- }
- return false;
- }
-
- String getErrorReturnValue(CFunc cfunc) {
- CType returnType = cfunc.getType();
- boolean isVoid = returnType.isVoid();
- if (isVoid) {
- return null;
- }
-
- String[] checks = mChecker.getChecks(cfunc.getName());
-
- int index = 1;
- if (checks != null) {
- while (index < checks.length) {
- if (checks[index].equals("return")) {
- return checks[index + 1];
- } else if (checks[index].startsWith("check")) {
- index += 3;
- } else if (checks[index].equals("ifcheck")) {
- index += 5;
- } else if (checks[index].equals("unsupported")) {
- index += 1;
- } else if (checks[index].equals("requires")) {
- index += 2;
- } else if (checks[index].equals("nullAllowed")) {
- index += 1;
- } else {
- System.out.println("Error: unknown keyword \"" +
- checks[index] + "\"");
- System.exit(0);
- }
- }
- }
-
- return null;
- }
-
- boolean isUnsupportedFunc(CFunc cfunc) {
- String[] checks = mChecker.getChecks(cfunc.getName());
- int index = 1;
- if (checks != null) {
- while (index < checks.length) {
- if (checks[index].equals("unsupported")) {
- return true;
- } else if (checks[index].equals("requires")) {
- index += 2;
- } else if (checks[index].equals("return")) {
- index += 2;
- } else if (checks[index].startsWith("check")) {
- index += 3;
- } else if (checks[index].equals("ifcheck")) {
- index += 5;
- } else if (checks[index].equals("nullAllowed")) {
- index += 1;
- } else {
- System.out.println("Error: unknown keyword \"" +
- checks[index] + "\"");
- System.exit(0);
- }
- }
- }
- return false;
- }
-
- String isRequiresFunc(CFunc cfunc) {
- String[] checks = mChecker.getChecks(cfunc.getName());
- int index = 1;
- if (checks != null) {
- while (index < checks.length) {
- if (checks[index].equals("unsupported")) {
- index += 1;
- } else if (checks[index].equals("requires")) {
- return checks[index+1];
- } else if (checks[index].equals("return")) {
- index += 2;
- } else if (checks[index].startsWith("check")) {
- index += 3;
- } else if (checks[index].equals("ifcheck")) {
- index += 5;
- } else if (checks[index].equals("nullAllowed")) {
- index += 1;
- } else {
- System.out.println("Error: unknown keyword \"" +
- checks[index] + "\"");
- System.exit(0);
- }
- }
- }
- return null;
- }
-
- void emitNativeBoundsChecks(CFunc cfunc, String cname, PrintStream out,
- boolean isBuffer, boolean emitExceptionCheck, String offset, String remaining, String iii) {
-
- String[] checks = mChecker.getChecks(cfunc.getName());
-
- boolean lastWasIfcheck = false;
-
- int index = 1;
- if (checks != null) {
- while (index < checks.length) {
- if (checks[index].startsWith("check")) {
- if (lastWasIfcheck) {
- printIfcheckPostamble(out, isBuffer, emitExceptionCheck,
- offset, remaining, iii);
- }
- lastWasIfcheck = false;
- if (cname != null && !cname.equals(checks[index + 1])) {
- index += 3;
- continue;
- }
- out.println(iii + "if (" + remaining + " < " + checks[index + 2] + ") {");
- if (emitExceptionCheck) {
- out.println(iii + indent + "_exception = 1;");
- }
- String exceptionClassName = "java/lang/IllegalArgumentException";
- // If the "check" keyword was of the form
- // "check_<class name>", use the class name in the
- // exception to be thrown
- int underscore = checks[index].indexOf('_');
- if (underscore >= 0) {
- String abbr = checks[index].substring(underscore + 1);
- if (abbr.equals("AIOOBE")) {
- exceptionClassName = "java/lang/ArrayIndexOutOfBoundsException";
- } else {
- throw new RuntimeException("unknown exception abbreviation: " + abbr);
- }
- }
- out.println(iii + indent + "jniThrowException(_env, " +
- "\"" + exceptionClassName + "\", " +
- "\"" + (isBuffer ? "remaining()" : "length - " + offset) + " < " + checks[index + 2] + "\");");
-
- out.println(iii + indent + "goto exit;");
- needsExit = true;
- out.println(iii + "}");
-
- index += 3;
- } else if (checks[index].equals("ifcheck")) {
- String[] matches = checks[index + 4].split(",");
-
- if (!lastWasIfcheck) {
- out.println(iii + "int _needed;");
- out.println(iii + "switch (" + checks[index + 3] + ") {");
- }
-
- for (int i = 0; i < matches.length; i++) {
- out.println("#if defined(" + matches[i] + ")");
- out.println(iii + " case " + matches[i] + ":");
- out.println("#endif // defined(" + matches[i] + ")");
- }
- out.println(iii + " _needed = " + checks[index + 2] + ";");
- out.println(iii + " break;");
-
- lastWasIfcheck = true;
- index += 5;
- } else if (checks[index].equals("return")) {
- // ignore
- index += 2;
- } else if (checks[index].equals("unsupported")) {
- // ignore
- index += 1;
- } else if (checks[index].equals("requires")) {
- // ignore
- index += 2;
- } else if (checks[index].equals("nullAllowed")) {
- // ignore
- index += 1;
- } else {
- System.out.println("Error: unknown keyword \"" + checks[index] + "\"");
- System.exit(0);
- }
- }
- }
-
- if (lastWasIfcheck) {
- printIfcheckPostamble(out, isBuffer, emitExceptionCheck, iii);
- }
- }
-
- boolean hasNonConstArg(JFunc jfunc, CFunc cfunc, List<Integer> nonPrimitiveArgs) {
- if (nonPrimitiveArgs.size() > 0) {
- for (int i = nonPrimitiveArgs.size() - 1; i >= 0; i--) {
- int idx = nonPrimitiveArgs.get(i).intValue();
- int cIndex = jfunc.getArgCIndex(idx);
- if (jfunc.getArgType(idx).isArray()) {
- if (!cfunc.getArgType(cIndex).isConst()) {
- return true;
- }
- } else if (jfunc.getArgType(idx).isBuffer()) {
- if (!cfunc.getArgType(cIndex).isConst()) {
- return true;
- }
- }
- }
- }
-
- return false;
- }
-
- /**
- * Emit a function in several variants:
- *
- * if nativeDecl: public native <returntype> func(args);
- *
- * if !nativeDecl:
- * if interfaceDecl: public <returntype> func(args);
- * if !interfaceDecl: public <returntype> func(args) { body }
- */
- void emitFunction(JFunc jfunc, PrintStream out, boolean nativeDecl, boolean interfaceDecl) {
- boolean isPointerFunc = isPointerFunc(jfunc);
-
- if (!nativeDecl && !interfaceDecl && !isPointerFunc) {
- // If it's not a pointer function, we've already emitted it
- // with nativeDecl == true
- return;
- }
-
- String maybeStatic = mUseStaticMethods ? "static " : "";
-
- if (isPointerFunc) {
- out.println(indent +
- (nativeDecl ? "private " + maybeStatic +"native " :
- (interfaceDecl ? "" : "public ") + maybeStatic) +
- jfunc.getType() + " " +
- jfunc.getName() +
- (nativeDecl ? "Bounds" : "") +
- "(");
- } else {
- out.println(indent +
- (nativeDecl ? "public " + maybeStatic +"native " :
- (interfaceDecl ? "" : "public ") + maybeStatic) +
- jfunc.getType() + " " +
- jfunc.getName() +
- "(");
- }
-
- int numArgs = jfunc.getNumArgs();
- for (int i = 0; i < numArgs; i++) {
- String argName = jfunc.getArgName(i);
- JType argType = jfunc.getArgType(i);
-
- out.print(indent + indent + argType + " " + argName);
- if (i == numArgs - 1) {
- if (isPointerFunc && nativeDecl) {
- out.println(",");
- out.println(indent + indent + "int remaining");
- } else {
- out.println();
- }
- } else {
- out.println(",");
- }
- }
-
- if (nativeDecl || interfaceDecl) {
- out.println(indent + ");");
- } else {
- out.println(indent + ") {");
-
- String iii = indent + indent;
-
- // emitBoundsChecks(jfunc, out, iii);
- emitFunctionCall(jfunc, out, iii, false);
-
- // Set the pointer after we call the native code, so that if
- // the native code throws an exception we don't modify the
- // pointer. We assume that the native code is written so that
- // if an exception is thrown, then the underlying glXXXPointer
- // function will not have been called.
-
- String fname = jfunc.getName();
- if (isPointerFunc) {
- // TODO - deal with VBO variants
- if (fname.equals("glColorPointer")) {
- out.println(iii + "if ((size == 4) &&");
- out.println(iii + " ((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_UNSIGNED_BYTE) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_colorPointer = pointer;");
- out.println(iii + "}");
- } else if (fname.equals("glNormalPointer")) {
- out.println(iii + "if (((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_BYTE) ||");
- out.println(iii + " (type == GL_SHORT) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_normalPointer = pointer;");
- out.println(iii + "}");
- } else if (fname.equals("glTexCoordPointer")) {
- out.println(iii + "if (((size == 2) ||");
- out.println(iii + " (size == 3) ||");
- out.println(iii + " (size == 4)) &&");
- out.println(iii + " ((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_BYTE) ||");
- out.println(iii + " (type == GL_SHORT) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_texCoordPointer = pointer;");
- out.println(iii + "}");
- } else if (fname.equals("glVertexPointer")) {
- out.println(iii + "if (((size == 2) ||");
- out.println(iii + " (size == 3) ||");
- out.println(iii + " (size == 4)) &&");
- out.println(iii + " ((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_BYTE) ||");
- out.println(iii + " (type == GL_SHORT) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_vertexPointer = pointer;");
- out.println(iii + "}");
- } else if (fname.equals("glPointSizePointerOES")) {
- out.println(iii + "if (((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_pointSizePointerOES = pointer;");
- out.println(iii + "}");
- } else if (fname.equals("glMatrixIndexPointerOES")) {
- out.println(iii + "if (((size == 2) ||");
- out.println(iii + " (size == 3) ||");
- out.println(iii + " (size == 4)) &&");
- out.println(iii + " ((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_BYTE) ||");
- out.println(iii + " (type == GL_SHORT) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_matrixIndexPointerOES = pointer;");
- out.println(iii + "}");
- } else if (fname.equals("glWeightPointer")) {
- out.println(iii + "if (((size == 2) ||");
- out.println(iii + " (size == 3) ||");
- out.println(iii + " (size == 4)) &&");
- out.println(iii + " ((type == GL_FLOAT) ||");
- out.println(iii + " (type == GL_BYTE) ||");
- out.println(iii + " (type == GL_SHORT) ||");
- out.println(iii + " (type == GL_FIXED)) &&");
- out.println(iii + " (stride >= 0)) {");
- out.println(iii + indent + "_weightPointerOES = pointer;");
- out.println(iii + "}");
- }
- }
-
- boolean isVoid = jfunc.getType().isVoid();
-
- if (!isVoid) {
- out.println(indent + indent + "return _returnValue;");
- }
- out.println(indent + "}");
- }
- out.println();
- }
-
- public void addNativeRegistration(String s) {
- nativeRegistrations.add(s);
- }
-
- public void emitNativeRegistration(String registrationFunctionName,
- PrintStream cStream) {
- cStream.println("static const char *classPathName = \"" +
- mClassPathName +
- "\";");
- cStream.println();
-
- cStream.println("static JNINativeMethod methods[] = {");
-
- cStream.println("{\"_nativeClassInit\", \"()V\", (void*)nativeClassInit },");
-
- Iterator<String> i = nativeRegistrations.iterator();
- while (i.hasNext()) {
- cStream.println(i.next());
- }
-
- cStream.println("};");
- cStream.println();
-
-
- cStream.println("int " + registrationFunctionName + "(JNIEnv *_env)");
- cStream.println("{");
- cStream.println(indent +
- "int err;");
-
- cStream.println(indent +
- "err = android::AndroidRuntime::registerNativeMethods(_env, classPathName, methods, NELEM(methods));");
-
- cStream.println(indent + "return err;");
- cStream.println("}");
- }
-
- public JniCodeEmitter() {
- super();
- }
-
- String getJniType(JType jType) {
- if (jType.isVoid()) {
- return "void";
- }
-
- String baseType = jType.getBaseType();
- if (jType.isPrimitive()) {
- if (baseType.equals("String")) {
- return "jstring";
- } else {
- return "j" + baseType;
- }
- } else if (jType.isArray()) {
- return "j" + baseType + "Array";
- } else {
- return "jobject";
- }
- }
-
- String getJniMangledName(String name) {
- name = name.replaceAll("_", "_1");
- name = name.replaceAll(";", "_2");
- name = name.replaceAll("\\[", "_3");
- return name;
- }
-
- public void emitJniCode(JFunc jfunc, PrintStream out) {
- CFunc cfunc = jfunc.getCFunc();
-
- // Emit comment identifying original C function
- //
- // Example:
- //
- // /* void glClipPlanef ( GLenum plane, const GLfloat *equation ) */
- //
- out.println("/* " + cfunc.getOriginal() + " */");
-
- // Emit JNI signature (name)
- //
- // Example:
- //
- // void
- // android_glClipPlanef__I_3FI
- //
-
- String outName = "android_" + jfunc.getName();
- boolean isPointerFunc = isPointerFunc(jfunc);
- boolean isVBOPointerFunc = (outName.endsWith("Pointer") ||
- outName.endsWith("PointerOES") ||
- outName.endsWith("DrawElements") || outName.endsWith("VertexAttribPointer")) &&
- !jfunc.getCFunc().hasPointerArg();
- if (isPointerFunc) {
- outName += "Bounds";
- }
-
- out.print("static ");
- out.println(getJniType(jfunc.getType()));
- out.print(outName);
-
- String rsignature = getJniName(jfunc.getType());
-
- String signature = "";
- int numArgs = jfunc.getNumArgs();
- for (int i = 0; i < numArgs; i++) {
- JType argType = jfunc.getArgType(i);
- signature += getJniName(argType);
- }
- if (isPointerFunc) {
- signature += "I";
- }
-
- // Append signature to function name
- String sig = getJniMangledName(signature).replace('.', '_').replace('/', '_');
- out.print("__" + sig);
- outName += "__" + sig;
-
- signature = signature.replace('.', '/');
- rsignature = rsignature.replace('.', '/');
-
- out.println();
- if (rsignature.length() == 0) {
- rsignature = "V";
- }
-
- String s = "{\"" +
- jfunc.getName() +
- (isPointerFunc ? "Bounds" : "") +
- "\", \"(" + signature +")" +
- rsignature +
- "\", (void *) " +
- outName +
- " },";
- nativeRegistrations.add(s);
-
- List<Integer> nonPrimitiveArgs = new ArrayList<Integer>();
- List<Integer> stringArgs = new ArrayList<Integer>();
- int numBufferArgs = 0;
- List<String> bufferArgNames = new ArrayList<String>();
-
- // Emit JNI signature (arguments)
- //
- // Example:
- //
- // (JNIEnv *_env, jobject this, jint plane, jfloatArray equation_ref, jint offset) {
- //
- out.print(" (JNIEnv *_env, jobject _this");
- for (int i = 0; i < numArgs; i++) {
- out.print(", ");
- JType argType = jfunc.getArgType(i);
- String suffix;
- if (!argType.isPrimitive()) {
- if (argType.isArray()) {
- suffix = "_ref";
- } else {
- suffix = "_buf";
- }
- nonPrimitiveArgs.add(new Integer(i));
- if (jfunc.getArgType(i).isBuffer()) {
- int cIndex = jfunc.getArgCIndex(i);
- String cname = cfunc.getArgName(cIndex);
- bufferArgNames.add(cname);
- numBufferArgs++;
- }
- } else {
- suffix = "";
- }
- if (argType.isString()) {
- stringArgs.add(new Integer(i));
- }
-
- out.print(getJniType(argType) + " " + jfunc.getArgName(i) + suffix);
- }
- if (isPointerFunc) {
- out.print(", jint remaining");
- }
- out.println(") {");
-
- int numArrays = 0;
- int numBuffers = 0;
- int numStrings = 0;
- for (int i = 0; i < nonPrimitiveArgs.size(); i++) {
- int idx = nonPrimitiveArgs.get(i).intValue();
- JType argType = jfunc.getArgType(idx);
- if (argType.isArray()) {
- ++numArrays;
- }
- if (argType.isBuffer()) {
- ++numBuffers;
- }
- if (argType.isString()) {
- ++numStrings;
- }
- }
-
- // Emit method body
-
- // Emit local variable declarations for _exception and _returnValue
- //
- // Example:
- //
- // android::gl::ogles_context_t *ctx;
- //
- // jint _exception;
- // GLenum _returnValue;
- //
- CType returnType = cfunc.getType();
- boolean isVoid = returnType.isVoid();
-
- boolean isUnsupported = isUnsupportedFunc(cfunc);
- if (isUnsupported) {
- out.println(indent +
- "jniThrowException(_env, \"java/lang/UnsupportedOperationException\",");
- out.println(indent +
- " \"" + cfunc.getName() + "\");");
- if (!isVoid) {
- String retval = getErrorReturnValue(cfunc);
- out.println(indent + "return " + retval + ";");
- }
- out.println("}");
- out.println();
- return;
- }
-
- String requiresExtension = isRequiresFunc(cfunc);
- if (requiresExtension != null) {
- out.println(indent +
- "if (! supportsExtension(_env, _this, have_" + requiresExtension + "ID)) {");
- out.println(indent + indent +
- "jniThrowException(_env, \"java/lang/UnsupportedOperationException\",");
- out.println(indent + indent +
- " \"" + cfunc.getName() + "\");");
- if (isVoid) {
- out.println(indent + indent + " return;");
- } else {
- String retval = getErrorReturnValue(cfunc);
- out.println(indent + indent + " return " + retval + ";");
- }
- out.println(indent + "}");
- }
- if (mUseContextPointer) {
- out.println(indent +
- "android::gl::ogles_context_t *ctx = getContext(_env, _this);");
- }
-
- boolean initializeReturnValue = stringArgs.size() > 0;
-
- boolean emitExceptionCheck = (numArrays > 0 || numBuffers > 0 || numStrings > 0) &&
- hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs);
- // mChecker.getChecks(cfunc.getName()) != null
-
- // Emit an _exeption variable if there will be error checks
- if (emitExceptionCheck) {
- out.println(indent + "jint _exception = 0;");
- }
-
- // Emit a single _array or multiple _XXXArray variables
- if (numBufferArgs == 1) {
- out.println(indent + "jarray _array = (jarray) 0;");
- } else {
- for (int i = 0; i < numBufferArgs; i++) {
- out.println(indent + "jarray _" + bufferArgNames.get(i) +
- "Array = (jarray) 0;");
- }
- }
- if (!isVoid) {
- String retval = getErrorReturnValue(cfunc);
- if (retval != null) {
- out.println(indent + returnType.getDeclaration() +
- " _returnValue = " + retval + ";");
- } else if (initializeReturnValue) {
- out.println(indent + returnType.getDeclaration() +
- " _returnValue = 0;");
- } else {
- out.println(indent + returnType.getDeclaration() +
- " _returnValue;");
- }
- }
-
- // Emit local variable declarations for pointer arguments
- //
- // Example:
- //
- // GLfixed *eqn_base;
- // GLfixed *eqn;
- //
- String offset = "offset";
- String remaining = "_remaining";
- if (nonPrimitiveArgs.size() > 0) {
- for (int i = 0; i < nonPrimitiveArgs.size(); i++) {
- int idx = nonPrimitiveArgs.get(i).intValue();
- int cIndex = jfunc.getArgCIndex(idx);
- String cname = cfunc.getArgName(cIndex);
-
- CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
- String decl = type.getDeclaration();
- if (jfunc.getArgType(idx).isArray()) {
- out.println(indent +
- decl +
- (decl.endsWith("*") ? "" : " ") +
- jfunc.getArgName(idx) +
- "_base = (" + decl + ") 0;");
- }
- remaining = ((numArrays + numBuffers) <= 1) ? "_remaining" :
- "_" + cname + "Remaining";
- out.println(indent +
- "jint " + remaining + ";");
- out.println(indent +
- decl +
- (decl.endsWith("*") ? "" : " ") +
- jfunc.getArgName(idx) +
- " = (" + decl + ") 0;");
- }
-
- out.println();
- }
-
- // Emit local variable declaration for strings
- if (stringArgs.size() > 0) {
- for (int i = 0; i < stringArgs.size(); i++) {
- int idx = stringArgs.get(i).intValue();
- int cIndex = jfunc.getArgCIndex(idx);
- String cname = cfunc.getArgName(cIndex);
-
- out.println(indent + "const char* _native" + cname + " = 0;");
- }
-
- out.println();
- }
-
- // Null pointer checks and GetStringUTFChars
- if (stringArgs.size() > 0) {
- for (int i = 0; i < stringArgs.size(); i++) {
- int idx = stringArgs.get(i).intValue();
- int cIndex = jfunc.getArgCIndex(idx);
- String cname = cfunc.getArgName(cIndex);
-
- CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
- String decl = type.getDeclaration();
- out.println(indent + "if (!" + cname + ") {");
- out.println(indent + " jniThrowException(_env, " +
- "\"java/lang/IllegalArgumentException\", \"" + cname + " == null\");");
- out.println(indent + " goto exit;");
- needsExit = true;
- out.println(indent + "}");
-
- out.println(indent + "_native" + cname + " = _env->GetStringUTFChars(" + cname + ", 0);");
- }
-
- out.println();
- }
-
- // Emit 'GetPrimitiveArrayCritical' for arrays
- // Emit 'GetPointer' calls for Buffer pointers
- int bufArgIdx = 0;
- if (nonPrimitiveArgs.size() > 0) {
- for (int i = 0; i < nonPrimitiveArgs.size(); i++) {
- int idx = nonPrimitiveArgs.get(i).intValue();
- int cIndex = jfunc.getArgCIndex(idx);
-
- String cname = cfunc.getArgName(cIndex);
- offset = numArrays <= 1 ? "offset" :
- cname + "Offset";
- remaining = ((numArrays + numBuffers) <= 1) ? "_remaining" :
- "_" + cname + "Remaining";
-
- if (jfunc.getArgType(idx).isArray()) {
- out.println(indent +
- "if (!" +
- cname +
- "_ref) {");
- if (emitExceptionCheck) {
- out.println(indent + indent + "_exception = 1;");
- }
- out.println(indent + " jniThrowException(_env, " +
- "\"java/lang/IllegalArgumentException\", " +
- "\"" + cname + " == null\");");
- out.println(indent + " goto exit;");
- needsExit = true;
- out.println(indent + "}");
-
- out.println(indent + "if (" + offset + " < 0) {");
- if (emitExceptionCheck) {
- out.println(indent + indent + "_exception = 1;");
- }
- out.println(indent + " jniThrowException(_env, " +
- "\"java/lang/IllegalArgumentException\", \"" + offset + " < 0\");");
- out.println(indent + " goto exit;");
- needsExit = true;
- out.println(indent + "}");
-
- out.println(indent + remaining + " = " +
- (mUseCPlusPlus ? "_env" : "(*_env)") +
- "->GetArrayLength(" +
- (mUseCPlusPlus ? "" : "_env, ") +
- cname + "_ref) - " + offset + ";");
-
- emitNativeBoundsChecks(cfunc, cname, out, false,
- emitExceptionCheck,
- offset, remaining, " ");
-
- out.println(indent +
- cname +
- "_base = (" +
- cfunc.getArgType(cIndex).getDeclaration() +
- ")");
- out.println(indent + " " +
- (mUseCPlusPlus ? "_env" : "(*_env)") +
- "->GetPrimitiveArrayCritical(" +
- (mUseCPlusPlus ? "" : "_env, ") +
- jfunc.getArgName(idx) +
- "_ref, (jboolean *)0);");
- out.println(indent +
- cname + " = " + cname + "_base + " + offset +
- ";");
- out.println();
- } else {
- String array = numBufferArgs <= 1 ? "_array" :
- "_" + bufferArgNames.get(bufArgIdx++) + "Array";
-
- boolean nullAllowed = isNullAllowed(cfunc) || isPointerFunc;
- if (nullAllowed) {
- out.println(indent + "if (" + cname + "_buf) {");
- out.print(indent);
- }
-
- if (isPointerFunc) {
- out.println(indent +
- cname +
- " = (" +
- cfunc.getArgType(cIndex).getDeclaration() +
- ") getDirectBufferPointer(_env, " +
- cname + "_buf);");
- String iii = " ";
- out.println(iii + indent + "if ( ! " + cname + " ) {");
- out.println(iii + iii + indent + "return;");
- out.println(iii + indent + "}");
- } else {
- out.println(indent +
- cname +
- " = (" +
- cfunc.getArgType(cIndex).getDeclaration() +
- ")getPointer(_env, " +
- cname +
- "_buf, &" + array + ", &" + remaining +
- ");");
- }
-
- emitNativeBoundsChecks(cfunc, cname, out, true,
- emitExceptionCheck,
- offset, remaining, nullAllowed ? " " : " ");
-
- if (nullAllowed) {
- out.println(indent + "}");
- }
- }
- }
- }
-
- if (!isVoid) {
- out.print(indent + "_returnValue = ");
- } else {
- out.print(indent);
- }
- String name = cfunc.getName();
-
- if (mUseContextPointer) {
- name = name.substring(2, name.length()); // Strip off 'gl' prefix
- name = name.substring(0, 1).toLowerCase() +
- name.substring(1, name.length());
- out.print("ctx->procs.");
- }
-
- out.print(name + (isPointerFunc ? "Bounds" : "") + "(");
-
- numArgs = cfunc.getNumArgs();
- if (numArgs == 0) {
- if (mUseContextPointer) {
- out.println("ctx);");
- } else {
- out.println(");");
- }
- } else {
- if (mUseContextPointer) {
- out.println("ctx,");
- } else {
- out.println();
- }
- for (int i = 0; i < numArgs; i++) {
- String typecast;
- if (i == numArgs - 1 && isVBOPointerFunc) {
- typecast = "const GLvoid *";
- } else {
- typecast = cfunc.getArgType(i).getDeclaration();
- }
- out.print(indent + indent +
- "(" +
- typecast +
- ")");
- if (cfunc.getArgType(i).isConstCharPointer()) {
- out.print("_native");
- }
- out.print(cfunc.getArgName(i));
-
- if (i == numArgs - 1) {
- if (isPointerFunc) {
- out.println(",");
- out.println(indent + indent + "(GLsizei)remaining");
- } else {
- out.println();
- }
- } else {
- out.println(",");
- }
- }
- out.println(indent + ");");
- }
-
- if (needsExit) {
- out.println();
- out.println("exit:");
- needsExit = false;
- }
-
- bufArgIdx = 0;
- if (nonPrimitiveArgs.size() > 0) {
- for (int i = nonPrimitiveArgs.size() - 1; i >= 0; i--) {
- int idx = nonPrimitiveArgs.get(i).intValue();
-
- int cIndex = jfunc.getArgCIndex(idx);
- if (jfunc.getArgType(idx).isArray()) {
-
- // If the argument is 'const', GL will not write to it.
- // In this case, we can use the 'JNI_ABORT' flag to avoid
- // the need to write back to the Java array
- out.println(indent +
- "if (" + jfunc.getArgName(idx) + "_base) {");
- out.println(indent + indent +
- (mUseCPlusPlus ? "_env" : "(*_env)") +
- "->ReleasePrimitiveArrayCritical(" +
- (mUseCPlusPlus ? "" : "_env, ") +
- jfunc.getArgName(idx) + "_ref, " +
- cfunc.getArgName(cIndex) +
- "_base,");
- out.println(indent + indent + indent +
- (cfunc.getArgType(cIndex).isConst() ?
- "JNI_ABORT" :
- "_exception ? JNI_ABORT: 0") +
- ");");
- out.println(indent + "}");
- } else if (jfunc.getArgType(idx).isBuffer()) {
- if (! isPointerFunc) {
- String array = numBufferArgs <= 1 ? "_array" :
- "_" + bufferArgNames.get(bufArgIdx++) + "Array";
- out.println(indent + "if (" + array + ") {");
- out.println(indent + indent +
- "releasePointer(_env, " + array + ", " +
- cfunc.getArgName(cIndex) +
- ", " +
- (cfunc.getArgType(cIndex).isConst() ?
- "JNI_FALSE" : "_exception ? JNI_FALSE :" +
- " JNI_TRUE") +
- ");");
- out.println(indent + "}");
- }
- }
- }
- }
-
- // Emit local variable declaration for strings
- if (stringArgs.size() > 0) {
- for (int i = 0; i < stringArgs.size(); i++) {
- int idx = stringArgs.get(i).intValue();
- int cIndex = jfunc.getArgCIndex(idx);
- String cname = cfunc.getArgName(cIndex);
-
- out.println(indent + "if (_native" + cname + ") {");
- out.println(indent + " _env->ReleaseStringUTFChars(" + cname + ", _native" + cname + ");");
- out.println(indent + "}");
- }
-
- out.println();
- }
-
-
- if (!isVoid) {
- out.println(indent + "return _returnValue;");
- }
-
- out.println("}");
- out.println();
- }
-
-}
diff --git a/opengl/tools/glgen/src/Jsr239CodeEmitter.java b/opengl/tools/glgen/src/Jsr239CodeEmitter.java
deleted file mode 100644
index c10efe3..0000000
--- a/opengl/tools/glgen/src/Jsr239CodeEmitter.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
-import java.io.PrintStream;
-
-/**
- * Emits a Java interface and Java & C implementation for a C function.
- *
- * <p> The Java interface will have Buffer and array variants for functions that
- * have a typed pointer argument. The array variant will convert a single "<type> *data"
- * argument to a pair of arguments "<type>[] data, int offset".
- */
-public class Jsr239CodeEmitter extends JniCodeEmitter implements CodeEmitter {
-
- PrintStream mJava10InterfaceStream;
- PrintStream mJava10ExtInterfaceStream;
- PrintStream mJava11InterfaceStream;
- PrintStream mJava11ExtInterfaceStream;
- PrintStream mJava11ExtPackInterfaceStream;
- PrintStream mJavaImplStream;
- PrintStream mCStream;
-
- PrintStream mJavaInterfaceStream;
-
- /**
- * @param java10InterfaceStream the PrintStream to which to emit the Java interface for GL 1.0 functions
- * @param java10ExtInterfaceStream the PrintStream to which to emit the Java interface for GL 1.0 extension functions
- * @param java11InterfaceStream the PrintStream to which to emit the Java interface for GL 1.1 functions
- * @param java11ExtInterfaceStream the PrintStream to which to emit the Java interface for GL 1.1 Extension functions
- * @param java11ExtPackInterfaceStream the PrintStream to which to emit the Java interface for GL 1.1 Extension Pack functions
- * @param javaImplStream the PrintStream to which to emit the Java implementation
- * @param cStream the PrintStream to which to emit the C implementation
- */
- public Jsr239CodeEmitter(String classPathName,
- ParameterChecker checker,
- PrintStream java10InterfaceStream,
- PrintStream java10ExtInterfaceStream,
- PrintStream java11InterfaceStream,
- PrintStream java11ExtInterfaceStream,
- PrintStream java11ExtPackInterfaceStream,
- PrintStream javaImplStream,
- PrintStream cStream,
- boolean useContextPointer) {
- mClassPathName = classPathName;
- mChecker = checker;
- mJava10InterfaceStream = java10InterfaceStream;
- mJava10ExtInterfaceStream = java10ExtInterfaceStream;
- mJava11InterfaceStream = java11InterfaceStream;
- mJava11ExtInterfaceStream = java11ExtInterfaceStream;
- mJava11ExtPackInterfaceStream = java11ExtPackInterfaceStream;
- mJavaImplStream = javaImplStream;
- mCStream = cStream;
- mUseContextPointer = useContextPointer;
- }
-
- public void setVersion(int version, boolean ext, boolean pack) {
- if (version == 0) {
- mJavaInterfaceStream = ext ? mJava10ExtInterfaceStream :
- mJava10InterfaceStream;
- } else if (version == 1) {
- mJavaInterfaceStream = ext ?
- (pack ? mJava11ExtPackInterfaceStream :
- mJava11ExtInterfaceStream) :
- mJava11InterfaceStream;
- } else {
- throw new RuntimeException("Bad version: " + version);
- }
- }
-
- public void emitCode(CFunc cfunc, String original) {
- emitCode(cfunc, original, mJavaInterfaceStream, mJavaImplStream, mCStream);
- }
-
- public void emitNativeRegistration() {
- emitNativeRegistration("register_com_google_android_gles_jni_GLImpl", mCStream);
- }
-}
diff --git a/opengl/tools/glgen/src/ParameterChecker.java b/opengl/tools/glgen/src/ParameterChecker.java
deleted file mode 100644
index bff6d86..0000000
--- a/opengl/tools/glgen/src/ParameterChecker.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2006 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.
- */
-
-import java.io.BufferedReader;
-import java.util.HashMap;
-
-public class ParameterChecker {
-
- HashMap<String,String[]> map = new HashMap<String,String[]>();
-
- public ParameterChecker(BufferedReader reader) throws Exception {
- String s;
- while ((s = reader.readLine()) != null) {
- String[] tokens = s.split("\\s");
- map.put(tokens[0], tokens);
- }
- }
-
- public String[] getChecks(String functionName) {
- String[] checks = map.get(functionName);
- if (checks == null &&
- (functionName.endsWith("fv") ||
- functionName.endsWith("xv") ||
- functionName.endsWith("iv"))) {
- functionName = functionName.substring(0, functionName.length() - 2);
- checks = map.get(functionName);
- }
- return checks;
- }
-}
diff --git a/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if
deleted file mode 100644
index 42891ea..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if
+++ /dev/null
@@ -1,26 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-package android.opengl;
-
-public class GLES10Ext {
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
- \ No newline at end of file
diff --git a/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp
deleted file mode 100644
index 5d418d7..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/misc.h>
-
-#include <assert.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-static int initialized = 0;
-
-static jclass nioAccessClass;
-static jclass bufferClass;
-static jmethodID getBasePointerID;
-static jmethodID getBaseArrayID;
-static jmethodID getBaseArrayOffsetID;
-static jfieldID positionID;
-static jfieldID limitID;
-static jfieldID elementSizeShiftID;
-
-/* Cache method IDs each time the class is loaded. */
-
-static void
-nativeClassInit(JNIEnv *_env, jclass glImplClass)
-{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
-
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
-}
-
-
-static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
-{
- jint position;
- jint limit;
- jint elementSizeShift;
- jlong pointer;
- jint offset;
- void *data;
-
- position = _env->GetIntField(buffer, positionID);
- limit = _env->GetIntField(buffer, limitID);
- elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- *remaining = (limit - position) << elementSizeShift;
- pointer = _env->CallStaticLongMethod(nioAccessClass,
- getBasePointerID, buffer);
- if (pointer != 0L) {
- *array = NULL;
- return (void *) (jint) pointer;
- }
-
- *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
- getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
- getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
-}
-
-
-static void
-releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
-{
- _env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
-}
-
-// --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if
deleted file mode 100644
index 4b2a831..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if
+++ /dev/null
@@ -1,271 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-package android.opengl;
-
-import java.nio.Buffer;
-
-public class GLES10 {
- public static final int GL_ADD = 0x0104;
- public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
- public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
- public static final int GL_ALPHA = 0x1906;
- public static final int GL_ALPHA_BITS = 0x0D55;
- public static final int GL_ALPHA_TEST = 0x0BC0;
- public static final int GL_ALWAYS = 0x0207;
- public static final int GL_AMBIENT = 0x1200;
- public static final int GL_AMBIENT_AND_DIFFUSE = 0x1602;
- public static final int GL_AND = 0x1501;
- public static final int GL_AND_INVERTED = 0x1504;
- public static final int GL_AND_REVERSE = 0x1502;
- public static final int GL_BACK = 0x0405;
- public static final int GL_BLEND = 0x0BE2;
- public static final int GL_BLUE_BITS = 0x0D54;
- public static final int GL_BYTE = 0x1400;
- public static final int GL_CCW = 0x0901;
- public static final int GL_CLAMP_TO_EDGE = 0x812F;
- public static final int GL_CLEAR = 0x1500;
- public static final int GL_COLOR_ARRAY = 0x8076;
- public static final int GL_COLOR_BUFFER_BIT = 0x4000;
- public static final int GL_COLOR_LOGIC_OP = 0x0BF2;
- public static final int GL_COLOR_MATERIAL = 0x0B57;
- public static final int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
- public static final int GL_CONSTANT_ATTENUATION = 0x1207;
- public static final int GL_COPY = 0x1503;
- public static final int GL_COPY_INVERTED = 0x150C;
- public static final int GL_CULL_FACE = 0x0B44;
- public static final int GL_CW = 0x0900;
- public static final int GL_DECAL = 0x2101;
- public static final int GL_DECR = 0x1E03;
- public static final int GL_DEPTH_BITS = 0x0D56;
- public static final int GL_DEPTH_BUFFER_BIT = 0x0100;
- public static final int GL_DEPTH_TEST = 0x0B71;
- public static final int GL_DIFFUSE = 0x1201;
- public static final int GL_DITHER = 0x0BD0;
- public static final int GL_DONT_CARE = 0x1100;
- public static final int GL_DST_ALPHA = 0x0304;
- public static final int GL_DST_COLOR = 0x0306;
- public static final int GL_EMISSION = 0x1600;
- public static final int GL_EQUAL = 0x0202;
- public static final int GL_EQUIV = 0x1509;
- public static final int GL_EXP = 0x0800;
- public static final int GL_EXP2 = 0x0801;
- public static final int GL_EXTENSIONS = 0x1F03;
- public static final int GL_FALSE = 0;
- public static final int GL_FASTEST = 0x1101;
- public static final int GL_FIXED = 0x140C;
- public static final int GL_FLAT = 0x1D00;
- public static final int GL_FLOAT = 0x1406;
- public static final int GL_FOG = 0x0B60;
- public static final int GL_FOG_COLOR = 0x0B66;
- public static final int GL_FOG_DENSITY = 0x0B62;
- public static final int GL_FOG_END = 0x0B64;
- public static final int GL_FOG_HINT = 0x0C54;
- public static final int GL_FOG_MODE = 0x0B65;
- public static final int GL_FOG_START = 0x0B63;
- public static final int GL_FRONT = 0x0404;
- public static final int GL_FRONT_AND_BACK = 0x0408;
- public static final int GL_GEQUAL = 0x0206;
- public static final int GL_GREATER = 0x0204;
- public static final int GL_GREEN_BITS = 0x0D53;
- public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B;
- public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A;
- public static final int GL_INCR = 0x1E02;
- public static final int GL_INVALID_ENUM = 0x0500;
- public static final int GL_INVALID_OPERATION = 0x0502;
- public static final int GL_INVALID_VALUE = 0x0501;
- public static final int GL_INVERT = 0x150A;
- public static final int GL_KEEP = 0x1E00;
- public static final int GL_LEQUAL = 0x0203;
- public static final int GL_LESS = 0x0201;
- public static final int GL_LIGHT_MODEL_AMBIENT = 0x0B53;
- public static final int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52;
- public static final int GL_LIGHT0 = 0x4000;
- public static final int GL_LIGHT1 = 0x4001;
- public static final int GL_LIGHT2 = 0x4002;
- public static final int GL_LIGHT3 = 0x4003;
- public static final int GL_LIGHT4 = 0x4004;
- public static final int GL_LIGHT5 = 0x4005;
- public static final int GL_LIGHT6 = 0x4006;
- public static final int GL_LIGHT7 = 0x4007;
- public static final int GL_LIGHTING = 0x0B50;
- public static final int GL_LINE_LOOP = 0x0002;
- public static final int GL_LINE_SMOOTH = 0x0B20;
- public static final int GL_LINE_SMOOTH_HINT = 0x0C52;
- public static final int GL_LINE_STRIP = 0x0003;
- public static final int GL_LINEAR = 0x2601;
- public static final int GL_LINEAR_ATTENUATION = 0x1208;
- public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
- public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
- public static final int GL_LINES = 0x0001;
- public static final int GL_LUMINANCE = 0x1909;
- public static final int GL_LUMINANCE_ALPHA = 0x190A;
- public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9;
- public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8;
- public static final int GL_MAX_LIGHTS = 0x0D31;
- public static final int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36;
- public static final int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38;
- public static final int GL_MAX_TEXTURE_SIZE = 0x0D33;
- public static final int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39;
- public static final int GL_MAX_TEXTURE_UNITS = 0x84E2;
- public static final int GL_MAX_VIEWPORT_DIMS = 0x0D3A;
- public static final int GL_MODELVIEW = 0x1700;
- public static final int GL_MODULATE = 0x2100;
- public static final int GL_MULTISAMPLE = 0x809D;
- public static final int GL_NAND = 0x150E;
- public static final int GL_NEAREST = 0x2600;
- public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
- public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
- public static final int GL_NEVER = 0x0200;
- public static final int GL_NICEST = 0x1102;
- public static final int GL_NO_ERROR = 0;
- public static final int GL_NOOP = 0x1505;
- public static final int GL_NOR = 0x1508;
- public static final int GL_NORMAL_ARRAY = 0x8075;
- public static final int GL_NORMALIZE = 0x0BA1;
- public static final int GL_NOTEQUAL = 0x0205;
- public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
- public static final int GL_ONE = 1;
- public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305;
- public static final int GL_ONE_MINUS_DST_COLOR = 0x0307;
- public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303;
- public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301;
- public static final int GL_OR = 0x1507;
- public static final int GL_OR_INVERTED = 0x150D;
- public static final int GL_OR_REVERSE = 0x150B;
- public static final int GL_OUT_OF_MEMORY = 0x0505;
- public static final int GL_PACK_ALIGNMENT = 0x0D05;
- public static final int GL_PALETTE4_R5_G6_B5_OES = 0x8B92;
- public static final int GL_PALETTE4_RGB5_A1_OES = 0x8B94;
- public static final int GL_PALETTE4_RGB8_OES = 0x8B90;
- public static final int GL_PALETTE4_RGBA4_OES = 0x8B93;
- public static final int GL_PALETTE4_RGBA8_OES = 0x8B91;
- public static final int GL_PALETTE8_R5_G6_B5_OES = 0x8B97;
- public static final int GL_PALETTE8_RGB5_A1_OES = 0x8B99;
- public static final int GL_PALETTE8_RGB8_OES = 0x8B95;
- public static final int GL_PALETTE8_RGBA4_OES = 0x8B98;
- public static final int GL_PALETTE8_RGBA8_OES = 0x8B96;
- public static final int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50;
- public static final int GL_POINT_SMOOTH = 0x0B10;
- public static final int GL_POINT_SMOOTH_HINT = 0x0C51;
- public static final int GL_POINTS = 0x0000;
- public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
- public static final int GL_POINT_SIZE = 0x0B11;
- public static final int GL_POLYGON_OFFSET_FILL = 0x8037;
- public static final int GL_POLYGON_SMOOTH_HINT = 0x0C53;
- public static final int GL_POSITION = 0x1203;
- public static final int GL_PROJECTION = 0x1701;
- public static final int GL_QUADRATIC_ATTENUATION = 0x1209;
- public static final int GL_RED_BITS = 0x0D52;
- public static final int GL_RENDERER = 0x1F01;
- public static final int GL_REPEAT = 0x2901;
- public static final int GL_REPLACE = 0x1E01;
- public static final int GL_RESCALE_NORMAL = 0x803A;
- public static final int GL_RGB = 0x1907;
- public static final int GL_RGBA = 0x1908;
- public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
- public static final int GL_SAMPLE_ALPHA_TO_ONE = 0x809F;
- public static final int GL_SAMPLE_COVERAGE = 0x80A0;
- public static final int GL_SCISSOR_TEST = 0x0C11;
- public static final int GL_SET = 0x150F;
- public static final int GL_SHININESS = 0x1601;
- public static final int GL_SHORT = 0x1402;
- public static final int GL_SMOOTH = 0x1D01;
- public static final int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22;
- public static final int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12;
- public static final int GL_SPECULAR = 0x1202;
- public static final int GL_SPOT_CUTOFF = 0x1206;
- public static final int GL_SPOT_DIRECTION = 0x1204;
- public static final int GL_SPOT_EXPONENT = 0x1205;
- public static final int GL_SRC_ALPHA = 0x0302;
- public static final int GL_SRC_ALPHA_SATURATE = 0x0308;
- public static final int GL_SRC_COLOR = 0x0300;
- public static final int GL_STACK_OVERFLOW = 0x0503;
- public static final int GL_STACK_UNDERFLOW = 0x0504;
- public static final int GL_STENCIL_BITS = 0x0D57;
- public static final int GL_STENCIL_BUFFER_BIT = 0x0400;
- public static final int GL_STENCIL_TEST = 0x0B90;
- public static final int GL_SUBPIXEL_BITS = 0x0D50;
- public static final int GL_TEXTURE = 0x1702;
- public static final int GL_TEXTURE_2D = 0x0DE1;
- public static final int GL_TEXTURE_COORD_ARRAY = 0x8078;
- public static final int GL_TEXTURE_ENV = 0x2300;
- public static final int GL_TEXTURE_ENV_COLOR = 0x2201;
- public static final int GL_TEXTURE_ENV_MODE = 0x2200;
- public static final int GL_TEXTURE_MAG_FILTER = 0x2800;
- public static final int GL_TEXTURE_MIN_FILTER = 0x2801;
- public static final int GL_TEXTURE_WRAP_S = 0x2802;
- public static final int GL_TEXTURE_WRAP_T = 0x2803;
- public static final int GL_TEXTURE0 = 0x84C0;
- public static final int GL_TEXTURE1 = 0x84C1;
- public static final int GL_TEXTURE2 = 0x84C2;
- public static final int GL_TEXTURE3 = 0x84C3;
- public static final int GL_TEXTURE4 = 0x84C4;
- public static final int GL_TEXTURE5 = 0x84C5;
- public static final int GL_TEXTURE6 = 0x84C6;
- public static final int GL_TEXTURE7 = 0x84C7;
- public static final int GL_TEXTURE8 = 0x84C8;
- public static final int GL_TEXTURE9 = 0x84C9;
- public static final int GL_TEXTURE10 = 0x84CA;
- public static final int GL_TEXTURE11 = 0x84CB;
- public static final int GL_TEXTURE12 = 0x84CC;
- public static final int GL_TEXTURE13 = 0x84CD;
- public static final int GL_TEXTURE14 = 0x84CE;
- public static final int GL_TEXTURE15 = 0x84CF;
- public static final int GL_TEXTURE16 = 0x84D0;
- public static final int GL_TEXTURE17 = 0x84D1;
- public static final int GL_TEXTURE18 = 0x84D2;
- public static final int GL_TEXTURE19 = 0x84D3;
- public static final int GL_TEXTURE20 = 0x84D4;
- public static final int GL_TEXTURE21 = 0x84D5;
- public static final int GL_TEXTURE22 = 0x84D6;
- public static final int GL_TEXTURE23 = 0x84D7;
- public static final int GL_TEXTURE24 = 0x84D8;
- public static final int GL_TEXTURE25 = 0x84D9;
- public static final int GL_TEXTURE26 = 0x84DA;
- public static final int GL_TEXTURE27 = 0x84DB;
- public static final int GL_TEXTURE28 = 0x84DC;
- public static final int GL_TEXTURE29 = 0x84DD;
- public static final int GL_TEXTURE30 = 0x84DE;
- public static final int GL_TEXTURE31 = 0x84DF;
- public static final int GL_TRIANGLE_FAN = 0x0006;
- public static final int GL_TRIANGLE_STRIP = 0x0005;
- public static final int GL_TRIANGLES = 0x0004;
- public static final int GL_TRUE = 1;
- public static final int GL_UNPACK_ALIGNMENT = 0x0CF5;
- public static final int GL_UNSIGNED_BYTE = 0x1401;
- public static final int GL_UNSIGNED_SHORT = 0x1403;
- public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
- public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
- public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
- public static final int GL_VENDOR = 0x1F00;
- public static final int GL_VERSION = 0x1F02;
- public static final int GL_VERTEX_ARRAY = 0x8074;
- public static final int GL_XOR = 0x1506;
- public static final int GL_ZERO = 0;
-
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
-
- private static Buffer _colorPointer;
- private static Buffer _normalPointer;
- private static Buffer _texCoordPointer;
- private static Buffer _vertexPointer;
-
diff --git a/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp
deleted file mode 100644
index 35a3c33..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/misc.h>
-
-#include <assert.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-/* special calls implemented in Android's GLES wrapper used to more
- * efficiently bound-check passed arrays */
-extern "C" {
-GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-}
-
-static int initialized = 0;
-
-static jclass nioAccessClass;
-static jclass bufferClass;
-static jmethodID getBasePointerID;
-static jmethodID getBaseArrayID;
-static jmethodID getBaseArrayOffsetID;
-static jfieldID positionID;
-static jfieldID limitID;
-static jfieldID elementSizeShiftID;
-
-/* Cache method IDs each time the class is loaded. */
-
-static void
-nativeClassInit(JNIEnv *_env, jclass glImplClass)
-{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
-
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
-}
-
-static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
-{
- jint position;
- jint limit;
- jint elementSizeShift;
- jlong pointer;
- jint offset;
- void *data;
-
- position = _env->GetIntField(buffer, positionID);
- limit = _env->GetIntField(buffer, limitID);
- elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- *remaining = (limit - position) << elementSizeShift;
- pointer = _env->CallStaticLongMethod(nioAccessClass,
- getBasePointerID, buffer);
- if (pointer != 0L) {
- *array = NULL;
- return (void *) (jint) pointer;
- }
-
- *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
- getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
- getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
-}
-
-static void
-releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
-{
- _env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
-}
-
-static void *
-getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
- char* buf = (char*) _env->GetDirectBufferAddress(buffer);
- if (buf) {
- jint position = _env->GetIntField(buffer, positionID);
- jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- buf += position << elementSizeShift;
- } else {
- jniThrowException(_env, "java/lang/IllegalArgumentException",
- "Must use a native order direct Buffer");
- }
- return (void*) buf;
-}
-
-static int
-getNumCompressedTextureFormats() {
- int numCompressedTextureFormats = 0;
- glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
- return numCompressedTextureFormats;
-}
-
-// --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if
deleted file mode 100644
index 0c5fa04..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if
+++ /dev/null
@@ -1,142 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-package android.opengl;
-
-import java.nio.Buffer;
-
-public class GLES11Ext {
- public static final int GL_BLEND_EQUATION_RGB_OES = 0x8009;
- public static final int GL_BLEND_EQUATION_ALPHA_OES = 0x883D;
- public static final int GL_BLEND_DST_RGB_OES = 0x80C8;
- public static final int GL_BLEND_SRC_RGB_OES = 0x80C9;
- public static final int GL_BLEND_DST_ALPHA_OES = 0x80CA;
- public static final int GL_BLEND_SRC_ALPHA_OES = 0x80CB;
- public static final int GL_BLEND_EQUATION_OES = 0x8009;
- public static final int GL_FUNC_ADD_OES = 0x8006;
- public static final int GL_FUNC_SUBTRACT_OES = 0x800A;
- public static final int GL_FUNC_REVERSE_SUBTRACT_OES = 0x800B;
- public static final int GL_ETC1_RGB8_OES = 0x8D64;
- public static final int GL_DEPTH_COMPONENT24_OES = 0x81A6;
- public static final int GL_DEPTH_COMPONENT32_OES = 0x81A7;
- public static final int GL_TEXTURE_CROP_RECT_OES = 0x8B9D;
- public static final int GL_FIXED_OES = 0x140C;
- public static final int GL_NONE_OES = 0;
- public static final int GL_FRAMEBUFFER_OES = 0x8D40;
- public static final int GL_RENDERBUFFER_OES = 0x8D41;
- public static final int GL_RGBA4_OES = 0x8056;
- public static final int GL_RGB5_A1_OES = 0x8057;
- public static final int GL_RGB565_OES = 0x8D62;
- public static final int GL_DEPTH_COMPONENT16_OES = 0x81A5;
- public static final int GL_RENDERBUFFER_WIDTH_OES = 0x8D42;
- public static final int GL_RENDERBUFFER_HEIGHT_OES = 0x8D43;
- public static final int GL_RENDERBUFFER_INTERNAL_FORMAT_OES = 0x8D44;
- public static final int GL_RENDERBUFFER_RED_SIZE_OES = 0x8D50;
- public static final int GL_RENDERBUFFER_GREEN_SIZE_OES = 0x8D51;
- public static final int GL_RENDERBUFFER_BLUE_SIZE_OES = 0x8D52;
- public static final int GL_RENDERBUFFER_ALPHA_SIZE_OES = 0x8D53;
- public static final int GL_RENDERBUFFER_DEPTH_SIZE_OES = 0x8D54;
- public static final int GL_RENDERBUFFER_STENCIL_SIZE_OES = 0x8D55;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 0x8CD0;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 0x8CD1;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 0x8CD2;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 0x8CD3;
- public static final int GL_COLOR_ATTACHMENT0_OES = 0x8CE0;
- public static final int GL_DEPTH_ATTACHMENT_OES = 0x8D00;
- public static final int GL_STENCIL_ATTACHMENT_OES = 0x8D20;
- public static final int GL_FRAMEBUFFER_COMPLETE_OES = 0x8CD5;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 0x8CD6;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 0x8CD7;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 0x8CD9;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 0x8CDA;
- public static final int GL_FRAMEBUFFER_UNSUPPORTED_OES = 0x8CDD;
- public static final int GL_FRAMEBUFFER_BINDING_OES = 0x8CA6;
- public static final int GL_RENDERBUFFER_BINDING_OES = 0x8CA7;
- public static final int GL_MAX_RENDERBUFFER_SIZE_OES = 0x84E8;
- public static final int GL_INVALID_FRAMEBUFFER_OPERATION_OES = 0x0506;
- public static final int GL_WRITE_ONLY_OES = 0x88B9;
- public static final int GL_BUFFER_ACCESS_OES = 0x88BB;
- public static final int GL_BUFFER_MAPPED_OES = 0x88BC;
- public static final int GL_BUFFER_MAP_POINTER_OES = 0x88BD;
- public static final int GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898D;
- public static final int GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898E;
- public static final int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898F;
- public static final int GL_MAX_VERTEX_UNITS_OES = 0x86A4;
- public static final int GL_MAX_PALETTE_MATRICES_OES = 0x8842;
- public static final int GL_MATRIX_PALETTE_OES = 0x8840;
- public static final int GL_MATRIX_INDEX_ARRAY_OES = 0x8844;
- public static final int GL_WEIGHT_ARRAY_OES = 0x86AD;
- public static final int GL_CURRENT_PALETTE_MATRIX_OES = 0x8843;
- public static final int GL_MATRIX_INDEX_ARRAY_SIZE_OES = 0x8846;
- public static final int GL_MATRIX_INDEX_ARRAY_TYPE_OES = 0x8847;
- public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_OES = 0x8848;
- public static final int GL_MATRIX_INDEX_ARRAY_POINTER_OES = 0x8849;
- public static final int GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES = 0x8B9E;
- public static final int GL_WEIGHT_ARRAY_SIZE_OES = 0x86AB;
- public static final int GL_WEIGHT_ARRAY_TYPE_OES = 0x86A9;
- public static final int GL_WEIGHT_ARRAY_STRIDE_OES = 0x86AA;
- public static final int GL_WEIGHT_ARRAY_POINTER_OES = 0x86AC;
- public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING_OES = 0x889E;
- public static final int GL_DEPTH_STENCIL_OES = 0x84F9;
- public static final int GL_UNSIGNED_INT_24_8_OES = 0x84FA;
- public static final int GL_DEPTH24_STENCIL8_OES = 0x88F0;
- public static final int GL_RGB8_OES = 0x8051;
- public static final int GL_RGBA8_OES = 0x8058;
- public static final int GL_STENCIL_INDEX1_OES = 0x8D46;
- public static final int GL_STENCIL_INDEX4_OES = 0x8D47;
- public static final int GL_STENCIL_INDEX8_OES = 0x8D48;
- public static final int GL_INCR_WRAP_OES = 0x8507;
- public static final int GL_DECR_WRAP_OES = 0x8508;
- public static final int GL_NORMAL_MAP_OES = 0x8511;
- public static final int GL_REFLECTION_MAP_OES = 0x8512;
- public static final int GL_TEXTURE_CUBE_MAP_OES = 0x8513;
- public static final int GL_TEXTURE_BINDING_CUBE_MAP_OES = 0x8514;
- public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES = 0x8515;
- public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES = 0x8516;
- public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 0x8517;
- public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES = 0x8518;
- public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES = 0x8519;
- public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES = 0x851A;
- public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES = 0x851C;
- public static final int GL_TEXTURE_GEN_MODE_OES = 0x2500;
- public static final int GL_TEXTURE_GEN_STR_OES = 0x8D60;
- public static final int GL_MIRRORED_REPEAT_OES = 0x8370;
- public static final int GL_3DC_X_AMD = 0x87F9;
- public static final int GL_3DC_XY_AMD = 0x87FA;
- public static final int GL_ATC_RGB_AMD = 0x8C92;
- public static final int GL_ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8C93;
- public static final int GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87EE;
- public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
- public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
- public static final int GL_BGRA = 0x80E1;
- public static final int GL_TEXTURE_EXTERNAL_OES = 0x8D65;
- public static final int GL_SAMPLER_EXTERNAL_OES = 0x8D66;
- public static final int GL_TEXTURE_BINDING_EXTERNAL_OES = 0x8D67;
- public static final int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68;
-
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
-
- private static final int GL_BYTE = GLES10.GL_BYTE;
- private static final int GL_FIXED = GLES10.GL_FIXED;
- private static final int GL_FLOAT = GLES10.GL_FLOAT;
- private static final int GL_SHORT = GLES10.GL_SHORT;
-
- private static Buffer _matrixIndexPointerOES;
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp
deleted file mode 100644
index 9b29a44..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/misc.h>
-
-#include <assert.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-/* special calls implemented in Android's GLES wrapper used to more
- * efficiently bound-check passed arrays */
-extern "C" {
-GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-}
-
-static int initialized = 0;
-
-static jclass nioAccessClass;
-static jclass bufferClass;
-static jmethodID getBasePointerID;
-static jmethodID getBaseArrayID;
-static jmethodID getBaseArrayOffsetID;
-static jfieldID positionID;
-static jfieldID limitID;
-static jfieldID elementSizeShiftID;
-
-/* Cache method IDs each time the class is loaded. */
-
-static void
-nativeClassInit(JNIEnv *_env, jclass glImplClass)
-{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
-
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
-}
-
-
-static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
-{
- jint position;
- jint limit;
- jint elementSizeShift;
- jlong pointer;
- jint offset;
- void *data;
-
- position = _env->GetIntField(buffer, positionID);
- limit = _env->GetIntField(buffer, limitID);
- elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- *remaining = (limit - position) << elementSizeShift;
- pointer = _env->CallStaticLongMethod(nioAccessClass,
- getBasePointerID, buffer);
- if (pointer != 0L) {
- *array = NULL;
- return (void *) (jint) pointer;
- }
-
- *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
- getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
- getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
-}
-
-
-static void
-releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
-{
- _env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
-}
-
-static void *
-getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
- char* buf = (char*) _env->GetDirectBufferAddress(buffer);
- if (buf) {
- jint position = _env->GetIntField(buffer, positionID);
- jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- buf += position << elementSizeShift;
- } else {
- jniThrowException(_env, "java/lang/IllegalArgumentException",
- "Must use a native order direct Buffer");
- }
- return (void*) buf;
-}
-// --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if
deleted file mode 100644
index 81572d2..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if
+++ /dev/null
@@ -1,152 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-package android.opengl;
-
-import java.nio.Buffer;
-
-public class GLES11 extends GLES10 {
- public static final int GL_ACTIVE_TEXTURE = 0x84E0;
- public static final int GL_ADD_SIGNED = 0x8574;
- public static final int GL_ALPHA_SCALE = 0x0D1C;
- public static final int GL_ALPHA_TEST_FUNC = 0x0BC1;
- public static final int GL_ALPHA_TEST_REF = 0x0BC2;
- public static final int GL_ARRAY_BUFFER = 0x8892;
- public static final int GL_ARRAY_BUFFER_BINDING = 0x8894;
- public static final int GL_BLEND_DST = 0x0BE0;
- public static final int GL_BLEND_SRC = 0x0BE1;
- public static final int GL_BUFFER_ACCESS = 0x88BB;
- public static final int GL_BUFFER_SIZE = 0x8764;
- public static final int GL_BUFFER_USAGE = 0x8765;
- public static final int GL_CLIENT_ACTIVE_TEXTURE = 0x84E1;
- public static final int GL_CLIP_PLANE0 = 0x3000;
- public static final int GL_CLIP_PLANE1 = 0x3001;
- public static final int GL_CLIP_PLANE2 = 0x3002;
- public static final int GL_CLIP_PLANE3 = 0x3003;
- public static final int GL_CLIP_PLANE4 = 0x3004;
- public static final int GL_CLIP_PLANE5 = 0x3005;
- public static final int GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898;
- public static final int GL_COLOR_ARRAY_POINTER = 0x8090;
- public static final int GL_COLOR_ARRAY_SIZE = 0x8081;
- public static final int GL_COLOR_ARRAY_STRIDE = 0x8083;
- public static final int GL_COLOR_ARRAY_TYPE = 0x8082;
- public static final int GL_COLOR_CLEAR_VALUE = 0x0C22;
- public static final int GL_COLOR_WRITEMASK = 0x0C23;
- public static final int GL_COMBINE = 0x8570;
- public static final int GL_COMBINE_ALPHA = 0x8572;
- public static final int GL_COMBINE_RGB = 0x8571;
- public static final int GL_CONSTANT = 0x8576;
- public static final int GL_COORD_REPLACE_OES = 0x8862;
- public static final int GL_CULL_FACE_MODE = 0x0B45;
- public static final int GL_CURRENT_COLOR = 0x0B00;
- public static final int GL_CURRENT_NORMAL = 0x0B02;
- public static final int GL_CURRENT_TEXTURE_COORDS = 0x0B03;
- public static final int GL_DEPTH_CLEAR_VALUE = 0x0B73;
- public static final int GL_DEPTH_FUNC = 0x0B74;
- public static final int GL_DEPTH_RANGE = 0x0B70;
- public static final int GL_DEPTH_WRITEMASK = 0x0B72;
- public static final int GL_DOT3_RGB = 0x86AE;
- public static final int GL_DOT3_RGBA = 0x86AF;
- public static final int GL_DYNAMIC_DRAW = 0x88E8;
- public static final int GL_ELEMENT_ARRAY_BUFFER = 0x8893;
- public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
- public static final int GL_FRONT_FACE = 0x0B46;
- public static final int GL_GENERATE_MIPMAP = 0x8191;
- public static final int GL_GENERATE_MIPMAP_HINT = 0x8192;
- public static final int GL_INTERPOLATE = 0x8575;
- public static final int GL_LINE_WIDTH = 0x0B21;
- public static final int GL_LOGIC_OP_MODE = 0x0BF0;
- public static final int GL_MATRIX_MODE = 0x0BA0;
- public static final int GL_MAX_CLIP_PLANES = 0x0D32;
- public static final int GL_MODELVIEW_MATRIX = 0x0BA6;
- public static final int GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898D;
- public static final int GL_MODELVIEW_STACK_DEPTH = 0x0BA3;
- public static final int GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897;
- public static final int GL_NORMAL_ARRAY_POINTER = 0x808F;
- public static final int GL_NORMAL_ARRAY_STRIDE = 0x807F;
- public static final int GL_NORMAL_ARRAY_TYPE = 0x807E;
- public static final int GL_OPERAND0_ALPHA = 0x8598;
- public static final int GL_OPERAND0_RGB = 0x8590;
- public static final int GL_OPERAND1_ALPHA = 0x8599;
- public static final int GL_OPERAND1_RGB = 0x8591;
- public static final int GL_OPERAND2_ALPHA = 0x859A;
- public static final int GL_OPERAND2_RGB = 0x8592;
- public static final int GL_POINT_DISTANCE_ATTENUATION = 0x8129;
- public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
- public static final int GL_POINT_SIZE = 0x0B11;
- public static final int GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES = 0x8B9F;
- public static final int GL_POINT_SIZE_ARRAY_OES = 0x8B9C;
- public static final int GL_POINT_SIZE_ARRAY_POINTER_OES = 0x898C;
- public static final int GL_POINT_SIZE_ARRAY_STRIDE_OES = 0x898B;
- public static final int GL_POINT_SIZE_ARRAY_TYPE_OES = 0x898A;
- public static final int GL_POINT_SIZE_MAX = 0x8127;
- public static final int GL_POINT_SIZE_MIN = 0x8126;
- public static final int GL_POINT_SPRITE_OES = 0x8861;
- public static final int GL_POLYGON_OFFSET_FACTOR = 0x8038;
- public static final int GL_POLYGON_OFFSET_UNITS = 0x2A00;
- public static final int GL_PREVIOUS = 0x8578;
- public static final int GL_PRIMARY_COLOR = 0x8577;
- public static final int GL_PROJECTION_MATRIX = 0x0BA7;
- public static final int GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898E;
- public static final int GL_PROJECTION_STACK_DEPTH = 0x0BA4;
- public static final int GL_RGB_SCALE = 0x8573;
- public static final int GL_SAMPLE_BUFFERS = 0x80A8;
- public static final int GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
- public static final int GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
- public static final int GL_SAMPLES = 0x80A9;
- public static final int GL_SCISSOR_BOX = 0x0C10;
- public static final int GL_SHADE_MODEL = 0x0B54;
- public static final int GL_SRC0_ALPHA = 0x8588;
- public static final int GL_SRC0_RGB = 0x8580;
- public static final int GL_SRC1_ALPHA = 0x8589;
- public static final int GL_SRC1_RGB = 0x8581;
- public static final int GL_SRC2_ALPHA = 0x858A;
- public static final int GL_SRC2_RGB = 0x8582;
- public static final int GL_STATIC_DRAW = 0x88E4;
- public static final int GL_STENCIL_CLEAR_VALUE = 0x0B91;
- public static final int GL_STENCIL_FAIL = 0x0B94;
- public static final int GL_STENCIL_FUNC = 0x0B92;
- public static final int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
- public static final int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
- public static final int GL_STENCIL_REF = 0x0B97;
- public static final int GL_STENCIL_VALUE_MASK = 0x0B93;
- public static final int GL_STENCIL_WRITEMASK = 0x0B98;
- public static final int GL_SUBTRACT = 0x84E7;
- public static final int GL_TEXTURE_BINDING_2D = 0x8069;
- public static final int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A;
- public static final int GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092;
- public static final int GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088;
- public static final int GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A;
- public static final int GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089;
- public static final int GL_TEXTURE_MATRIX = 0x0BA8;
- public static final int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898F;
- public static final int GL_TEXTURE_STACK_DEPTH = 0x0BA5;
- public static final int GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896;
- public static final int GL_VERTEX_ARRAY_POINTER = 0x808E;
- public static final int GL_VERTEX_ARRAY_SIZE = 0x807A;
- public static final int GL_VERTEX_ARRAY_STRIDE = 0x807C;
- public static final int GL_VERTEX_ARRAY_TYPE = 0x807B;
- public static final int GL_VIEWPORT = 0x0BA2;
- public static final int GL_WRITE_ONLY = 0x88B9;
-
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
-
- private static Buffer _pointSizePointerOES;
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp
deleted file mode 100644
index 823079f..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/misc.h>
-
-#include <assert.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-/* special calls implemented in Android's GLES wrapper used to more
- * efficiently bound-check passed arrays */
-extern "C" {
-GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-}
-
-static int initialized = 0;
-
-static jclass nioAccessClass;
-static jclass bufferClass;
-static jmethodID getBasePointerID;
-static jmethodID getBaseArrayID;
-static jmethodID getBaseArrayOffsetID;
-static jfieldID positionID;
-static jfieldID limitID;
-static jfieldID elementSizeShiftID;
-
-/* Cache method IDs each time the class is loaded. */
-
-static void
-nativeClassInit(JNIEnv *_env, jclass glImplClass)
-{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
-
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
-}
-
-
-static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
-{
- jint position;
- jint limit;
- jint elementSizeShift;
- jlong pointer;
- jint offset;
- void *data;
-
- position = _env->GetIntField(buffer, positionID);
- limit = _env->GetIntField(buffer, limitID);
- elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- *remaining = (limit - position) << elementSizeShift;
- pointer = _env->CallStaticLongMethod(nioAccessClass,
- getBasePointerID, buffer);
- if (pointer != 0L) {
- *array = NULL;
- return (void *) (jint) pointer;
- }
-
- *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
- getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
- getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
-}
-
-
-static void
-releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
-{
- _env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
-}
-
-static void *
-getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
- char* buf = (char*) _env->GetDirectBufferAddress(buffer);
- if (buf) {
- jint position = _env->GetIntField(buffer, positionID);
- jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- buf += position << elementSizeShift;
- } else {
- jniThrowException(_env, "java/lang/IllegalArgumentException",
- "Must use a native order direct Buffer");
- }
- return (void*) buf;
-}
-
-// --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if
deleted file mode 100644
index b615e0a..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if
+++ /dev/null
@@ -1,330 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-package android.opengl;
-
-/** OpenGL ES 2.0
- */
-public class GLES20 {
- public static final int GL_ACTIVE_TEXTURE = 0x84E0;
- public static final int GL_DEPTH_BUFFER_BIT = 0x00000100;
- public static final int GL_STENCIL_BUFFER_BIT = 0x00000400;
- public static final int GL_COLOR_BUFFER_BIT = 0x00004000;
- public static final int GL_FALSE = 0;
- public static final int GL_TRUE = 1;
- public static final int GL_POINTS = 0x0000;
- public static final int GL_LINES = 0x0001;
- public static final int GL_LINE_LOOP = 0x0002;
- public static final int GL_LINE_STRIP = 0x0003;
- public static final int GL_TRIANGLES = 0x0004;
- public static final int GL_TRIANGLE_STRIP = 0x0005;
- public static final int GL_TRIANGLE_FAN = 0x0006;
- public static final int GL_ZERO = 0;
- public static final int GL_ONE = 1;
- public static final int GL_SRC_COLOR = 0x0300;
- public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301;
- public static final int GL_SRC_ALPHA = 0x0302;
- public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303;
- public static final int GL_DST_ALPHA = 0x0304;
- public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305;
- public static final int GL_DST_COLOR = 0x0306;
- public static final int GL_ONE_MINUS_DST_COLOR = 0x0307;
- public static final int GL_SRC_ALPHA_SATURATE = 0x0308;
- public static final int GL_FUNC_ADD = 0x8006;
- public static final int GL_BLEND_EQUATION = 0x8009;
- public static final int GL_BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */
- public static final int GL_BLEND_EQUATION_ALPHA = 0x883D;
- public static final int GL_FUNC_SUBTRACT = 0x800A;
- public static final int GL_FUNC_REVERSE_SUBTRACT = 0x800B;
- public static final int GL_BLEND_DST_RGB = 0x80C8;
- public static final int GL_BLEND_SRC_RGB = 0x80C9;
- public static final int GL_BLEND_DST_ALPHA = 0x80CA;
- public static final int GL_BLEND_SRC_ALPHA = 0x80CB;
- public static final int GL_CONSTANT_COLOR = 0x8001;
- public static final int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002;
- public static final int GL_CONSTANT_ALPHA = 0x8003;
- public static final int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004;
- public static final int GL_BLEND_COLOR = 0x8005;
- public static final int GL_ARRAY_BUFFER = 0x8892;
- public static final int GL_ELEMENT_ARRAY_BUFFER = 0x8893;
- public static final int GL_ARRAY_BUFFER_BINDING = 0x8894;
- public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
- public static final int GL_STREAM_DRAW = 0x88E0;
- public static final int GL_STATIC_DRAW = 0x88E4;
- public static final int GL_DYNAMIC_DRAW = 0x88E8;
- public static final int GL_BUFFER_SIZE = 0x8764;
- public static final int GL_BUFFER_USAGE = 0x8765;
- public static final int GL_CURRENT_VERTEX_ATTRIB = 0x8626;
- public static final int GL_FRONT = 0x0404;
- public static final int GL_BACK = 0x0405;
- public static final int GL_FRONT_AND_BACK = 0x0408;
- public static final int GL_TEXTURE_2D = 0x0DE1;
- public static final int GL_CULL_FACE = 0x0B44;
- public static final int GL_BLEND = 0x0BE2;
- public static final int GL_DITHER = 0x0BD0;
- public static final int GL_STENCIL_TEST = 0x0B90;
- public static final int GL_DEPTH_TEST = 0x0B71;
- public static final int GL_SCISSOR_TEST = 0x0C11;
- public static final int GL_POLYGON_OFFSET_FILL = 0x8037;
- public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
- public static final int GL_SAMPLE_COVERAGE = 0x80A0;
- public static final int GL_NO_ERROR = 0;
- public static final int GL_INVALID_ENUM = 0x0500;
- public static final int GL_INVALID_VALUE = 0x0501;
- public static final int GL_INVALID_OPERATION = 0x0502;
- public static final int GL_OUT_OF_MEMORY = 0x0505;
- public static final int GL_CW = 0x0900;
- public static final int GL_CCW = 0x0901;
- public static final int GL_LINE_WIDTH = 0x0B21;
- public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
- public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
- public static final int GL_CULL_FACE_MODE = 0x0B45;
- public static final int GL_FRONT_FACE = 0x0B46;
- public static final int GL_DEPTH_RANGE = 0x0B70;
- public static final int GL_DEPTH_WRITEMASK = 0x0B72;
- public static final int GL_DEPTH_CLEAR_VALUE = 0x0B73;
- public static final int GL_DEPTH_FUNC = 0x0B74;
- public static final int GL_STENCIL_CLEAR_VALUE = 0x0B91;
- public static final int GL_STENCIL_FUNC = 0x0B92;
- public static final int GL_STENCIL_FAIL = 0x0B94;
- public static final int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
- public static final int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
- public static final int GL_STENCIL_REF = 0x0B97;
- public static final int GL_STENCIL_VALUE_MASK = 0x0B93;
- public static final int GL_STENCIL_WRITEMASK = 0x0B98;
- public static final int GL_STENCIL_BACK_FUNC = 0x8800;
- public static final int GL_STENCIL_BACK_FAIL = 0x8801;
- public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
- public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
- public static final int GL_STENCIL_BACK_REF = 0x8CA3;
- public static final int GL_STENCIL_BACK_VALUE_MASK = 0x8CA4;
- public static final int GL_STENCIL_BACK_WRITEMASK = 0x8CA5;
- public static final int GL_VIEWPORT = 0x0BA2;
- public static final int GL_SCISSOR_BOX = 0x0C10;
- public static final int GL_COLOR_CLEAR_VALUE = 0x0C22;
- public static final int GL_COLOR_WRITEMASK = 0x0C23;
- public static final int GL_UNPACK_ALIGNMENT = 0x0CF5;
- public static final int GL_PACK_ALIGNMENT = 0x0D05;
- public static final int GL_MAX_TEXTURE_SIZE = 0x0D33;
- public static final int GL_MAX_VIEWPORT_DIMS = 0x0D3A;
- public static final int GL_SUBPIXEL_BITS = 0x0D50;
- public static final int GL_RED_BITS = 0x0D52;
- public static final int GL_GREEN_BITS = 0x0D53;
- public static final int GL_BLUE_BITS = 0x0D54;
- public static final int GL_ALPHA_BITS = 0x0D55;
- public static final int GL_DEPTH_BITS = 0x0D56;
- public static final int GL_STENCIL_BITS = 0x0D57;
- public static final int GL_POLYGON_OFFSET_UNITS = 0x2A00;
- public static final int GL_POLYGON_OFFSET_FACTOR = 0x8038;
- public static final int GL_TEXTURE_BINDING_2D = 0x8069;
- public static final int GL_SAMPLE_BUFFERS = 0x80A8;
- public static final int GL_SAMPLES = 0x80A9;
- public static final int GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
- public static final int GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
- public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
- public static final int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
- public static final int GL_DONT_CARE = 0x1100;
- public static final int GL_FASTEST = 0x1101;
- public static final int GL_NICEST = 0x1102;
- public static final int GL_GENERATE_MIPMAP_HINT = 0x8192;
- public static final int GL_BYTE = 0x1400;
- public static final int GL_UNSIGNED_BYTE = 0x1401;
- public static final int GL_SHORT = 0x1402;
- public static final int GL_UNSIGNED_SHORT = 0x1403;
- public static final int GL_INT = 0x1404;
- public static final int GL_UNSIGNED_INT = 0x1405;
- public static final int GL_FLOAT = 0x1406;
- public static final int GL_FIXED = 0x140C;
- public static final int GL_DEPTH_COMPONENT = 0x1902;
- public static final int GL_ALPHA = 0x1906;
- public static final int GL_RGB = 0x1907;
- public static final int GL_RGBA = 0x1908;
- public static final int GL_LUMINANCE = 0x1909;
- public static final int GL_LUMINANCE_ALPHA = 0x190A;
- public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
- public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
- public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
- public static final int GL_FRAGMENT_SHADER = 0x8B30;
- public static final int GL_VERTEX_SHADER = 0x8B31;
- public static final int GL_MAX_VERTEX_ATTRIBS = 0x8869;
- public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
- public static final int GL_MAX_VARYING_VECTORS = 0x8DFC;
- public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
- public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
- public static final int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872;
- public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
- public static final int GL_SHADER_TYPE = 0x8B4F;
- public static final int GL_DELETE_STATUS = 0x8B80;
- public static final int GL_LINK_STATUS = 0x8B82;
- public static final int GL_VALIDATE_STATUS = 0x8B83;
- public static final int GL_ATTACHED_SHADERS = 0x8B85;
- public static final int GL_ACTIVE_UNIFORMS = 0x8B86;
- public static final int GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
- public static final int GL_ACTIVE_ATTRIBUTES = 0x8B89;
- public static final int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
- public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
- public static final int GL_CURRENT_PROGRAM = 0x8B8D;
- public static final int GL_NEVER = 0x0200;
- public static final int GL_LESS = 0x0201;
- public static final int GL_EQUAL = 0x0202;
- public static final int GL_LEQUAL = 0x0203;
- public static final int GL_GREATER = 0x0204;
- public static final int GL_NOTEQUAL = 0x0205;
- public static final int GL_GEQUAL = 0x0206;
- public static final int GL_ALWAYS = 0x0207;
- public static final int GL_KEEP = 0x1E00;
- public static final int GL_REPLACE = 0x1E01;
- public static final int GL_INCR = 0x1E02;
- public static final int GL_DECR = 0x1E03;
- public static final int GL_INVERT = 0x150A;
- public static final int GL_INCR_WRAP = 0x8507;
- public static final int GL_DECR_WRAP = 0x8508;
- public static final int GL_VENDOR = 0x1F00;
- public static final int GL_RENDERER = 0x1F01;
- public static final int GL_VERSION = 0x1F02;
- public static final int GL_EXTENSIONS = 0x1F03;
- public static final int GL_NEAREST = 0x2600;
- public static final int GL_LINEAR = 0x2601;
- public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
- public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
- public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
- public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
- public static final int GL_TEXTURE_MAG_FILTER = 0x2800;
- public static final int GL_TEXTURE_MIN_FILTER = 0x2801;
- public static final int GL_TEXTURE_WRAP_S = 0x2802;
- public static final int GL_TEXTURE_WRAP_T = 0x2803;
- public static final int GL_TEXTURE = 0x1702;
- public static final int GL_TEXTURE_CUBE_MAP = 0x8513;
- public static final int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
- public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
- public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
- public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
- public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
- public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
- public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
- public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
- public static final int GL_TEXTURE0 = 0x84C0;
- public static final int GL_TEXTURE1 = 0x84C1;
- public static final int GL_TEXTURE2 = 0x84C2;
- public static final int GL_TEXTURE3 = 0x84C3;
- public static final int GL_TEXTURE4 = 0x84C4;
- public static final int GL_TEXTURE5 = 0x84C5;
- public static final int GL_TEXTURE6 = 0x84C6;
- public static final int GL_TEXTURE7 = 0x84C7;
- public static final int GL_TEXTURE8 = 0x84C8;
- public static final int GL_TEXTURE9 = 0x84C9;
- public static final int GL_TEXTURE10 = 0x84CA;
- public static final int GL_TEXTURE11 = 0x84CB;
- public static final int GL_TEXTURE12 = 0x84CC;
- public static final int GL_TEXTURE13 = 0x84CD;
- public static final int GL_TEXTURE14 = 0x84CE;
- public static final int GL_TEXTURE15 = 0x84CF;
- public static final int GL_TEXTURE16 = 0x84D0;
- public static final int GL_TEXTURE17 = 0x84D1;
- public static final int GL_TEXTURE18 = 0x84D2;
- public static final int GL_TEXTURE19 = 0x84D3;
- public static final int GL_TEXTURE20 = 0x84D4;
- public static final int GL_TEXTURE21 = 0x84D5;
- public static final int GL_TEXTURE22 = 0x84D6;
- public static final int GL_TEXTURE23 = 0x84D7;
- public static final int GL_TEXTURE24 = 0x84D8;
- public static final int GL_TEXTURE25 = 0x84D9;
- public static final int GL_TEXTURE26 = 0x84DA;
- public static final int GL_TEXTURE27 = 0x84DB;
- public static final int GL_TEXTURE28 = 0x84DC;
- public static final int GL_TEXTURE29 = 0x84DD;
- public static final int GL_TEXTURE30 = 0x84DE;
- public static final int GL_TEXTURE31 = 0x84DF;
- public static final int GL_REPEAT = 0x2901;
- public static final int GL_CLAMP_TO_EDGE = 0x812F;
- public static final int GL_MIRRORED_REPEAT = 0x8370;
- public static final int GL_FLOAT_VEC2 = 0x8B50;
- public static final int GL_FLOAT_VEC3 = 0x8B51;
- public static final int GL_FLOAT_VEC4 = 0x8B52;
- public static final int GL_INT_VEC2 = 0x8B53;
- public static final int GL_INT_VEC3 = 0x8B54;
- public static final int GL_INT_VEC4 = 0x8B55;
- public static final int GL_BOOL = 0x8B56;
- public static final int GL_BOOL_VEC2 = 0x8B57;
- public static final int GL_BOOL_VEC3 = 0x8B58;
- public static final int GL_BOOL_VEC4 = 0x8B59;
- public static final int GL_FLOAT_MAT2 = 0x8B5A;
- public static final int GL_FLOAT_MAT3 = 0x8B5B;
- public static final int GL_FLOAT_MAT4 = 0x8B5C;
- public static final int GL_SAMPLER_2D = 0x8B5E;
- public static final int GL_SAMPLER_CUBE = 0x8B60;
- public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
- public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
- public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
- public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
- public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
- public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
- public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
- public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
- public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
- public static final int GL_COMPILE_STATUS = 0x8B81;
- public static final int GL_INFO_LOG_LENGTH = 0x8B84;
- public static final int GL_SHADER_SOURCE_LENGTH = 0x8B88;
- public static final int GL_SHADER_COMPILER = 0x8DFA;
- public static final int GL_SHADER_BINARY_FORMATS = 0x8DF8;
- public static final int GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9;
- public static final int GL_LOW_FLOAT = 0x8DF0;
- public static final int GL_MEDIUM_FLOAT = 0x8DF1;
- public static final int GL_HIGH_FLOAT = 0x8DF2;
- public static final int GL_LOW_INT = 0x8DF3;
- public static final int GL_MEDIUM_INT = 0x8DF4;
- public static final int GL_HIGH_INT = 0x8DF5;
- public static final int GL_FRAMEBUFFER = 0x8D40;
- public static final int GL_RENDERBUFFER = 0x8D41;
- public static final int GL_RGBA4 = 0x8056;
- public static final int GL_RGB5_A1 = 0x8057;
- public static final int GL_RGB565 = 0x8D62;
- public static final int GL_DEPTH_COMPONENT16 = 0x81A5;
- public static final int GL_STENCIL_INDEX = 0x1901;
- public static final int GL_STENCIL_INDEX8 = 0x8D48;
- public static final int GL_RENDERBUFFER_WIDTH = 0x8D42;
- public static final int GL_RENDERBUFFER_HEIGHT = 0x8D43;
- public static final int GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
- public static final int GL_RENDERBUFFER_RED_SIZE = 0x8D50;
- public static final int GL_RENDERBUFFER_GREEN_SIZE = 0x8D51;
- public static final int GL_RENDERBUFFER_BLUE_SIZE = 0x8D52;
- public static final int GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53;
- public static final int GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54;
- public static final int GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
- public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
- public static final int GL_COLOR_ATTACHMENT0 = 0x8CE0;
- public static final int GL_DEPTH_ATTACHMENT = 0x8D00;
- public static final int GL_STENCIL_ATTACHMENT = 0x8D20;
- public static final int GL_NONE = 0;
- public static final int GL_FRAMEBUFFER_COMPLETE = 0x8CD5;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
- public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
- public static final int GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
- public static final int GL_FRAMEBUFFER_BINDING = 0x8CA6;
- public static final int GL_RENDERBUFFER_BINDING = 0x8CA7;
- public static final int GL_MAX_RENDERBUFFER_SIZE = 0x84E8;
- public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506;
-
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
diff --git a/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp
deleted file mode 100644
index 13a2577..0000000
--- a/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-**
-** Copyright 2009, 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 source file is automatically generated
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/misc.h>
-
-#include <assert.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-static int initialized = 0;
-
-static jclass nioAccessClass;
-static jclass bufferClass;
-static jmethodID getBasePointerID;
-static jmethodID getBaseArrayID;
-static jmethodID getBaseArrayOffsetID;
-static jfieldID positionID;
-static jfieldID limitID;
-static jfieldID elementSizeShiftID;
-
-/* Cache method IDs each time the class is loaded. */
-
-static void
-nativeClassInit(JNIEnv *_env, jclass glImplClass)
-{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
-
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
-}
-
-
-static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
-{
- jint position;
- jint limit;
- jint elementSizeShift;
- jlong pointer;
- jint offset;
- void *data;
-
- position = _env->GetIntField(buffer, positionID);
- limit = _env->GetIntField(buffer, limitID);
- elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- *remaining = (limit - position) << elementSizeShift;
- pointer = _env->CallStaticLongMethod(nioAccessClass,
- getBasePointerID, buffer);
- if (pointer != 0L) {
- *array = NULL;
- return (void *) (jint) pointer;
- }
-
- *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
- getBaseArrayID, buffer);
- offset = _env->CallStaticIntMethod(nioAccessClass,
- getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
-}
-
-
-static void
-releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
-{
- _env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
-}
-
-static void *
-getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
- char* buf = (char*) _env->GetDirectBufferAddress(buffer);
- if (buf) {
- jint position = _env->GetIntField(buffer, positionID);
- jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- buf += position << elementSizeShift;
- } else {
- jniThrowException(_env, "java/lang/IllegalArgumentException",
- "Must use a native order direct Buffer");
- }
- return (void*) buf;
-}
-
-static int
-getNumCompressedTextureFormats() {
- int numCompressedTextureFormats = 0;
- glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
- return numCompressedTextureFormats;
-}
-
-static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) {
- glVertexAttribPointer(indx, size, type, normalized, stride, pointer);
-}
-
-// --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.cpp b/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.cpp
deleted file mode 100644
index ce6ab24..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdlib.h>
-
-/* void glGetProgramInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
-static jstring android_glGetProgramInfoLog(JNIEnv *_env, jobject, jint shader) {
- GLint infoLen = 0;
- glGetProgramiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (!infoLen) {
- return _env->NewStringUTF("");
- }
- char* buf = (char*) malloc(infoLen);
- if (buf == NULL) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
- return NULL;
- }
- glGetProgramInfoLog(shader, infoLen, NULL, buf);
- jstring result = _env->NewStringUTF(buf);
- free(buf);
- return result;
-}
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java b/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java
deleted file mode 100644
index 762df39..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
- // C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length,
- // GLchar * infoLog);
-
- public static native String glGetProgramInfoLog(
- int program
- );
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.nativeReg
deleted file mode 100644
index 8553f2d..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.nativeReg
+++ /dev/null
@@ -1 +0,0 @@
-{"glGetProgramInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramInfoLog },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.cpp b/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.cpp
deleted file mode 100644
index dd656b6..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdlib.h>
-
-/* void glGetShaderInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
-static jstring android_glGetShaderInfoLog(JNIEnv *_env, jobject, jint shader) {
- GLint infoLen = 0;
- glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
- if (!infoLen) {
- return _env->NewStringUTF("");
- }
- char* buf = (char*) malloc(infoLen);
- if (buf == NULL) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory");
- return NULL;
- }
- glGetShaderInfoLog(shader, infoLen, NULL, buf);
- jstring result = _env->NewStringUTF(buf);
- free(buf);
- return result;
-}
diff --git a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java b/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java
deleted file mode 100644
index af529c0..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
- // C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length,
- // GLchar * infoLog);
-
- public static native String glGetShaderInfoLog(
- int shader
- );
diff --git a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.nativeReg
deleted file mode 100644
index 71163c3..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.nativeReg
+++ /dev/null
@@ -1 +0,0 @@
-{"glGetShaderInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetShaderInfoLog },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetString.cpp b/opengl/tools/glgen/stubs/gles11/glGetString.cpp
deleted file mode 100644
index 239fe4a..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetString.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-/* const GLubyte * glGetString ( GLenum name ) */
-static jstring android_glGetString(JNIEnv* _env, jobject, jint name) {
- const char* chars = (const char*) glGetString((GLenum) name);
- return _env->NewStringUTF(chars);
-}
diff --git a/opengl/tools/glgen/stubs/gles11/glGetString.java b/opengl/tools/glgen/stubs/gles11/glGetString.java
deleted file mode 100644
index b02a0d1..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetString.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
- // C function const GLubyte * glGetString ( GLenum name )
-
- public static native String glGetString(
- int name
- );
diff --git a/opengl/tools/glgen/stubs/gles11/glGetString.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetString.nativeReg
deleted file mode 100644
index a4af31f..0000000
--- a/opengl/tools/glgen/stubs/gles11/glGetString.nativeReg
+++ /dev/null
@@ -1 +0,0 @@
-{"glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },
diff --git a/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp b/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp
deleted file mode 100644
index 125fd0f..0000000
--- a/opengl/tools/glgen/stubs/gles11/glShaderSource.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-
-/* void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint * length ) */
-static
-void
-android_glShaderSource
- (JNIEnv *_env, jobject _this, jint shader, jstring string) {
-
- if (!string) {
- jniThrowException(_env, "java/lang/IllegalArgumentException", "string == null");
- return;
- }
-
- const char* nativeString = _env->GetStringUTFChars(string, 0);
- const char* strings[] = {nativeString};
- glShaderSource(shader, 1, strings, 0);
- _env->ReleaseStringUTFChars(string, nativeString);
-}
diff --git a/opengl/tools/glgen/stubs/gles11/glShaderSource.java b/opengl/tools/glgen/stubs/gles11/glShaderSource.java
deleted file mode 100644
index e9fcef3..0000000
--- a/opengl/tools/glgen/stubs/gles11/glShaderSource.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2009 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.
- */
-
- // C function void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint* length )
-
- public static native void glShaderSource(
- int shader,
- String string
- );
diff --git a/opengl/tools/glgen/stubs/gles11/glShaderSource.nativeReg b/opengl/tools/glgen/stubs/gles11/glShaderSource.nativeReg
deleted file mode 100644
index b17783a..0000000
--- a/opengl/tools/glgen/stubs/gles11/glShaderSource.nativeReg
+++ /dev/null
@@ -1 +0,0 @@
-{"glShaderSource", "(ILjava/lang/String;)V", (void *) android_glShaderSource },
diff --git a/opengl/tools/glgen/stubs/jsr239/GL10ExtHeader.java-if b/opengl/tools/glgen/stubs/jsr239/GL10ExtHeader.java-if
deleted file mode 100644
index b0999c2..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GL10ExtHeader.java-if
+++ /dev/null
@@ -1,22 +0,0 @@
-**
-** Copyright 2007, 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 source file is automatically generated
-
-package javax.microedition.khronos.opengles;
-
-public interface GL10Ext extends GL {
-
diff --git a/opengl/tools/glgen/stubs/jsr239/GL10Header.java-if b/opengl/tools/glgen/stubs/jsr239/GL10Header.java-if
deleted file mode 100644
index 8392821..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GL10Header.java-if
+++ /dev/null
@@ -1,259 +0,0 @@
-**
-** Copyright 2006, 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 source file is automatically generated
-
-package javax.microedition.khronos.opengles;
-
-public interface GL10 extends GL {
- int GL_ADD = 0x0104;
- int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
- int GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
- int GL_ALPHA = 0x1906;
- int GL_ALPHA_BITS = 0x0D55;
- int GL_ALPHA_TEST = 0x0BC0;
- int GL_ALWAYS = 0x0207;
- int GL_AMBIENT = 0x1200;
- int GL_AMBIENT_AND_DIFFUSE = 0x1602;
- int GL_AND = 0x1501;
- int GL_AND_INVERTED = 0x1504;
- int GL_AND_REVERSE = 0x1502;
- int GL_BACK = 0x0405;
- int GL_BLEND = 0x0BE2;
- int GL_BLUE_BITS = 0x0D54;
- int GL_BYTE = 0x1400;
- int GL_CCW = 0x0901;
- int GL_CLAMP_TO_EDGE = 0x812F;
- int GL_CLEAR = 0x1500;
- int GL_COLOR_ARRAY = 0x8076;
- int GL_COLOR_BUFFER_BIT = 0x4000;
- int GL_COLOR_LOGIC_OP = 0x0BF2;
- int GL_COLOR_MATERIAL = 0x0B57;
- int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
- int GL_CONSTANT_ATTENUATION = 0x1207;
- int GL_COPY = 0x1503;
- int GL_COPY_INVERTED = 0x150C;
- int GL_CULL_FACE = 0x0B44;
- int GL_CW = 0x0900;
- int GL_DECAL = 0x2101;
- int GL_DECR = 0x1E03;
- int GL_DEPTH_BITS = 0x0D56;
- int GL_DEPTH_BUFFER_BIT = 0x0100;
- int GL_DEPTH_TEST = 0x0B71;
- int GL_DIFFUSE = 0x1201;
- int GL_DITHER = 0x0BD0;
- int GL_DONT_CARE = 0x1100;
- int GL_DST_ALPHA = 0x0304;
- int GL_DST_COLOR = 0x0306;
- int GL_EMISSION = 0x1600;
- int GL_EQUAL = 0x0202;
- int GL_EQUIV = 0x1509;
- int GL_EXP = 0x0800;
- int GL_EXP2 = 0x0801;
- int GL_EXTENSIONS = 0x1F03;
- int GL_FALSE = 0;
- int GL_FASTEST = 0x1101;
- int GL_FIXED = 0x140C;
- int GL_FLAT = 0x1D00;
- int GL_FLOAT = 0x1406;
- int GL_FOG = 0x0B60;
- int GL_FOG_COLOR = 0x0B66;
- int GL_FOG_DENSITY = 0x0B62;
- int GL_FOG_END = 0x0B64;
- int GL_FOG_HINT = 0x0C54;
- int GL_FOG_MODE = 0x0B65;
- int GL_FOG_START = 0x0B63;
- int GL_FRONT = 0x0404;
- int GL_FRONT_AND_BACK = 0x0408;
- int GL_GEQUAL = 0x0206;
- int GL_GREATER = 0x0204;
- int GL_GREEN_BITS = 0x0D53;
- int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B;
- int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A;
- int GL_INCR = 0x1E02;
- int GL_INVALID_ENUM = 0x0500;
- int GL_INVALID_OPERATION = 0x0502;
- int GL_INVALID_VALUE = 0x0501;
- int GL_INVERT = 0x150A;
- int GL_KEEP = 0x1E00;
- int GL_LEQUAL = 0x0203;
- int GL_LESS = 0x0201;
- int GL_LIGHT_MODEL_AMBIENT = 0x0B53;
- int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52;
- int GL_LIGHT0 = 0x4000;
- int GL_LIGHT1 = 0x4001;
- int GL_LIGHT2 = 0x4002;
- int GL_LIGHT3 = 0x4003;
- int GL_LIGHT4 = 0x4004;
- int GL_LIGHT5 = 0x4005;
- int GL_LIGHT6 = 0x4006;
- int GL_LIGHT7 = 0x4007;
- int GL_LIGHTING = 0x0B50;
- int GL_LINE_LOOP = 0x0002;
- int GL_LINE_SMOOTH = 0x0B20;
- int GL_LINE_SMOOTH_HINT = 0x0C52;
- int GL_LINE_STRIP = 0x0003;
- int GL_LINEAR = 0x2601;
- int GL_LINEAR_ATTENUATION = 0x1208;
- int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
- int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
- int GL_LINES = 0x0001;
- int GL_LUMINANCE = 0x1909;
- int GL_LUMINANCE_ALPHA = 0x190A;
- int GL_MAX_ELEMENTS_INDICES = 0x80E9;
- int GL_MAX_ELEMENTS_VERTICES = 0x80E8;
- int GL_MAX_LIGHTS = 0x0D31;
- int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36;
- int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38;
- int GL_MAX_TEXTURE_SIZE = 0x0D33;
- int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39;
- int GL_MAX_TEXTURE_UNITS = 0x84E2;
- int GL_MAX_VIEWPORT_DIMS = 0x0D3A;
- int GL_MODELVIEW = 0x1700;
- int GL_MODULATE = 0x2100;
- int GL_MULTISAMPLE = 0x809D;
- int GL_NAND = 0x150E;
- int GL_NEAREST = 0x2600;
- int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
- int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
- int GL_NEVER = 0x0200;
- int GL_NICEST = 0x1102;
- int GL_NO_ERROR = 0;
- int GL_NOOP = 0x1505;
- int GL_NOR = 0x1508;
- int GL_NORMAL_ARRAY = 0x8075;
- int GL_NORMALIZE = 0x0BA1;
- int GL_NOTEQUAL = 0x0205;
- int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
- int GL_ONE = 1;
- int GL_ONE_MINUS_DST_ALPHA = 0x0305;
- int GL_ONE_MINUS_DST_COLOR = 0x0307;
- int GL_ONE_MINUS_SRC_ALPHA = 0x0303;
- int GL_ONE_MINUS_SRC_COLOR = 0x0301;
- int GL_OR = 0x1507;
- int GL_OR_INVERTED = 0x150D;
- int GL_OR_REVERSE = 0x150B;
- int GL_OUT_OF_MEMORY = 0x0505;
- int GL_PACK_ALIGNMENT = 0x0D05;
- int GL_PALETTE4_R5_G6_B5_OES = 0x8B92;
- int GL_PALETTE4_RGB5_A1_OES = 0x8B94;
- int GL_PALETTE4_RGB8_OES = 0x8B90;
- int GL_PALETTE4_RGBA4_OES = 0x8B93;
- int GL_PALETTE4_RGBA8_OES = 0x8B91;
- int GL_PALETTE8_R5_G6_B5_OES = 0x8B97;
- int GL_PALETTE8_RGB5_A1_OES = 0x8B99;
- int GL_PALETTE8_RGB8_OES = 0x8B95;
- int GL_PALETTE8_RGBA4_OES = 0x8B98;
- int GL_PALETTE8_RGBA8_OES = 0x8B96;
- int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50;
- int GL_POINT_SMOOTH = 0x0B10;
- int GL_POINT_SMOOTH_HINT = 0x0C51;
- int GL_POINTS = 0x0000;
- int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
- int GL_POINT_SIZE = 0x0B11;
- int GL_POLYGON_OFFSET_FILL = 0x8037;
- int GL_POLYGON_SMOOTH_HINT = 0x0C53;
- int GL_POSITION = 0x1203;
- int GL_PROJECTION = 0x1701;
- int GL_QUADRATIC_ATTENUATION = 0x1209;
- int GL_RED_BITS = 0x0D52;
- int GL_RENDERER = 0x1F01;
- int GL_REPEAT = 0x2901;
- int GL_REPLACE = 0x1E01;
- int GL_RESCALE_NORMAL = 0x803A;
- int GL_RGB = 0x1907;
- int GL_RGBA = 0x1908;
- int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
- int GL_SAMPLE_ALPHA_TO_ONE = 0x809F;
- int GL_SAMPLE_COVERAGE = 0x80A0;
- int GL_SCISSOR_TEST = 0x0C11;
- int GL_SET = 0x150F;
- int GL_SHININESS = 0x1601;
- int GL_SHORT = 0x1402;
- int GL_SMOOTH = 0x1D01;
- int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22;
- int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12;
- int GL_SPECULAR = 0x1202;
- int GL_SPOT_CUTOFF = 0x1206;
- int GL_SPOT_DIRECTION = 0x1204;
- int GL_SPOT_EXPONENT = 0x1205;
- int GL_SRC_ALPHA = 0x0302;
- int GL_SRC_ALPHA_SATURATE = 0x0308;
- int GL_SRC_COLOR = 0x0300;
- int GL_STACK_OVERFLOW = 0x0503;
- int GL_STACK_UNDERFLOW = 0x0504;
- int GL_STENCIL_BITS = 0x0D57;
- int GL_STENCIL_BUFFER_BIT = 0x0400;
- int GL_STENCIL_TEST = 0x0B90;
- int GL_SUBPIXEL_BITS = 0x0D50;
- int GL_TEXTURE = 0x1702;
- int GL_TEXTURE_2D = 0x0DE1;
- int GL_TEXTURE_COORD_ARRAY = 0x8078;
- int GL_TEXTURE_ENV = 0x2300;
- int GL_TEXTURE_ENV_COLOR = 0x2201;
- int GL_TEXTURE_ENV_MODE = 0x2200;
- int GL_TEXTURE_MAG_FILTER = 0x2800;
- int GL_TEXTURE_MIN_FILTER = 0x2801;
- int GL_TEXTURE_WRAP_S = 0x2802;
- int GL_TEXTURE_WRAP_T = 0x2803;
- int GL_TEXTURE0 = 0x84C0;
- int GL_TEXTURE1 = 0x84C1;
- int GL_TEXTURE2 = 0x84C2;
- int GL_TEXTURE3 = 0x84C3;
- int GL_TEXTURE4 = 0x84C4;
- int GL_TEXTURE5 = 0x84C5;
- int GL_TEXTURE6 = 0x84C6;
- int GL_TEXTURE7 = 0x84C7;
- int GL_TEXTURE8 = 0x84C8;
- int GL_TEXTURE9 = 0x84C9;
- int GL_TEXTURE10 = 0x84CA;
- int GL_TEXTURE11 = 0x84CB;
- int GL_TEXTURE12 = 0x84CC;
- int GL_TEXTURE13 = 0x84CD;
- int GL_TEXTURE14 = 0x84CE;
- int GL_TEXTURE15 = 0x84CF;
- int GL_TEXTURE16 = 0x84D0;
- int GL_TEXTURE17 = 0x84D1;
- int GL_TEXTURE18 = 0x84D2;
- int GL_TEXTURE19 = 0x84D3;
- int GL_TEXTURE20 = 0x84D4;
- int GL_TEXTURE21 = 0x84D5;
- int GL_TEXTURE22 = 0x84D6;
- int GL_TEXTURE23 = 0x84D7;
- int GL_TEXTURE24 = 0x84D8;
- int GL_TEXTURE25 = 0x84D9;
- int GL_TEXTURE26 = 0x84DA;
- int GL_TEXTURE27 = 0x84DB;
- int GL_TEXTURE28 = 0x84DC;
- int GL_TEXTURE29 = 0x84DD;
- int GL_TEXTURE30 = 0x84DE;
- int GL_TEXTURE31 = 0x84DF;
- int GL_TRIANGLE_FAN = 0x0006;
- int GL_TRIANGLE_STRIP = 0x0005;
- int GL_TRIANGLES = 0x0004;
- int GL_TRUE = 1;
- int GL_UNPACK_ALIGNMENT = 0x0CF5;
- int GL_UNSIGNED_BYTE = 0x1401;
- int GL_UNSIGNED_SHORT = 0x1403;
- int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
- int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
- int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
- int GL_VENDOR = 0x1F00;
- int GL_VERSION = 0x1F02;
- int GL_VERTEX_ARRAY = 0x8074;
- int GL_XOR = 0x1506;
- int GL_ZERO = 0;
-
diff --git a/opengl/tools/glgen/stubs/jsr239/GL11ExtHeader.java-if b/opengl/tools/glgen/stubs/jsr239/GL11ExtHeader.java-if
deleted file mode 100644
index 7be2164..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GL11ExtHeader.java-if
+++ /dev/null
@@ -1,40 +0,0 @@
-**
-** Copyright 2007, 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 source file is automatically generated
-
-package javax.microedition.khronos.opengles;
-
-public interface GL11Ext extends GL {
- int GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES = 0x8B9E;
- int GL_MATRIX_INDEX_ARRAY_OES = 0x8844;
- int GL_MATRIX_INDEX_ARRAY_POINTER_OES = 0x8849;
- int GL_MATRIX_INDEX_ARRAY_SIZE_OES = 0x8846;
- int GL_MATRIX_INDEX_ARRAY_STRIDE_OES = 0x8848;
- int GL_MATRIX_INDEX_ARRAY_TYPE_OES = 0x8847;
- int GL_MATRIX_PALETTE_OES = 0x8840;
- int GL_MAX_PALETTE_MATRICES_OES = 0x8842;
- int GL_MAX_VERTEX_UNITS_OES = 0x86A4;
- int GL_TEXTURE_CROP_RECT_OES = 0x8B9D;
- int GL_WEIGHT_ARRAY_BUFFER_BINDING_OES = 0x889E;
- int GL_WEIGHT_ARRAY_OES = 0x86AD;
- int GL_WEIGHT_ARRAY_POINTER_OES = 0x86AC;
- int GL_WEIGHT_ARRAY_SIZE_OES = 0x86AB;
- int GL_WEIGHT_ARRAY_STRIDE_OES = 0x86AA;
- int GL_WEIGHT_ARRAY_TYPE_OES = 0x86A9;
-
- void glTexParameterfv(int target, int pname, float[] param, int offset);
-
diff --git a/opengl/tools/glgen/stubs/jsr239/GL11ExtensionPackHeader.java-if b/opengl/tools/glgen/stubs/jsr239/GL11ExtensionPackHeader.java-if
deleted file mode 100644
index a800191..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GL11ExtensionPackHeader.java-if
+++ /dev/null
@@ -1,108 +0,0 @@
-**
-** Copyright 2007, 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 source file is automatically generated
-
-package javax.microedition.khronos.opengles;
-
-public interface GL11ExtensionPack extends GL {
- int GL_BLEND_DST_ALPHA = 0x80CA;
- int GL_BLEND_DST_RGB = 0x80C8;
- int GL_BLEND_EQUATION = 0x8009;
- int GL_BLEND_EQUATION_ALPHA = 0x883D;
- int GL_BLEND_EQUATION_RGB = 0x8009;
- int GL_BLEND_SRC_ALPHA = 0x80CB;
- int GL_BLEND_SRC_RGB = 0x80C9;
- int GL_COLOR_ATTACHMENT0_OES = 0x8CE0;
- int GL_COLOR_ATTACHMENT1_OES = 0x8CE1;
- int GL_COLOR_ATTACHMENT2_OES = 0x8CE2;
- int GL_COLOR_ATTACHMENT3_OES = 0x8CE3;
- int GL_COLOR_ATTACHMENT4_OES = 0x8CE4;
- int GL_COLOR_ATTACHMENT5_OES = 0x8CE5;
- int GL_COLOR_ATTACHMENT6_OES = 0x8CE6;
- int GL_COLOR_ATTACHMENT7_OES = 0x8CE7;
- int GL_COLOR_ATTACHMENT8_OES = 0x8CE8;
- int GL_COLOR_ATTACHMENT9_OES = 0x8CE9;
- int GL_COLOR_ATTACHMENT10_OES = 0x8CEA;
- int GL_COLOR_ATTACHMENT11_OES = 0x8CEB;
- int GL_COLOR_ATTACHMENT12_OES = 0x8CEC;
- int GL_COLOR_ATTACHMENT13_OES = 0x8CED;
- int GL_COLOR_ATTACHMENT14_OES = 0x8CEE;
- int GL_COLOR_ATTACHMENT15_OES = 0x8CEF;
- int GL_DECR_WRAP = 0x8508;
- int GL_DEPTH_ATTACHMENT_OES = 0x8D00;
- int GL_DEPTH_COMPONENT = 0x1902;
- int GL_DEPTH_COMPONENT16 = 0x81A5;
- int GL_DEPTH_COMPONENT24 = 0x81A6;
- int GL_DEPTH_COMPONENT32 = 0x81A7;
- int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 0x8CD1;
- int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 0x8CD0;
- int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 0x8CD3;
- int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 0x8CD2;
- int GL_FRAMEBUFFER_BINDING_OES = 0x8CA6;
- int GL_FRAMEBUFFER_COMPLETE_OES = 0x8CD5;
- int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 0x8CD6;
- int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 0x8CD9;
- int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES = 0x8CDB;
- int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 0x8CDA;
- int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 0x8CD7;
- int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES = 0x8CDC;
- int GL_FRAMEBUFFER_OES = 0x8D40;
- int GL_FRAMEBUFFER_UNSUPPORTED_OES = 0x8CDD;
- int GL_FUNC_ADD = 0x8006;
- int GL_FUNC_REVERSE_SUBTRACT = 0x800B;
- int GL_FUNC_SUBTRACT = 0x800A;
- int GL_INCR_WRAP = 0x8507;
- int GL_INVALID_FRAMEBUFFER_OPERATION_OES = 0x0506;
- int GL_MAX_COLOR_ATTACHMENTS_OES = 0x8CDF;
- int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
- int GL_MAX_RENDERBUFFER_SIZE_OES = 0x84E8;
- int GL_MIRRORED_REPEAT = 0x8370;
- int GL_NORMAL_MAP = 0x8511;
- int GL_REFLECTION_MAP = 0x8512;
- int GL_RENDERBUFFER_ALPHA_SIZE_OES = 0x8D53;
- int GL_RENDERBUFFER_BINDING_OES = 0x8CA7;
- int GL_RENDERBUFFER_BLUE_SIZE_OES = 0x8D52;
- int GL_RENDERBUFFER_DEPTH_SIZE_OES = 0x8D54;
- int GL_RENDERBUFFER_GREEN_SIZE_OES = 0x8D51;
- int GL_RENDERBUFFER_HEIGHT_OES = 0x8D43;
- int GL_RENDERBUFFER_INTERNAL_FORMAT_OES = 0x8D44;
- int GL_RENDERBUFFER_OES = 0x8D41;
- int GL_RENDERBUFFER_RED_SIZE_OES = 0x8D50;
- int GL_RENDERBUFFER_STENCIL_SIZE_OES = 0x8D55;
- int GL_RENDERBUFFER_WIDTH_OES = 0x8D42;
- int GL_RGB5_A1 = 0x8057;
- int GL_RGB565_OES = 0x8D62;
- int GL_RGB8 = 0x8051;
- int GL_RGBA4 = 0x8056;
- int GL_RGBA8 = 0x8058;
- int GL_STENCIL_ATTACHMENT_OES = 0x8D20;
- int GL_STENCIL_INDEX = 0x1901;
- int GL_STENCIL_INDEX1_OES = 0x8D46;
- int GL_STENCIL_INDEX4_OES = 0x8D47;
- int GL_STENCIL_INDEX8_OES = 0x8D48;
- int GL_STR = -1;
- int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
- int GL_TEXTURE_CUBE_MAP = 0x8513;
- int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
- int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
- int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
- int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
- int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
- int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
- int GL_TEXTURE_GEN_MODE = 0x2500;
- int GL_TEXTURE_GEN_STR = 0x8D60;
-
diff --git a/opengl/tools/glgen/stubs/jsr239/GL11Header.java-if b/opengl/tools/glgen/stubs/jsr239/GL11Header.java-if
deleted file mode 100644
index b0e5a6b..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GL11Header.java-if
+++ /dev/null
@@ -1,145 +0,0 @@
-**
-** Copyright 2006, 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 source file is automatically generated
-
-package javax.microedition.khronos.opengles;
-
-public interface GL11 extends GL10 {
- int GL_ACTIVE_TEXTURE = 0x84E0;
- int GL_ADD_SIGNED = 0x8574;
- int GL_ALPHA_SCALE = 0x0D1C;
- int GL_ALPHA_TEST_FUNC = 0x0BC1;
- int GL_ALPHA_TEST_REF = 0x0BC2;
- int GL_ARRAY_BUFFER = 0x8892;
- int GL_ARRAY_BUFFER_BINDING = 0x8894;
- int GL_BLEND_DST = 0x0BE0;
- int GL_BLEND_SRC = 0x0BE1;
- int GL_BUFFER_ACCESS = 0x88BB;
- int GL_BUFFER_SIZE = 0x8764;
- int GL_BUFFER_USAGE = 0x8765;
- int GL_CLIENT_ACTIVE_TEXTURE = 0x84E1;
- int GL_CLIP_PLANE0 = 0x3000;
- int GL_CLIP_PLANE1 = 0x3001;
- int GL_CLIP_PLANE2 = 0x3002;
- int GL_CLIP_PLANE3 = 0x3003;
- int GL_CLIP_PLANE4 = 0x3004;
- int GL_CLIP_PLANE5 = 0x3005;
- int GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898;
- int GL_COLOR_ARRAY_POINTER = 0x8090;
- int GL_COLOR_ARRAY_SIZE = 0x8081;
- int GL_COLOR_ARRAY_STRIDE = 0x8083;
- int GL_COLOR_ARRAY_TYPE = 0x8082;
- int GL_COLOR_CLEAR_VALUE = 0x0C22;
- int GL_COLOR_WRITEMASK = 0x0C23;
- int GL_COMBINE = 0x8570;
- int GL_COMBINE_ALPHA = 0x8572;
- int GL_COMBINE_RGB = 0x8571;
- int GL_CONSTANT = 0x8576;
- int GL_COORD_REPLACE_OES = 0x8862;
- int GL_CULL_FACE_MODE = 0x0B45;
- int GL_CURRENT_COLOR = 0x0B00;
- int GL_CURRENT_NORMAL = 0x0B02;
- int GL_CURRENT_TEXTURE_COORDS = 0x0B03;
- int GL_DEPTH_CLEAR_VALUE = 0x0B73;
- int GL_DEPTH_FUNC = 0x0B74;
- int GL_DEPTH_RANGE = 0x0B70;
- int GL_DEPTH_WRITEMASK = 0x0B72;
- int GL_DOT3_RGB = 0x86AE;
- int GL_DOT3_RGBA = 0x86AF;
- int GL_DYNAMIC_DRAW = 0x88E8;
- int GL_ELEMENT_ARRAY_BUFFER = 0x8893;
- int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
- int GL_FRONT_FACE = 0x0B46;
- int GL_GENERATE_MIPMAP = 0x8191;
- int GL_GENERATE_MIPMAP_HINT = 0x8192;
- int GL_INTERPOLATE = 0x8575;
- int GL_LINE_WIDTH = 0x0B21;
- int GL_LOGIC_OP_MODE = 0x0BF0;
- int GL_MATRIX_MODE = 0x0BA0;
- int GL_MAX_CLIP_PLANES = 0x0D32;
- int GL_MODELVIEW_MATRIX = 0x0BA6;
- int GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898D;
- int GL_MODELVIEW_STACK_DEPTH = 0x0BA3;
- int GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897;
- int GL_NORMAL_ARRAY_POINTER = 0x808F;
- int GL_NORMAL_ARRAY_STRIDE = 0x807F;
- int GL_NORMAL_ARRAY_TYPE = 0x807E;
- int GL_OPERAND0_ALPHA = 0x8598;
- int GL_OPERAND0_RGB = 0x8590;
- int GL_OPERAND1_ALPHA = 0x8599;
- int GL_OPERAND1_RGB = 0x8591;
- int GL_OPERAND2_ALPHA = 0x859A;
- int GL_OPERAND2_RGB = 0x8592;
- int GL_POINT_DISTANCE_ATTENUATION = 0x8129;
- int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
- int GL_POINT_SIZE = 0x0B11;
- int GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES = 0x8B9F;
- int GL_POINT_SIZE_ARRAY_OES = 0x8B9C;
- int GL_POINT_SIZE_ARRAY_POINTER_OES = 0x898C;
- int GL_POINT_SIZE_ARRAY_STRIDE_OES = 0x898B;
- int GL_POINT_SIZE_ARRAY_TYPE_OES = 0x898A;
- int GL_POINT_SIZE_MAX = 0x8127;
- int GL_POINT_SIZE_MIN = 0x8126;
- int GL_POINT_SPRITE_OES = 0x8861;
- int GL_POLYGON_OFFSET_FACTOR = 0x8038;
- int GL_POLYGON_OFFSET_UNITS = 0x2A00;
- int GL_PREVIOUS = 0x8578;
- int GL_PRIMARY_COLOR = 0x8577;
- int GL_PROJECTION_MATRIX = 0x0BA7;
- int GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898E;
- int GL_PROJECTION_STACK_DEPTH = 0x0BA4;
- int GL_RGB_SCALE = 0x8573;
- int GL_SAMPLE_BUFFERS = 0x80A8;
- int GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
- int GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
- int GL_SAMPLES = 0x80A9;
- int GL_SCISSOR_BOX = 0x0C10;
- int GL_SHADE_MODEL = 0x0B54;
- int GL_SRC0_ALPHA = 0x8588;
- int GL_SRC0_RGB = 0x8580;
- int GL_SRC1_ALPHA = 0x8589;
- int GL_SRC1_RGB = 0x8581;
- int GL_SRC2_ALPHA = 0x858A;
- int GL_SRC2_RGB = 0x8582;
- int GL_STATIC_DRAW = 0x88E4;
- int GL_STENCIL_CLEAR_VALUE = 0x0B91;
- int GL_STENCIL_FAIL = 0x0B94;
- int GL_STENCIL_FUNC = 0x0B92;
- int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
- int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
- int GL_STENCIL_REF = 0x0B97;
- int GL_STENCIL_VALUE_MASK = 0x0B93;
- int GL_STENCIL_WRITEMASK = 0x0B98;
- int GL_SUBTRACT = 0x84E7;
- int GL_TEXTURE_BINDING_2D = 0x8069;
- int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A;
- int GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092;
- int GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088;
- int GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A;
- int GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089;
- int GL_TEXTURE_MATRIX = 0x0BA8;
- int GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898F;
- int GL_TEXTURE_STACK_DEPTH = 0x0BA5;
- int GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896;
- int GL_VERTEX_ARRAY_POINTER = 0x808E;
- int GL_VERTEX_ARRAY_SIZE = 0x807A;
- int GL_VERTEX_ARRAY_STRIDE = 0x807C;
- int GL_VERTEX_ARRAY_TYPE = 0x807B;
- int GL_VIEWPORT = 0x0BA2;
- int GL_WRITE_ONLY = 0x88B9;
-
- void glGetPointerv(int pname, java.nio.Buffer[] params);
diff --git a/opengl/tools/glgen/stubs/jsr239/GL11ImplHeader.java-impl b/opengl/tools/glgen/stubs/jsr239/GL11ImplHeader.java-impl
deleted file mode 100644
index 501be65..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GL11ImplHeader.java-impl
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2006 The Android Open Source Project
-
-// All Rights Reserved.
-
-// This source file is automatically generated
-
-package com.google.android.gles_jni;
-
-import java.nio.Buffer;
-import javax.microedition.khronos.opengles.GL11;
-import android.graphics.Canvas;
-
-public class GL11Impl implements GL11 {
-
- // Private accessors for native code
-
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
-
- Buffer _colorPointer = null;
- Buffer _normalPointer = null;
- Buffer _texCoordPointer = null;
- Buffer _vertexPointer = null;
-
- public GL11Impl() {
- }
-
-
diff --git a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
deleted file mode 100644
index f7315ee..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
+++ /dev/null
@@ -1,260 +0,0 @@
-**
-** Copyright 2006, 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 source file is automatically generated
-
-#include "jni.h"
-#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/misc.h>
-
-#include <assert.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-// Work around differences between the generated name and the actual name.
-
-#define glBlendEquation glBlendEquationOES
-#define glBlendEquationSeparate glBlendEquationSeparateOES
-#define glBlendFuncSeparate glBlendFuncSeparateOES
-#define glGetTexGenfv glGetTexGenfvOES
-#define glGetTexGeniv glGetTexGenivOES
-#define glGetTexGenxv glGetTexGenxvOES
-#define glTexGenf glTexGenfOES
-#define glTexGenfv glTexGenfvOES
-#define glTexGeni glTexGeniOES
-#define glTexGeniv glTexGenivOES
-#define glTexGenx glTexGenxOES
-#define glTexGenxv glTexGenxvOES
-
-
-
-/* special calls implemented in Android's GLES wrapper used to more
- * efficiently bound-check passed arrays */
-extern "C" {
-GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-}
-
-static int initialized = 0;
-
-static jclass nioAccessClass;
-static jclass bufferClass;
-static jclass G11ImplClass;
-static jmethodID getBasePointerID;
-static jmethodID getBaseArrayID;
-static jmethodID getBaseArrayOffsetID;
-static jmethodID allowIndirectBuffersID;
-static jfieldID positionID;
-static jfieldID limitID;
-static jfieldID elementSizeShiftID;
-static jfieldID haveCheckedExtensionsID;
-static jfieldID have_OES_blend_equation_separateID;
-static jfieldID have_OES_blend_subtractID;
-static jfieldID have_OES_framebuffer_objectID;
-static jfieldID have_OES_texture_cube_mapID;
-
-/* Cache method IDs each time the class is loaded. */
-
-static void
-nativeClassInit(JNIEnv *_env, jclass glImplClass)
-{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- jclass g11impClassLocal = _env->FindClass("com/google/android/gles_jni/GLImpl");
- G11ImplClass = (jclass) _env->NewGlobalRef(g11impClassLocal);
- haveCheckedExtensionsID = _env->GetFieldID(G11ImplClass, "haveCheckedExtensions", "Z");
- have_OES_blend_equation_separateID = _env->GetFieldID(G11ImplClass, "have_OES_blend_equation_separate", "Z");
- have_OES_blend_subtractID = _env->GetFieldID(G11ImplClass, "have_OES_blend_subtract", "Z");
- have_OES_framebuffer_objectID = _env->GetFieldID(G11ImplClass, "have_OES_framebuffer_object", "Z");
- have_OES_texture_cube_mapID = _env->GetFieldID(G11ImplClass, "have_OES_texture_cube_map", "Z");
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
- allowIndirectBuffersID = _env->GetStaticMethodID(g11impClassLocal,
- "allowIndirectBuffers", "(Ljava/lang/String;)Z");
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
-}
-
-static void *
-getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
-{
- jint position;
- jint limit;
- jint elementSizeShift;
- jlong pointer;
- jint offset;
- void *data;
-
- position = _env->GetIntField(buffer, positionID);
- limit = _env->GetIntField(buffer, limitID);
- elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- *remaining = (limit - position) << elementSizeShift;
- pointer = _env->CallStaticLongMethod(nioAccessClass,
- getBasePointerID, buffer);
- if (pointer != 0L) {
- *array = NULL;
- return (void *) (jint) pointer;
- }
-
- *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
- getBaseArrayID, buffer);
- if (*array == NULL) {
- return (void*) NULL;
- }
- offset = _env->CallStaticIntMethod(nioAccessClass,
- getBaseArrayOffsetID, buffer);
- data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
-
- return (void *) ((char *) data + offset);
-}
-
-static void
-releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
-{
- _env->ReleasePrimitiveArrayCritical(array, data,
- commit ? 0 : JNI_ABORT);
-}
-
-extern "C" {
-extern char* __progname;
-}
-
-static bool
-allowIndirectBuffers(JNIEnv *_env) {
- static jint sIndirectBufferCompatability;
- if (sIndirectBufferCompatability == 0) {
- jobject appName = _env->NewStringUTF(::__progname);
- sIndirectBufferCompatability = _env->CallStaticBooleanMethod(G11ImplClass, allowIndirectBuffersID, appName) ? 2 : 1;
- }
- return sIndirectBufferCompatability == 2;
-}
-
-static void *
-getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
- if (!buffer) {
- return NULL;
- }
- void* buf = _env->GetDirectBufferAddress(buffer);
- if (buf) {
- jint position = _env->GetIntField(buffer, positionID);
- jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
- buf = ((char*) buf) + (position << elementSizeShift);
- } else {
- if (allowIndirectBuffers(_env)) {
- jarray array = 0;
- jint remaining;
- buf = getPointer(_env, buffer, &array, &remaining);
- if (array) {
- releasePointer(_env, array, buf, 0);
- }
- } else {
- jniThrowException(_env, "java/lang/IllegalArgumentException",
- "Must use a native order direct Buffer");
- }
- }
- return buf;
-}
-
-static int
-getNumCompressedTextureFormats() {
- int numCompressedTextureFormats = 0;
- glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
- return numCompressedTextureFormats;
-}
-
-// Check if the extension at the head of pExtensions is pExtension. Note that pExtensions is
-// terminated by either 0 or space, while pExtension is terminated by 0.
-
-static bool
-extensionEqual(const GLubyte* pExtensions, const GLubyte* pExtension) {
- while (true) {
- char a = *pExtensions++;
- char b = *pExtension++;
- bool aEnd = a == '\0' || a == ' ';
- bool bEnd = b == '\0';
- if ( aEnd || bEnd) {
- return aEnd == bEnd;
- }
- if ( a != b ) {
- return false;
- }
- }
-}
-
-static const GLubyte*
-nextExtension(const GLubyte* pExtensions) {
- while (true) {
- char a = *pExtensions++;
- if ( a == '\0') {
- return pExtensions-1;
- } else if ( a == ' ') {
- return pExtensions;
- }
- }
-}
-
-static bool
-checkForExtension(const GLubyte* pExtensions, const GLubyte* pExtension) {
- for (;*pExtensions != '\0'; pExtensions = nextExtension(pExtensions)) {
- if (extensionEqual(pExtensions, pExtension)) {
- return true;
- }
- }
- return false;
-}
-
-static bool
-supportsExtension(JNIEnv *_env, jobject impl, jfieldID fieldId) {
- if (!_env->GetBooleanField(impl, haveCheckedExtensionsID)) {
- _env->SetBooleanField(impl, haveCheckedExtensionsID, true);
- const GLubyte* sExtensions = glGetString(GL_EXTENSIONS);
- _env->SetBooleanField(impl, have_OES_blend_equation_separateID,
- checkForExtension(sExtensions, (const GLubyte*) "GL_OES_blend_equation_separate"));
- _env->SetBooleanField(impl, have_OES_blend_subtractID,
- checkForExtension(sExtensions, (const GLubyte*) "GL_OES_blend_subtract"));
- _env->SetBooleanField(impl, have_OES_framebuffer_objectID,
- checkForExtension(sExtensions, (const GLubyte*) "GL_OES_framebuffer_object"));
- _env->SetBooleanField(impl, have_OES_texture_cube_mapID,
- checkForExtension(sExtensions, (const GLubyte*) "GL_OES_texture_cube_map"));
- }
- return _env->GetBooleanField(impl, fieldId);
-}
-
-// --------------------------------------------------------------------------
diff --git a/opengl/tools/glgen/stubs/jsr239/GLHeader.java-if b/opengl/tools/glgen/stubs/jsr239/GLHeader.java-if
deleted file mode 100644
index 3b78f3d..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GLHeader.java-if
+++ /dev/null
@@ -1,22 +0,0 @@
-/* //device/java/android/javax/microedition/khronos/opengles/GL.java
-**
-** Copyright 2006, 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 javax.microedition.khronos.opengles;
-
-public interface GL {
-}
-
diff --git a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl
deleted file mode 100644
index cd730aa..0000000
--- a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl
+++ /dev/null
@@ -1,84 +0,0 @@
-**
-** Copyright 2006, 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 source file is automatically generated
-
-package com.google.android.gles_jni;
-
-import android.app.AppGlobals;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.IPackageManager;
-import android.os.Build;
-import android.util.Log;
-
-import java.nio.Buffer;
-import javax.microedition.khronos.opengles.GL10;
-import javax.microedition.khronos.opengles.GL10Ext;
-import javax.microedition.khronos.opengles.GL11;
-import javax.microedition.khronos.opengles.GL11Ext;
-import javax.microedition.khronos.opengles.GL11ExtensionPack;
-
-public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack {
-
- // Private accessors for native code
-
- native private static void _nativeClassInit();
- static {
- _nativeClassInit();
- }
-
- Buffer _colorPointer = null;
- Buffer _normalPointer = null;
- Buffer _texCoordPointer = null;
- Buffer _vertexPointer = null;
- Buffer _pointSizePointerOES = null;
- Buffer _matrixIndexPointerOES = null;
- Buffer _weightPointerOES = null;
-
- private boolean haveCheckedExtensions;
- private boolean have_OES_blend_equation_separate;
- private boolean have_OES_blend_subtract;
- private boolean have_OES_framebuffer_object;
- private boolean have_OES_texture_cube_map;
-
- public GLImpl() {
- }
-
- public void glGetPointerv(int pname, java.nio.Buffer[] params) {
- throw new UnsupportedOperationException("glGetPointerv");
- }
-
- private static boolean allowIndirectBuffers(String appName) {
- boolean result = false;
- int version = 0;
- IPackageManager pm = AppGlobals.getPackageManager();
- try {
- ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0);
- if (applicationInfo != null) {
- version = applicationInfo.targetSdkVersion;
- }
- } catch (android.os.RemoteException e) {
- // ignore
- }
- Log.e("OpenGLES", String.format(
- "Application %s (SDK target %d) called a GL11 Pointer method with an indirect Buffer.",
- appName, version));
- if (version <= Build.VERSION_CODES.CUPCAKE) {
- result = true;
- }
- return result;
- }
-
diff --git a/opengl/tools/glgen/stubs/jsr239/glGetString.cpp b/opengl/tools/glgen/stubs/jsr239/glGetString.cpp
deleted file mode 100644
index cd6e3f3..0000000
--- a/opengl/tools/glgen/stubs/jsr239/glGetString.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-/* const GLubyte * glGetString ( GLenum name ) */
-static jstring android_glGetString(JNIEnv *_env, jobject, jint name) {
- const char* chars = (const char*) glGetString((GLenum) name);
- return _env->NewStringUTF(chars);
-}
diff --git a/opengl/tools/glgen/stubs/jsr239/glGetString.java-10-if b/opengl/tools/glgen/stubs/jsr239/glGetString.java-10-if
deleted file mode 100644
index 898fabc..0000000
--- a/opengl/tools/glgen/stubs/jsr239/glGetString.java-10-if
+++ /dev/null
@@ -1,4 +0,0 @@
- public String glGetString(
- int name
- );
-
diff --git a/opengl/tools/glgen/stubs/jsr239/glGetString.java-if b/opengl/tools/glgen/stubs/jsr239/glGetString.java-if
deleted file mode 100644
index 898fabc..0000000
--- a/opengl/tools/glgen/stubs/jsr239/glGetString.java-if
+++ /dev/null
@@ -1,4 +0,0 @@
- public String glGetString(
- int name
- );
-
diff --git a/opengl/tools/glgen/stubs/jsr239/glGetString.java-impl b/opengl/tools/glgen/stubs/jsr239/glGetString.java-impl
deleted file mode 100644
index 8c7881c..0000000
--- a/opengl/tools/glgen/stubs/jsr239/glGetString.java-impl
+++ /dev/null
@@ -1,16 +0,0 @@
- // C function const GLubyte * glGetString ( GLenum name )
-
- public native String _glGetString(
- int name
- );
-
- public String glGetString(
- int name
- ) {
- String returnValue;
- returnValue = _glGetString(
- name
- );
- return returnValue;
- }
-
diff --git a/opengl/tools/glgen/stubs/jsr239/glGetString.nativeReg b/opengl/tools/glgen/stubs/jsr239/glGetString.nativeReg
deleted file mode 100644
index e64187c..0000000
--- a/opengl/tools/glgen/stubs/jsr239/glGetString.nativeReg
+++ /dev/null
@@ -1 +0,0 @@
-{"_glGetString", "(I)Ljava/lang/String;", (void *) android_glGetString },