VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_currentheader.py@ 40640

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

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.5 KB
 
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# This script generates the include/state/cr_currentpointers.h file.
7
8import sys
9sys.path.append( "../glapi_parser" )
10import apiutil
11
12from pack_currenttypes import *
13
14apiutil.CopyrightC()
15
16print """
17/* DO NOT EDIT - THIS FILE GENERATED BY THE pack_currentheader.py SCRIPT */
18
19#ifndef CR_CURRENT_H
20#define CR_CURRENT_H
21
22#include "state/cr_limits.h"
23"""
24
25for k in current_fns.keys():
26 name = k.lower();
27 print "typedef struct {"
28 if current_fns[k].has_key( 'array' ):
29 print "\tconst unsigned char *ptr[%s];" % current_fns[k]['array']
30 else:
31 print "\tconst unsigned char *ptr;"
32 for type in current_fns[k]['types']:
33 for size in current_fns[k]['sizes']:
34 if current_fns[k].has_key( 'array' ):
35 print "\tconst unsigned char *%s%d[%s];" % (type, size, current_fns[k]['array'])
36 else:
37 print "\tconst unsigned char *%s%d;" % (type, size)
38 print "} GL%s_p;\n" % name
39
40print "typedef struct attrs {"
41for k in current_fns.keys():
42 name = k.lower()
43 field = '%s%s' % (k[:1].lower(),k[1:])
44 print "\tGL%s_p %s;" % (name,field)
45print " } CRCurrentStateAttr;"
46
47
48print "typedef struct {"
49print """
50 CRCurrentStateAttr c;
51 unsigned char *vtx_op;
52 unsigned char *vtx_data;
53 unsigned char *begin_op;
54 unsigned char *begin_data;
55 unsigned int vtx_count;
56 unsigned int vtx_max;
57 unsigned int vtx_count_begin;
58 unsigned int attribsUsedMask;
59
60} CRCurrentStatePointers;
61
62#endif /* CR_CURRENT_H */
63"""
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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