diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:43:39 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:43:39 +0200 |
commit | f4092abdf94af6a99aff944d6264bc1284e8bdd4 (patch) | |
tree | 2ac1c9cc16ceb93edb2c4382c088dac5aeafdf0f /nx-X11/extras/Mesa/include/GL/glfbdev.h | |
parent | a840692edc9c6d19cd7c057f68e39c7d95eb767d (diff) | |
download | nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.gz nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.bz2 nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.zip |
Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1
Summary: Imported nx-X11-3.1.0-1.tar.gz
Keywords:
Imported nx-X11-3.1.0-1.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/extras/Mesa/include/GL/glfbdev.h')
-rw-r--r-- | nx-X11/extras/Mesa/include/GL/glfbdev.h | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/nx-X11/extras/Mesa/include/GL/glfbdev.h b/nx-X11/extras/Mesa/include/GL/glfbdev.h new file mode 100644 index 000000000..6af3ac314 --- /dev/null +++ b/nx-X11/extras/Mesa/include/GL/glfbdev.h @@ -0,0 +1,148 @@ +/* + * Mesa 3-D graphics library + * Version: 5.1 + * + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef GLFBDEV_H +#define GLFBDEV_H + + +/* avoid including linux/fb.h */ +struct fb_fix_screeninfo; +struct fb_var_screeninfo; + + +/* public types */ +typedef struct GLFBDevVisualRec *GLFBDevVisualPtr; +typedef struct GLFBDevBufferRec *GLFBDevBufferPtr; +typedef struct GLFBDevContextRec *GLFBDevContextPtr; + + +/* API version */ +#define GLFBDEV_VERSION_1_0 1 + + +/* For glFBDevCreateVisual */ +#define GLFBDEV_DOUBLE_BUFFER 100 +#define GLFBDEV_COLOR_INDEX 101 +#define GLFBDEV_DEPTH_SIZE 102 +#define GLFBDEV_STENCIL_SIZE 103 +#define GLFBDEV_ACCUM_SIZE 104 +#define GLFBDEV_LEVEL 105 +#define GLFBDEV_NONE 0 + +/* For glFBDevGetString */ +#define GLFBDEV_VERSION 200 +#define GLFBDEV_VENDOR 201 + + +/* Misc functions */ + +extern const char * +glFBDevGetString( int str ); + + +typedef void (*GLFBDevProc)(); + + +extern const GLFBDevProc +glFBDevGetProcAddress( const char *procName ); + + + +/** + * Create a GLFBDevVisual. + * \param fixInfo - needed to get the visual types, etc. + * \param varInfo - needed to get the bits_per_pixel, etc. + * \param attribs - for requesting depth, stencil, accum buffers, etc. + */ +extern GLFBDevVisualPtr +glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo, + const struct fb_var_screeninfo *varInfo, + const int *attribs ); + +extern void +glFBDevDestroyVisual( GLFBDevVisualPtr visual ); + +extern int +glFBDevGetVisualAttrib( const GLFBDevVisualPtr visual, int attrib); + + + +/** + * Create a GLFBDevBuffer. + * \param fixInfo, varInfo - needed in order to get the screen size + * (resolution), etc. + * \param visual - as returned by glFBDevCreateVisual() + * \param frontBuffer - address of front color buffer + * \param backBuffer - address of back color buffer (may be NULL) + * \param size - size of the color buffer(s) in bytes. + */ +extern GLFBDevBufferPtr +glFBDevCreateBuffer( const struct fb_fix_screeninfo *fixInfo, + const struct fb_var_screeninfo *varInfo, + const GLFBDevVisualPtr visual, + void *frontBuffer, void *backBuffer, size_t size ); + +extern void +glFBDevDestroyBuffer( GLFBDevBufferPtr buffer ); + +extern int +glFBDevGetBufferAttrib( const GLFBDevBufferPtr buffer, int attrib); + +extern GLFBDevBufferPtr +glFBDevGetCurrentDrawBuffer( void ); + +extern GLFBDevBufferPtr +glFBDevGetCurrentReadBuffer( void ); + +extern void +glFBDevSwapBuffers( GLFBDevBufferPtr buffer ); + + + +/** + * Create a GLFBDevContext. + * \param visual - as created by glFBDevCreateVisual. + * \param share - specifies another context with which to share textures, + * display lists, etc. (may be NULL). + */ +extern GLFBDevContextPtr +glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share ); + +extern void +glFBDevDestroyContext( GLFBDevContextPtr context ); + +extern int +glFBDevGetContextAttrib( const GLFBDevContextPtr context, int attrib); + +extern GLFBDevContextPtr +glFBDevGetCurrentContext( void ); + +extern int +glFBDevMakeCurrent( GLFBDevContextPtr context, + GLFBDevBufferPtr drawBuffer, + GLFBDevBufferPtr readBuffer ); + + +#endif /* GLFBDEV_H */ |