VirtualBox

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

Last change on this file since 63205 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 930 bytes
Line 
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 '}'
Note: See TracBrowser for help on using the repository browser.

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