VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/gldrv.h@ 3338

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

Export HostServices

File size: 4.0 KB
Line 
1/** @file
2 *
3 * VBox OpenGL windows helper functions
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 __VBOXGLWIN__H
23#define __VBOXGLWIN__H
24
25#include <iprt/types.h>
26
27#ifdef __WIN__
28#define VBOX_OGL_DEBUG_WINDOW_OUTPUT
29#endif
30
31#ifdef VBOX_OGL_DEBUG_WINDOW_OUTPUT
32#define VBOX_OGL_GUEST_TO_HOST_HDC(a) pClient->hdc
33#else
34#define VBOX_OGL_GUEST_TO_HOST_HDC(a) a
35#endif
36
37typedef struct
38{
39 uint64_t lastretval;
40
41 uint8_t *pLastParam;
42 uint32_t cbLastParam;
43
44#ifdef VBOX_OGL_DEBUG_WINDOW_OUTPUT
45 HWND hwnd;
46 HDC hdc;
47#endif
48} VBOXOGLCTX, *PVBOXOGLCTX;
49
50
51#ifndef __WIN__
52typedef uint32_t DWORD;
53typedef uint16_t WORD;
54typedef uint8_t BYTE;
55typedef BYTE BOOL;
56typedef RTGCUINTPTR HANDLE;
57typedef HANDLE HDC;
58typedef HANDLE HGLRC;
59typedef uint32_t UINT;
60typedef uint32_t COLORREF;
61
62typedef struct
63{
64 WORD nSize;
65 WORD nVersion;
66 DWORD dwFlags;
67 BYTE iPixelType;
68 BYTE cColorBits;
69 BYTE cRedBits;
70 BYTE cRedShift;
71 BYTE cGreenBits;
72 BYTE cGreenShift;
73 BYTE cBlueBits;
74 BYTE cBlueShift;
75 BYTE cAlphaBits;
76 BYTE cAlphaShift;
77 BYTE cAccumBits;
78 BYTE cAccumRedBits;
79 BYTE cAccumGreenBits;
80 BYTE cAccumBlueBits;
81 BYTE cAccumAlphaBits;
82 BYTE cDepthBits;
83 BYTE cStencilBits;
84 BYTE cAuxBuffers;
85 BYTE iLayerType;
86 BYTE bReserved;
87 DWORD dwLayerMask;
88 DWORD dwVisibleMask;
89 DWORD dwDamageMask;
90} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
91
92typedef struct
93{
94 WORD nSize;
95 WORD nVersion;
96 DWORD dwFlags;
97 BYTE iPixelType;
98 BYTE cColorBits;
99 BYTE cRedBits;
100 BYTE cRedShift;
101 BYTE cGreenBits;
102 BYTE cGreenShift;
103 BYTE cBlueBits;
104 BYTE cBlueShift;
105 BYTE cAlphaBits;
106 BYTE cAlphaShift;
107 BYTE cAccumBits;
108 BYTE cAccumRedBits;
109 BYTE cAccumGreenBits;
110 BYTE cAccumBlueBits;
111 BYTE cAccumAlphaBits;
112 BYTE cDepthBits;
113 BYTE cStencilBits;
114 BYTE cAuxBuffers;
115 BYTE iLayerPlane;
116 BYTE bReserved;
117 COLORREF crTransparent;
118} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, LPLAYERPLANEDESCRIPTOR;
119
120#endif
121
122void vboxglDrvReleaseContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
123void vboxglDrvCreateContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
124void vboxglDrvDeleteContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
125void vboxglDrvCopyContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
126void vboxglDrvSetContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
127void vboxglDrvCreateLayerContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
128void vboxglDrvShareLists(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
129void vboxglDrvDescribeLayerPlane(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
130void vboxglDrvSetLayerPaletteEntries(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
131void vboxglDrvGetLayerPaletteEntries(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
132void vboxglDrvRealizeLayerPalette(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
133void vboxglDrvSwapLayerBuffers(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
134void vboxglDrvDescribePixelFormat(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
135void vboxglDrvSetPixelFormat(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
136void vboxglDrvSwapBuffers(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
137
138#endif /* __VBOXGLWIN__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