65ff6223922402207960fc01987ec06ea749e46f
[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())