VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/passthrough/passthrough.py@ 51255

最後變更 在這個檔案從51255是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 930 位元組
 
1# Copyright (c) 2001, Stanford University
2# All rights reserved.
3#
4# See the file LICENSE.txt for information on redistributing this software.
5
6import sys
7
8import apiutil
9
10
11apiutil.CopyrightC()
12
13print """#include <stdio.h>
14#include "cr_error.h"
15#include "cr_string.h"
16#include "cr_spu.h"
17#include "passthroughspu.h"
18"""
19
20keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
21
22
23print 'SPUNamedFunctionTable _cr_passthrough_table[%d];' % ( len(keys) + 1 )
24
25print """
26static void __fillin( int offset, char *name, SPUGenericFunction func )
27{
28 _cr_passthrough_table[offset].name = crStrdup( name );
29 _cr_passthrough_table[offset].fn = func;
30}
31
32void BuildPassthroughTable( SPU *child )
33{"""
34
35for index in range(len(keys)):
36 func_name = keys[index]
37 print '\t__fillin( %3d, "%s", (SPUGenericFunction) child->dispatch_table.%s );' % (index, func_name, func_name )
38print '\t__fillin( %3d, NULL, NULL );' % len(keys)
39print '}'
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette