VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_simpleget.py@ 18255

Last change on this file since 18255 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: 1.1 KB
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 "cr_spu.h"
14#include "chromium.h"
15#include "cr_error.h"
16#include "cr_mem.h"
17#include "cr_net.h"
18#include "server_dispatch.h"
19#include "server.h"
20"""
21
22from get_sizes import *;
23
24
25funcs = [ 'GetIntegerv', 'GetFloatv', 'GetDoublev', 'GetBooleanv' ]
26types = [ 'GLint', 'GLfloat', 'GLdouble', 'GLboolean' ]
27
28for index in range(len(funcs)):
29 func_name = funcs[index]
30 params = apiutil.Parameters(func_name)
31 print 'void SERVER_DISPATCH_APIENTRY crServerDispatch%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params))
32 print '{'
33 print '\t%s *get_values;' % types[index]
34 print '\tint tablesize = __numValues( pname ) * sizeof(%s);' % types[index]
35 print '\t(void) params;'
36 print '\tget_values = (%s *) crAlloc( tablesize );' % types[index]
37 print '\tcr_server.head_spu->dispatch_table.%s( pname, get_values );' % func_name
38 print '\tcrServerReturnValue( get_values, tablesize );'
39 print '\tcrFree(get_values);'
40 print '}\n'
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