VirtualBox

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

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

bugfix

File size: 4.4 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 uint32_t ulLastError;
41
42 bool fHasLastError;
43
44 uint8_t *pLastParam;
45 uint32_t cbLastParam;
46
47#ifdef VBOX_OGL_DEBUG_WINDOW_OUTPUT
48 HWND hwnd;
49 HDC hdc;
50#endif
51} VBOXOGLCTX, *PVBOXOGLCTX;
52
53
54#ifndef __WIN__
55
56typedef uint32_t DWORD;
57typedef uint16_t WORD;
58typedef uint8_t BYTE;
59typedef BYTE BOOL;
60typedef RTGCUINTPTR HANDLE;
61typedef HANDLE HDC;
62typedef HANDLE HGLRC;
63typedef uint32_t UINT;
64typedef uint32_t COLORREF;
65typedef void VOID;
66typedef void * LPVOID;
67typedef int16_t SHORT;
68typedef uint16_t USHORT;
69typedef int64_t INT64;
70typedef int32_t INT32;
71typedef float FLOAT; /* ??? */
72
73#define DECLARE_HANDLE(a) typedef HANDLE a
74#define WINAPI
75
76typedef struct
77{
78 WORD nSize;
79 WORD nVersion;
80 DWORD dwFlags;
81 BYTE iPixelType;
82 BYTE cColorBits;
83 BYTE cRedBits;
84 BYTE cRedShift;
85 BYTE cGreenBits;
86 BYTE cGreenShift;
87 BYTE cBlueBits;
88 BYTE cBlueShift;
89 BYTE cAlphaBits;
90 BYTE cAlphaShift;
91 BYTE cAccumBits;
92 BYTE cAccumRedBits;
93 BYTE cAccumGreenBits;
94 BYTE cAccumBlueBits;
95 BYTE cAccumAlphaBits;
96 BYTE cDepthBits;
97 BYTE cStencilBits;
98 BYTE cAuxBuffers;
99 BYTE iLayerType;
100 BYTE bReserved;
101 DWORD dwLayerMask;
102 DWORD dwVisibleMask;
103 DWORD dwDamageMask;
104} PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
105
106typedef struct
107{
108 WORD nSize;
109 WORD nVersion;
110 DWORD dwFlags;
111 BYTE iPixelType;
112 BYTE cColorBits;
113 BYTE cRedBits;
114 BYTE cRedShift;
115 BYTE cGreenBits;
116 BYTE cGreenShift;
117 BYTE cBlueBits;
118 BYTE cBlueShift;
119 BYTE cAlphaBits;
120 BYTE cAlphaShift;
121 BYTE cAccumBits;
122 BYTE cAccumRedBits;
123 BYTE cAccumGreenBits;
124 BYTE cAccumBlueBits;
125 BYTE cAccumAlphaBits;
126 BYTE cDepthBits;
127 BYTE cStencilBits;
128 BYTE cAuxBuffers;
129 BYTE iLayerPlane;
130 BYTE bReserved;
131 COLORREF crTransparent;
132} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, LPLAYERPLANEDESCRIPTOR;
133
134#endif
135
136void vboxglDrvReleaseContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
137void vboxglDrvCreateContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
138void vboxglDrvDeleteContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
139void vboxglDrvCopyContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
140void vboxglDrvSetContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
141void vboxglDrvCreateLayerContext(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
142void vboxglDrvShareLists(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
143void vboxglDrvDescribeLayerPlane(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
144void vboxglDrvSetLayerPaletteEntries(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
145void vboxglDrvGetLayerPaletteEntries(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
146void vboxglDrvRealizeLayerPalette(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
147void vboxglDrvSwapLayerBuffers(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
148void vboxglDrvDescribePixelFormat(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
149void vboxglDrvSetPixelFormat(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
150void vboxglDrvSwapBuffers(VBOXOGLCTX *pClient, uint8_t *pCmdBuffer);
151
152
153RTUINTPTR vboxDrvIsExtensionAvailable(char *pszExtFunctionName);
154
155#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