VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/dlm/dlm_calllist.c@ 56566

Last change on this file since 56566 was 56566, checked in by vboxsync, 10 years ago

Host 3D: Expando SPU, DLM module.

  • DLM module reworked. Now it uses hardware way in order to execute Display List (software approach dropped);
  • Chromium/utils slightly extended with more helper functions needed for Expando/DLM;
  • More testing needed especially for glCallLists() and glListBase();
  • Expando/DLM code now enabed for Mac hosts.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: dlm_calllist.c 56566 2015-06-20 08:10:59Z vboxsync $ */
2#if 0
3
4#include <stdio.h>
5#include "cr_spu.h"
6#include "cr_dlm.h"
7#include "cr_mem.h"
8#include "cr_error.h"
9#include "dlm.h"
10#include <VBox/VBoxUhgsmi.h>
11/* The headers and structures are still auto-generated */
12#include "dlm_generated.h"
13
14/* The CallList functions have a special implementation. They aren't commonly
15 * listed as state-changers, but they can cause state to change.
16 */
17
18static void DLM_APIENTRY executeCallList(DLMInstanceList *x, SPUDispatchTable *dispatchTable)
19{
20 struct instanceCallList *instance = (struct instanceCallList *)x;
21 dispatchTable->CallList(instance->list);
22}
23void DLM_APIENTRY crDLMCompileCallList( GLuint list )
24{
25 struct instanceCallList *instance;
26 instance = crCalloc(sizeof(struct instanceCallList));
27 if (!instance) {
28 crdlm_error(__LINE__, __FILE__, GL_OUT_OF_MEMORY,
29 "out of memory adding CallList to display list");
30 return;
31 }
32 /* Put in the parameters */
33 instance->list = list;
34
35 /* Add to the display list correctly */
36 crdlm_add_to_list((DLMInstanceList *)instance, executeCallList);
37}
38
39/*** CallLists ***/
40static void DLM_APIENTRY executeCallLists(DLMInstanceList *x, SPUDispatchTable *dispatchTable)
41{
42 struct instanceCallLists *instance = (struct instanceCallLists *)x;
43 dispatchTable->CallLists(instance->n, instance->type, instance->lists);
44}
45void DLM_APIENTRY crDLMCompileCallLists( GLsizei n, GLenum type, const GLvoid * lists )
46{
47 struct instanceCallLists *instance;
48 instance = crCalloc(sizeof(struct instanceCallLists) + crdlm_pointers_CallLists(NULL, n, type, lists));
49 if (!instance) {
50 crdlm_error(__LINE__, __FILE__, GL_OUT_OF_MEMORY,
51 "out of memory adding CallLists to display list");
52 return;
53 }
54 instance->n = n;
55 instance->type = type;
56 if (lists == NULL) {
57 instance->lists = NULL;
58 }
59 else {
60 instance->lists = instance->listsData;
61 }
62 (void) crdlm_pointers_CallLists(instance, n, type, lists);
63
64 crdlm_add_to_list((DLMInstanceList *)instance, executeCallLists);
65}
66
67#endif
Note: See TracBrowser for help on using the repository browser.

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