VirtualBox

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

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

Biggest check-in ever. New source code headers for all (C) innotek files.

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