diff --git a/.gitignore b/.gitignore index 695d9d9..d2ba19e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,10 +16,13 @@ bin/* Debug/* +scripts/__pycache__ +src/gles_api.json src/bindgen_core_api.c src/bindgen_gles_api.c sdk/io_stubs.c sdk/orca_surface.c +sdk/gl31.h *bind_gen.c .vscode/settings.json diff --git a/build.sh b/build.sh index f4aba36..2965b23 100755 --- a/build.sh +++ b/build.sh @@ -57,6 +57,10 @@ elif [ $target = orca ] ; then LIBS="-Lbin -lmilepost -lwasm3" FLAGS="-g -DLOG_COMPILE_DEBUG -mmacos-version-min=10.15.4 -maes" + # generate gl31 header and json spec + + python3 ./scripts/gles_gen.py --spec milepost/ext/gl.xml --header sdk/gl31.h --json src/gles_api.json + # generate wasm3 api bindings python3 ./scripts/bindgen.py core \ diff --git a/milepost b/milepost index 6221370..12fa7be 160000 --- a/milepost +++ b/milepost @@ -1 +1 @@ -Subproject commit 6221370aa0e8c520ebde179a1e715a8ed2e28611 +Subproject commit 12fa7be765b139f41e45aa802b3e1558ba704fb9 diff --git a/samples/glesTriangle/.gitignore b/samples/glesTriangle/.gitignore new file mode 100644 index 0000000..4c0e970 --- /dev/null +++ b/samples/glesTriangle/.gitignore @@ -0,0 +1,3 @@ +Triangle +profile.dtrace +profile.spall diff --git a/samples/glesTriangle/build.bat b/samples/glesTriangle/build.bat new file mode 100644 index 0000000..1426e9c --- /dev/null +++ b/samples/glesTriangle/build.bat @@ -0,0 +1,17 @@ +@echo off + +:: compile wasm module +set wasmFlags=--target=wasm32^ + --no-standard-libraries ^ + -fno-builtin ^ + -Wl,--no-entry ^ + -Wl,--export-dynamic ^ + -g ^ + -O2 ^ + -mbulk-memory ^ + -D__ORCA__ ^ + -isystem ..\..\cstdlib\include -I ..\..\sdk -I..\..\milepost\ext -I ..\..\milepost -I ..\..\milepost\src + +clang %wasmFlags% -o .\module.wasm ..\..\sdk\orca.c ..\..\cstdlib\src\*.c src\main.c + +python3 ..\..\scripts\mkapp.py --orca-dir ..\.. --name Triangle --resource-dir data module.wasm diff --git a/samples/glesTriangle/build.sh b/samples/glesTriangle/build.sh new file mode 100755 index 0000000..508c1ec --- /dev/null +++ b/samples/glesTriangle/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +set -euo pipefail + +if [[ -x /usr/local/opt/llvm/bin/clang ]]; then + CLANG=/usr/local/opt/llvm/bin/clang +elif [[ -x /opt/homebrew/opt/llvm/bin/clang ]]; then + CLANG=/opt/homebrew/opt/llvm/bin/clang +else + echo "Could not find Homebrew clang; this script will probably not work." + CLANG=clang +fi + +STDLIB_DIR=../../cstdlib +ORCA_SDK_DIR=../../sdk +MILEPOST_DIR=../../milepost + +wasmFlags="--target=wasm32 \ + --no-standard-libraries \ + -fno-builtin \ + -Wl,--no-entry \ + -Wl,--export-dynamic \ + -g \ + -O2 \ + -mbulk-memory \ + -D__ORCA__ \ + -I $STDLIB_DIR/include \ + -I $ORCA_SDK_DIR \ + -I $MILEPOST_DIR/ext -I $MILEPOST_DIR -I $MILEPOST_DIR/src" + +$CLANG $wasmFlags -o ./module.wasm ../../sdk/orca.c ../../cstdlib/src/*.c src/main.c + +python3 ../../scripts/mkapp.py --orca-dir ../.. --name Triangle --resource-dir data module.wasm diff --git a/samples/glesTriangle/src/main.c b/samples/glesTriangle/src/main.c new file mode 100644 index 0000000..fa67657 --- /dev/null +++ b/samples/glesTriangle/src/main.c @@ -0,0 +1,96 @@ +#include +#include +#include + +#include + +vec2 frameSize = {100, 100}; + +mg_surface surface; + +unsigned int program; + +const char* vshaderSource = + "attribute vec4 vPosition;\n" + "uniform mat4 transform;\n" + "void main()\n" + "{\n" + " gl_Position = transform*vPosition;\n" + "}\n"; + +const char* fshaderSource = + "precision mediump float;\n" + "void main()\n" + "{\n" + " gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n" + "}\n"; + +void compile_shader(GLuint shader, const char* source) +{ + glShaderSource(shader, 1, &source, 0); + glCompileShader(shader); + + int err = glGetError(); + if(err) + { + log_info("gl error"); + } +} + + +ORCA_EXPORT void OnInit(void) +{ + surface = mg_surface_gles(); + + mg_surface_prepare(surface); + + unsigned int vshader = glCreateShader(GL_VERTEX_SHADER); + unsigned int fshader = glCreateShader(GL_FRAGMENT_SHADER); + program = glCreateProgram(); + + compile_shader(vshader, vshaderSource); + compile_shader(fshader, fshaderSource); + + glAttachShader(program, vshader); + glAttachShader(program, fshader); + glLinkProgram(program); + glUseProgram(program); +} + +ORCA_EXPORT void OnFrameResize(u32 width, u32 height) +{ + log_info("frame resize %u, %u", width, height); + frameSize.x = width; + frameSize.y = height; +} + +ORCA_EXPORT void OnFrameRefresh(void) +{ + f32 aspect = frameSize.x/frameSize.y; + + mg_surface_prepare(surface); + + glClearColor(0, 1, 1, 1); + glClear(GL_COLOR_BUFFER_BIT); + + static float alpha = 0; + + glViewport(0, 0, frameSize.x * 2, frameSize.y * 2); + + GLfloat matrix[] = {cosf(alpha)/aspect, sinf(alpha), 0, 0, + -sinf(alpha)/aspect, cosf(alpha), 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1}; + alpha += 2*M_PI/120; + + glUniformMatrix4fv(0, 1, false, matrix); + + GLfloat vertices[] = { + -0.866/2, -0.5/2, 0, 0.866/2, -0.5/2, 0, 0, 0.5, 0}; + + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vertices); + glEnableVertexAttribArray(0); + glDrawArrays(GL_TRIANGLES, 0, 3); + + mg_surface_present(surface); +} diff --git a/samples/pong/src/main.c b/samples/pong/src/main.c index 85de550..77ed230 100644 --- a/samples/pong/src/main.c +++ b/samples/pong/src/main.c @@ -45,9 +45,6 @@ mg_image ballImage; mg_image paddleImage; mg_font pongFont; -// TODO(ben): Why is this here? Why isn't it forward-declared by some header? -mg_surface mg_surface_main(void); - f32 lerp(f32 a, f32 b, f32 t); mp_rect blockRect(int i); int checkCollision(mp_rect block); @@ -69,7 +66,7 @@ str8 loadFile(mem_arena* arena, str8 filename) { ORCA_EXPORT void OnInit(void) { - surface = mg_surface_main(); + surface = mg_surface_canvas(); canvas = mg_canvas_create(); waterImage = mg_image_create_from_data(surface, loadFile(mem_scratch(), STR8("/underwater.jpg")), false); diff --git a/samples/ui/build.sh b/samples/ui/build.sh old mode 100644 new mode 100755 diff --git a/samples/ui/src/main.c b/samples/ui/src/main.c index 301280a..2656209 100644 --- a/samples/ui/src/main.c +++ b/samples/ui/src/main.c @@ -12,12 +12,10 @@ mg_font font; ui_context ui; mem_arena textArena = {0}; -mg_surface mg_surface_main(void); - ORCA_EXPORT void OnInit(void) { //TODO create surface for main window - surface = mg_surface_main(); + surface = mg_surface_canvas(); canvas = mg_canvas_create(); ui_init(&ui); diff --git a/scripts/gles_gen.py b/scripts/gles_gen.py new file mode 100644 index 0000000..f4668de --- /dev/null +++ b/scripts/gles_gen.py @@ -0,0 +1,228 @@ +from reg_modified import * +import xml.etree.ElementTree as et +from argparse import ArgumentParser + +def gen_gles_header(spec, filename): + # Generates the GLES header, wrapping gl functions + # prototypes in ORCA_IMPORT() macro + + gles2through31Pat = '2\.[0-9]|3\.[01]' + allVersions = '.*' + + genOpts = CGeneratorOptions( + filename=filename, + apiname='gles2', + profile='common', + versions=gles2through31Pat, + emitversions=allVersions, + protectProto=False, + procMacro='ORCA_IMPORT') + + reg = Registry() + tree = et.parse(spec) + reg.loadElementTree(tree) + + gen = COutputGenerator() + reg.setGenerator(gen) + reg.apiGen(genOpts) + + +def get_bindgen_tag_for_type(typeName): + typeToTags = { + "void": "v", + + "GLenum": "i", + "GLbitfield": "i", + + "GLboolean": "i", + "GLbyte": "i", + "GLubyte": "i", + "GLchar": "i", + + "GLshort": "i", + "GLushort": "i", + "GLhalf": "i", + "GLhalfARB": "i", + + "GLuint": "i", + "GLint": "i", + "GLclampx": "i", + "GLsizei": "i", + "GLfixed": "i", + + "GLuint64": "I", + "GLint64": "I", + "GLintptr": "I", + "GLsizeiptr": "I", + + "GLfloat": "f", + "GLclampf": "f", + + "GLdouble": "F", + "GLclampd": "F", + + "GLsync": "p" + } + + if typeName[len(typeName)-1] == '*': + return "p" + else: + tag = typeToTags.get(typeName) + return tag + +def gen_gles_bindgen_json(spec, filename): + + # Gather gles 3.1 required functions + tree = et.parse(spec) + api = [] + + for feature in tree.iterfind('feature[@api="gles2"]'): + if float(feature.get('number')) > 3.1: + break + + for require in feature.iter('require'): + if require.get('profile') == 'compatibility': + continue + for command in require.iter('command'): + api.append(command.get('name')) + + for remove in feature.iter('remove'): + for command in remove.iter('command'): + api.remove(command.get('name')) + + # put all GL commands in a dict + commands = dict() + commandsSpec = tree.find('./commands') + for command in commandsSpec.iter('command'): + name = command.find('proto/name') + commands[name.text] = command + + # TODO: Generate json descriptions for commands in api + + manualBind = [ + "glShaderSource"] + + json = '[\n' + for name in api: + if name in manualBind: + continue + + command = commands.get(name) + if command == None: + print("Couldn't find definition for required command '" + name + "'") + exit(-1) + + proto = command.find("proto") + ptype = proto.find("ptype") + + retType = '' + if proto.text != None: + retType += proto.text + + if ptype != None: + if ptype.text != None: + retType += ptype.text + if ptype.tail != None: + retType += ptype.tail + + retType = retType.strip() + + retTag = get_bindgen_tag_for_type(retType) + if retTag == None: + print("Couldn't find tag for GL type '" + retType + "'") + exit(-1) + + entry = '{\n\t"name": "' + name + '",\n' + entry += '\t"cname": "' + name + '",\n' + entry += '\t"ret": { "name": "' + retType + '", "tag": "' + retTag + '"},\n' + + entry += '\t"args": [ ' + + # iterate through params + for param in command.iter('param'): + + argNode = param.find('name') + argName = argNode.text + + typeNode = param.find('ptype') + + typeName = '' + + if param.text != None: + typeName += param.text + + if typeNode != None: + if typeNode.text != None: + typeName += typeNode.text + if typeNode.tail != None: + typeName += typeNode.tail + + typeName = typeName.strip() + + typeTag = get_bindgen_tag_for_type(typeName) + + if typeTag == None: + print("Couldn't find tag for GL type '" + typeName + "' in function '"+ name +"'") + exit(-1) + + entry += '\n' + entry += '\t\t{"name": "'+ argName +'",\n' + entry += '\t\t "type": {"name": "'+ typeName +'", "tag": "'+ typeTag +'"}' + + if param.get('len') != None: + lenString = param.get('len') + tokens = lenString.split('*') + + if lenString.startswith("COMPSIZE"): + print("Warning: function " + name + ": parameter " + argName + " lenght uses COMPSIZE") + else: + entry += ',\n' + entry += '\t\t "len": {' + if len(tokens) == 2: + if tokens[1].isnumeric() == False: + print("Warning: function " + name + ": couldn't parse parameter '" + argName + "' lenght attribute") + entry += '"count": "' + tokens[0] + '", "components": "'+ tokens[1] + '"' + elif len(tokens) == 1: + if tokens[0].isnumeric(): + entry += '"components":'+ tokens[0] + else: + entry += '"count": "'+ tokens[0] + '"' + else: + print("Warning: function " + name + ": couldn't parse parameter '" + argName + "' lenght attribute") + + entry += '}' + elif typeTag == "p": + print("Warning: function " + name + ": parameter " + argName + " has no len attribute") + + entry += '},' + + entry = entry[:-1] + entry += '\n\t]\n}' + + json += entry + json += ',\n' + + json = json[:-2] + json += '\n]' + + # write json to jsonFile + f = open(filename, 'w') + f.write(json) + f.close() + +#---------------------------------------- +# driver +#---------------------------------------- + +parser = ArgumentParser() +parser.add_argument("-s", "--spec") +parser.add_argument("--header") +parser.add_argument("-j", "--json") + +args = parser.parse_args() + +glesHeader = args.header +jsonFile = args.json + +gen_gles_header(args.spec, glesHeader) +gen_gles_bindgen_json(args.spec, jsonFile) diff --git a/scripts/mkapp.py b/scripts/mkapp.py index 26e8252..b3300bf 100644 --- a/scripts/mkapp.py +++ b/scripts/mkapp.py @@ -137,6 +137,8 @@ def macos_make_app(args): icon.icns NSHighResolutionCapable True + MetalCaptureEnabled + """.format(app_name=app_name, version=version, bundle_sig=bundle_sig, icon_file=icon_file) diff --git a/scripts/reg_modified.py b/scripts/reg_modified.py new file mode 100644 index 0000000..c5c45ef --- /dev/null +++ b/scripts/reg_modified.py @@ -0,0 +1,1171 @@ +#!/usr/bin/python3 -i +# +# Copyright 2013-2020 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +import io,os,re,string,sys +from xml import etree + +def write(*args, **kwargs): + file = kwargs.pop('file', sys.stdout) + end = kwargs.pop('end', '\n') + file.write(' '.join([str(arg) for arg in args])) + file.write(end) + +# noneStr - returns string argument, or "" if argument is None. +# Used in converting lxml Elements into text. +# str - string to convert +def noneStr(str): + if (str): + return str + else: + return "" + +# matchAPIProfile - returns whether an API and profile +# being generated matches an element's profile +# api - string naming the API to match +# profile - string naming the profile to match +# elem - Element which (may) have 'api' and 'profile' +# attributes to match to. +# If a tag is not present in the Element, the corresponding API +# or profile always matches. +# Otherwise, the tag must exactly match the API or profile. +# Thus, if 'profile' = core: +# with no attribute will match +# will match +# will not match +# Possible match conditions: +# Requested Element +# Profile Profile +# --------- -------- +# None None Always matches +# 'string' None Always matches +# None 'string' Does not match. Can't generate multiple APIs +# or profiles, so if an API/profile constraint +# is present, it must be asked for explicitly. +# 'string' 'string' Strings must match +# +# ** In the future, we will allow regexes for the attributes, +# not just strings, so that api="^(gl|gles2)" will match. Even +# this isn't really quite enough, we might prefer something +# like "gl(core)|gles1(common-lite)". +def matchAPIProfile(api, profile, elem): + """Match a requested API & profile name to a api & profile attributes of an Element""" + match = True + # Match 'api', if present + if ('api' in elem.attrib): + if (api == None): + raise UserWarning("No API requested, but 'api' attribute is present with value '" + + elem.get('api') + "'") + elif (api != elem.get('api')): + # Requested API doesn't match attribute + return False + if ('profile' in elem.attrib): + if (profile == None): + raise UserWarning("No profile requested, but 'profile' attribute is present with value '" + + elem.get('profile') + "'") + elif (profile != elem.get('profile')): + # Requested profile doesn't match attribute + return False + return True + +# BaseInfo - base class for information about a registry feature +# (type/group/enum/command/API/extension). +# required - should this feature be defined during header generation +# (has it been removed by a profile or version)? +# declared - has this feature been defined already? +# elem - lxml.etree Element for this feature +# resetState() - reset required/declared to initial values. Used +# prior to generating a new API interface. +class BaseInfo: + """Represents the state of a registry feature, used during API generation""" + def __init__(self, elem): + self.required = False + self.declared = False + self.elem = elem + def resetState(self): + self.required = False + self.declared = False + +# TypeInfo - registry information about a type. No additional state +# beyond BaseInfo is required. +class TypeInfo(BaseInfo): + """Represents the state of a registry type""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# GroupInfo - registry information about a group of related enums. +# enums - dictionary of enum names which are in the group +class GroupInfo(BaseInfo): + """Represents the state of a registry enumerant group""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.enums = {} + +# EnumInfo - registry information about an enum +# type - numeric type of the value of the tag +# ( '' for GLint, 'u' for GLuint, 'ull' for GLuint64 ) +class EnumInfo(BaseInfo): + """Represents the state of a registry enum""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.type = elem.get('type') + if (self.type == None): + self.type = '' + +# CmdInfo - registry information about a command +# glxtype - type of GLX protocol { None, 'render', 'single', 'vendor' } +# glxopcode - GLX protocol opcode { None, number } +# glxequiv - equivalent command at GLX dispatch level { None, string } +# vecequiv - equivalent vector form of a command taking multiple scalar args +# { None, string } +class CmdInfo(BaseInfo): + """Represents the state of a registry command""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.glxtype = None + self.glxopcode = None + self.glxequiv = None + self.vecequiv = None + +# FeatureInfo - registry information about an API +# or +# name - feature name string (e.g. 'GL_ARB_multitexture') +# number - feature version number (e.g. 1.2). +# features are unversioned and assigned version number 0. +# category - category, e.g. VERSION or ARB/KHR/OES/ETC/vendor +# emit - has this feature been defined already? +class FeatureInfo(BaseInfo): + """Represents the state of an API feature (version/extension)""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.name = elem.get('name') + # Determine element category (vendor). Only works + # for elements. + if (elem.tag == 'feature'): + self.category = 'VERSION' + self.number = elem.get('number') + else: + self.category = self.name.split('_', 2)[1] + self.number = "0" + self.emit = False + +# Primary sort key for regSortFeatures. +# Sorts by category of the feature name string: +# Core API features (those defined with a tag) +# ARB/KHR/OES (Khronos extensions) +# other (EXT/vendor extensions) +def regSortCategoryKey(feature): + if (feature.elem.tag == 'feature'): + return 0 + elif (feature.category == 'ARB' or + feature.category == 'KHR' or + feature.category == 'OES'): + return 1 + else: + return 2 + +# Secondary sort key for regSortFeatures. +# Sorts by extension name. +def regSortNameKey(feature): + return feature.name + +# Tertiary sort key for regSortFeatures. +# Sorts by feature version number. +# elements all have version number "0" +def regSortNumberKey(feature): + return feature.number + +# regSortFeatures - default sort procedure for features. +# Sorts by primary key of feature category, +# then by feature name within the category, +# then by version number +def regSortFeatures(featureList): + featureList.sort(key = regSortNumberKey) + featureList.sort(key = regSortNameKey) + featureList.sort(key = regSortCategoryKey) + +# GeneratorOptions - base class for options used during header production +# These options are target language independent, and used by +# Registry.apiGen() and by base OutputGenerator objects. +# +# Members +# filename - name of file to generate, or None to write to stdout. +# apiname - string matching 'apiname' attribute, e.g. 'gl'. +# profile - string specifying API profile , e.g. 'core', or None. +# versions - regex matching API versions to process interfaces for. +# Normally '.*' or '[0-9]\.[0-9]' to match all defined versions. +# emitversions - regex matching API versions to actually emit +# interfaces for (though all requested versions are considered +# when deciding which interfaces to generate). For GL 4.3 glext.h, +# this might be '1\.[2-5]|[2-4]\.[0-9]'. +# defaultExtensions - If not None, a string which must in its +# entirety match the pattern in the "supported" attribute of +# the . Defaults to None. Usually the same as apiname. +# addExtensions - regex matching names of additional extensions +# to include. Defaults to None. +# removeExtensions - regex matching names of extensions to +# remove (after defaultExtensions and addExtensions). Defaults +# to None. +# sortProcedure - takes a list of FeatureInfo objects and sorts +# them in place to a preferred order in the generated output. +# Default is core API versions, ARB/KHR/OES extensions, all +# other extensions, alphabetically within each group. +# The regex patterns can be None or empty, in which case they match +# nothing. +class GeneratorOptions: + """Represents options during header production from an API registry""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures): + self.filename = filename + self.apiname = apiname + self.profile = profile + self.versions = self.emptyRegex(versions) + self.emitversions = self.emptyRegex(emitversions) + self.defaultExtensions = defaultExtensions + self.addExtensions = self.emptyRegex(addExtensions) + self.removeExtensions = self.emptyRegex(removeExtensions) + self.sortProcedure = sortProcedure + # + # Substitute a regular expression which matches no version + # or extension names for None or the empty string. + def emptyRegex(self,pat): + if (pat == None or pat == ''): + return '_nomatch_^' + else: + return pat + +# CGeneratorOptions - subclass of GeneratorOptions. +# +# Adds options used by COutputGenerator objects during C language header +# generation. +# +# Additional members +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# protectFile - True if multiple inclusion protection should be +# generated (based on the filename) around the entire header. +# protectFeature - True if #ifndef..#endif protection should be +# generated around a feature interface in the header file. +# genFuncPointers - True if function pointer typedefs should be +# generated +# protectProto - Controls cpp protection around prototypes: +# False - no protection +# 'nonzero' - protectProtoStr must be defined to a nonzero value +# True - protectProtoStr must be defined +# protectProtoStr - #ifdef symbol to use around prototype +# declarations, if protected +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +class CGeneratorOptions(GeneratorOptions): + """Represents options during C header production from an API registry""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + genFuncPointers = True, + protectFile = True, + protectFeature = True, + protectProto = True, + protectProtoStr = True, + apicall = '', + apientry = '', + apientryp = '', + procMacro = ''): + GeneratorOptions.__init__(self, filename, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.genFuncPointers = genFuncPointers + self.protectFile = protectFile + self.protectFeature = protectFeature + self.protectProto = protectProto + self.protectProtoStr = protectProtoStr + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + self.procMacro = procMacro + +# OutputGenerator - base class for generating API interfaces. +# Manages basic logic, logging, and output file control +# Derived classes actually generate formatted output. +# +# ---- methods ---- +# OutputGenerator(errFile, warnFile, diagFile) +# errFile, warnFile, diagFile - file handles to write errors, +# warnings, diagnostics to. May be None to not write. +# logMsg(level, *args) - log messages of different categories +# level - 'error', 'warn', or 'diag'. 'error' will also +# raise a UserWarning exception +# *args - print()-style arguments +# beginFile(genOpts) - start a new interface file +# genOpts - GeneratorOptions controlling what's generated and how +# endFile() - finish an interface file, closing it when done +# beginFeature(interface, emit) - write interface for a feature +# and tag generated features as having been done. +# interface - element for the / to generate +# emit - actually write to the header only when True +# endFeature() - finish an interface. +# genType(typeinfo,name) - generate interface for a type +# typeinfo - TypeInfo for a type +# genEnum(enuminfo, name) - generate interface for an enum +# enuminfo - EnumInfo for an enum +# name - enum name +# genCmd(cmdinfo) - generate interface for a command +# cmdinfo - CmdInfo for a command +class OutputGenerator: + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + self.outFile = None + self.errFile = errFile + self.warnFile = warnFile + self.diagFile = diagFile + # Internal state + self.featureName = None + self.genOpts = None + # + # logMsg - write a message of different categories to different + # destinations. + # level - + # 'diag' (diagnostic, voluminous) + # 'warn' (warning) + # 'error' (fatal error - raises exception after logging) + # *args - print()-style arguments to direct to corresponding log + def logMsg(self, level, *args): + """Log a message at the given level. Can be ignored or log to a file""" + if (level == 'error'): + strfile = io.StringIO() + write('ERROR:', *args, file=strfile) + if (self.errFile != None): + write(strfile.getvalue(), file=self.errFile) + raise UserWarning(strfile.getvalue()) + elif (level == 'warn'): + if (self.warnFile != None): + write('WARNING:', *args, file=self.warnFile) + elif (level == 'diag'): + if (self.diagFile != None): + write('DIAG:', *args, file=self.diagFile) + else: + raise UserWarning( + '*** FATAL ERROR in Generator.logMsg: unknown level:' + level) + # + def beginFile(self, genOpts): + self.genOpts = genOpts + # + # Open specified output file. Not done in constructor since a + # Generator can be used without writing to a file. + if (self.genOpts.filename != None): + self.outFile = open(self.genOpts.filename, 'w') + else: + self.outFile = sys.stdout + def endFile(self): + self.errFile and self.errFile.flush() + self.warnFile and self.warnFile.flush() + self.diagFile and self.diagFile.flush() + self.outFile.flush() + if (self.outFile != sys.stdout and self.outFile != sys.stderr): + self.outFile.close() + self.genOpts = None + # + def beginFeature(self, interface, emit): + self.emit = emit + self.featureName = interface.get('name') + # If there's an additional 'protect' attribute in the feature, save it + self.featureExtraProtect = interface.get('protect') + def endFeature(self): + # Derived classes responsible for emitting feature + self.featureName = None + self.featureExtraProtect = None + # + # Type generation + def genType(self, typeinfo, name): + if (self.featureName == None): + raise UserWarning('Attempt to generate type', name, + 'when not in feature') + # + # Enumerant generation + def genEnum(self, enuminfo, name): + if (self.featureName == None): + raise UserWarning('Attempt to generate enum', name, + 'when not in feature') + # + # Command generation + def genCmd(self, cmd, name): + if (self.featureName == None): + raise UserWarning('Attempt to generate command', name, + 'when not in feature') + +# COutputGenerator - subclass of OutputGenerator. +# Generates C-language API interfaces. +# +# ---- methods ---- +# COutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# makeCDecls(cmd) - return C prototype and function pointer typedef for a +# Element, as a list of two strings +# cmd - Element for the +# newline() - print a newline to the output file (utility function) +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) - generate interface for a type +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class COutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # Internal state - accumulators for different inner block text + self.typeBody = '' + self.enumBody = '' + self.cmdBody = '' + # + # makeCDecls - return C prototype and function pointer typedef for a + # command, as a two-element list of strings. + # cmd - Element containing a tag + def makeCDecls(self, cmd): + """Generate C function pointer typedef for Element""" + proto = cmd.find('proto') + params = cmd.findall('param') + # Begin accumulating prototype and typedef strings + pdecl = self.genOpts.apicall + + tdecl = 'typedef ' + # + # Insert the function return type/name. + # For prototypes, add APIENTRY macro before the name + # For typedefs, add (APIENTRYP ) around the name and + # use the PFNGLCMDNAMEPROC nameng convention. + # Done by walking the tree for element by element. + # lxml.etree has elem.text followed by (elem[i], elem[i].tail) + # for each child element and any following text + # Leading text + pdecl += noneStr(proto.text) + tdecl += noneStr(proto.text) + # For each child element, if it's a wrap in appropriate + # declaration. Otherwise append its contents and tail contents. + for elem in proto: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name'): + pdecl += self.genOpts.apientry + + if self.genOpts.procMacro != '': + pdecl += self.genOpts.procMacro + '(' + + pdecl += text + tail + + if self.genOpts.procMacro != '': + pdecl += ')' + + tdecl += '(' + self.genOpts.apientryp + 'PFN' + text.upper() + 'PROC' + tail + ')' + else: + pdecl += text + tail + tdecl += text + tail + # Now add the parameter declaration list, which is identical + # for prototypes and typedefs. Concatenate all the text from + # a node without the tags. No tree walking required + # since all tags are ignored. + n = len(params) + paramdecl = ' (' + if n > 0: + for i in range(0,n): + paramdecl += ''.join([t for t in params[i].itertext()]) + if (i < n - 1): + paramdecl += ', ' + else: + paramdecl += 'void' + paramdecl += ');\n'; + return [ pdecl + paramdecl, tdecl + paramdecl ] + # + def newline(self): + write('', file=self.outFile) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + # C-specific + # + # Multiple inclusion protection & C++ wrappers. + if (genOpts.protectFile and self.genOpts.filename): + headerSym = '__' + self.genOpts.apiname + '_' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename)) + write('#ifndef', headerSym, file=self.outFile) + write('#define', headerSym, '1', file=self.outFile) + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('extern "C" {', file=self.outFile) + write('#endif', file=self.outFile) + self.newline() + # + # User-supplied prefix text, if any (list of strings) + if (genOpts.prefixText): + for s in genOpts.prefixText: + write(s, file=self.outFile) + # + # Some boilerplate describing what was generated - this + # will probably be removed later since the extensions + # pattern may be very long. + write('/* Generated C header for:', file=self.outFile) + write(' * API:', genOpts.apiname, file=self.outFile) + if (genOpts.profile): + write(' * Profile:', genOpts.profile, file=self.outFile) + write(' * Versions considered:', genOpts.versions, file=self.outFile) + write(' * Versions emitted:', genOpts.emitversions, file=self.outFile) + write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile) + write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile) + write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile) + write(' */', file=self.outFile) + def endFile(self): + # C-specific + # Finish C++ wrapper and multiple inclusion protection + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('}', file=self.outFile) + write('#endif', file=self.outFile) + if (self.genOpts.protectFile and self.genOpts.filename): + self.newline() + write('#endif', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + # C-specific + # Accumulate types, enums, function pointer typedefs, end function + # prototypes separately for this feature. They're only printed in + # endFeature(). + self.typeBody = '' + self.enumBody = '' + self.cmdPointerBody = '' + self.cmdBody = '' + def endFeature(self): + # C-specific + # Actually write the interface to the output file. + if (self.emit): + self.newline() + if (self.genOpts.protectFeature): + write('#ifndef', self.featureName, file=self.outFile) + write('#define', self.featureName, '1', file=self.outFile) + if (self.typeBody != ''): + write(self.typeBody, end='', file=self.outFile) + # + # Don't add additional protection for derived type declarations, + # which may be needed by other features later on. + if (self.featureExtraProtect != None): + write('#ifdef', self.featureExtraProtect, file=self.outFile) + if (self.enumBody != ''): + write(self.enumBody, end='', file=self.outFile) + if (self.genOpts.genFuncPointers and self.cmdPointerBody != ''): + write(self.cmdPointerBody, end='', file=self.outFile) + if (self.cmdBody != ''): + if (self.genOpts.protectProto == True): + prefix = '#ifdef ' + self.genOpts.protectProtoStr + '\n' + suffix = '#endif\n' + elif (self.genOpts.protectProto == 'nonzero'): + prefix = '#if ' + self.genOpts.protectProtoStr + '\n' + suffix = '#endif\n' + elif (self.genOpts.protectProto == False): + prefix = '' + suffix = '' + else: + self.gen.logMsg('warn', + '*** Unrecognized value for protectProto:', + self.genOpts.protectProto, + 'not generating prototype wrappers') + prefix = '' + suffix = '' + + write(prefix + self.cmdBody + suffix, end='', file=self.outFile) + if (self.featureExtraProtect != None): + write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) + if (self.genOpts.protectFeature): + write('#endif /*', self.featureName, '*/', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFeature(self) + # + # Type generation + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + # + # Replace tags with an APIENTRY-style string + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + typeElem = typeinfo.elem + s = noneStr(typeElem.text) + for elem in typeElem: + if (elem.tag == 'apientry'): + s += self.genOpts.apientry + noneStr(elem.tail) + else: + s += noneStr(elem.text) + noneStr(elem.tail) + if (len(s) > 0): + self.typeBody += s + '\n' + # + # Enumerant generation + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + # + # EnumInfo.type is a C value suffix (e.g. u, ull) + self.enumBody += '#define ' + name.ljust(33) + ' ' + enuminfo.elem.get('value') + # + # Handle non-integer 'type' fields by using it as the C value suffix + t = enuminfo.elem.get('type') + if (t != '' and t != 'i'): + self.enumBody += enuminfo.type + self.enumBody += '\n' + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + decls = self.makeCDecls(cmdinfo.elem) + self.cmdBody += decls[0] + if (self.genOpts.genFuncPointers): + self.cmdPointerBody += decls[1] + +# Registry - object representing an API registry, loaded from an XML file +# Members +# tree - ElementTree containing the root +# typedict - dictionary of TypeInfo objects keyed by type name +# groupdict - dictionary of GroupInfo objects keyed by group name +# enumdict - dictionary of EnumInfo objects keyed by enum name +# cmddict - dictionary of CmdInfo objects keyed by command name +# apidict - dictionary of Elements keyed by API name +# extensions - list of Elements +# extdict - dictionary of Elements keyed by extension name +# gen - OutputGenerator object used to write headers / messages +# genOpts - GeneratorOptions object used to control which +# fetures to write and how to format them +# emitFeatures - True to actually emit features for a version / extension, +# or False to just treat them as emitted +# Public methods +# loadElementTree(etree) - load registry from specified ElementTree +# loadFile(filename) - load registry from XML file +# setGenerator(gen) - OutputGenerator to use +# parseTree() - parse the registry once loaded & create dictionaries +# dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries +# to specified file handle (default stdout). Truncates type / +# enum / command elements to maxlen characters (default 80) +# generator(g) - specify the output generator object +# apiGen(apiname, genOpts) - generate API headers for the API type +# and profile specified in genOpts, but only for the versions and +# extensions specified there. +# apiReset() - call between calls to apiGen() to reset internal state +# validateGroups() - call to verify that each or +# with a 'group' attribute matches an actual existing group. +# Private methods +# addElementInfo(elem,info,infoName,dictionary) - add feature info to dict +# lookupElementInfo(fname,dictionary) - lookup feature info in dict +class Registry: + """Represents an API registry loaded from XML""" + def __init__(self): + self.tree = None + self.typedict = {} + self.groupdict = {} + self.enumdict = {} + self.cmddict = {} + self.apidict = {} + self.extensions = [] + self.extdict = {} + # A default output generator, so commands prior to apiGen can report + # errors via the generator object. + self.gen = OutputGenerator() + self.genOpts = None + self.emitFeatures = False + def loadElementTree(self, tree): + """Load ElementTree into a Registry object and parse it""" + self.tree = tree + self.parseTree() + def loadFile(self, file): + """Load an API registry XML file into a Registry object and parse it""" + self.tree = etree.parse(file) + self.parseTree() + def setGenerator(self, gen): + """Specify output generator object. None restores the default generator""" + self.gen = gen + # addElementInfo - add information about an element to the + # corresponding dictionary + # elem - ///// Element + # info - corresponding {Type|Group|Enum|Cmd|Feature}Info object + # infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension' + # dictionary - self.{type|group|enum|cmd|api|ext}dict + # If the Element has an 'api' attribute, the dictionary key is the + # tuple (name,api). If not, the key is the name. 'name' is an + # attribute of the Element + def addElementInfo(self, elem, info, infoName, dictionary): + if ('api' in elem.attrib): + key = (elem.get('name'),elem.get('api')) + else: + key = elem.get('name') + if key in dictionary: + self.gen.logMsg('warn', '*** Attempt to redefine', + infoName, 'with key:', key) + else: + dictionary[key] = info + # + # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name. + # If an object qualified by API name exists, use that. + # fname - name of type / enum / command + # dictionary - self.{type|enum|cmd}dict + def lookupElementInfo(self, fname, dictionary): + key = (fname, self.genOpts.apiname) + if (key in dictionary): + # self.gen.logMsg('diag', 'Found API-specific element for feature', fname) + return dictionary[key] + elif (fname in dictionary): + # self.gen.logMsg('diag', 'Found generic element for feature', fname) + return dictionary[fname] + else: + return None + def parseTree(self): + """Parse the registry Element, once created""" + # This must be the Element for the root + self.reg = self.tree.getroot() + # + # Create dictionary of registry types from toplevel tags + # and add 'name' attribute to each tag (where missing) + # based on its element. + # + # There's usually one block; more are OK + # Required attributes: 'name' or nested tag contents + self.typedict = {} + for type in self.reg.findall('types/type'): + # If the doesn't already have a 'name' attribute, set + # it from contents of its tag. + if (type.get('name') == None): + type.attrib['name'] = type.find('name').text + self.addElementInfo(type, TypeInfo(type), 'type', self.typedict) + # + # Create dictionary of registry groups from toplevel tags. + # + # There's usually one block; more are OK. + # Required attributes: 'name' + self.groupdict = {} + for group in self.reg.findall('groups/group'): + self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict) + # + # Create dictionary of registry enums from toplevel tags + # + # There are usually many tags in different namespaces, but + # these are functional namespaces of the values, while the actual + # enum names all share the dictionary. + # Required attributes: 'name', 'value' + self.enumdict = {} + for enum in self.reg.findall('enums/enum'): + self.addElementInfo(enum, EnumInfo(enum), 'enum', self.enumdict) + # + # Create dictionary of registry commands from tags + # and add 'name' attribute to each tag (where missing) + # based on its element. + # + # There's usually only one block; more are OK. + # Required attributes: 'name' or tag contents + self.cmddict = {} + for cmd in self.reg.findall('commands/command'): + # If the doesn't already have a 'name' attribute, set + # it from contents of its tag. + if (cmd.get('name') == None): + cmd.attrib['name'] = cmd.find('proto/name').text + ci = CmdInfo(cmd) + self.addElementInfo(cmd, ci, 'command', self.cmddict) + # + # Create dictionaries of API and extension interfaces + # from toplevel and tags. + # + self.apidict = {} + for feature in self.reg.findall('feature'): + ai = FeatureInfo(feature) + self.addElementInfo(feature, ai, 'feature', self.apidict) + self.extensions = self.reg.findall('extensions/extension') + self.extdict = {} + for feature in self.extensions: + ei = FeatureInfo(feature) + self.addElementInfo(feature, ei, 'extension', self.extdict) + def dumpReg(self, maxlen = 40, filehandle = sys.stdout): + """Dump all the dictionaries constructed from the Registry object""" + write('***************************************', file=filehandle) + write(' ** Dumping Registry contents **', file=filehandle) + write('***************************************', file=filehandle) + write('// Types', file=filehandle) + for name in self.typedict: + tobj = self.typedict[name] + write(' Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle) + write('// Groups', file=filehandle) + for name in self.groupdict: + gobj = self.groupdict[name] + write(' Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle) + write('// Enums', file=filehandle) + for name in self.enumdict: + eobj = self.enumdict[name] + write(' Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle) + write('// Commands', file=filehandle) + for name in self.cmddict: + cobj = self.cmddict[name] + write(' Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle) + write('// APIs', file=filehandle) + for key in self.apidict: + write(' API Version ', key, '->', + etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle) + write('// Extensions', file=filehandle) + for key in self.extdict: + write(' Extension', key, '->', + etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle) + # write('***************************************', file=filehandle) + # write(' ** Dumping XML ElementTree **', file=filehandle) + # write('***************************************', file=filehandle) + # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle) + # + # typename - name of type + # required - boolean (to tag features as required or not) + def markTypeRequired(self, typename, required): + """Require (along with its dependencies) or remove (but not its dependencies) a type""" + self.gen.logMsg('diag', '*** tagging type:', typename, '-> required =', required) + # Get TypeInfo object for tag corresponding to typename + type = self.lookupElementInfo(typename, self.typedict) + if (type != None): + # Tag required type dependencies as required. + # This DOES NOT un-tag dependencies in a tag. + # See comments in markRequired() below for the reason. + if (required and ('requires' in type.elem.attrib)): + depType = type.elem.get('requires') + self.gen.logMsg('diag', '*** Generating dependent type', + depType, 'for type', typename) + self.markTypeRequired(depType, required) + type.required = required + else: + self.gen.logMsg('warn', '*** type:', typename , 'IS NOT DEFINED') + # + # features - Element for or tag + # required - boolean (to tag features as required or not) + def markRequired(self, features, required): + """Require or remove features specified in the Element""" + self.gen.logMsg('diag', '*** markRequired (features = , required =', required, ')') + # Loop over types, enums, and commands in the tag + # @@ It would be possible to respect 'api' and 'profile' attributes + # in individual features, but that's not done yet. + for typeElem in features.findall('type'): + self.markTypeRequired(typeElem.get('name'), required) + for enumElem in features.findall('enum'): + name = enumElem.get('name') + self.gen.logMsg('diag', '*** tagging enum:', name, '-> required =', required) + enum = self.lookupElementInfo(name, self.enumdict) + if (enum != None): + enum.required = required + else: + self.gen.logMsg('warn', '*** enum:', name , 'IS NOT DEFINED') + for cmdElem in features.findall('command'): + name = cmdElem.get('name') + self.gen.logMsg('diag', '*** tagging command:', name, '-> required =', required) + cmd = self.lookupElementInfo(name, self.cmddict) + if (cmd != None): + cmd.required = required + # Tag all parameter types of this command as required. + # This DOES NOT remove types of commands in a + # tag, because many other commands may use the same type. + # We could be more clever and reference count types, + # instead of using a boolean. + if (required): + # Look for in entire tree, + # not just immediate children + for ptype in cmd.elem.findall('.//ptype'): + self.gen.logMsg('diag', '*** markRequired: command implicitly requires dependent type', ptype.text) + self.markTypeRequired(ptype.text, required) + else: + self.gen.logMsg('warn', '*** command:', name, 'IS NOT DEFINED') + # + # interface - Element for or , containing + # and tags + # api - string specifying API name being generated + # profile - string specifying API profile being generated + def requireAndRemoveFeatures(self, interface, api, profile): + """Process and tags for a or """ + # marks things that are required by this version/profile + for feature in interface.findall('require'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,True) + # marks things that are removed by this version/profile + for feature in interface.findall('remove'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,False) + # + # generateFeature - generate a single type / enum / command, + # and all its dependencies as needed. + # fname - name of feature (// + # ftype - type of feature, 'type' | 'enum' | 'command' + # dictionary - of *Info objects - self.{type|enum|cmd}dict + # genProc - bound function pointer for self.gen.gen{Type|Enum|Cmd} + def generateFeature(self, fname, ftype, dictionary, genProc): + f = self.lookupElementInfo(fname, dictionary) + if (f == None): + # No such feature. This is an error, but reported earlier + self.gen.logMsg('diag', '*** No entry found for feature', fname, + 'returning!') + return + # + # If feature isn't required, or has already been declared, return + if (not f.required): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(not required)') + return + if (f.declared): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)') + return + # + # Pull in dependent type declaration(s) of the feature. + # For types, there may be one in the 'required' attribute of the element + # For commands, there may be many in tags within the element + # For enums, no dependencies are allowed (though perhasps if you + # have a uint64 enum, it should require GLuint64) + if (ftype == 'type'): + if ('requires' in f.elem.attrib): + depname = f.elem.get('requires') + self.gen.logMsg('diag', '*** Generating required dependent type', + depname) + self.generateFeature(depname, 'type', self.typedict, + self.gen.genType) + elif (ftype == 'command'): + for ptype in f.elem.findall('.//ptype'): + depname = ptype.text + self.gen.logMsg('diag', '*** Generating required parameter type', + depname) + self.generateFeature(depname, 'type', self.typedict, + self.gen.genType) + # + # Actually generate the type only if emitting declarations + if self.emitFeatures: + self.gen.logMsg('diag', '*** Emitting', ftype, 'decl for', fname) + genProc(f, fname) + else: + self.gen.logMsg('diag', '*** Skipping', ftype, fname, + '(not emitting this feature)') + # Always mark feature declared, as though actually emitted + f.declared = True + # + # generateRequiredInterface - generate all interfaces required + # by an API version or extension + # interface - Element for or + def generateRequiredInterface(self, interface): + """Generate required C interface for specified API version/extension""" + # + # Loop over all features inside all tags. + # tags are ignored (handled in pass 1). + for features in interface.findall('require'): + for t in features.findall('type'): + self.generateFeature(t.get('name'), 'type', self.typedict, + self.gen.genType) + for e in features.findall('enum'): + self.generateFeature(e.get('name'), 'enum', self.enumdict, + self.gen.genEnum) + for c in features.findall('command'): + self.generateFeature(c.get('name'), 'command', self.cmddict, + self.gen.genCmd) + # + # apiGen(genOpts) - generate interface for specified versions + # genOpts - GeneratorOptions object with parameters used + # by the Generator object. + def apiGen(self, genOpts): + """Generate interfaces for the specified API type and range of versions""" + # + self.gen.logMsg('diag', '*******************************************') + self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename, + 'api:', genOpts.apiname, + 'profile:', genOpts.profile) + self.gen.logMsg('diag', '*******************************************') + # + self.genOpts = genOpts + # Reset required/declared flags for all features + self.apiReset() + # + # Compile regexps used to select versions & extensions + regVersions = re.compile(self.genOpts.versions) + regEmitVersions = re.compile(self.genOpts.emitversions) + regAddExtensions = re.compile(self.genOpts.addExtensions) + regRemoveExtensions = re.compile(self.genOpts.removeExtensions) + # + # Get all matching API versions & add to list of FeatureInfo + features = [] + apiMatch = False + for key in self.apidict: + fi = self.apidict[key] + api = fi.elem.get('api') + if (api == self.genOpts.apiname): + apiMatch = True + if (regVersions.match(fi.number)): + # Matches API & version #s being generated. Mark for + # emission and add to the features[] list . + # @@ Could use 'declared' instead of 'emit'? + fi.emit = (regEmitVersions.match(fi.number) != None) + features.append(fi) + if (not fi.emit): + self.gen.logMsg('diag', '*** NOT tagging feature api =', api, + 'name =', fi.name, 'number =', fi.number, + 'for emission (does not match emitversions pattern)') + else: + self.gen.logMsg('diag', '*** NOT including feature api =', api, + 'name =', fi.name, 'number =', fi.number, + '(does not match requested versions)') + else: + self.gen.logMsg('diag', '*** NOT including feature api =', api, + 'name =', fi.name, + '(does not match requested API)') + if (not apiMatch): + self.gen.logMsg('warn', '*** No matching API versions found!') + # + # Get all matching extensions & add to the list. + # Start with extensions tagged with 'api' pattern matching the API + # being generated. Add extensions matching the pattern specified in + # regExtensions, then remove extensions matching the pattern + # specified in regRemoveExtensions + for key in self.extdict: + ei = self.extdict[key] + extName = ei.name + include = False + # + # Include extension if defaultExtensions is not None and if the + # 'supported' attribute matches defaultExtensions. The regexp in + # 'supported' must exactly match defaultExtensions, so bracket + # it with ^(pat)$. + pat = '^(' + ei.elem.get('supported') + ')$' + if (self.genOpts.defaultExtensions and + re.match(pat, self.genOpts.defaultExtensions)): + self.gen.logMsg('diag', '*** Including extension', + extName, "(defaultExtensions matches the 'supported' attribute)") + include = True + # + # Include additional extensions if the extension name matches + # the regexp specified in the generator options. This allows + # forcing extensions into an interface even if they're not + # tagged appropriately in the registry. + if (regAddExtensions.match(extName) != None): + self.gen.logMsg('diag', '*** Including extension', + extName, '(matches explicitly requested extensions to add)') + include = True + # Remove extensions if the name matches the regexp specified + # in generator options. This allows forcing removal of + # extensions from an interface even if they're tagged that + # way in the registry. + if (regRemoveExtensions.match(extName) != None): + self.gen.logMsg('diag', '*** Removing extension', + extName, '(matches explicitly requested extensions to remove)') + include = False + # + # If the extension is to be included, add it to the + # extension features list. + if (include): + ei.emit = True + features.append(ei) + else: + self.gen.logMsg('diag', '*** NOT including extension', + extName, '(does not match api attribute or explicitly requested extensions)') + # + # Sort the extension features list, if a sort procedure is defined + if (self.genOpts.sortProcedure): + self.genOpts.sortProcedure(features) + # + # Pass 1: loop over requested API versions and extensions tagging + # types/commands/features as required (in an block) or no + # longer required (in an block). It is possible to remove + # a feature in one version and restore it later by requiring it in + # a later version. + # If a profile other than 'None' is being generated, it must + # match the profile attribute (if any) of the and + # tags. + self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************') + for f in features: + self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for', + f.name) + self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) + # + # Pass 2: loop over specified API versions and extensions printing + # declarations for required things which haven't already been + # generated. + self.gen.logMsg('diag', '*** PASS 2: GENERATE INTERFACES FOR FEATURES ************************') + self.gen.beginFile(self.genOpts) + for f in features: + self.gen.logMsg('diag', '*** PASS 2: Generating interface for', + f.name) + emit = self.emitFeatures = f.emit + if (not emit): + self.gen.logMsg('diag', '*** PASS 2: NOT declaring feature', + f.elem.get('name'), 'because it is not tagged for emission') + # Generate the interface (or just tag its elements as having been + # emitted, if they haven't been). + self.gen.beginFeature(f.elem, emit) + self.generateRequiredInterface(f.elem) + self.gen.endFeature() + self.gen.endFile() + # + # apiReset - use between apiGen() calls to reset internal state + # + def apiReset(self): + """Reset type/enum/command dictionaries before generating another API""" + for type in self.typedict: + self.typedict[type].resetState() + for enum in self.enumdict: + self.enumdict[enum].resetState() + for cmd in self.cmddict: + self.cmddict[cmd].resetState() + for cmd in self.apidict: + self.apidict[cmd].resetState() + # + # validateGroups - check that group= attributes match actual groups + # + def validateGroups(self): + """Validate group= attributes on and tags""" + # Keep track of group names not in tags + badGroup = {} + self.gen.logMsg('diag', '*** VALIDATING GROUP ATTRIBUTES ***') + for cmd in self.reg.findall('commands/command'): + proto = cmd.find('proto') + funcname = cmd.find('proto/name').text + if ('group' in proto.attrib.keys()): + group = proto.get('group') + # self.gen.logMsg('diag', '*** Command ', funcname, ' has return group ', group) + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + for param in cmd.findall('param'): + pname = param.find('name') + if (pname != None): + pname = pname.text + else: + pname = type.get('name') + if ('group' in param.attrib.keys()): + group = param.get('group') + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + if (len(badGroup.keys()) > 0): + self.gen.logMsg('diag', '*** SUMMARY OF UNRECOGNIZED GROUPS ***') + for key in sorted(badGroup.keys()): + self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') diff --git a/sdk/orca.h b/sdk/orca.h index a093c2d..cd311a2 100644 --- a/sdk/orca.h +++ b/sdk/orca.h @@ -25,4 +25,9 @@ #error "Orca apps can only be compiled with clang for now" #endif +#include"gl31.h" + +mg_surface mg_surface_canvas(); +mg_surface mg_surface_gles(); + #endif //__ORCA_H_ diff --git a/src/canvas_api.json b/src/canvas_api.json index 4bb301c..5c329df 100644 --- a/src/canvas_api.json +++ b/src/canvas_api.json @@ -36,12 +36,6 @@ {"name": "pixels", "type": {"name": "u8*", "tag": "p"}}] }, -{ - "name": "mg_surface_main", - "cname": "orca_surface_main", - "ret": {"name": "mg_surface", "tag": "S"}, - "args": [] -}, { "name": "mg_surface_prepare", "cname": "mg_surface_prepare", @@ -75,4 +69,17 @@ "type": {"name": "u32", "tag": "i"}}, {"name": "elements", "type": {"name": "mg_path_elt*", "tag": "p"}}] -}] +}, +{ + "name": "mg_surface_canvas", + "cname": "orca_surface_canvas", + "ret": {"name": "mg_surface", "tag": "S"}, + "args": [] +}, +{ + "name": "mg_surface_gles", + "cname": "orca_surface_gles", + "ret": {"name": "mg_surface", "tag": "S"}, + "args": [] +} +] diff --git a/src/gles_api.json b/src/gles_api.json index fcd6982..be4e8c8 100644 --- a/src/gles_api.json +++ b/src/gles_api.json @@ -1,383 +1,4335 @@ [ { - "name": "glCreateProgram", - "cname": "glCreateProgram", - "ret": {"name": "int", "tag": "i"}, - "args": [] -}, -{ - "name": "glCreateShader", - "cname": "glCreateShader", - "ret": {"name": "int", "tag": "i"}, - "args": [ {"name": "shaderType", - "type": {"name": "GLenum", "tag": "i"}}] -}, -{ - "name": "glCompileShader", - "cname": "glCompileShader", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "shader", - "type": {"name": "GLuint", "tag": "i"}}] + "name": "glActiveTexture", + "cname": "glActiveTexture", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "texture", + "type": {"name": "GLenum", "tag": "i"}} + ] }, { "name": "glAttachShader", "cname": "glAttachShader", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "program", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "shader", - "type": {"name": "GLuint", "tag": "i"}} - ] + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}} + ] }, { - "name": "glLinkProgram", - "cname": "glLinkProgram", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "program", - "type": {"name": "GLuint", "tag": "i"}}] -}, -{ - "name": "glUseProgram", - "cname": "glUseProgram", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "program", - "type": {"name": "GLuint", "tag": "i"}}] -}, -{ - "name": "glGetError", - "cname": "glGetError", - "ret": {"name": "GLenum", "tag": "i"}, - "args": [] -}, -{ - "name": "glClearColor", - "cname": "glClearColor", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "red", - "type": {"name": "GLfloat", "tag": "f"}}, - {"name": "green", - "type": {"name": "GLfloat", "tag": "f"}}, - {"name": "blue", - "type": {"name": "GLfloat", "tag": "f"}}, - {"name": "alpha", - "type": {"name": "GLfloat", "tag": "f"}} - ] -}, -{ - "name": "glClear", - "cname": "glClear", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "mask", - "type": {"name": "GLbitfield", "tag": "i"}}] -}, -{ - "name": "glViewport", - "cname": "glViewport", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "x", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "y", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "width", - "type": {"name": "GLsizei", "tag": "i"}}, - {"name": "height", - "type": {"name": "GLsizei", "tag": "i"}} - ] -}, -{ - "name": "glGetShaderiv", - "cname": "glGetShaderiv", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "shader", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "pname", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "params", - "type": {"name": "GLint*", "tag": "p"}} - ] -}, -{ - "name": "glGetShaderInfoLog", - "cname": "glGetShaderInfoLog", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "shader", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "maxLength", - "type": {"name": "GLsizei", "tag": "i"}}, - {"name": "length", - "type": {"name": "GLsizei", "tag": "p"}}, - {"name": "infoLog", - "type": {"name": "GLchar", "tag": "p"}} - ] -}, -{ - "name": "glBindFramebuffer", - "cname": "glBindFramebuffer", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "framebuffer", - "type": {"name": "GLuint", "tag": "i"}} - ] -}, -{ - "name": "glBindTexture", - "cname": "glBindTexture", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "texture", - "type": {"name": "GLuint", "tag": "i"}} - ] -}, -{ - "name": "glActiveTexture", - "cname": "glActiveTexture", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "texture", - "type": {"name": "GLuint", "tag": "i"}}] -}, -{ - "name": "glGenBuffers", - "cname": "glGenBuffers", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "n", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "buffers", - "type": {"name": "GLuint*", "tag": "p"}} - ] -}, -{ - "name": "glGenTextures", - "cname": "glGenTextures", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "n", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "textures", - "type": {"name": "GLuint*", "tag": "p"}} - ] -}, -{ - "name": "glGenFramebuffers", - "cname": "glGenFramebuffers", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "n", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "framebuffers", - "type": {"name": "GLuint*", "tag": "p"}} - ] -}, -{ - "name": "glFramebufferTexture2D", - "cname": "glFramebufferTexture2D", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "attachment", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "textarget", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "texture", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "level", - "type": {"name": "GLint", "tag": "i"}} - ] -}, -{ - "name": "glCheckFramebufferStatus", - "cname": "glCheckFramebufferStatus", - "ret": {"name": "GLenum", "tag": "i"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}] -}, -{ - "name": "glTexImage2D", - "cname": "glTexImage2D", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "level", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "internalformat", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "width", - "type": {"name": "GLsizei", "tag": "i"}}, - {"name": "height", - "type": {"name": "GLsizei", "tag": "i"}}, - {"name": "border", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "format", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "type", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "data", - "type": {"name": "void*", "tag": "p"}} - ] -}, -{ - "name": "glTexParameteri", - "cname": "glTexParameteri", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "pname", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "param", - "type": {"name": "GLint", "tag": "i"}} - ] + "name": "glBindAttribLocation", + "cname": "glBindAttribLocation", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "name", + "type": {"name": "const GLchar *", "tag": "p"}} + ] }, { "name": "glBindBuffer", "cname": "glBindBuffer", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "buffer", - "type": {"name": "GLuint", "tag": "i"}} - ] + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "buffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBindFramebuffer", + "cname": "glBindFramebuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "framebuffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBindRenderbuffer", + "cname": "glBindRenderbuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "renderbuffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBindTexture", + "cname": "glBindTexture", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "texture", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBlendColor", + "cname": "glBlendColor", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "red", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "green", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "blue", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "alpha", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glBlendEquation", + "cname": "glBlendEquation", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glBlendEquationSeparate", + "cname": "glBlendEquationSeparate", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "modeRGB", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "modeAlpha", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glBlendFunc", + "cname": "glBlendFunc", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sfactor", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "dfactor", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glBlendFuncSeparate", + "cname": "glBlendFuncSeparate", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sfactorRGB", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "dfactorRGB", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "sfactorAlpha", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "dfactorAlpha", + "type": {"name": "GLenum", "tag": "i"}} + ] }, { "name": "glBufferData", "cname": "glBufferData", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "target", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "size", - "type": {"name": "GLsizeiptr", "tag": "i"}}, - {"name": "data", - "type": {"name": "void*", "tag": "p"}}, - {"name": "usage", - "type": {"name": "GLenum", "tag": "i"}} - ] + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "size", + "type": {"name": "GLsizeiptr", "tag": "I"}}, + {"name": "data", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "size"}}, + {"name": "usage", + "type": {"name": "GLenum", "tag": "i"}} + ] }, { - "name": "glUniform1i", - "cname": "glUniform1i", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "location", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "v0", - "type": {"name": "GLint", "tag": "i"}} - ] + "name": "glBufferSubData", + "cname": "glBufferSubData", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "offset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "size", + "type": {"name": "GLsizeiptr", "tag": "I"}}, + {"name": "data", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "size"}} + ] }, { - "name": "glUniform2i", - "cname": "glUniform2i", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "location", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "v0", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "v1", - "type": {"name": "GLint", "tag": "i"}} - ] + "name": "glCheckFramebufferStatus", + "cname": "glCheckFramebufferStatus", + "ret": { "name": "GLenum", "tag": "i"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}} + ] }, { - "name": "glUniform1f", - "cname": "glUniform1f", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "location", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "v0", - "type": {"name": "GLfloat", "tag": "f"}} - ] + "name": "glClear", + "cname": "glClear", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mask", + "type": {"name": "GLbitfield", "tag": "i"}} + ] }, { - "name": "glUniform2f", - "cname": "glUniform2f", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "location", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "v0", - "type": {"name": "GLfloat", "tag": "f"}}, - {"name": "v1", - "type": {"name": "GLfloat", "tag": "f"}} - ] + "name": "glClearColor", + "cname": "glClearColor", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "red", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "green", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "blue", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "alpha", + "type": {"name": "GLfloat", "tag": "f"}} + ] }, { - "name": "glUniform3f", - "cname": "glUniform3f", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "location", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "v0", - "type": {"name": "GLfloat", "tag": "f"}}, - {"name": "v1", - "type": {"name": "GLfloat", "tag": "f"}}, - {"name": "v2", - "type": {"name": "GLfloat", "tag": "f"}} - ] + "name": "glClearDepthf", + "cname": "glClearDepthf", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "d", + "type": {"name": "GLfloat", "tag": "f"}} + ] }, { - "name": "glUniformMatrix4fv", - "cname": "glUniformMatrix4fv", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "location", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "count", - "type": {"name": "GLsizei", "tag": "i"}}, - {"name": "transpose", - "type": {"name": "GLboolean", "tag": "i"}}, - {"name": "value", - "type": {"name": "GLfloat*", "tag": "p"}} - ] + "name": "glClearStencil", + "cname": "glClearStencil", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "s", + "type": {"name": "GLint", "tag": "i"}} + ] }, { - "name": "glGetAttribLocation", - "cname": "glGetAttribLocation", - "ret": {"name": "GLint", "tag": "i"}, - "args": [ {"name": "program", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "name", - "type": {"name": "GLchar*", "tag": "p"}} - ] + "name": "glColorMask", + "cname": "glColorMask", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "red", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "green", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "blue", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "alpha", + "type": {"name": "GLboolean", "tag": "i"}} + ] }, { - "name": "glGetUniformLocation", - "cname": "glGetUniformLocation", - "ret": {"name": "GLint", "tag": "i"}, - "args": [ {"name": "program", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "name", - "type": {"name": "GLchar*", "tag": "p"}} - ] -}, - -{ - "name": "glVertexAttribPointer", - "cname": "glVertexAttribPointer", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "index", - "type": {"name": "GLuint", "tag": "i"}}, - {"name": "size", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "type", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "normalized", - "type": {"name": "GLboolean", "tag": "i"}}, - {"name": "stride", - "type": {"name": "GLsizei", "tag": "i"}}, - {"name": "pointer", - "type": {"name": "void*", "tag": "p"}} - ] + "name": "glCompileShader", + "cname": "glCompileShader", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}} + ] }, { - "name": "glEnableVertexAttribArray", - "cname": "glEnableVertexAttribArray", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "index", - "type": {"name": "GLuint", "tag": "i"}}] + "name": "glCompressedTexImage2D", + "cname": "glCompressedTexImage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "border", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "imageSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "data", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "imageSize"}} + ] +}, +{ + "name": "glCompressedTexSubImage2D", + "cname": "glCompressedTexSubImage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "xoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "yoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "imageSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "data", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "imageSize"}} + ] +}, +{ + "name": "glCopyTexImage2D", + "cname": "glCopyTexImage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "border", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glCopyTexSubImage2D", + "cname": "glCopyTexSubImage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "xoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "yoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glCreateProgram", + "cname": "glCreateProgram", + "ret": { "name": "GLuint", "tag": "i"}, + "args": [ + ] +}, +{ + "name": "glCreateShader", + "cname": "glCreateShader", + "ret": { "name": "GLuint", "tag": "i"}, + "args": [ + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glCullFace", + "cname": "glCullFace", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glDeleteBuffers", + "cname": "glDeleteBuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "buffers", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glDeleteFramebuffers", + "cname": "glDeleteFramebuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "framebuffers", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glDeleteProgram", + "cname": "glDeleteProgram", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDeleteRenderbuffers", + "cname": "glDeleteRenderbuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "renderbuffers", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glDeleteShader", + "cname": "glDeleteShader", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDeleteTextures", + "cname": "glDeleteTextures", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "textures", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glDepthFunc", + "cname": "glDepthFunc", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "func", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glDepthMask", + "cname": "glDepthMask", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "flag", + "type": {"name": "GLboolean", "tag": "i"}} + ] +}, +{ + "name": "glDepthRangef", + "cname": "glDepthRangef", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "f", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glDetachShader", + "cname": "glDetachShader", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDisable", + "cname": "glDisable", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "cap", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glDisableVertexAttribArray", + "cname": "glDisableVertexAttribArray", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}} + ] }, { "name": "glDrawArrays", "cname": "glDrawArrays", - "ret": {"name": "void", "tag": "v"}, - "args": [ {"name": "mode", - "type": {"name": "GLenum", "tag": "i"}}, - {"name": "first", - "type": {"name": "GLint", "tag": "i"}}, - {"name": "count", - "type": {"name": "GLsizei", "tag": "i"}} - ] + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "first", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glDrawElements", + "cname": "glDrawElements", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "indices", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glEnable", + "cname": "glEnable", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "cap", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glEnableVertexAttribArray", + "cname": "glEnableVertexAttribArray", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glFinish", + "cname": "glFinish", + "ret": { "name": "void", "tag": "v"}, + "args": [ + ] +}, +{ + "name": "glFlush", + "cname": "glFlush", + "ret": { "name": "void", "tag": "v"}, + "args": [ + ] +}, +{ + "name": "glFramebufferRenderbuffer", + "cname": "glFramebufferRenderbuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "attachment", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "renderbuffertarget", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "renderbuffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glFramebufferTexture2D", + "cname": "glFramebufferTexture2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "attachment", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "textarget", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "texture", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glFrontFace", + "cname": "glFrontFace", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGenBuffers", + "cname": "glGenBuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "buffers", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGenerateMipmap", + "cname": "glGenerateMipmap", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGenFramebuffers", + "cname": "glGenFramebuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "framebuffers", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGenRenderbuffers", + "cname": "glGenRenderbuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "renderbuffers", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGenTextures", + "cname": "glGenTextures", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "textures", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGetActiveAttrib", + "cname": "glGetActiveAttrib", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "size", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"components":1}}, + {"name": "type", + "type": {"name": "GLenum *", "tag": "p"}, + "len": {"components":1}}, + {"name": "name", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glGetActiveUniform", + "cname": "glGetActiveUniform", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "size", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"components":1}}, + {"name": "type", + "type": {"name": "GLenum *", "tag": "p"}, + "len": {"components":1}}, + {"name": "name", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glGetAttachedShaders", + "cname": "glGetAttachedShaders", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "maxCount", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "shaders", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "maxCount"}} + ] +}, +{ + "name": "glGetAttribLocation", + "cname": "glGetAttribLocation", + "ret": { "name": "GLint", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "name", + "type": {"name": "const GLchar *", "tag": "p"}} + ] +}, +{ + "name": "glGetBooleanv", + "cname": "glGetBooleanv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLboolean *", "tag": "p"}} + ] +}, +{ + "name": "glGetBufferParameteriv", + "cname": "glGetBufferParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetError", + "cname": "glGetError", + "ret": { "name": "GLenum", "tag": "i"}, + "args": [ + ] +}, +{ + "name": "glGetFloatv", + "cname": "glGetFloatv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glGetFramebufferAttachmentParameteriv", + "cname": "glGetFramebufferAttachmentParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "attachment", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetIntegerv", + "cname": "glGetIntegerv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetProgramiv", + "cname": "glGetProgramiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetProgramInfoLog", + "cname": "glGetProgramInfoLog", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "infoLog", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glGetRenderbufferParameteriv", + "cname": "glGetRenderbufferParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetShaderiv", + "cname": "glGetShaderiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetShaderInfoLog", + "cname": "glGetShaderInfoLog", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "infoLog", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glGetShaderPrecisionFormat", + "cname": "glGetShaderPrecisionFormat", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "shadertype", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "precisiontype", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "range", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"components":2}}, + {"name": "precision", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"components":1}} + ] +}, +{ + "name": "glGetShaderSource", + "cname": "glGetShaderSource", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "source", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glGetString", + "cname": "glGetString", + "ret": { "name": "const GLubyte *", "tag": "p"}, + "args": [ + {"name": "name", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGetTexParameterfv", + "cname": "glGetTexParameterfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glGetTexParameteriv", + "cname": "glGetTexParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetUniformfv", + "cname": "glGetUniformfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glGetUniformiv", + "cname": "glGetUniformiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetUniformLocation", + "cname": "glGetUniformLocation", + "ret": { "name": "GLint", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "name", + "type": {"name": "const GLchar *", "tag": "p"}} + ] +}, +{ + "name": "glGetVertexAttribfv", + "cname": "glGetVertexAttribfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLfloat *", "tag": "p"}, + "len": {"components":4}} + ] +}, +{ + "name": "glGetVertexAttribiv", + "cname": "glGetVertexAttribiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"components":4}} + ] +}, +{ + "name": "glGetVertexAttribPointerv", + "cname": "glGetVertexAttribPointerv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pointer", + "type": {"name": "void **", "tag": "p"}, + "len": {"components":1}} + ] +}, +{ + "name": "glHint", + "cname": "glHint", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glIsBuffer", + "cname": "glIsBuffer", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "buffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glIsEnabled", + "cname": "glIsEnabled", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "cap", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glIsFramebuffer", + "cname": "glIsFramebuffer", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "framebuffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glIsProgram", + "cname": "glIsProgram", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glIsRenderbuffer", + "cname": "glIsRenderbuffer", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "renderbuffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glIsShader", + "cname": "glIsShader", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "shader", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glIsTexture", + "cname": "glIsTexture", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "texture", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glLineWidth", + "cname": "glLineWidth", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "width", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glLinkProgram", + "cname": "glLinkProgram", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glPixelStorei", + "cname": "glPixelStorei", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glPolygonOffset", + "cname": "glPolygonOffset", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "factor", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "units", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glReadPixels", + "cname": "glReadPixels", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pixels", + "type": {"name": "void *", "tag": "p"}} + ] +}, +{ + "name": "glReleaseShaderCompiler", + "cname": "glReleaseShaderCompiler", + "ret": { "name": "void", "tag": "v"}, + "args": [ + ] +}, +{ + "name": "glRenderbufferStorage", + "cname": "glRenderbufferStorage", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glSampleCoverage", + "cname": "glSampleCoverage", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "value", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "invert", + "type": {"name": "GLboolean", "tag": "i"}} + ] +}, +{ + "name": "glScissor", + "cname": "glScissor", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glShaderBinary", + "cname": "glShaderBinary", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "shaders", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count"}}, + {"name": "binaryFormat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "binary", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "length"}}, + {"name": "length", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glStencilFunc", + "cname": "glStencilFunc", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "func", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "ref", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "mask", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glStencilFuncSeparate", + "cname": "glStencilFuncSeparate", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "face", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "func", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "ref", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "mask", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glStencilMask", + "cname": "glStencilMask", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mask", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glStencilMaskSeparate", + "cname": "glStencilMaskSeparate", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "face", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "mask", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glStencilOp", + "cname": "glStencilOp", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "fail", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "zfail", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "zpass", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glStencilOpSeparate", + "cname": "glStencilOpSeparate", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "face", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "sfail", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "dpfail", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "dppass", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glTexImage2D", + "cname": "glTexImage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "border", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pixels", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glTexParameterf", + "cname": "glTexParameterf", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glTexParameterfv", + "cname": "glTexParameterfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "const GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glTexParameteri", + "cname": "glTexParameteri", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glTexParameteriv", + "cname": "glTexParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "const GLint *", "tag": "p"}} + ] +}, +{ + "name": "glTexSubImage2D", + "cname": "glTexSubImage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "xoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "yoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pixels", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glUniform1f", + "cname": "glUniform1f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glUniform1fv", + "cname": "glUniform1fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "1"}} + ] +}, +{ + "name": "glUniform1i", + "cname": "glUniform1i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glUniform1iv", + "cname": "glUniform1iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "1"}} + ] +}, +{ + "name": "glUniform2f", + "cname": "glUniform2f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v1", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glUniform2fv", + "cname": "glUniform2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "2"}} + ] +}, +{ + "name": "glUniform2i", + "cname": "glUniform2i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glUniform2iv", + "cname": "glUniform2iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "2"}} + ] +}, +{ + "name": "glUniform3f", + "cname": "glUniform3f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v1", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v2", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glUniform3fv", + "cname": "glUniform3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "3"}} + ] +}, +{ + "name": "glUniform3i", + "cname": "glUniform3i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glUniform3iv", + "cname": "glUniform3iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "3"}} + ] +}, +{ + "name": "glUniform4f", + "cname": "glUniform4f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v1", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v2", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v3", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glUniform4fv", + "cname": "glUniform4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glUniform4i", + "cname": "glUniform4i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v3", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glUniform4iv", + "cname": "glUniform4iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glUniformMatrix2fv", + "cname": "glUniformMatrix2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glUniformMatrix3fv", + "cname": "glUniformMatrix3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "9"}} + ] +}, +{ + "name": "glUniformMatrix4fv", + "cname": "glUniformMatrix4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "16"}} + ] +}, +{ + "name": "glUseProgram", + "cname": "glUseProgram", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glValidateProgram", + "cname": "glValidateProgram", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glVertexAttrib1f", + "cname": "glVertexAttrib1f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glVertexAttrib1fv", + "cname": "glVertexAttrib1fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"components":1}} + ] +}, +{ + "name": "glVertexAttrib2f", + "cname": "glVertexAttrib2f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "y", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glVertexAttrib2fv", + "cname": "glVertexAttrib2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"components":2}} + ] +}, +{ + "name": "glVertexAttrib3f", + "cname": "glVertexAttrib3f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "y", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "z", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glVertexAttrib3fv", + "cname": "glVertexAttrib3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"components":3}} + ] +}, +{ + "name": "glVertexAttrib4f", + "cname": "glVertexAttrib4f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "y", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "z", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "w", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glVertexAttrib4fv", + "cname": "glVertexAttrib4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"components":4}} + ] +}, +{ + "name": "glVertexAttribPointer", + "cname": "glVertexAttribPointer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "size", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "normalized", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "stride", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "pointer", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glViewport", + "cname": "glViewport", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glReadBuffer", + "cname": "glReadBuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "src", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glDrawRangeElements", + "cname": "glDrawRangeElements", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "start", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "end", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "indices", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glTexImage3D", + "cname": "glTexImage3D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "depth", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "border", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pixels", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glTexSubImage3D", + "cname": "glTexSubImage3D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "xoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "yoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "zoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "depth", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pixels", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glCopyTexSubImage3D", + "cname": "glCopyTexSubImage3D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "xoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "yoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "zoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glCompressedTexImage3D", + "cname": "glCompressedTexImage3D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "depth", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "border", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "imageSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "data", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "imageSize"}} + ] +}, +{ + "name": "glCompressedTexSubImage3D", + "cname": "glCompressedTexSubImage3D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "xoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "yoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "zoffset", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "depth", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "imageSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "data", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "imageSize"}} + ] +}, +{ + "name": "glGenQueries", + "cname": "glGenQueries", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "ids", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glDeleteQueries", + "cname": "glDeleteQueries", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "ids", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glIsQuery", + "cname": "glIsQuery", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "id", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBeginQuery", + "cname": "glBeginQuery", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "id", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glEndQuery", + "cname": "glEndQuery", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGetQueryiv", + "cname": "glGetQueryiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetQueryObjectuiv", + "cname": "glGetQueryObjectuiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "id", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLuint *", "tag": "p"}} + ] +}, +{ + "name": "glUnmapBuffer", + "cname": "glUnmapBuffer", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGetBufferPointerv", + "cname": "glGetBufferPointerv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "void **", "tag": "p"}, + "len": {"components":1}} + ] +}, +{ + "name": "glDrawBuffers", + "cname": "glDrawBuffers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "bufs", + "type": {"name": "const GLenum *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glUniformMatrix2x3fv", + "cname": "glUniformMatrix2x3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "6"}} + ] +}, +{ + "name": "glUniformMatrix3x2fv", + "cname": "glUniformMatrix3x2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "6"}} + ] +}, +{ + "name": "glUniformMatrix2x4fv", + "cname": "glUniformMatrix2x4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "8"}} + ] +}, +{ + "name": "glUniformMatrix4x2fv", + "cname": "glUniformMatrix4x2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "8"}} + ] +}, +{ + "name": "glUniformMatrix3x4fv", + "cname": "glUniformMatrix3x4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "12"}} + ] +}, +{ + "name": "glUniformMatrix4x3fv", + "cname": "glUniformMatrix4x3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "12"}} + ] +}, +{ + "name": "glBlitFramebuffer", + "cname": "glBlitFramebuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "srcX0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "srcY0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "srcX1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "srcY1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "dstX0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "dstY0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "dstX1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "dstY1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "mask", + "type": {"name": "GLbitfield", "tag": "i"}}, + {"name": "filter", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glRenderbufferStorageMultisample", + "cname": "glRenderbufferStorageMultisample", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "samples", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glFramebufferTextureLayer", + "cname": "glFramebufferTextureLayer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "attachment", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "texture", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "layer", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glMapBufferRange", + "cname": "glMapBufferRange", + "ret": { "name": "void *", "tag": "p"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "offset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "length", + "type": {"name": "GLsizeiptr", "tag": "I"}}, + {"name": "access", + "type": {"name": "GLbitfield", "tag": "i"}} + ] +}, +{ + "name": "glFlushMappedBufferRange", + "cname": "glFlushMappedBufferRange", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "offset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "length", + "type": {"name": "GLsizeiptr", "tag": "I"}} + ] +}, +{ + "name": "glBindVertexArray", + "cname": "glBindVertexArray", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "array", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDeleteVertexArrays", + "cname": "glDeleteVertexArrays", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "arrays", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGenVertexArrays", + "cname": "glGenVertexArrays", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "arrays", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glIsVertexArray", + "cname": "glIsVertexArray", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "array", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glGetIntegeri_v", + "cname": "glGetIntegeri_v", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glBeginTransformFeedback", + "cname": "glBeginTransformFeedback", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "primitiveMode", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glEndTransformFeedback", + "cname": "glEndTransformFeedback", + "ret": { "name": "void", "tag": "v"}, + "args": [ + ] +}, +{ + "name": "glBindBufferRange", + "cname": "glBindBufferRange", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "buffer", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "offset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "size", + "type": {"name": "GLsizeiptr", "tag": "I"}} + ] +}, +{ + "name": "glBindBufferBase", + "cname": "glBindBufferBase", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "buffer", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glTransformFeedbackVaryings", + "cname": "glTransformFeedbackVaryings", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "varyings", + "type": {"name": "const GLchar *const*", "tag": "p"}, + "len": {"count": "count"}}, + {"name": "bufferMode", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGetTransformFeedbackVarying", + "cname": "glGetTransformFeedbackVarying", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "size", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "type", + "type": {"name": "GLenum *", "tag": "p"}, + "len": {"components":1}}, + {"name": "name", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glVertexAttribIPointer", + "cname": "glVertexAttribIPointer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "size", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "stride", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "pointer", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glGetVertexAttribIiv", + "cname": "glGetVertexAttribIiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"components":1}} + ] +}, +{ + "name": "glGetVertexAttribIuiv", + "cname": "glGetVertexAttribIuiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"components":1}} + ] +}, +{ + "name": "glVertexAttribI4i", + "cname": "glVertexAttribI4i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "z", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "w", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glVertexAttribI4ui", + "cname": "glVertexAttribI4ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "x", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "z", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "w", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glVertexAttribI4iv", + "cname": "glVertexAttribI4iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"components":4}} + ] +}, +{ + "name": "glVertexAttribI4uiv", + "cname": "glVertexAttribI4uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"components":4}} + ] +}, +{ + "name": "glGetUniformuiv", + "cname": "glGetUniformuiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLuint *", "tag": "p"}} + ] +}, +{ + "name": "glGetFragDataLocation", + "cname": "glGetFragDataLocation", + "ret": { "name": "GLint", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "name", + "type": {"name": "const GLchar *", "tag": "p"}} + ] +}, +{ + "name": "glUniform1ui", + "cname": "glUniform1ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glUniform2ui", + "cname": "glUniform2ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glUniform3ui", + "cname": "glUniform3ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glUniform4ui", + "cname": "glUniform4ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v3", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glUniform1uiv", + "cname": "glUniform1uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "1"}} + ] +}, +{ + "name": "glUniform2uiv", + "cname": "glUniform2uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "2"}} + ] +}, +{ + "name": "glUniform3uiv", + "cname": "glUniform3uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "3"}} + ] +}, +{ + "name": "glUniform4uiv", + "cname": "glUniform4uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glClearBufferiv", + "cname": "glClearBufferiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "buffer", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "drawbuffer", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}} + ] +}, +{ + "name": "glClearBufferuiv", + "cname": "glClearBufferuiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "buffer", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "drawbuffer", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}} + ] +}, +{ + "name": "glClearBufferfv", + "cname": "glClearBufferfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "buffer", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "drawbuffer", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glClearBufferfi", + "cname": "glClearBufferfi", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "buffer", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "drawbuffer", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "depth", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "stencil", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glGetStringi", + "cname": "glGetStringi", + "ret": { "name": "const GLubyte *", "tag": "p"}, + "args": [ + {"name": "name", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glCopyBufferSubData", + "cname": "glCopyBufferSubData", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "readTarget", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "writeTarget", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "readOffset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "writeOffset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "size", + "type": {"name": "GLsizeiptr", "tag": "I"}} + ] +}, +{ + "name": "glGetUniformIndices", + "cname": "glGetUniformIndices", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformCount", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "uniformNames", + "type": {"name": "const GLchar *const*", "tag": "p"}}, + {"name": "uniformIndices", + "type": {"name": "GLuint *", "tag": "p"}} + ] +}, +{ + "name": "glGetActiveUniformsiv", + "cname": "glGetActiveUniformsiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformCount", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "uniformIndices", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "uniformCount"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetUniformBlockIndex", + "cname": "glGetUniformBlockIndex", + "ret": { "name": "GLuint", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformBlockName", + "type": {"name": "const GLchar *", "tag": "p"}} + ] +}, +{ + "name": "glGetActiveUniformBlockiv", + "cname": "glGetActiveUniformBlockiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformBlockIndex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetActiveUniformBlockName", + "cname": "glGetActiveUniformBlockName", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformBlockIndex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "uniformBlockName", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glUniformBlockBinding", + "cname": "glUniformBlockBinding", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformBlockIndex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "uniformBlockBinding", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDrawArraysInstanced", + "cname": "glDrawArraysInstanced", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "first", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "instancecount", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glDrawElementsInstanced", + "cname": "glDrawElementsInstanced", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "indices", + "type": {"name": "const void *", "tag": "p"}}, + {"name": "instancecount", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glFenceSync", + "cname": "glFenceSync", + "ret": { "name": "GLsync", "tag": "p"}, + "args": [ + {"name": "condition", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "flags", + "type": {"name": "GLbitfield", "tag": "i"}} + ] +}, +{ + "name": "glIsSync", + "cname": "glIsSync", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "sync", + "type": {"name": "GLsync", "tag": "p"}} + ] +}, +{ + "name": "glDeleteSync", + "cname": "glDeleteSync", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sync", + "type": {"name": "GLsync", "tag": "p"}} + ] +}, +{ + "name": "glClientWaitSync", + "cname": "glClientWaitSync", + "ret": { "name": "GLenum", "tag": "i"}, + "args": [ + {"name": "sync", + "type": {"name": "GLsync", "tag": "p"}}, + {"name": "flags", + "type": {"name": "GLbitfield", "tag": "i"}}, + {"name": "timeout", + "type": {"name": "GLuint64", "tag": "I"}} + ] +}, +{ + "name": "glWaitSync", + "cname": "glWaitSync", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sync", + "type": {"name": "GLsync", "tag": "p"}}, + {"name": "flags", + "type": {"name": "GLbitfield", "tag": "i"}}, + {"name": "timeout", + "type": {"name": "GLuint64", "tag": "I"}} + ] +}, +{ + "name": "glGetInteger64v", + "cname": "glGetInteger64v", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLint64 *", "tag": "p"}} + ] +}, +{ + "name": "glGetSynciv", + "cname": "glGetSynciv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sync", + "type": {"name": "GLsync", "tag": "p"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "values", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glGetInteger64i_v", + "cname": "glGetInteger64i_v", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLint64 *", "tag": "p"}} + ] +}, +{ + "name": "glGetBufferParameteri64v", + "cname": "glGetBufferParameteri64v", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint64 *", "tag": "p"}} + ] +}, +{ + "name": "glGenSamplers", + "cname": "glGenSamplers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "samplers", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glDeleteSamplers", + "cname": "glDeleteSamplers", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "samplers", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glIsSampler", + "cname": "glIsSampler", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBindSampler", + "cname": "glBindSampler", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "unit", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glSamplerParameteri", + "cname": "glSamplerParameteri", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glSamplerParameteriv", + "cname": "glSamplerParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "const GLint *", "tag": "p"}} + ] +}, +{ + "name": "glSamplerParameterf", + "cname": "glSamplerParameterf", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glSamplerParameterfv", + "cname": "glSamplerParameterfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "const GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glGetSamplerParameteriv", + "cname": "glGetSamplerParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetSamplerParameterfv", + "cname": "glGetSamplerParameterfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "sampler", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glVertexAttribDivisor", + "cname": "glVertexAttribDivisor", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "divisor", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glBindTransformFeedback", + "cname": "glBindTransformFeedback", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "id", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDeleteTransformFeedbacks", + "cname": "glDeleteTransformFeedbacks", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "ids", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGenTransformFeedbacks", + "cname": "glGenTransformFeedbacks", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "ids", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glIsTransformFeedback", + "cname": "glIsTransformFeedback", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "id", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glPauseTransformFeedback", + "cname": "glPauseTransformFeedback", + "ret": { "name": "void", "tag": "v"}, + "args": [ + ] +}, +{ + "name": "glResumeTransformFeedback", + "cname": "glResumeTransformFeedback", + "ret": { "name": "void", "tag": "v"}, + "args": [ + ] +}, +{ + "name": "glGetProgramBinary", + "cname": "glGetProgramBinary", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "binaryFormat", + "type": {"name": "GLenum *", "tag": "p"}, + "len": {"components":1}}, + {"name": "binary", + "type": {"name": "void *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glProgramBinary", + "cname": "glProgramBinary", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "binaryFormat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "binary", + "type": {"name": "const void *", "tag": "p"}, + "len": {"count": "length"}}, + {"name": "length", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glProgramParameteri", + "cname": "glProgramParameteri", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "value", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glInvalidateFramebuffer", + "cname": "glInvalidateFramebuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "numAttachments", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "attachments", + "type": {"name": "const GLenum *", "tag": "p"}, + "len": {"count": "numAttachments"}} + ] +}, +{ + "name": "glInvalidateSubFramebuffer", + "cname": "glInvalidateSubFramebuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "numAttachments", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "attachments", + "type": {"name": "const GLenum *", "tag": "p"}, + "len": {"count": "numAttachments"}}, + {"name": "x", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "y", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glTexStorage2D", + "cname": "glTexStorage2D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "levels", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glTexStorage3D", + "cname": "glTexStorage3D", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "levels", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "depth", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glGetInternalformativ", + "cname": "glGetInternalformativ", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glDispatchCompute", + "cname": "glDispatchCompute", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "num_groups_x", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "num_groups_y", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "num_groups_z", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDispatchComputeIndirect", + "cname": "glDispatchComputeIndirect", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "indirect", + "type": {"name": "GLintptr", "tag": "I"}} + ] +}, +{ + "name": "glDrawArraysIndirect", + "cname": "glDrawArraysIndirect", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "indirect", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glDrawElementsIndirect", + "cname": "glDrawElementsIndirect", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "mode", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "indirect", + "type": {"name": "const void *", "tag": "p"}} + ] +}, +{ + "name": "glFramebufferParameteri", + "cname": "glFramebufferParameteri", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "param", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glGetFramebufferParameteriv", + "cname": "glGetFramebufferParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetProgramInterfaceiv", + "cname": "glGetProgramInterfaceiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "programInterface", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetProgramResourceIndex", + "cname": "glGetProgramResourceIndex", + "ret": { "name": "GLuint", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "programInterface", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "name", + "type": {"name": "const GLchar *", "tag": "p"}} + ] +}, +{ + "name": "glGetProgramResourceName", + "cname": "glGetProgramResourceName", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "programInterface", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "name", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glGetProgramResourceiv", + "cname": "glGetProgramResourceiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "programInterface", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "propCount", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "props", + "type": {"name": "const GLenum *", "tag": "p"}, + "len": {"count": "propCount"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glGetProgramResourceLocation", + "cname": "glGetProgramResourceLocation", + "ret": { "name": "GLint", "tag": "i"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "programInterface", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "name", + "type": {"name": "const GLchar *", "tag": "p"}} + ] +}, +{ + "name": "glUseProgramStages", + "cname": "glUseProgramStages", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "stages", + "type": {"name": "GLbitfield", "tag": "i"}}, + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glActiveShaderProgram", + "cname": "glActiveShaderProgram", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glCreateShaderProgramv", + "cname": "glCreateShaderProgramv", + "ret": { "name": "GLuint", "tag": "i"}, + "args": [ + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "strings", + "type": {"name": "const GLchar *const*", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glBindProgramPipeline", + "cname": "glBindProgramPipeline", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glDeleteProgramPipelines", + "cname": "glDeleteProgramPipelines", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "pipelines", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glGenProgramPipelines", + "cname": "glGenProgramPipelines", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "n", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "pipelines", + "type": {"name": "GLuint *", "tag": "p"}, + "len": {"count": "n"}} + ] +}, +{ + "name": "glIsProgramPipeline", + "cname": "glIsProgramPipeline", + "ret": { "name": "GLboolean", "tag": "i"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glGetProgramPipelineiv", + "cname": "glGetProgramPipelineiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glProgramUniform1i", + "cname": "glProgramUniform1i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform2i", + "cname": "glProgramUniform2i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform3i", + "cname": "glProgramUniform3i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform4i", + "cname": "glProgramUniform4i", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v3", + "type": {"name": "GLint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform1ui", + "cname": "glProgramUniform1ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform2ui", + "cname": "glProgramUniform2ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform3ui", + "cname": "glProgramUniform3ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform4ui", + "cname": "glProgramUniform4ui", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v1", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v2", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "v3", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glProgramUniform1f", + "cname": "glProgramUniform1f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glProgramUniform2f", + "cname": "glProgramUniform2f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v1", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glProgramUniform3f", + "cname": "glProgramUniform3f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v1", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v2", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glProgramUniform4f", + "cname": "glProgramUniform4f", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "v0", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v1", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v2", + "type": {"name": "GLfloat", "tag": "f"}}, + {"name": "v3", + "type": {"name": "GLfloat", "tag": "f"}} + ] +}, +{ + "name": "glProgramUniform1iv", + "cname": "glProgramUniform1iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glProgramUniform2iv", + "cname": "glProgramUniform2iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "2"}} + ] +}, +{ + "name": "glProgramUniform3iv", + "cname": "glProgramUniform3iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "3"}} + ] +}, +{ + "name": "glProgramUniform4iv", + "cname": "glProgramUniform4iv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLint *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glProgramUniform1uiv", + "cname": "glProgramUniform1uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glProgramUniform2uiv", + "cname": "glProgramUniform2uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "2"}} + ] +}, +{ + "name": "glProgramUniform3uiv", + "cname": "glProgramUniform3uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "3"}} + ] +}, +{ + "name": "glProgramUniform4uiv", + "cname": "glProgramUniform4uiv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLuint *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glProgramUniform1fv", + "cname": "glProgramUniform1fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count"}} + ] +}, +{ + "name": "glProgramUniform2fv", + "cname": "glProgramUniform2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "2"}} + ] +}, +{ + "name": "glProgramUniform3fv", + "cname": "glProgramUniform3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "3"}} + ] +}, +{ + "name": "glProgramUniform4fv", + "cname": "glProgramUniform4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glProgramUniformMatrix2fv", + "cname": "glProgramUniformMatrix2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "4"}} + ] +}, +{ + "name": "glProgramUniformMatrix3fv", + "cname": "glProgramUniformMatrix3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "9"}} + ] +}, +{ + "name": "glProgramUniformMatrix4fv", + "cname": "glProgramUniformMatrix4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "16"}} + ] +}, +{ + "name": "glProgramUniformMatrix2x3fv", + "cname": "glProgramUniformMatrix2x3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "6"}} + ] +}, +{ + "name": "glProgramUniformMatrix3x2fv", + "cname": "glProgramUniformMatrix3x2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "6"}} + ] +}, +{ + "name": "glProgramUniformMatrix2x4fv", + "cname": "glProgramUniformMatrix2x4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "8"}} + ] +}, +{ + "name": "glProgramUniformMatrix4x2fv", + "cname": "glProgramUniformMatrix4x2fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "8"}} + ] +}, +{ + "name": "glProgramUniformMatrix3x4fv", + "cname": "glProgramUniformMatrix3x4fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "12"}} + ] +}, +{ + "name": "glProgramUniformMatrix4x3fv", + "cname": "glProgramUniformMatrix4x3fv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "program", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "location", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "count", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "transpose", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "value", + "type": {"name": "const GLfloat *", "tag": "p"}, + "len": {"count": "count", "components": "12"}} + ] +}, +{ + "name": "glValidateProgramPipeline", + "cname": "glValidateProgramPipeline", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glGetProgramPipelineInfoLog", + "cname": "glGetProgramPipelineInfoLog", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pipeline", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bufSize", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "length", + "type": {"name": "GLsizei *", "tag": "p"}, + "len": {"components":1}}, + {"name": "infoLog", + "type": {"name": "GLchar *", "tag": "p"}, + "len": {"count": "bufSize"}} + ] +}, +{ + "name": "glBindImageTexture", + "cname": "glBindImageTexture", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "unit", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "texture", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "layered", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "layer", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "access", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "format", + "type": {"name": "GLenum", "tag": "i"}} + ] +}, +{ + "name": "glGetBooleani_v", + "cname": "glGetBooleani_v", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "data", + "type": {"name": "GLboolean *", "tag": "p"}} + ] +}, +{ + "name": "glMemoryBarrier", + "cname": "glMemoryBarrier", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "barriers", + "type": {"name": "GLbitfield", "tag": "i"}} + ] +}, +{ + "name": "glMemoryBarrierByRegion", + "cname": "glMemoryBarrierByRegion", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "barriers", + "type": {"name": "GLbitfield", "tag": "i"}} + ] +}, +{ + "name": "glTexStorage2DMultisample", + "cname": "glTexStorage2DMultisample", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "samples", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "internalformat", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "width", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "height", + "type": {"name": "GLsizei", "tag": "i"}}, + {"name": "fixedsamplelocations", + "type": {"name": "GLboolean", "tag": "i"}} + ] +}, +{ + "name": "glGetMultisamplefv", + "cname": "glGetMultisamplefv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "index", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "val", + "type": {"name": "GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glSampleMaski", + "cname": "glSampleMaski", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "maskNumber", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "mask", + "type": {"name": "GLbitfield", "tag": "i"}} + ] +}, +{ + "name": "glGetTexLevelParameteriv", + "cname": "glGetTexLevelParameteriv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLint *", "tag": "p"}} + ] +}, +{ + "name": "glGetTexLevelParameterfv", + "cname": "glGetTexLevelParameterfv", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "target", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "level", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "pname", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "params", + "type": {"name": "GLfloat *", "tag": "p"}} + ] +}, +{ + "name": "glBindVertexBuffer", + "cname": "glBindVertexBuffer", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "bindingindex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "buffer", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "offset", + "type": {"name": "GLintptr", "tag": "I"}}, + {"name": "stride", + "type": {"name": "GLsizei", "tag": "i"}} + ] +}, +{ + "name": "glVertexAttribFormat", + "cname": "glVertexAttribFormat", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "attribindex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "size", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "normalized", + "type": {"name": "GLboolean", "tag": "i"}}, + {"name": "relativeoffset", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glVertexAttribIFormat", + "cname": "glVertexAttribIFormat", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "attribindex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "size", + "type": {"name": "GLint", "tag": "i"}}, + {"name": "type", + "type": {"name": "GLenum", "tag": "i"}}, + {"name": "relativeoffset", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glVertexAttribBinding", + "cname": "glVertexAttribBinding", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "attribindex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "bindingindex", + "type": {"name": "GLuint", "tag": "i"}} + ] +}, +{ + "name": "glVertexBindingDivisor", + "cname": "glVertexBindingDivisor", + "ret": { "name": "void", "tag": "v"}, + "args": [ + {"name": "bindingindex", + "type": {"name": "GLuint", "tag": "i"}}, + {"name": "divisor", + "type": {"name": "GLuint", "tag": "i"}} + ] } -] +] \ No newline at end of file diff --git a/src/manual_gles_api.c b/src/gles_api_bind_manual.c similarity index 100% rename from src/manual_gles_api.c rename to src/gles_api_bind_manual.c diff --git a/src/main.c b/src/main.c index afcbce4..ab1c904 100644 --- a/src/main.c +++ b/src/main.c @@ -170,11 +170,38 @@ void orca_log(log_level level, msg); } -mg_surface orca_surface_main(void) +mg_surface orca_surface_canvas(void) { return(__orcaApp.surface); } +typedef struct orca_surface_create_data +{ + mp_window window; + mg_surface_api api; + mg_surface surface; + +} orca_surface_create_data; + +i32 orca_surface_gles_callback(void* user) +{ + orca_surface_create_data* data = (orca_surface_create_data*)user; + data->surface = mg_surface_create_for_window(data->window, data->api); + return(0); +} + +mg_surface orca_surface_gles(void) +{ + orca_surface_create_data data = { + .surface = mg_surface_nil(), + .window = __orcaApp.window, + .api = MG_GLES + }; + + mp_dispatch_on_main_thread_sync(orca_surface_gles_callback, (void*)&data); + return(data.surface); +} + void orca_surface_render_commands(mg_surface surface, mg_color clearColor, u32 primitiveCount, @@ -303,7 +330,7 @@ void orca_runtime_init(orca_runtime* runtime) #include"io_api_bind_gen.c" #include"gles_api_bind_gen.c" -#include"manual_gles_api.c" +#include"gles_api_bind_manual.c" i32 orca_runloop(void* user) { @@ -765,6 +792,7 @@ int main(int argc, char** argv) app->canvas = mg_canvas_create(); mg_surface_swap_interval(app->surface, 1); + app->debugOverlay.show = false; app->debugOverlay.surface = mg_surface_create_for_window(app->window, MG_CANVAS); app->debugOverlay.canvas = mg_canvas_create();