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 |
|
---|
6 | import sys
|
---|
7 |
|
---|
8 | import apiutil
|
---|
9 |
|
---|
10 |
|
---|
11 | apiutil.CopyrightC()
|
---|
12 |
|
---|
13 | print """#include <stdio.h>
|
---|
14 | #include "cr_error.h"
|
---|
15 | #include "cr_string.h"
|
---|
16 | #include "cr_spu.h"
|
---|
17 | #include "passthroughspu.h"
|
---|
18 | """
|
---|
19 |
|
---|
20 | keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
|
---|
21 |
|
---|
22 |
|
---|
23 | print 'SPUNamedFunctionTable _cr_passthrough_table[%d];' % ( len(keys) + 1 )
|
---|
24 |
|
---|
25 | print """
|
---|
26 | static 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 |
|
---|
32 | void BuildPassthroughTable( SPU *child )
|
---|
33 | {"""
|
---|
34 |
|
---|
35 | for 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 )
|
---|
38 | print '\t__fillin( %3d, NULL, NULL );' % len(keys)
|
---|
39 | print '}'
|
---|
Note:
See
TracBrowser
for help on using the repository browser.