VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/feedback/feedback_state.py@ 78413

Last change on this file since 78413 was 78375, checked in by vboxsync, 6 years ago

Additions/common/crOpengl,GuestHost/OpenGL,HostServices/SharedOpenGL: Eliminate all global variables from the state tracker library (state_tracker) in preparation of the SPU DLL merging, bugref:9435

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 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
6from __future__ import print_function
7import sys
8
9import apiutil
10
11
12apiutil.CopyrightC()
13
14print("""
15#include "cr_server.h"
16#include "feedbackspu.h"
17#include "feedbackspu_proto.h"
18""")
19custom = ["CreateContext", "VBoxCreateContext", "MakeCurrent", "DestroyContext"]
20
21keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
22
23for func_name in keys:
24 if apiutil.FindSpecial( "feedback_state", func_name ):
25 if func_name in custom:
26 continue
27 return_type = apiutil.ReturnType(func_name)
28 params = apiutil.Parameters(func_name)
29 print('%s FEEDBACKSPU_APIENTRY feedbackspu_%s(%s)' % (return_type, func_name, apiutil.MakeDeclarationString(params)))
30 print('{')
31 if len(params) == 0:
32 print('\tcrState%s(&feedback_spu.StateTracker);' % (func_name,))
33 else:
34 print('\tcrState%s(&feedback_spu.StateTracker, %s);' % (func_name, apiutil.MakeCallString(params)))
35 print('')
36 print('\tfeedback_spu.super.%s(%s);' % (func_name, apiutil.MakeCallString(params)))
37 print('}')
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