VirtualBox

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

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

VBox_hdr_h -> _VBox_hdr_h

File size: 4.3 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 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef ___VBox_HostService_VBoxOpenGLSvc_h
23#define ___VBox_HostService_VBoxOpenGLSvc_h
24
25#include <VBox/types.h>
26#include <VBox/VBoxGuest.h>
27#include <VBox/hgcmsvc.h>
28
29/* OpenGL command buffer size */
30#define VBOX_OGL_MAX_CMD_BUFFER (128*1024)
31#define VBOX_OGL_CMD_ALIGN 4
32#define VBOX_OGL_CMD_ALIGN_MASK (VBOX_OGL_CMD_ALIGN-1)
33#define VBOX_OGL_CMD_MAGIC 0x1234ABCD
34
35/* for debugging */
36#define VBOX_OGL_CMD_STRICT
37
38/* OpenGL command block */
39typedef struct
40{
41#ifdef VBOX_OGL_CMD_STRICT
42 uint32_t Magic;
43#endif
44 uint32_t enmOp;
45 uint32_t cbCmd;
46 uint32_t cParams;
47 /* start of variable size parameter array */
48} VBOX_OGL_CMD, *PVBOX_OGL_CMD;
49
50typedef struct
51{
52#ifdef VBOX_OGL_CMD_STRICT
53 uint32_t Magic;
54#endif
55 uint32_t cbParam;
56 /* start of variable size parameter */
57} VBOX_OGL_VAR_PARAM, *PVBOX_OGL_VAR_PARAM;
58
59/** OpenGL Folders service functions. (guest)
60 * @{
61 */
62
63/** Query mappings changes. */
64#define VBOXOGL_FN_GLGETSTRING (1)
65#define VBOXOGL_FN_GLFLUSH (2)
66#define VBOXOGL_FN_GLFLUSHPTR (3)
67#define VBOXOGL_FN_GLCHECKEXT (4)
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 * VBOXOGL_FN_GLCHECKEXT
176 */
177
178/** Parameters structure. */
179typedef struct
180{
181 VBoxGuestHGCMCallInfo hdr;
182
183 /** pointer, in
184 * Extension function name
185 */
186 HGCMFunctionParameter pszExtFnName;
187
188} VBoxOGLglCheckExt;
189
190/** Number of parameters */
191#define VBOXOGL_CPARMS_GLCHECKEXT (1)
192
193/** @} */
194
195
196#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