From: Mikko Rasa Date: Tue, 15 Jun 2010 11:00:29 +0000 (+0000) Subject: Add GLES2 flavor (gldbg doesn't build yet, glwrap.so and gldump do) X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a0799c5aa5aec7e9cfe05f6bf2c9d8058437b8df;p=gldbg.git Add GLES2 flavor (gldbg doesn't build yet, glwrap.so and gldump do) --- diff --git a/flavors/gles2/egl.api b/flavors/gles2/egl.api new file mode 100644 index 0000000..fefa70c --- /dev/null +++ b/flavors/gles2/egl.api @@ -0,0 +1,6 @@ +typemap egl.tm +iomap egl.io +spec egl.spec +prefix egl +enumspec eglenum.spec +enumprefix EGL_ diff --git a/flavors/gles2/egl.io b/flavors/gles2/egl.io new file mode 100644 index 0000000..3f795dd --- /dev/null +++ b/flavors/gles2/egl.io @@ -0,0 +1,14 @@ +EGLint, int, %i +EGLDisplay, pointer, %p +EGLNativeDisplayType, pointer, %p +EGLBoolean, int, %i +char *, string, \"%s\" +EGLConfig, pointer, %p +EGLSurface, pointer, %p +EGLNativeWindowType, int, %lx +EGLNativePixmapType, int, %lx +EGLenum, int, %s, describe_enum:p.name:'"%s"'%p.type +EGLenumHack, int, %s, describe_enum:p.name:'"%s"'%p.type +EGLClientBuffer, pointer, %p +EGLContext, pointer, %p +__eglMustCastToProperFunctionPointerType, pointer, %p diff --git a/flavors/gles2/egl.spec b/flavors/gles2/egl.spec new file mode 100644 index 0000000..44efdf8 --- /dev/null +++ b/flavors/gles2/egl.spec @@ -0,0 +1,178 @@ +GetError() + return EGLenumHack + +GetDisplay(display_id) + return Display + param display_id NativeDisplayType in value + +Initialize(dpy, major, minor) + return Boolean + param dpy Display in value + param major int out array [1] + param minor int out array [1] + +Terminate(dpy) + return Boolean + param dpy Display in value + +QueryString(dpy, name) + return string + param dpy Display in value + param name EGLenumHack in value + +GetConfigs(dpy, configs, config_size, num_config) + return Boolean + param dpy Display in value + param configs Config out array [num_config] + param config_size int in value + param num_config int out array [1] + +ChooseConfig(dpy, attrib_list, configs, config_size, num_config) + return Boolean + param dpy Display in value + param attrib_list EGLenumHack in array + param configs Config out array [num_config] + param config_size int in value + param num_config int out array [1] + +GetConfigAttrib(dpy, config, attribute, value) + return Boolean + param dpy Display in value + param config Config in value + param attribute EGLenumHack in value + param value int out array [1] + +CreateWindowSurface(dpy, config, win, attrib_list) + return Surface + param dpy Display in value + param config Config in value + param win NativeWindowType in value + param attrib_list EGLenumHack in array + +CreatePbufferSurface(dpy, config, attrib_list) + return Surface + param dpy Display in value + param config Config in value + param attrib_list EGLenumHack in array + +CreatePixmapSurface(dpy, config, pixmap, attrib_list) + return Surface + param dpy Display in value + param config Config in value + param pixmap NativePixmapType in value + param attrib_list EGLenumHack in array + +DestroySurface(dpy, surface) + return Boolean + param dpy Display in value + param surface Surface in value + +QuerySurface(dpy, surface, attribute, value) + return Boolean + param dpy Display in value + param surface Surface in value + param attribute EGLenumHack in value + param value int out array [1] + +BindAPI(api) + return Boolean + param api EGLenum in value + +QueryAPI() + return EGLenum + +WaitClient() + return Boolean + +ReleaseThread() + return Boolean + +CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list) + return Surface + param dpy Display in value + param buftype EGLenum in value + param buffer ClientBuffer in value + param config Config in value + param attrib_list EGLenumHack in array + +SurfaceAttrib(dpy, surface, attribute, value) + return Boolean + param dpy Display in value + param surface Surface in value + param attribute int in value + param value EGLenumHack in value + +BindTexImage(dpy, surface, buffer) + return Boolean + param dpy Display in value + param surface Surface in value + param buffer int in value + +ReleaseTexImage(dpy, surface, buffer) + return Boolean + param dpy Display in value + param surface Surface in value + param buffer int in value + +SwapInterval(dpy, interval) + return Boolean + param dpy Display in value + param interval int in value + +CreateContext(dpy, config, share_context, attrib_list) + return Context + param dpy Display in value + param config Config in value + param share_context Context in value + param attrib_list EGLenumHack in array + +DestroyContext(dpy, ctx) + return Boolean + param dpy Display in value + param ctx Context in value + +MakeCurrent(dpy, draw, read, ctx) + return Boolean + param dpy Display in value + param draw Surface in value + param read Surface in value + param ctx Context in value + +GetCurrentContext() + return Context + +GetCurrentSurface(readdraw) + return Surface + param readdraw EGLenumHack in value + +GetCurrentDisplay() + return Display + +QueryContext(dpy, ctx, attribute, value) + return Boolean + param dpy Display in value + param ctx Context in value + param attribute EGLenumHack in value + param value int out array [1] + +WaitGL() + return Boolean + +WaitNative(engine) + return Boolean + param engine EGLenumHack in value + +SwapBuffers(dpy, surface) + return Boolean + param dpy Display in value + param surface Surface in value + +CopyBuffers(dpy, surface, target) + return Boolean + param dpy Display in value + param surface Surface in value + param target NativePixmapType in value + +GetProcAddress(procname) + return FuncPtr + param procname string in value diff --git a/flavors/gles2/egl.tm b/flavors/gles2/egl.tm new file mode 100644 index 0000000..6b696dd --- /dev/null +++ b/flavors/gles2/egl.tm @@ -0,0 +1,14 @@ +int,*,*, EGLint,*,* +Display,*,*, EGLDisplay,*,* +NativeDisplayType,*,*, EGLNativeDisplayType,*,* +Boolean,*,*, EGLBoolean,*,* +string,*,*, const char *,*,* +Config,*,*, EGLConfig,*,* +Surface,*,*, EGLSurface,*,* +NativeWindowType,*,*, EGLNativeWindowType,*,* +NativePixmapType,*,*, EGLNativePixmapType,*,* +EGLenumHack,*,*, EGLenumHack,*,* +EGLenum,*,*, EGLenum,*,* +ClientBuffer,*,*, EGLClientBuffer,*,* +Context,*,*, EGLContext,*,* +FuncPtr,*,*, __eglMustCastToProperFunctionPointerType,*,* diff --git a/flavors/gles2/eglenum.spec b/flavors/gles2/eglenum.spec new file mode 100644 index 0000000..d8baa34 --- /dev/null +++ b/flavors/gles2/eglenum.spec @@ -0,0 +1,116 @@ +EGL enum: + VERSION_1_0 = 1 + VERSION_1_1 = 1 + VERSION_1_2 = 1 + VERSION_1_3 = 1 + VERSION_1_4 = 1 + FALSE = 0 + TRUE = 1 + SUCCESS = 0x3000 + NOT_INITIALIZED = 0x3001 + BAD_ACCESS = 0x3002 + BAD_ALLOC = 0x3003 + BAD_ATTRIBUTE = 0x3004 + BAD_CONFIG = 0x3005 + BAD_CONTEXT = 0x3006 + BAD_CURRENT_SURFACE = 0x3007 + BAD_DISPLAY = 0x3008 + BAD_MATCH = 0x3009 + BAD_NATIVE_PIXMAP = 0x300A + BAD_NATIVE_WINDOW = 0x300B + BAD_PARAMETER = 0x300C + BAD_SURFACE = 0x300D + CONTEXT_LOST = 0x300E /* EGL 1.1 - IMG_power_management */ + BUFFER_SIZE = 0x3020 + ALPHA_SIZE = 0x3021 + BLUE_SIZE = 0x3022 + GREEN_SIZE = 0x3023 + RED_SIZE = 0x3024 + DEPTH_SIZE = 0x3025 + STENCIL_SIZE = 0x3026 + CONFIG_CAVEAT = 0x3027 + CONFIG_ID = 0x3028 + LEVEL = 0x3029 + MAX_PBUFFER_HEIGHT = 0x302A + MAX_PBUFFER_PIXELS = 0x302B + MAX_PBUFFER_WIDTH = 0x302C + NATIVE_RENDERABLE = 0x302D + NATIVE_VISUAL_ID = 0x302E + NATIVE_VISUAL_TYPE = 0x302F + SAMPLES = 0x3031 + SAMPLE_BUFFERS = 0x3032 + SURFACE_TYPE = 0x3033 + TRANSPARENT_TYPE = 0x3034 + TRANSPARENT_BLUE_VALUE = 0x3035 + TRANSPARENT_GREEN_VALUE = 0x3036 + TRANSPARENT_RED_VALUE = 0x3037 + NONE = 0x3038 /* Attrib list terminator */ + BIND_TO_TEXTURE_RGB = 0x3039 + BIND_TO_TEXTURE_RGBA = 0x303A + MIN_SWAP_INTERVAL = 0x303B + MAX_SWAP_INTERVAL = 0x303C + LUMINANCE_SIZE = 0x303D + ALPHA_MASK_SIZE = 0x303E + COLOR_BUFFER_TYPE = 0x303F + RENDERABLE_TYPE = 0x3040 + MATCH_NATIVE_PIXMAP = 0x3041 /* Pseudo-attribute (not queryable) */ + CONFORMANT = 0x3042 + SLOW_CONFIG = 0x3050 /* EGL_CONFIG_CAVEAT value */ + NON_CONFORMANT_CONFIG = 0x3051 /* EGL_CONFIG_CAVEAT value */ + TRANSPARENT_RGB = 0x3052 /* EGL_TRANSPARENT_TYPE value */ + RGB_BUFFER = 0x308E /* EGL_COLOR_BUFFER_TYPE value */ + LUMINANCE_BUFFER = 0x308F /* EGL_COLOR_BUFFER_TYPE value */ + NO_TEXTURE = 0x305C + TEXTURE_RGB = 0x305D + TEXTURE_RGBA = 0x305E + TEXTURE_2D = 0x305F + PBUFFER_BIT = 0x0001 /* EGL_SURFACE_TYPE mask bits */ + PIXMAP_BIT = 0x0002 /* EGL_SURFACE_TYPE mask bits */ + WINDOW_BIT = 0x0004 /* EGL_SURFACE_TYPE mask bits */ + VG_COLORSPACE_LINEAR_BIT = 0x0020 /* EGL_SURFACE_TYPE mask bits */ + VG_ALPHA_FORMAT_PRE_BIT = 0x0040 /* EGL_SURFACE_TYPE mask bits */ + MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */ + SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */ + OPENGL_ES_BIT = 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ + OPENVG_BIT = 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ + OPENGL_ES2_BIT = 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ + OPENGL_BIT = 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ + VENDOR = 0x3053 + VERSION = 0x3054 + EXTENSIONS = 0x3055 + CLIENT_APIS = 0x308D + HEIGHT = 0x3056 + WIDTH = 0x3057 + LARGEST_PBUFFER = 0x3058 + TEXTURE_FORMAT = 0x3080 + TEXTURE_TARGET = 0x3081 + MIPMAP_TEXTURE = 0x3082 + MIPMAP_LEVEL = 0x3083 + RENDER_BUFFER = 0x3086 + VG_COLORSPACE = 0x3087 + VG_ALPHA_FORMAT = 0x3088 + HORIZONTAL_RESOLUTION = 0x3090 + VERTICAL_RESOLUTION = 0x3091 + PIXEL_ASPECT_RATIO = 0x3092 + SWAP_BEHAVIOR = 0x3093 + MULTISAMPLE_RESOLVE = 0x3099 + BACK_BUFFER = 0x3084 + SINGLE_BUFFER = 0x3085 + VG_COLORSPACE_sRGB = 0x3089 /* EGL_VG_COLORSPACE value */ + VG_COLORSPACE_LINEAR = 0x308A /* EGL_VG_COLORSPACE value */ + VG_ALPHA_FORMAT_NONPRE = 0x308B /* EGL_ALPHA_FORMAT value */ + VG_ALPHA_FORMAT_PRE = 0x308C /* EGL_ALPHA_FORMAT value */ + DISPLAY_SCALING = 10000 + BUFFER_PRESERVED = 0x3094 /* EGL_SWAP_BEHAVIOR value */ + BUFFER_DESTROYED = 0x3095 /* EGL_SWAP_BEHAVIOR value */ + OPENVG_IMAGE = 0x3096 + CONTEXT_CLIENT_TYPE = 0x3097 + CONTEXT_CLIENT_VERSION = 0x3098 + MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */ + MULTISAMPLE_RESOLVE_BOX = 0x309B /* EGL_MULTISAMPLE_RESOLVE value */ + OPENGL_ES_API = 0x30A0 + OPENVG_API = 0x30A1 + OPENGL_API = 0x30A2 + DRAW = 0x3059 + READ = 0x305A + CORE_NATIVE_ENGINE = 0x305B diff --git a/flavors/gles2/flavor.mk b/flavors/gles2/flavor.mk new file mode 100644 index 0000000..3f9ac80 --- /dev/null +++ b/flavors/gles2/flavor.mk @@ -0,0 +1,4 @@ +# $Id$ + +CPPFLAGS += -DAPIENTRY= +APIS := $(FLAVOR_ROOT)/gles2.api $(FLAVOR_ROOT)/egl.api diff --git a/flavors/gles2/gles2.api b/flavors/gles2/gles2.api new file mode 100644 index 0000000..a050980 --- /dev/null +++ b/flavors/gles2/gles2.api @@ -0,0 +1,6 @@ +typemap gles2.tm +iomap gles2.io +spec gles2.spec +prefix gl +enumspec gles2enum.spec +enumprefix GL_ diff --git a/flavors/gles2/gles2.io b/flavors/gles2/gles2.io new file mode 100644 index 0000000..f64dab6 --- /dev/null +++ b/flavors/gles2/gles2.io @@ -0,0 +1,26 @@ +enum, int, %s, describe_enum:p.name:'"%s"'%p.type +boolean, char, %i +bitfield, int, %s, describe_bitfield:p.name:'"%s"'%p.type +byte, char, %i +ubyte, char, %u +short, short, %i +ushort, short, %u +int, int, %i +uint, int, %u +unsigned int, int, %u +sizei, int, %i +intptr, int, %li +sizeiptr, int, %li +handle, int, %i +int64, long long, %lli +uint64, long long, %llu +half, short, %#x +float, float, %g +clampf, float, %g +double, double, %g +clampd, double, %g +ubyte *, string, \"%s\" +char *, string, \"%s\" +void *, pointer, %p +void* const, pointer, %p +boolean *, pointer, %p diff --git a/flavors/gles2/gles2.spec b/flavors/gles2/gles2.spec new file mode 100644 index 0000000..96abda9 --- /dev/null +++ b/flavors/gles2/gles2.spec @@ -0,0 +1,810 @@ +ActiveTexture(texture) + return void + param texture TextureUnit in value + +AttachShader(program, shader) + return void + param program UInt32 in value + param shader UInt32 in value + +BindAttribLocation(program, index, name) + return void + param program UInt32 in value + param index UInt32 in value + param name Char in array [] + +BindBuffer(target, buffer) + return void + param target BufferTarget in value + param buffer UInt32 in value + +BindFramebuffer(target, framebuffer) + return void + param target FramebufferTarget in value + param framebuffer UInt32 in value + +BindRenderbuffer(target, renderbuffer) + return void + param target RenderbufferTarget in value + param renderbuffer UInt32 in value + +BindTexture(target, texture) + return void + param target TextureTarget in value + param texture Texture in value + +BlendColor(red, green, blue, alpha) + return void + param red ClampedColorF in value + param green ClampedColorF in value + param blue ClampedColorF in value + param alpha ClampedColorF in value + +BlendEquation(mode) + return void + param mode BlendEquationMode in value + +BlendEquationSeparate(modeRGB, modeAlpha) + return void + param modeRGB BlendEquationMode in value + param modeAlpha BlendEquationMode in value + +BlendFunc(sfactor, dfactor) + return void + param sfactor BlendingFactorSrc in value + param dfactor BlendingFactorDest in value + +BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha) + return void + param sfactorRGB BlendFuncSeparateParameter in value + param dfactorRGB BlendFuncSeparateParameter in value + param sfactorAlpha BlendFuncSeparateParameter in value + param dfactorAlpha BlendFuncSeparateParameter in value + +BufferData(target, size, data, usage) + return void + param target BufferTarget in value + param size BufferSize in value + param data ConstVoid in array [size] + param usage BufferUsage in value + +BufferSubData(target, offset, size, data) + return void + param target BufferTarget in value + param offset BufferOffset in value + param size BufferSize in value + param data ConstVoid in array [size] + +CheckFramebufferStatus(target) + return GLenum + param target FramebufferTarget in value + +Clear(mask) + return void + param mask ClearBufferMask in value + +ClearColor(red, green, blue, alpha) + return void + param red ClampedColorF in value + param green ClampedColorF in value + param blue ClampedColorF in value + param alpha ClampedColorF in value + +ClearDepthf(depth) + return void + param depth ClampedFloat32 in value + +ClearStencil(s) + return void + param s StencilValue in value + +ColorMask(red, green, blue, alpha) + return void + param red Boolean in value + param green Boolean in value + param blue Boolean in value + param alpha Boolean in value + +CompileShader(shader) + return void + param shader UInt32 in value + +CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTexture in array [imageSize] + +CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTexture in array [imageSize] + +CopyTexImage2D(target, level, internalformat, x, y, width, height, border) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + +CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + +CreateProgram() + return UInt32 + +CreateShader(type) + return UInt32 + param type GLenum in value + +CullFace(mode) + return void + param mode CullFaceMode in value + +DeleteBuffers(n, buffers) + return void + param n SizeI in value + param buffers ConstUInt32 in array [n] + +DeleteFramebuffers(n, framebuffers) + return void + param n SizeI in value + param framebuffers UInt32 in array [n] + +DeleteProgram(program) + return void + param program UInt32 in value + +DeleteRenderbuffers(n, renderbuffers) + return void + param n SizeI in value + param renderbuffers UInt32 in array [n] + +DeleteShader(shader) + return void + param shader UInt32 in value + +DeleteTextures(n, textures) + return void + param n SizeI in value + param textures Texture in array [n] + +DepthFunc(func) + return void + param func DepthFunction in value + +DepthMask(flag) + return void + param flag Boolean in value + +DepthRangef(near, far) + return void + param near ClampedFloat32 in value + param far ClampedFloat32 in value + +DetachShader(program, shader) + return void + param program UInt32 in value + param shader UInt32 in value + +Disable(cap) + return void + param cap EnableCap in value + +DisableVertexAttribArray(index) + return void + param index UInt32 in value + +DrawArrays(mode, first, count) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + +DrawElements(mode, count, type, indices) + return void + param mode BeginMode in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + +Enable(cap) + return void + param cap EnableCap in value + +EnableVertexAttribArray(index) + return void + param index UInt32 in value + +Finish() + return void + +Flush() + return void + +FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param renderbuffertarget RenderbufferTarget in value + param renderbuffer UInt32 in value + +FramebufferTexture2D(target, attachment, textarget, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + +FrontFace(mode) + return void + param mode FrontFaceDirection in value + +GenBuffers(n, buffers) + return void + param n SizeI in value + param buffers UInt32 out array [n] + +GenerateMipmap(target) + return void + param target GLenum in value + +GenFramebuffers(n, framebuffers) + return void + param n SizeI in value + param framebuffers UInt32 out array [n] + +GenRenderbuffers(n, renderbuffers) + return void + param n SizeI in value + param renderbuffers UInt32 out array [n] + +GenTextures(n, textures) + return void + param n SizeI in value + param textures Texture out array [n] + +GetActiveAttrib(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size Int32 out array [1] + param type GLenum out array [1] + param name Char out array [] + +GetActiveUniform(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size Int32 out array [1] + param type GLenum out array [1] + param name Char out array [] + +GetAttachedShaders(program, maxCount, count, obj) + return void + param program UInt32 in value + param maxCount SizeI in value + param count SizeI out array [1] + param obj UInt32 out array [count] + +GetAttribLocation(program, name) + return Int32 + param program UInt32 in value + param name Char in array [] + +GetBooleanv(pname, params) + return void + param pname GetPName in value + param params Boolean out array [COMPSIZE(pname)] + +GetBufferParameteriv(target, pname, params) + return void + param target BufferTarget in value + param pname BufferPName in value + param params Int32 out array [COMPSIZE(pname)] + +GetError() + return ErrorCode + +GetFloatv(pname, params) + return void + param pname GetPName in value + param params Float32 out array [COMPSIZE(pname)] + +GetFramebufferAttachmentParameteriv(target, attachment, pname, params) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + +GetIntegerv(pname, params) + return void + param pname GetPName in value + param params Int32 out array [COMPSIZE(pname)] + +GetProgramiv(program, pname, params) + return void + param program UInt32 in value + param pname GLenum in value + param params Int32 out array [pname] + +GetProgramInfoLog(program, bufSize, length, infoLog) + return void + param program UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param infoLog Char out array [length] + +GetRenderbufferParameteriv(target, pname, params) + return void + param target RenderbufferTarget in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + +GetShaderiv(shader, pname, params) + return void + param shader UInt32 in value + param pname GLenum in value + param params Int32 out array [pname] + +GetShaderInfoLog(shader, bufSize, length, infoLog) + return void + param shader UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param infoLog Char out array [length] + +#GetShaderPrecisionFormat + +GetShaderSource(shader, bufSize, length, source) + return void + param shader UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param source Char out array [length] + +GetString(name) + return String + param name StringName in value + +GetTexParameterfv(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + +GetTexParameteriv(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + +GetUniformfv(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params Float32 out array [location] + +GetUniformiv(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params Int32 out array [location] + +GetUniformLocation(program, name) + return Int32 + param program UInt32 in value + param name Char in array [] + +GetVertexAttribfv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Float32 out array [4] + +GetVertexAttribiv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Int32 out array [4] + +GetVertexAttribPointerv(index, pname, pointer) + return void + param index UInt32 in value + param pname VertexAttribPointerPropertyARB in value + param pointer VoidPointer out array [1] + +Hint(target, mode) + return void + param target HintTarget in value + param mode HintMode in value + +IsBuffer(buffer) + return Boolean + param buffer UInt32 in value + +IsEnabled(cap) + return Boolean + param cap EnableCap in value + +IsFramebuffer(framebuffer) + return Boolean + param framebuffer UInt32 in value + +IsProgram(program) + return Boolean + param program UInt32 in value + +IsRenderbuffer(renderbuffer) + return Boolean + param renderbuffer UInt32 in value + +IsShader(shader) + return Boolean + param shader UInt32 in value + +IsTexture(texture) + return Boolean + param texture Texture in value + +LineWidth(width) + return void + param width CheckedFloat32 in value + +LinkProgram(program) + return void + param program UInt32 in value + +PixelStorei(pname, param) + return void + param pname PixelStoreParameter in value + param param CheckedInt32 in value + +PolygonOffset(factor, units) + return void + param factor Float32 in value + param units Float32 in value + +ReadPixels(x, y, width, height, format, type, pixels) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void out array [COMPSIZE(format/type/width/height)] + +#ReleaseShaderCompiler + +RenderbufferStorage(target, internalformat, width, height) + return void + param target RenderbufferTarget in value + param internalformat GLenum in value + param width SizeI in value + param height SizeI in value + +SampleCoverage(value, invert) + return void + param value ClampedFloat32 in value + param invert Boolean in value + +Scissor(x, y, width, height) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + +#ShaderBinary + +ShaderSource(shader, count, string, length) + return void + param shader UInt32 in value + param count SizeI in value + param string CharPointer in array [count] + param length Int32 in array [1] + +StencilFunc(func, ref, mask) + return void + param func StencilFunction in value + param ref ClampedStencilValue in value + param mask MaskedStencilValue in value + +StencilFuncSeparate(frontfunc, backfunc, ref, mask) + return void + param frontfunc StencilFunction in value + param backfunc StencilFunction in value + param ref ClampedStencilValue in value + param mask MaskedStencilValue in value + +StencilMask(mask) + return void + param mask MaskedStencilValue in value + +StencilMaskSeparate(face, mask) + return void + param face StencilFaceDirection in value + param mask MaskedStencilValue in value + +StencilOp(fail, zfail, zpass) + return void + param fail StencilOp in value + param zfail StencilOp in value + param zpass StencilOp in value + +StencilOpSeparate(face, sfail, dpfail, dppass) + return void + param face StencilFaceDirection in value + param sfail StencilOp in value + param dpfail StencilOp in value + param dppass StencilOp in value + +TexImage2D(target, level, internalformat, width, height, border, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureComponentCount in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + +TexParameterf(target, pname, param) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedFloat32 in value + +TexParameterfv(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + +TexParameteri(target, pname, param) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedInt32 in value + +TexParameteriv(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + +TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + +Uniform1f(location, v0) + return void + param location Int32 in value + param v0 Float32 in value + +Uniform1fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + +Uniform1i(location, v0) + return void + param location Int32 in value + param v0 Int32 in value + +Uniform1iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + +Uniform2f(location, v0, v1) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + +Uniform2fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + +Uniform2i(location, v0, v1) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + +Uniform2iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + +Uniform3f(location, v0, v1, v2) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + +Uniform3fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + +Uniform3i(location, v0, v1, v2) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + +Uniform3iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + +Uniform4f(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + param v3 Float32 in value + +Uniform4fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + +Uniform4i(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + param v3 Int32 in value + +Uniform4iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + +UniformMatrix2fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + +UniformMatrix3fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + +UniformMatrix4fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + +UseProgram(program) + return void + param program UInt32 in value + +ValidateProgram(program) + return void + param program UInt32 in value + +VertexAttrib1f(index, x) + return void + param index UInt32 in value + param x Float32 in value + +VertexAttrib1fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [1] + +VertexAttrib2f(index, x, y) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + +VertexAttrib2fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [2] + +VertexAttrib3f(index, x, y, z) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + +VertexAttrib3fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [3] + +VertexAttrib4f(index, x, y, z, w) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + +VertexAttrib4fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [4] + +VertexAttribPointer(index, size, type, normalized, stride, pointer) + return void + param index UInt32 in value + param size Int32 in value + param type VertexAttribPointerTypeARB in value + param normalized Boolean in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + +Viewport(x, y, width, height) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value diff --git a/flavors/gles2/gles2.tm b/flavors/gles2/gles2.tm new file mode 100644 index 0000000..cab8550 --- /dev/null +++ b/flavors/gles2/gles2.tm @@ -0,0 +1,323 @@ +AccumOp,*,*, GLenum,*,* +AlphaFunction,*,*, GLenum,*,* +AttribMask,*,*, GLbitfield,*,* +BeginMode,*,*, GLenum,*,* +BinormalPointerTypeEXT,*,*, GLenum,*,* +BlendEquationMode,*,*, GLenum,*,* +BlendEquationModeEXT,*,*, GLenum,*,* +BlendFuncSeparateParameterEXT,*,*, GLenum,*,* +BlendingFactorDest,*,*, GLenum,*,* +BlendingFactorSrc,*,*, GLenum,*,* +Boolean,*,*, GLboolean,*,* +BooleanPointer,*,*, GLboolean*,*,* +Char,in,array, const GLchar *,*,value +Char,out,array, GLchar *,*,value +CharPointer,*,*, GLchar*,*,* +CheckedFloat32,*,*, GLfloat,*,* +CheckedInt32,*,*, GLint,*,* +ClampColorTargetARB,*,*, GLenum,*,* +ClampColorModeARB,*,*, GLenum,*,* +ClampedColorF,*,*, GLclampf,*,* +ClampedFloat32,*,*, GLclampf,*,* +ClampedFloat64,*,*, GLclampd,*,* +ClampedStencilValue,*,*, GLint,*,* +ClearBufferMask,*,*, GLbitfield,*,* +ClientAttribMask,*,*, GLbitfield,*,* +ClipPlaneName,*,*, GLenum,*,* +ColorB,*,*, GLbyte,*,* +ColorD,*,*, GLdouble,*,* +ColorF,*,*, GLfloat,*,* +ColorI,*,*, GLint,*,* +ColorIndexValueD,*,*, GLdouble,*,* +ColorIndexValueF,*,*, GLfloat,*,* +ColorIndexValueI,*,*, GLint,*,* +ColorIndexValueS,*,*, GLshort,*,* +ColorIndexValueUB,*,*, GLubyte,*,* +ColorMaterialParameter,*,*, GLenum,*,* +ColorPointerType,*,*, GLenum,*,* +ColorS,*,*, GLshort,*,* +ColorTableParameterPName,*,*, GLenum,*,* +ColorTableParameterPNameSGI,*,*, GLenum,*,* +ColorTableTarget,*,*, GLenum,*,* +ColorTableTargetSGI,*,*, GLenum,*,* +ColorUB,*,*, GLubyte,*,* +ColorUI,*,*, GLuint,*,* +ColorUS,*,*, GLushort,*,* +CombinerBiasNV,*,*, GLenum,*,* +CombinerComponentUsageNV,*,*, GLenum,*,* +CombinerMappingNV,*,*, GLenum,*,* +CombinerParameterNV,*,*, GLenum,*,* +CombinerPortionNV,*,*, GLenum,*,* +CombinerRegisterNV,*,*, GLenum,*,* +CombinerScaleNV,*,*, GLenum,*,* +CombinerStageNV,*,*, GLenum,*,* +CombinerVariableNV,*,*, GLenum,*,* +CompressedTextureARB,*,*, GLvoid,*,* +ControlPointNV,*,*, GLvoid,*,* +ControlPointTypeNV,*,*, GLenum,*,* +ConvolutionParameter,*,*, GLenum,*,* +ConvolutionParameterEXT,*,*, GLenum,*,* +ConvolutionTarget,*,*, GLenum,*,* +ConvolutionTargetEXT,*,*, GLenum,*,* +CoordD,*,*, GLdouble,*,* +CoordF,*,*, GLfloat,*,* +CoordI,*,*, GLint,*,* +CoordS,*,*, GLshort,*,* +CullFaceMode,*,*, GLenum,*,* +CullParameterEXT,*,*, GLenum,*,* +DepthFunction,*,*, GLenum,*,* +DrawBufferMode,*,*, GLenum,*,* +DrawBufferName,*,*, GLint,*,* +DrawElementsType,*,*, GLenum,*,* +ElementPointerTypeATI,*,*, GLenum,*,* +EnableCap,*,*, GLenum,*,* +ErrorCode,*,*, GLenum,*,* +EvalMapsModeNV,*,*, GLenum,*,* +EvalTargetNV,*,*, GLenum,*,* +FeedbackElement,*,*, GLfloat,*,* +FeedbackType,*,*, GLenum,*,* +FenceNV,*,*, GLuint,*,* +FenceConditionNV,*,*, GLenum,*,* +FenceParameterNameNV,*,*, GLenum,*,* +FfdMaskSGIX,*,*, GLbitfield,*,* +FfdTargetSGIX,*,*, GLenum,*,* +Float32,*,*, GLfloat,*,* +Float32Pointer,*,*, GLfloat*,*,* +Float64,*,*, GLdouble,*,* +Float64Pointer,*,*, GLdouble*,*,* +FogParameter,*,*, GLenum,*,* +FogPointerTypeEXT,*,*, GLenum,*,* +FogPointerTypeIBM,*,*, GLenum,*,* +FragmentLightModelParameterSGIX,*,*,GLenum,*,* +FragmentLightNameSGIX,*,*, GLenum,*,* +FragmentLightParameterSGIX,*,*, GLenum,*,* +FramebufferAttachment,*,*, GLenum,*,* +FramebufferTarget,*,*, GLenum,*,* +FrontFaceDirection,*,*, GLenum,*,* +FunctionPointer,*,*, _GLfuncptr,*,* +GetColorTableParameterPName,*,*, GLenum,*,* +GetColorTableParameterPNameSGI,*,*, GLenum,*,* +GetConvolutionParameterPName,*,*, GLenum,*,* +GetHistogramParameterPName,*,*, GLenum,*,* +GetHistogramParameterPNameEXT,*,*, GLenum,*,* +GetMapQuery,*,*, GLenum,*,* +GetMinmaxParameterPName,*,*, GLenum,*,* +GetMinmaxParameterPNameEXT,*,*, GLenum,*,* +GetPName,*,*, GLenum,*,* +GetPointervPName,*,*, GLenum,*,* +GetTextureParameter,*,*, GLenum,*,* +HintMode,*,*, GLenum,*,* +HintTarget,*,*, GLenum,*,* +HintTargetPGI,*,*, GLenum,*,* +HistogramTarget,*,*, GLenum,*,* +HistogramTargetEXT,*,*, GLenum,*,* +IglooFunctionSelectSGIX,*,*, GLenum,*,* +IglooParameterSGIX,*,*, GLvoid,*,* +ImageTransformPNameHP,*,*, GLenum,*,* +ImageTransformTargetHP,*,*, GLenum,*,* +IndexFunctionEXT,*,*, GLenum,*,* +IndexMaterialParameterEXT,*,*, GLenum,*,* +IndexPointerType,*,*, GLenum,*,* +Int16,*,*, GLshort,*,* +Int32,*,*, GLint,*,* +Int8,*,*, GLbyte,*,* +InterleavedArrayFormat,*,*, GLenum,*,* +LightEnvParameterSGIX,*,*, GLenum,*,* +LightModelParameter,*,*, GLenum,*,* +LightName,*,*, GLenum,*,* +LightParameter,*,*, GLenum,*,* +LightTextureModeEXT,*,*, GLenum,*,* +LightTexturePNameEXT,*,*, GLenum,*,* +LineStipple,*,*, GLushort,*,* +List,*,*, GLuint,*,* +ListMode,*,*, GLenum,*,* +ListNameType,*,*, GLenum,*,* +ListParameterName,*,*, GLenum,*,* +LogicOp,*,*, GLenum,*,* +MapAttribParameterNV,*,*, GLenum,*,* +MapParameterNV,*,*, GLenum,*,* +MapTarget,*,*, GLenum,*,* +MapTargetNV,*,*, GLenum,*,* +MapTypeNV,*,*, GLenum,*,* +MaskedColorIndexValueF,*,*, GLfloat,*,* +MaskedColorIndexValueI,*,*, GLuint,*,* +MaskedStencilValue,*,*, GLuint,*,* +MaterialFace,*,*, GLenum,*,* +MaterialParameter,*,*, GLenum,*,* +MatrixIndexPointerTypeARB,*,*, GLenum,*,* +MatrixMode,*,*, GLenum,*,* +MatrixTransformNV,*,*, GLenum,*,* +MeshMode1,*,*, GLenum,*,* +MeshMode2,*,*, GLenum,*,* +MinmaxTarget,*,*, GLenum,*,* +MinmaxTargetEXT,*,*, GLenum,*,* +NormalPointerType,*,*, GLenum,*,* +NurbsCallback,*,*, GLenum,*,* +NurbsObj,*,*, GLUnurbs*,*,* +NurbsProperty,*,*, GLenum,*,* +NurbsTrim,*,*, GLenum,*,* +OcclusionQueryParameterNameNV,*,*, GLenum,*,* +PixelCopyType,*,*, GLenum,*,* +PixelFormat,*,*, GLenum,*,* +PixelInternalFormat,*,*, GLenum,*,* +PixelMap,*,*, GLenum,*,* +PixelStoreParameter,*,*, GLenum,*,* +PixelTexGenModeSGIX,*,*, GLenum,*,* +PixelTexGenParameterNameSGIS,*,*, GLenum,*,* +PixelTransferParameter,*,*, GLenum,*,* +PixelTransformPNameEXT,*,*, GLenum,*,* +PixelTransformTargetEXT,*,*, GLenum,*,* +PixelType,*,*, GLenum,*,* +PointParameterNameARB,*,*, GLenum,*,* +PolygonMode,*,*, GLenum,*,* +ProgramNV,*,*, GLuint,*,* +ProgramCharacterNV,*,*, GLubyte,*,* +ProgramParameterNV,*,*, GLenum,*,* +ProgramParameterPName,*,*, GLenum,*,* +QuadricCallback,*,*, GLenum,*,* +QuadricDrawStyle,*,*, GLenum,*,* +QuadricNormal,*,*, GLenum,*,* +QuadricObj,*,*, GLUquadric*,*,* +QuadricOrientation,*,*, GLenum,*,* +ReadBufferMode,*,*, GLenum,*,* +RenderbufferTarget,*,*, GLenum,*,* +RenderingMode,*,*, GLenum,*,* +ReplacementCodeSUN,*,*, GLuint,*,* +ReplacementCodeTypeSUN,*,*, GLenum,*,* +SamplePassARB,*,*, GLenum,*,* +SamplePatternEXT,*,*, GLenum,*,* +SamplePatternSGIS,*,*, GLenum,*,* +SecondaryColorPointerTypeIBM,*,*, GLenum,*,* +SelectName,*,*, GLuint,*,* +SeparableTarget,*,*, GLenum,*,* +SeparableTargetEXT,*,*, GLenum,*,* +ShadingModel,*,*, GLenum,*,* +SizeI,*,*, GLsizei,*,* +SpriteParameterNameSGIX,*,*, GLenum,*,* +StencilFunction,*,*, GLenum,*,* +StencilFaceDirection,*,*, GLenum,*,* +StencilOp,*,*, GLenum,*,* +StencilValue,*,*, GLint,*,* +String,*,*, const GLubyte *,*,* +StringName,*,*, GLenum,*,* +TangentPointerTypeEXT,*,*, GLenum,*,* +TessCallback,*,*, GLenum,*,* +TessContour,*,*, GLenum,*,* +TessProperty,*,*, GLenum,*,* +TesselatorObj,*,*, GLUtesselator*,*,* +TexCoordPointerType,*,*, GLenum,*,* +Texture,*,*, GLuint,*,* +TextureComponentCount,*,*, GLint,*,* +TextureCoordName,*,*, GLenum,*,* +TextureEnvParameter,*,*, GLenum,*,* +TextureEnvTarget,*,*, GLenum,*,* +TextureFilterSGIS,*,*, GLenum,*,* +TextureGenParameter,*,*, GLenum,*,* +TextureNormalModeEXT,*,*, GLenum,*,* +TextureParameterName,*,*, GLenum,*,* +TextureTarget,*,*, GLenum,*,* +TextureUnit,*,*, GLenum,*,* +UInt16,*,*, GLushort,*,* +UInt32,*,*, GLuint,*,* +UInt8,*,*, GLubyte,*,* +VertexAttribEnum,*,*, GLenum,*,* +VertexAttribEnumNV,*,*, GLenum,*,* +VertexAttribPointerTypeNV,*,*, GLenum,*,* +VertexPointerType,*,*, GLenum,*,* +VertexWeightPointerTypeEXT,*,*, GLenum,*,* +Void,*,*, GLvoid,*,* +VoidPointer,*,*, GLvoid*,*,* +ConstVoidPointer,*,*, GLvoid* const,*,* +WeightPointerTypeARB,*,*, GLenum,*,* +WinCoord,*,*, GLint,*,* +void,*,*, *,*,* +ArrayObjectPNameATI,*,*, GLenum,*,* +ArrayObjectUsageATI,*,*, GLenum,*,*, +ConstFloat32,*,*, GLfloat,*,* +ConstInt32,*,*, GLint,*,* +ConstUInt32,*,*, GLuint,*,* +ConstVoid,*,*, GLvoid,*,* +DataTypeEXT,*,*, GLenum,*,* +FragmentOpATI,*,*, GLenum,*,* +GetTexBumpParameterATI,*,*, GLenum,*,* +GetVariantValueEXT,*,*, GLenum,*,* +ParameterRangeEXT,*,*, GLenum,*,* +PreserveModeATI,*,*, GLenum,*,* +ProgramFormatARB,*,*, GLenum,*,* +ProgramTargetARB,*,*, GLenum,*,* +ProgramTarget,*,*, GLenum,*,* +ProgramPropertyARB,*,*, GLenum,*,* +ProgramStringPropertyARB,*,*, GLenum,*,* +ScalarType,*,*, GLenum,*,* +SwizzleOpATI,*,*, GLenum,*,* +TexBumpParameterATI,*,*, GLenum,*,* +VariantCapEXT,*,*, GLenum,*,* +VertexAttribPointerPropertyARB,*,*, GLenum,*,* +VertexAttribPointerTypeARB,*,*, GLenum,*,* +VertexAttribPropertyARB,*,*, GLenum,*,* +VertexShaderCoordOutEXT,*,*, GLenum,*,* +VertexShaderOpEXT,*,*, GLenum,*,* +VertexShaderParameterEXT,*,*, GLenum,*,* +VertexShaderStorageTypeEXT,*,*, GLenum,*,* +VertexShaderTextureUnitParameter,*,*, GLenum,*,* +VertexShaderWriteMaskEXT,*,*, GLenum,*,* +VertexStreamATI,*,*, GLenum,*,* +PNTrianglesPNameATI,*,*, GLenum,*,* +# ARB_vertex_buffer_object types and core equivalents for new types +BufferOffset,*,*, GLintptr,*,* +BufferSize,*,*, GLsizeiptr,*,* +BufferAccessARB,*,*, GLenum,*,* +BufferOffsetARB,*,*, GLintptrARB,*,* +BufferPNameARB,*,*, GLenum,*,* +BufferPointerNameARB,*,*, GLenum,*,* +BufferSizeARB,*,*, GLsizeiptrARB,*,* +BufferTargetARB,*,*, GLenum,*,* +BufferUsageARB,*,*, GLenum,*,* +# APPLE_fence +ObjectTypeAPPLE,*,*, GLenum,*,* +# APPLE_vertex_array_range +VertexArrayPNameAPPLE,*,*, GLenum,*,* +# ATI_draw_buffers +DrawBufferModeATI,*,*, GLenum,*,* +# NV_half +Half16NV,*,*, GLhalfNV,*,* +# NV_pixel_data_range +PixelDataRangeTargetNV,*,*, GLenum,*,* +# Generic types for as-yet-unspecified enums +TypeEnum,*,*, GLenum,*,* +GLbitfield,*,*, GLbitfield,*,* +GLenum,*,*, GLenum,*,* +Int64,*,*, GLint64,*,* +UInt64,*,*, GLuint64,*,* +# Object handle & data pointers +handleARB,*,*, GLhandleARB,*,* +charARB,*,array, GLcharARB *,*,value +charPointerARB,*,*, GLcharARB*,*,* +sync,*,*, GLsync,*,*, +# EXT_timer_query +Int64EXT,*,*, GLint64EXT,*,* +UInt64EXT,*,*, GLuint64EXT,*,* +# EXT_direct_state_access +FramebufferAttachment,*,*, GLenum,*,* +FramebufferAttachmentParameterName,*,*, GLenum,*,* +Framebuffer,*,*, GLuint,*,* +FramebufferStatus,*,*, GLenum,*,* +FramebufferTarget,*,*, GLenum,*,* +GetFramebufferParameter,*,*, GLenum,*,* +Intptr,*,*, GLintptr,*,* +ProgramFormat,*,*, GLenum,*,* +ProgramProperty,*,*, GLenum,*,* +ProgramStringProperty,*,*, GLenum,*,* +ProgramTarget,*,*, GLenum,*,* +Renderbuffer,*,*, GLuint,*,* +RenderbufferParameterName,*,*, GLenum,*,* +Sizeiptr,*,*, GLsizeiptr,*,* +TextureInternalFormat,*,*, GLenum,*,* +VertexBufferObjectAccess,*,*, GLenum,*,* +VertexBufferObjectParameter,*,*, GLenum,*,* +VertexBufferObjectUsage,*,*, GLenum,*,* +# ARB_map_buffer_range +BufferAccessMask,*,*, GLbitfield,*,* +# NV_explicit_multisample +GetMultisamplePNameNV,*,*, GLenum,*,* +SampleMaskNV,*,*, GLbitfield,*,* diff --git a/flavors/gles2/gles2enum.spec b/flavors/gles2/gles2enum.spec new file mode 100644 index 0000000..7367510 --- /dev/null +++ b/flavors/gles2/gles2enum.spec @@ -0,0 +1,304 @@ +GLES2 enum: + ES_VERSION_2_0 = 1 + DEPTH_BUFFER_BIT = 0x00000100 + STENCIL_BUFFER_BIT = 0x00000400 + COLOR_BUFFER_BIT = 0x00004000 + FALSE = 0 + TRUE = 1 + POINTS = 0x0000 + LINES = 0x0001 + LINE_LOOP = 0x0002 + LINE_STRIP = 0x0003 + TRIANGLES = 0x0004 + TRIANGLE_STRIP = 0x0005 + TRIANGLE_FAN = 0x0006 + ZERO = 0 + ONE = 1 + SRC_COLOR = 0x0300 + ONE_MINUS_SRC_COLOR = 0x0301 + SRC_ALPHA = 0x0302 + ONE_MINUS_SRC_ALPHA = 0x0303 + DST_ALPHA = 0x0304 + ONE_MINUS_DST_ALPHA = 0x0305 + DST_COLOR = 0x0306 + ONE_MINUS_DST_COLOR = 0x0307 + SRC_ALPHA_SATURATE = 0x0308 + FUNC_ADD = 0x8006 + BLEND_EQUATION = 0x8009 + BLEND_EQUATION_RGB = 0x8009 /* same as BLEND_EQUATION */ + BLEND_EQUATION_ALPHA = 0x883D + FUNC_SUBTRACT = 0x800A + FUNC_REVERSE_SUBTRACT = 0x800B + BLEND_DST_RGB = 0x80C8 + BLEND_SRC_RGB = 0x80C9 + BLEND_DST_ALPHA = 0x80CA + BLEND_SRC_ALPHA = 0x80CB + CONSTANT_COLOR = 0x8001 + ONE_MINUS_CONSTANT_COLOR = 0x8002 + CONSTANT_ALPHA = 0x8003 + ONE_MINUS_CONSTANT_ALPHA = 0x8004 + BLEND_COLOR = 0x8005 + ARRAY_BUFFER = 0x8892 + ELEMENT_ARRAY_BUFFER = 0x8893 + ARRAY_BUFFER_BINDING = 0x8894 + ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 + STREAM_DRAW = 0x88E0 + STATIC_DRAW = 0x88E4 + DYNAMIC_DRAW = 0x88E8 + BUFFER_SIZE = 0x8764 + BUFFER_USAGE = 0x8765 + CURRENT_VERTEX_ATTRIB = 0x8626 + FRONT = 0x0404 + BACK = 0x0405 + FRONT_AND_BACK = 0x0408 + TEXTURE_2D = 0x0DE1 + CULL_FACE = 0x0B44 + BLEND = 0x0BE2 + DITHER = 0x0BD0 + STENCIL_TEST = 0x0B90 + DEPTH_TEST = 0x0B71 + SCISSOR_TEST = 0x0C11 + POLYGON_OFFSET_FILL = 0x8037 + SAMPLE_ALPHA_TO_COVERAGE = 0x809E + SAMPLE_COVERAGE = 0x80A0 + NO_ERROR = 0 + INVALID_ENUM = 0x0500 + INVALID_VALUE = 0x0501 + INVALID_OPERATION = 0x0502 + OUT_OF_MEMORY = 0x0505 + CW = 0x0900 + CCW = 0x0901 + LINE_WIDTH = 0x0B21 + ALIASED_POINT_SIZE_RANGE = 0x846D + ALIASED_LINE_WIDTH_RANGE = 0x846E + CULL_FACE_MODE = 0x0B45 + FRONT_FACE = 0x0B46 + DEPTH_RANGE = 0x0B70 + DEPTH_WRITEMASK = 0x0B72 + DEPTH_CLEAR_VALUE = 0x0B73 + DEPTH_FUNC = 0x0B74 + STENCIL_CLEAR_VALUE = 0x0B91 + STENCIL_FUNC = 0x0B92 + STENCIL_FAIL = 0x0B94 + STENCIL_PASS_DEPTH_FAIL = 0x0B95 + STENCIL_PASS_DEPTH_PASS = 0x0B96 + STENCIL_REF = 0x0B97 + STENCIL_VALUE_MASK = 0x0B93 + STENCIL_WRITEMASK = 0x0B98 + STENCIL_BACK_FUNC = 0x8800 + STENCIL_BACK_FAIL = 0x8801 + STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 + STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 + STENCIL_BACK_REF = 0x8CA3 + STENCIL_BACK_VALUE_MASK = 0x8CA4 + STENCIL_BACK_WRITEMASK = 0x8CA5 + VIEWPORT = 0x0BA2 + SCISSOR_BOX = 0x0C10 + COLOR_CLEAR_VALUE = 0x0C22 + COLOR_WRITEMASK = 0x0C23 + UNPACK_ALIGNMENT = 0x0CF5 + PACK_ALIGNMENT = 0x0D05 + MAX_TEXTURE_SIZE = 0x0D33 + MAX_VIEWPORT_DIMS = 0x0D3A + SUBPIXEL_BITS = 0x0D50 + RED_BITS = 0x0D52 + GREEN_BITS = 0x0D53 + BLUE_BITS = 0x0D54 + ALPHA_BITS = 0x0D55 + DEPTH_BITS = 0x0D56 + STENCIL_BITS = 0x0D57 + POLYGON_OFFSET_UNITS = 0x2A00 + POLYGON_OFFSET_FACTOR = 0x8038 + TEXTURE_BINDING_2D = 0x8069 + SAMPLE_BUFFERS = 0x80A8 + SAMPLES = 0x80A9 + SAMPLE_COVERAGE_VALUE = 0x80AA + SAMPLE_COVERAGE_INVERT = 0x80AB + NUM_COMPRESSED_TEXTURE_FORMATS= 0x86A2 + COMPRESSED_TEXTURE_FORMATS = 0x86A3 + DONT_CARE = 0x1100 + FASTEST = 0x1101 + NICEST = 0x1102 + GENERATE_MIPMAP_HINT = 0x8192 + BYTE = 0x1400 + UNSIGNED_BYTE = 0x1401 + SHORT = 0x1402 + UNSIGNED_SHORT = 0x1403 + INT = 0x1404 + UNSIGNED_INT = 0x1405 + FLOAT = 0x1406 + FIXED = 0x140C + DEPTH_COMPONENT = 0x1902 + ALPHA = 0x1906 + RGB = 0x1907 + RGBA = 0x1908 + LUMINANCE = 0x1909 + LUMINANCE_ALPHA = 0x190A + UNSIGNED_SHORT_4_4_4_4 = 0x8033 + UNSIGNED_SHORT_5_5_5_1 = 0x8034 + UNSIGNED_SHORT_5_6_5 = 0x8363 + FRAGMENT_SHADER = 0x8B30 + VERTEX_SHADER = 0x8B31 + MAX_VERTEX_ATTRIBS = 0x8869 + MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB + MAX_VARYING_VECTORS = 0x8DFC + MAX_COMBINED_TEXTURE_IMAGE_UNITS= 0x8B4D + MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C + MAX_TEXTURE_IMAGE_UNITS = 0x8872 + MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD + SHADER_TYPE = 0x8B4F + DELETE_STATUS = 0x8B80 + LINK_STATUS = 0x8B82 + VALIDATE_STATUS = 0x8B83 + ATTACHED_SHADERS = 0x8B85 + ACTIVE_UNIFORMS = 0x8B86 + ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87 + ACTIVE_ATTRIBUTES = 0x8B89 + ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A + SHADING_LANGUAGE_VERSION = 0x8B8C + CURRENT_PROGRAM = 0x8B8D + NEVER = 0x0200 + LESS = 0x0201 + EQUAL = 0x0202 + LEQUAL = 0x0203 + GREATER = 0x0204 + NOTEQUAL = 0x0205 + GEQUAL = 0x0206 + ALWAYS = 0x0207 + KEEP = 0x1E00 + REPLACE = 0x1E01 + INCR = 0x1E02 + DECR = 0x1E03 + INVERT = 0x150A + INCR_WRAP = 0x8507 + DECR_WRAP = 0x8508 + VENDOR = 0x1F00 + RENDERER = 0x1F01 + VERSION = 0x1F02 + EXTENSIONS = 0x1F03 + NEAREST = 0x2600 + LINEAR = 0x2601 + NEAREST_MIPMAP_NEAREST = 0x2700 + LINEAR_MIPMAP_NEAREST = 0x2701 + NEAREST_MIPMAP_LINEAR = 0x2702 + LINEAR_MIPMAP_LINEAR = 0x2703 + TEXTURE_MAG_FILTER = 0x2800 + TEXTURE_MIN_FILTER = 0x2801 + TEXTURE_WRAP_S = 0x2802 + TEXTURE_WRAP_T = 0x2803 + TEXTURE = 0x1702 + TEXTURE_CUBE_MAP = 0x8513 + TEXTURE_BINDING_CUBE_MAP = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A + MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C + TEXTURE0 = 0x84C0 + TEXTURE1 = 0x84C1 + TEXTURE2 = 0x84C2 + TEXTURE3 = 0x84C3 + TEXTURE4 = 0x84C4 + TEXTURE5 = 0x84C5 + TEXTURE6 = 0x84C6 + TEXTURE7 = 0x84C7 + TEXTURE8 = 0x84C8 + TEXTURE9 = 0x84C9 + TEXTURE10 = 0x84CA + TEXTURE11 = 0x84CB + TEXTURE12 = 0x84CC + TEXTURE13 = 0x84CD + TEXTURE14 = 0x84CE + TEXTURE15 = 0x84CF + TEXTURE16 = 0x84D0 + TEXTURE17 = 0x84D1 + TEXTURE18 = 0x84D2 + TEXTURE19 = 0x84D3 + TEXTURE20 = 0x84D4 + TEXTURE21 = 0x84D5 + TEXTURE22 = 0x84D6 + TEXTURE23 = 0x84D7 + TEXTURE24 = 0x84D8 + TEXTURE25 = 0x84D9 + TEXTURE26 = 0x84DA + TEXTURE27 = 0x84DB + TEXTURE28 = 0x84DC + TEXTURE29 = 0x84DD + TEXTURE30 = 0x84DE + TEXTURE31 = 0x84DF + ACTIVE_TEXTURE = 0x84E0 + REPEAT = 0x2901 + CLAMP_TO_EDGE = 0x812F + MIRRORED_REPEAT = 0x8370 + FLOAT_VEC2 = 0x8B50 + FLOAT_VEC3 = 0x8B51 + FLOAT_VEC4 = 0x8B52 + INT_VEC2 = 0x8B53 + INT_VEC3 = 0x8B54 + INT_VEC4 = 0x8B55 + BOOL = 0x8B56 + BOOL_VEC2 = 0x8B57 + BOOL_VEC3 = 0x8B58 + BOOL_VEC4 = 0x8B59 + FLOAT_MAT2 = 0x8B5A + FLOAT_MAT3 = 0x8B5B + FLOAT_MAT4 = 0x8B5C + SAMPLER_2D = 0x8B5E + SAMPLER_CUBE = 0x8B60 + VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 + VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 + VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 + VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 + VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A + VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING= 0x889F + IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A + IMPLEMENTATION_COLOR_READ_FORMAT= 0x8B9B + COMPILE_STATUS = 0x8B81 + INFO_LOG_LENGTH = 0x8B84 + SHADER_SOURCE_LENGTH = 0x8B88 + SHADER_COMPILER = 0x8DFA + SHADER_BINARY_FORMATS = 0x8DF8 + NUM_SHADER_BINARY_FORMATS = 0x8DF9 + LOW_FLOAT = 0x8DF0 + MEDIUM_FLOAT = 0x8DF1 + HIGH_FLOAT = 0x8DF2 + LOW_INT = 0x8DF3 + MEDIUM_INT = 0x8DF4 + HIGH_INT = 0x8DF5 + FRAMEBUFFER = 0x8D40 + RENDERBUFFER = 0x8D41 + RGBA4 = 0x8056 + RGB5_A1 = 0x8057 + RGB565 = 0x8D62 + DEPTH_COMPONENT16 = 0x81A5 + STENCIL_INDEX = 0x1901 + STENCIL_INDEX8 = 0x8D48 + RENDERBUFFER_WIDTH = 0x8D42 + RENDERBUFFER_HEIGHT = 0x8D43 + RENDERBUFFER_INTERNAL_FORMAT = 0x8D44 + RENDERBUFFER_RED_SIZE = 0x8D50 + RENDERBUFFER_GREEN_SIZE = 0x8D51 + RENDERBUFFER_BLUE_SIZE = 0x8D52 + RENDERBUFFER_ALPHA_SIZE = 0x8D53 + RENDERBUFFER_DEPTH_SIZE = 0x8D54 + RENDERBUFFER_STENCIL_SIZE = 0x8D55 + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0 + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2 + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE= 0x8CD3 + COLOR_ATTACHMENT0 = 0x8CE0 + DEPTH_ATTACHMENT = 0x8D00 + STENCIL_ATTACHMENT = 0x8D20 + NONE = 0 + FRAMEBUFFER_COMPLETE = 0x8CD5 + FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6 + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT= 0x8CD7 + FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9 + FRAMEBUFFER_UNSUPPORTED = 0x8CDD + FRAMEBUFFER_BINDING = 0x8CA6 + RENDERBUFFER_BINDING = 0x8CA7 + MAX_RENDERBUFFER_SIZE = 0x84E8 + INVALID_FRAMEBUFFER_OPERATION = 0x0506 diff --git a/flavors/gles2/source/arraysize.c b/flavors/gles2/source/arraysize.c new file mode 100644 index 0000000..076347f --- /dev/null +++ b/flavors/gles2/source/arraysize.c @@ -0,0 +1,57 @@ +/* $Id$ + +This file is part of gldbg +Copyright © 2010 Mikko Rasa, Mikkosoft Productions +Distributed under the GPL +*/ + +#include "arraysize.h" + +int typesize(GLenum type) +{ + switch(type) + { + case GL_BYTE: return sizeof(GLbyte); + case GL_SHORT: return sizeof(GLshort); + case GL_INT: return sizeof(GLint); + case GL_UNSIGNED_BYTE: return sizeof(GLubyte); + case GL_UNSIGNED_SHORT: return sizeof(GLushort); + case GL_UNSIGNED_INT: return sizeof(GLuint); + case GL_FLOAT: return sizeof(GLfloat); + // Short and byte packed types are broken + default: return 1; + } +} + +int formatsize(GLenum format) +{ + switch(format) + { + case GL_STENCIL_INDEX: return 1; + case GL_DEPTH_COMPONENT: return 1; + case GL_ALPHA: return 1; + case GL_RGB: return 3; + case GL_RGBA: return 4; + case GL_LUMINANCE: return 1; + case GL_LUMINANCE_ALPHA: return 2; + default: return 1; + } +} + +int paramsize(GLenum pname) +{ + switch(pname) + { + // Texture + case GL_TEXTURE_WRAP_S: return 1; + case GL_TEXTURE_WRAP_T: return 1; + case GL_TEXTURE_MIN_FILTER: return 1; + case GL_TEXTURE_MAG_FILTER: return 1; + default: return 1; + } +} + +int buffersize(GLenum buffer) +{ + return 1; +} diff --git a/flavors/gles2/source/glwrap_funcs.c b/flavors/gles2/source/glwrap_funcs.c new file mode 100644 index 0000000..c647753 --- /dev/null +++ b/flavors/gles2/source/glwrap_funcs.c @@ -0,0 +1,67 @@ +/* $Id$ + +This file is part of gldbg +Copyright © 2010 Mikko Rasa, Mikkosoft Productions +Distributed under the GPL +*/ + +#include +#include "arraysize.h" +#include "functions.h" +#include "glwrap.h" +#include "opengl.h" + +GLenum cur_error = GL_NO_ERROR; + +static void check_error() +{ + GLenum (*orig_glGetError)() = 0; + GLenum code; + + if(!orig_glGetError) + orig_glGetError = glsym("glGetError"); + + code = orig_glGetError(); + if(code!=GL_NO_ERROR) + { + begin_packet(FUNC_GLDERROR); + write_int(code); + send_packet(); + + if(cur_error==GL_NO_ERROR) + cur_error = code; + } +} + +GLenum APIENTRY glGetError() +{ + GLenum ret = cur_error; + cur_error = GL_NO_ERROR; + + begin_packet(FUNC_GLGETERROR); + write_int(ret); + send_packet(); + + return ret; +} + +void (*eglGetProcAddress(const char *procname))(void) +{ + void *handle = 0; + void (*ret)() = 0; + + if(glsym((const char *)procname)) + { + handle = dlopen(NULL, RTLD_LAZY); + ret = dlsym(handle, (const char *)procname); + } + + begin_packet(FUNC_EGLGETPROCADDRESS); + write_pointer(ret); + write_string((const char *)procname); + send_packet(); + + return ret; +} + +#include "gensrc/glwrap.funcs" diff --git a/flavors/gles2/source/opengl.h b/flavors/gles2/source/opengl.h new file mode 100644 index 0000000..85bd081 --- /dev/null +++ b/flavors/gles2/source/opengl.h @@ -0,0 +1,9 @@ +/* $Id$ + +This file is part of gldbg +Copyright © 2010 Mikko Rasa, Mikkosoft Productions +Distributed under the GPL +*/ + +#include +#include diff --git a/source/glwrap.funcs.t b/source/glwrap.funcs.t index 17e711b..6770ec7 100644 --- a/source/glwrap.funcs.t +++ b/source/glwrap.funcs.t @@ -4,6 +4,7 @@ !handcode glGetError !handcode glXGetProcAddress !handcode glXGetProcAddressARB +!handcode eglGetProcAddress wl('%s APIENTRY %s(%s)', ret.ctype, func.name, ", ".join([p.ctype+" "+p.name for p in params])) wl('{') wl(' static %s (*orig)(%s);', ret.ctype, ", ".join([p.ctype for p in params]))