VirtualBox

source: vbox/trunk/include/VBox/HostServices/VBoxOpenGLSvc.h@ 3341

Last change on this file since 3341 was 3341, checked in by vboxsync, 18 years ago

Export to OSE

File size: 3.9 KB
Line 
1/** @file
2 *
3 * OpenGL:
4 * Common header for host service and guest clients.
5 */
6
7/*
8 * Copyright (C) 2006-2007 innotek GmbH
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23#ifndef __VBOGLSVC__H
24#define __VBOGLSVC__H
25
26#include <VBox/types.h>
27#include <VBox/VBoxGuest.h>
28#include <VBox/hgcmsvc.h>
29
30/* OpenGL command buffer size */
31#define VBOX_OGL_MAX_CMD_BUFFER (64*1024)
32#define VBOX_OGL_CMD_ALIGN 4
33#define VBOX_OGL_CMD_ALIGN_MASK (VBOX_OGL_CMD_ALIGN-1)
34#define VBOX_OGL_CMD_MAGIC 0x1234ABCD
35
36/* for debugging */
37#define VBOX_OGL_CMD_STRICT
38
39/* OpenGL command block */
40typedef struct
41{
42#ifdef VBOX_OGL_CMD_STRICT
43 uint32_t Magic;
44#endif
45 uint32_t enmOp;
46 uint32_t cbCmd;
47 uint32_t cParams;
48 /* start of variable size parameter array */
49} VBOX_OGL_CMD, *PVBOX_OGL_CMD;
50
51typedef struct
52{
53#ifdef VBOX_OGL_CMD_STRICT
54 uint32_t Magic;
55#endif
56 uint32_t cbParam;
57 /* start of variable size parameter */
58} VBOX_OGL_VAR_PARAM, *PVBOX_OGL_VAR_PARAM;
59
60/** OpenGL Folders service functions. (guest)
61 * @{
62 */
63
64/** Query mappings changes. */
65#define VBOXOGL_FN_GLGETSTRING (1)
66#define VBOXOGL_FN_GLFLUSH (2)
67#define VBOXOGL_FN_GLFLUSHPTR (3)
68
69/** @} */
70
71/** Function parameter structures.
72 * @{
73 */
74
75/**
76 * VBOXOGL_FN_GLGETSTRING
77 */
78
79/** Parameters structure. */
80typedef struct
81{
82 VBoxGuestHGCMCallInfo hdr;
83
84 /** 32bit, in: name
85 * GLenum name parameter
86 */
87 HGCMFunctionParameter name;
88
89 /** pointer, in/out
90 * Buffer for requested string
91 */
92 HGCMFunctionParameter pString;
93} VBoxOGLglGetString;
94
95/** Number of parameters */
96#define VBOXOGL_CPARMS_GLGETSTRING (2)
97
98
99
100/**
101 * VBOXOGL_FN_GLFLUSH
102 */
103
104/** Parameters structure. */
105typedef struct
106{
107 VBoxGuestHGCMCallInfo hdr;
108
109 /** pointer, in
110 * Command buffer
111 */
112 HGCMFunctionParameter pCmdBuffer;
113
114 /** 32bit, out: cCommands
115 * Number of commands in the buffer
116 */
117 HGCMFunctionParameter cCommands;
118
119 /** 64bit, out: retval
120 * uint64_t return code of last command
121 */
122 HGCMFunctionParameter retval;
123
124 /** 32bit, out: lasterror
125 * GLenum current last error
126 */
127 HGCMFunctionParameter lasterror;
128
129} VBoxOGLglFlush;
130
131/** Number of parameters */
132#define VBOXOGL_CPARMS_GLFLUSH (4)
133
134/**
135 * VBOXOGL_FN_GLFLUSHPTR
136 */
137
138/** Parameters structure. */
139typedef struct
140{
141 VBoxGuestHGCMCallInfo hdr;
142
143 /** pointer, in
144 * Command buffer
145 */
146 HGCMFunctionParameter pCmdBuffer;
147
148 /** 32bit, out: cCommands
149 * Number of commands in the buffer
150 */
151 HGCMFunctionParameter cCommands;
152
153 /** pointer, in
154 * Last command's final parameter memory block
155 */
156 HGCMFunctionParameter pLastParam;
157
158 /** 64bit, out: retval
159 * uint64_t return code of last command
160 */
161 HGCMFunctionParameter retval;
162
163 /** 32bit, out: lasterror
164 * GLenum current last error
165 */
166 HGCMFunctionParameter lasterror;
167
168} VBoxOGLglFlushPtr;
169
170/** Number of parameters */
171#define VBOXOGL_CPARMS_GLFLUSHPTR (5)
172
173/** @} */
174
175
176#endif /* __VBOGLSVC__H */
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