| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/GL/uglmesa.h
Go to the documentation of this file.

    00001 /* uglmesa.h - Public header UGL/Mesa */
    00002
    00003 /* Copyright (C) 2001 by Wind River Systems, Inc */
    00004
    00005 /*
    00006  * Mesa 3-D graphics library
    00007  * Version:  4.0
    00008  *
    00009  * The MIT License
    00010  * Permission is hereby granted, free of charge, to any person obtaining a
    00011  * copy of this software and associated documentation files (the "Software"),
    00012  * to deal in the Software without restriction, including without limitation
    00013  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    00014  * and/or sell copies of the Software, and to permit persons to whom the
    00015  * Software is furnished to do so, subject to the following conditions:
    00016  *
    00017  * The above copyright notice and this permission notice shall be included
    00018  * in all copies or substantial portions of the Software.
    00019  *
    00020  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    00021  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00022  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
    00023  * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00024  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    00025  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    00026  * DEALINGS IN THE SOFTWARE.
    00027  */
    00028
    00029 /*
    00030  * Author:
    00031  * Stephane Raimbault <stephane.raimbault@windriver.com>
    00032  */
    00033
    00034 #ifndef UGLMESA_H
    00035 #define UGLMESA_H
    00036
    00037 #ifdef __cplusplus
    00038 extern "C" {
    00039 #endif
    00040
    00041 #define UGL_MESA_MAJOR_VERSION 4
    00042 #define UGL_MESA_MINOR_VERSION 0
    00043
    00044 #include <GL/gl.h>
    00045 #include <ugl/ugl.h>
    00046
    00047 /*
    00048  * Values for display mode of uglMesaCreateContext ()
    00049  */
    00050
    00051 /*
    00052  * With these mask values, it's possible to test double buffer mode
    00053  * with UGL_MESA_DOUBLE mask
    00054  *
    00055  * SINGLE  0000 0001
    00056  * DOUBLE  0000 0110
    00057  * -  SOFT 0000 0010
    00058  * -  HARD 0000 0100
    00059  * WINDML  0001 0000
    00060  *
    00061  *
    00062  */
    00063 #define UGL_MESA_SINGLE            0x01
    00064 #define UGL_MESA_DOUBLE            0x06
    00065 #define UGL_MESA_DOUBLE_SOFTWARE   0x02
    00066 #define UGL_MESA_DOUBLE_HARDWARE   0x04
    00067
    00068 #define UGL_MESA_WINDML_EXCLUSIVE  0x10
    00069
    00070 #define UGL_MESA_FULLSCREEN_WIDTH  0x0
    00071 #define UGL_MESA_FULLSCREEN_HEIGHT 0x0
    00072
    00073 /*
    00074  * uglMesaPixelStore() parameters:
    00075  */
    00076
    00077 #define UGL_MESA_ROW_LENGTH         0x20
    00078 #define UGL_MESA_Y_UP              0x21
    00079
    00080 /*
    00081  * Accepted by uglMesaGetIntegerv:
    00082  */
    00083
    00084 #define UGL_MESA_LEFT_X                             0x01
    00085 #define UGL_MESA_TOP_Y                              0x02
    00086 #define UGL_MESA_WIDTH                              0x03
    00087 #define UGL_MESA_HEIGHT                             0x04
    00088 #define UGL_MESA_DISPLAY_WIDTH          0x05
    00089 #define UGL_MESA_DISPLAY_HEIGHT         0x06
    00090 #define UGL_MESA_COLOR_FORMAT            0x07
    00091 #define UGL_MESA_COLOR_MODEL            0x08
    00092 #define UGL_MESA_PIXEL_FORMAT           0x09
    00093 #define UGL_MESA_TYPE                    0x0A
    00094 #define UGL_MESA_RGB                     0x0B
    00095 #define UGL_MESA_COLOR_INDEXED          0x0C
    00096 #define UGL_MESA_SINGLE_BUFFER          0x0D
    00097 #define UGL_MESA_DOUBLE_BUFFER          0x0E
    00098 #define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
    00099 #define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
    00100
    00101 /*
    00102  * typedefs
    00103  */
    00104
    00105 typedef struct uglMesaContext * UGL_MESA_CONTEXT;
    00106
    00107 UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
    00108                                                          UGL_MESA_CONTEXT share_list);
    00109
    00110 UGL_MESA_CONTEXT  uglMesaCreateNewContextExt (GLenum mode,
    00111                                                              GLint depth_bits,
    00112                                                              GLint stencil_bits,
    00113                                                              GLint accum_red_bits,
    00114                                                              GLint accum_green_bits,
    00115                                                              GLint accum_blue_bits,
    00116                                                              GLint accum_alpha_bits,
    00117                                                              UGL_MESA_CONTEXT share_list);
    00118
    00119 GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
    00120                                                  GLsizei left, GLsizei top,
    00121                                                  GLsizei width, GLsizei height);
    00122
    00123 GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
    00124
    00125 GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
    00126
    00127 GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
    00128
    00129 GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
    00130
    00131 void uglMesaDestroyContext (void);
    00132
    00133 UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
    00134
    00135 void uglMesaSwapBuffers (void);
    00136
    00137 void uglMesaPixelStore (GLint pname, GLint value);
    00138
    00139 void uglMesaGetIntegerv (GLint pname, GLint *value);
    00140
    00141 GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
    00142                                              GLint *bytesPerValue, void **buffer);
    00143
    00144 GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
    00145                                              GLint *format, void **buffer);
    00146
    00147 GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
    00148                                     GLfloat green, GLfloat blue);
    00149
    00150 #ifdef __cplusplus
    00151 }
    00152 #endif
    00153
    00154
    00155 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines