Changeset 19099 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Apr 22, 2009 9:13:20 AM (16 years ago)
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk
r18885 r19099 398 398 feedback/feedbackspu_config.c \ 399 399 feedback/feedbackspu_init.c \ 400 feedback/feedback_context.c \ 400 401 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu.c \ 401 402 $(VBOX_PATH_CROGL_GENFILES)/feedbackspu_state.c -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedback_state.py
r17269 r19099 16 16 #include "feedbackspu_proto.h" 17 17 """ 18 custom = ["CreateContext", "MakeCurrent", "DestroyContext"] 18 19 19 20 keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt") 20 21 21 22 for func_name in keys: 22 if apiutil.FindSpecial( "feedback_state", func_name ): 23 return_type = apiutil.ReturnType(func_name) 24 params = apiutil.Parameters(func_name) 25 print '%s FEEDBACKSPU_APIENTRY feedbackspu_%s( %s )' % (return_type, func_name, apiutil.MakeDeclarationString(params)) 26 print '{' 27 print '\tcrState%s( %s );' % (func_name, apiutil.MakeCallString(params)) 28 print '' 29 print '\tfeedback_spu.super.%s( %s );' % (func_name, apiutil.MakeCallString(params)) 30 print '}' 23 if apiutil.FindSpecial( "feedback_state", func_name ): 24 if func_name in custom: 25 continue 26 return_type = apiutil.ReturnType(func_name) 27 params = apiutil.Parameters(func_name) 28 print '%s FEEDBACKSPU_APIENTRY feedbackspu_%s( %s )' % (return_type, func_name, apiutil.MakeDeclarationString(params)) 29 print '{' 30 print '\tcrState%s( %s );' % (func_name, apiutil.MakeCallString(params)) 31 print '' 32 print '\tfeedback_spu.super.%s( %s );' % (func_name, apiutil.MakeCallString(params)) 33 print '}' -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedback_state_special
r17269 r19099 59 59 RasterPos4s 60 60 RasterPos4sv 61 CreateContext 62 MakeCurrent 63 DestroyContext -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu.h
r17269 r19099 18 18 #include "cr_glstate.h" 19 19 20 typedef struct context_info_t ContextInfo; 21 22 struct context_info_t { 23 CRContext *clientState; /* used to store client-side GL state */ 24 GLint clientCtx; /* client context ID */ 25 }; 26 20 27 typedef struct { 21 28 int id; … … 28 35 29 36 CRCurrentStatePointers current; 37 38 CRContext *defaultctx; 39 int numContexts; 40 ContextInfo context[CR_MAX_CONTEXTS]; 41 42 #ifdef CHROMIUM_THREADSAFE 43 CRmutex mutex; 44 #endif 30 45 } feedbackSPU; 31 46 -
trunk/src/VBox/Additions/common/crOpenGL/feedback/feedbackspu_init.c
r17269 r19099 33 33 (void) num_contexts; 34 34 35 #ifdef CHROMIUM_THREADSAFE 36 crInitMutex(&feedback_spu.mutex); 37 #endif 38 35 39 feedback_spu.id = id; 36 40 feedback_spu.has_child = 0; … … 47 51 /* create/init default state tracker */ 48 52 crStateInit(); 49 ctx = crStateGetCurrent(); 50 CRASSERT(ctx); 51 crStateSetCurrentPointers(ctx, &feedback_spu.current); 53 54 feedback_spu.defaultctx = crStateCreateContext(NULL, 0, NULL); 55 crStateSetCurrent(feedback_spu.defaultctx); 56 57 feedback_spu.numContexts = 0; 58 crMemZero(feedback_spu.context, CR_MAX_CONTEXTS * sizeof(ContextInfo)); 52 59 53 60 return &feedback_functions;
Note:
See TracChangeset
for help on using the changeset viewer.