Changeset 16073 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jan 20, 2009 9:59:13 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/array/arrayspu_init.c
r15532 r16073 14 14 15 15 static SPUFunctions array_functions = { 16 17 18 16 NULL, /* CHILD COPY */ 17 NULL, /* DATA */ 18 _cr_array_table /* THE ACTUAL FUNCTIONS */ 19 19 }; 20 20 21 21 static SPUFunctions *arraySPUInit( int id, SPU *child, SPU *self, 22 23 22 unsigned int context_id, 23 unsigned int num_contexts ) 24 24 { 25 25 26 27 26 (void) context_id; 27 (void) num_contexts; 28 28 29 30 31 32 33 34 35 36 37 38 39 29 array_spu.id = id; 30 array_spu.has_child = 0; 31 if (child) 32 { 33 crSPUInitDispatchTable( &(array_spu.child) ); 34 crSPUCopyDispatchTable( &(array_spu.child), &(child->dispatch_table) ); 35 array_spu.has_child = 1; 36 } 37 crSPUInitDispatchTable( &(array_spu.super) ); 38 crSPUCopyDispatchTable( &(array_spu.super), &(self->superSPU->dispatch_table) ); 39 arrayspuSetVBoxConfiguration(); 40 40 41 42 41 crStateInit(); 42 array_spu.ctx = crStateCreateContext( NULL, 0, NULL ); 43 43 #ifdef CR_ARB_vertex_buffer_object 44 44 array_spu.ctx->bufferobject.retainBufferData = GL_TRUE; 45 45 #endif 46 47 48 46 /* we call SetCurrent instead of MakeCurrent as the differencer 47 * isn't setup yet anyway */ 48 crStateSetCurrent( array_spu.ctx ); 49 49 50 50 return &array_functions; 51 51 } 52 52 53 53 static void arraySPUSelfDispatch(SPUDispatchTable *self) 54 54 { 55 56 55 crSPUInitDispatchTable( &(array_spu.self) ); 56 crSPUCopyDispatchTable( &(array_spu.self), self ); 57 57 } 58 58 59 59 static int arraySPUCleanup(void) 60 60 { 61 61 return 1; 62 62 } 63 63 64 64 int SPULoad( char **name, char **super, SPUInitFuncPtr *init, 65 66 65 SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup, 66 SPUOptionsPtr *options, int *flags ) 67 67 { 68 69 70 71 72 73 74 75 76 68 *name = "array"; 69 *super = "passthrough"; 70 *init = arraySPUInit; 71 *self = arraySPUSelfDispatch; 72 *cleanup = arraySPUCleanup; 73 *options = arraySPUOptions; 74 *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO); 75 76 return 1; 77 77 }
Note:
See TracChangeset
for help on using the changeset viewer.