VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/mesa-7.2/GL/glfbdev.h@ 68495

Last change on this file since 68495 was 64269, checked in by vboxsync, 8 years ago

bugref:3810: X11 Guest Additions maintenance: remove unnecessary parts of the Mesa 7.2 sources from the tree, leaving only public OpenGL header files. The reason we are not just switching to using the Mesa 11 headers is that they currently conflict with our API definitions in APIspec.txt including due to increased const-correctness.

File size: 4.2 KB
Line 
1/*
2 * Mesa 3-D graphics library
3 * Version: 6.5
4 *
5 * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26#ifndef GLFBDEV_H
27#define GLFBDEV_H
28
29
30/* avoid including linux/fb.h */
31struct fb_fix_screeninfo;
32struct fb_var_screeninfo;
33
34
35/* public types */
36typedef struct GLFBDevVisualRec *GLFBDevVisualPtr;
37typedef struct GLFBDevBufferRec *GLFBDevBufferPtr;
38typedef struct GLFBDevContextRec *GLFBDevContextPtr;
39
40
41/* API version */
42#define GLFBDEV_VERSION_1_0 1
43
44
45/* For glFBDevCreateVisual */
46#define GLFBDEV_DOUBLE_BUFFER 100
47#define GLFBDEV_COLOR_INDEX 101
48#define GLFBDEV_DEPTH_SIZE 102
49#define GLFBDEV_STENCIL_SIZE 103
50#define GLFBDEV_ACCUM_SIZE 104
51#define GLFBDEV_LEVEL 105
52#define GLFBDEV_MULTISAMPLE 106
53#define GLFBDEV_NONE 0
54
55/* For glFBDevGetString */
56#define GLFBDEV_VERSION 200
57#define GLFBDEV_VENDOR 201
58
59
60/* Misc functions */
61
62extern const char *
63glFBDevGetString( int str );
64
65
66typedef void (*GLFBDevProc)();
67
68
69extern GLFBDevProc
70glFBDevGetProcAddress( const char *procName );
71
72
73
74/**
75 * Create a GLFBDevVisual.
76 * \param fixInfo - needed to get the visual types, etc.
77 * \param varInfo - needed to get the bits_per_pixel, etc.
78 * \param attribs - for requesting depth, stencil, accum buffers, etc.
79 */
80extern GLFBDevVisualPtr
81glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo,
82 const struct fb_var_screeninfo *varInfo,
83 const int *attribs );
84
85extern void
86glFBDevDestroyVisual( GLFBDevVisualPtr visual );
87
88extern int
89glFBDevGetVisualAttrib( const GLFBDevVisualPtr visual, int attrib);
90
91
92
93/**
94 * Create a GLFBDevBuffer.
95 * \param fixInfo, varInfo - needed in order to get the screen size
96 * (resolution), etc.
97 * \param visual - as returned by glFBDevCreateVisual()
98 * \param frontBuffer - address of front color buffer
99 * \param backBuffer - address of back color buffer (may be NULL)
100 * \param size - size of the color buffer(s) in bytes.
101 */
102extern GLFBDevBufferPtr
103glFBDevCreateBuffer( const struct fb_fix_screeninfo *fixInfo,
104 const struct fb_var_screeninfo *varInfo,
105 const GLFBDevVisualPtr visual,
106 void *frontBuffer, void *backBuffer, size_t size );
107
108extern void
109glFBDevDestroyBuffer( GLFBDevBufferPtr buffer );
110
111extern int
112glFBDevGetBufferAttrib( const GLFBDevBufferPtr buffer, int attrib);
113
114extern GLFBDevBufferPtr
115glFBDevGetCurrentDrawBuffer( void );
116
117extern GLFBDevBufferPtr
118glFBDevGetCurrentReadBuffer( void );
119
120extern void
121glFBDevSwapBuffers( GLFBDevBufferPtr buffer );
122
123
124
125/**
126 * Create a GLFBDevContext.
127 * \param visual - as created by glFBDevCreateVisual.
128 * \param share - specifies another context with which to share textures,
129 * display lists, etc. (may be NULL).
130 */
131extern GLFBDevContextPtr
132glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share );
133
134extern void
135glFBDevDestroyContext( GLFBDevContextPtr context );
136
137extern int
138glFBDevGetContextAttrib( const GLFBDevContextPtr context, int attrib);
139
140extern GLFBDevContextPtr
141glFBDevGetCurrentContext( void );
142
143extern int
144glFBDevMakeCurrent( GLFBDevContextPtr context,
145 GLFBDevBufferPtr drawBuffer,
146 GLFBDevBufferPtr readBuffer );
147
148
149#endif /* GLFBDEV_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