am a0e21bdc: Merge "Fix some dEQP GLES2 issues." into lmp-mr1-dev automerge: a0d087b
[platform/upstream/VK-GL-CTS.git] / scripts / opengl / gen_func_ptrs.py
1 # -*- coding: utf-8 -*-
2
3 from src_util import *
4
5 def commandTypedefDecl (command):
6         return "typedef GLW_APICALL %s\t(GLW_APIENTRY* %s)\t(%s);" % (
7                 command.type,
8                 getFunctionTypeName(command.name),
9                 commandParams(command))
10
11 def commandMemberDecl (command):
12         return "%s\t%s;" % (getFunctionTypeName(command.name),
13                                                 getFunctionMemberName(command.name))
14
15 def genFunctionPointers (iface):
16         genCommandList(iface, commandTypedefDecl, OPENGL_INC_DIR, "glwFunctionTypes.inl", True)
17         genCommandList(iface, commandMemberDecl, OPENGL_INC_DIR, "glwFunctions.inl", True)
18
19 if __name__ == "__main__":
20         genFunctionPointers(getHybridInterface())