VirtualBox

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

Last change on this file since 3473 was 3473, checked in by vboxsync, 17 years ago

Bugfix

File size: 4.3 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 (128*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#define VBOXOGL_FN_GLCHECKEXT (4)
69
70/** @} */
71
72/** Function parameter structures.
73 * @{
74 */
75
76/**
77 * VBOXOGL_FN_GLGETSTRING
78 */
79
80/** Parameters structure. */
81typedef struct
82{
83 VBoxGuestHGCMCallInfo hdr;
84
85 /** 32bit, in: name
86 * GLenum name parameter
87 */
88 HGCMFunctionParameter name;
89
90 /** pointer, in/out
91 * Buffer for requested string
92 */
93 HGCMFunctionParameter pString;
94} VBoxOGLglGetString;
95
96/** Number of parameters */
97#define VBOXOGL_CPARMS_GLGETSTRING (2)
98
99
100
101/**
102 * VBOXOGL_FN_GLFLUSH
103 */
104
105/** Parameters structure. */
106typedef struct
107{
108 VBoxGuestHGCMCallInfo hdr;
109
110 /** pointer, in
111 * Command buffer
112 */
113 HGCMFunctionParameter pCmdBuffer;
114
115 /** 32bit, out: cCommands
116 * Number of commands in the buffer
117 */
118 HGCMFunctionParameter cCommands;
119
120 /** 64bit, out: retval
121 * uint64_t return code of last command
122 */
123 HGCMFunctionParameter retval;
124
125 /** 32bit, out: lasterror
126 * GLenum current last error
127 */
128 HGCMFunctionParameter lasterror;
129
130} VBoxOGLglFlush;
131
132/** Number of parameters */
133#define VBOXOGL_CPARMS_GLFLUSH (4)
134
135/**
136 * VBOXOGL_FN_GLFLUSHPTR
137 */
138
139/** Parameters structure. */
140typedef struct
141{
142 VBoxGuestHGCMCallInfo hdr;
143
144 /** pointer, in
145 * Command buffer
146 */
147 HGCMFunctionParameter pCmdBuffer;
148
149 /** 32bit, out: cCommands
150 * Number of commands in the buffer
151 */
152 HGCMFunctionParameter cCommands;
153
154 /** pointer, in
155 * Last command's final parameter memory block
156 */
157 HGCMFunctionParameter pLastParam;
158
159 /** 64bit, out: retval
160 * uint64_t return code of last command
161 */
162 HGCMFunctionParameter retval;
163
164 /** 32bit, out: lasterror
165 * GLenum current last error
166 */
167 HGCMFunctionParameter lasterror;
168
169} VBoxOGLglFlushPtr;
170
171/** Number of parameters */
172#define VBOXOGL_CPARMS_GLFLUSHPTR (5)
173
174
175/**
176 * VBOXOGL_FN_GLCHECKEXT
177 */
178
179/** Parameters structure. */
180typedef struct
181{
182 VBoxGuestHGCMCallInfo hdr;
183
184 /** pointer, in
185 * Extension function name
186 */
187 HGCMFunctionParameter pszExtFnName;
188
189} VBoxOGLglCheckExt;
190
191/** Number of parameters */
192#define VBOXOGL_CPARMS_GLCHECKEXT (1)
193
194/** @} */
195
196
197#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