fbsdk-opengl.h

Go to the documentation of this file.
00001 #ifndef _FBSDK_OPENGL_H_
00002 #define _FBSDK_OPENGL_H_
00003 /**************************************************************************
00004 Copyright (c) 1994 - 2008 Autodesk, Inc. and/or its licensors.
00005 All Rights Reserved.
00006 
00007 The coded instructions, statements, computer programs, and/or related 
00008 material (collectively the "Data") in these files contain unpublished 
00009 information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010 protected by Canada and United States of America federal copyright law 
00011 and by international treaties.
00012 
00013 The Data may not be disclosed or distributed to third parties, in whole 
00014 or in part, without the prior written consent of Autodesk, Inc. 
00015 ("Autodesk").
00016 
00017 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024 FREE.
00025 
00026 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036 
00037 **************************************************************************/
00038 
00039 #if defined(KARCH_ENV_WIN32)
00040 //  #include <windows.h> // must include before this include if needed
00041 // Now redefining those if not already defined
00042     #ifndef WINGDIAPI
00043         #define CALLBACK        __stdcall
00044         #define WINAPI          __stdcall
00045         #define DECLSPEC_IMPORT __declspec(dllimport)
00046         #define WINGDIAPI       DECLSPEC_IMPORT
00047         #define APIENTRY        WINAPI
00048     #endif
00049     #ifndef _WCHAR_T_DEFINED
00050         #ifndef KARCH_ENV_MING32
00051             typedef unsigned short wchar_t;
00052         #endif
00053         #define _WCHAR_T_DEFINED
00054     #endif
00055 #else
00056     #ifdef __sgi
00057         #define glDeleteTextures    glDeleteTexturesEXT
00058         #define glGenTextures       glGenTexturesEXT
00059         #define glBindTexture       glBindTextureEXT
00060         #define glCopyTexImage2D    glCopyTexImage2DEXT
00061         #define glCopyTexSubImage2D glCopyTexSubImage2DEXT
00062         #define glTexSubImage2D     glTexSubImage2DEXT
00063         #define glIsTexture         glIsTextureEXT
00064         #define glCopyTexImage2D    glCopyTexImage2DEXT
00065         #define GL_BGRA_EXT         GL_BGRA             // On SGI only this is not an extension             
00066         #define GL_BGR_EXT          GL_BGR              // On SGI only this is not an extension                     
00067     #endif
00068     #ifndef CALLBACK
00069         #define CALLBACK
00070     #endif
00071 #endif
00072 
00073 #if defined(KARCH_ENV_MACOSX)
00074     #include <OpenGl/gl.h>
00075     #include <OpenGl/glu.h>
00076 #else
00077     #include <GL/gl.h>
00078     #include <GL/glu.h>
00079 #endif
00080 
00081 #if defined(KARCH_ENV_WIN32) || defined(KARCH_ENV_WIN64)
00082     #if defined(KARCH_ENV_MING32)
00083         #include <GL/glext.h>
00084     #endif
00085     #ifdef GL_EXT_bgra
00086         #define GL_BGR                                  GL_BGR_EXT
00087         #define GL_BGRA                                 GL_BGRA_EXT
00088     #endif
00089     #define GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT    0x80D2      // glEnable
00090 
00091     #ifndef GL_EXT_abgr
00092         #define GL_ABGR_EXT                         0x8000
00093         #define GL_EXT_abgr 1
00094     #endif
00095 
00096     #ifndef GL_LIGHT_MODEL_COLOR_CONTROL_EXT
00097         #define GL_LIGHT_MODEL_COLOR_CONTROL_EXT        0x81F8      // glLightModel OpenGL 1.2
00098     #endif
00099 
00100     #ifndef GL_SINGLE_COLOR_EXT
00101         #define GL_SINGLE_COLOR_EXT                     0x81F9      // glLightModel OpenGL 1.2
00102     #endif
00103     
00104     #ifndef GL_SEPARATE_SPECULAR_COLOR_EXT
00105         #define GL_SEPARATE_SPECULAR_COLOR_EXT          0x81FA      // glLightModel OpenGL 1.2
00106     #endif
00107 
00108     #define GL_DISPLAY_CGP                          0x6001
00109     #define GL_GLTARGET_CGP                         0x6003
00110 #endif
00111 
00112 #if defined(KARCH_ENV_LINUX)
00113     #include <GL/glext.h>
00114     #define GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT    GL_POST_COLOR_MATRIX_COLOR_TABLE
00115 #endif
00116 
00117 #if defined(KARCH_ENV_IRIX)
00118     #define GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT    GL_POST_COLOR_MATRIX_COLOR_TABLE
00119 #endif
00120 
00121 #if defined(KARCH_ENV_MACOSX)
00122     #include <OpenGl/glext.h>
00123     #define GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT    GL_POST_COLOR_MATRIX_COLOR_TABLE
00124 #endif
00125 
00126 #ifndef GL_LIGHT_MODEL_COLOR_CONTROL
00127     #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
00128 #endif
00129 
00130 #ifndef GL_SEPARATE_SPECULAR_COLOR
00131     #define GL_SEPARATE_SPECULAR_COLOR  0x81FA
00132 #endif
00133 
00134 #ifndef GL_EXT_422_pixels
00135     #define GL_422_EXT 0x80cc
00136 #endif
00137 
00138 #endif /* _FBSDK_OPENGL_H_ */