Add a bunch of extensions in preparation of render-to-texture support.
This commit is contained in:
parent
f06036be09
commit
b293639b76
@ -372,11 +372,13 @@
|
||||
|
||||
#ifdef __APPLE__
|
||||
# define SG_GL_H <OpenGL/gl.h>
|
||||
# define SG_GLX_H <OpenGL/glx.h>
|
||||
# define SG_GLU_H <OpenGL/glu.h>
|
||||
# define SG_GLEXT_H <OpenGL/glext.h>
|
||||
# define SG_GLUT_H <GLUT/glut.h>
|
||||
#else
|
||||
# define SG_GL_H <GL/gl.h>
|
||||
# define SG_GLX_H <GL/glx.h>
|
||||
# define SG_GLU_H <GL/glu.h>
|
||||
# define SG_GLEXT_H <GL/glext.h>
|
||||
# define SG_GLUT_H <GL/glut.h>
|
||||
|
@ -235,6 +235,260 @@ typedef void (APIENTRY * glClientActiveTextureProc)(GLenum texture);
|
||||
#define GL_DOT3_RGBA_ARB 0x86AF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ARB_depth_texture
|
||||
*/
|
||||
#ifndef GL_ARB_depth_texture
|
||||
#define GL_ARB_depth_texture 1
|
||||
#define GL_DEPTH_COMPONENT16_ARB 0x81A5
|
||||
#define GL_DEPTH_COMPONENT24_ARB 0x81A6
|
||||
#define GL_DEPTH_COMPONENT32_ARB 0x81A7
|
||||
#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
|
||||
#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ARB_multisample
|
||||
*/
|
||||
#ifndef GL_ARB_multisample
|
||||
#define GL_ARB_multisample 1
|
||||
#define GL_MULTISAMPLE_ARB 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
|
||||
#define GL_SAMPLE_COVERAGE_ARB 0x80A0
|
||||
#define GL_SAMPLE_BUFFERS_ARB 0x80A8
|
||||
#define GL_SAMPLES_ARB 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
|
||||
#define GL_MULTISAMPLE_BIT_ARB 0x20000000
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* WGL spcific OpenGL extenstions */
|
||||
#ifdef WIN32
|
||||
|
||||
/*
|
||||
* ARB_pbuffer
|
||||
*/
|
||||
#ifndef GL_ARB_pbuffer
|
||||
#define GL_ARB_pbuffer 1
|
||||
#define GL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define GL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define GL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define GL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define GL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define GL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define GL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define GL_PBUFFER_LOST_ARB 0x2036
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (APIENTRY * wglGetPbufferDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef int (APIENTRY * wglReleasePbufferDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
typedef BOOL (APIENTRY * wglDestroyPbufferARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef BOOL (APIENTRY * wglQueryPbufferARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* ARB_pixel_format
|
||||
*/
|
||||
#ifndef GL_ARB_pixel_format
|
||||
#define GL_ARB_pixel_format 1
|
||||
#define GL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define GL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define GL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define GL_ACCELERATION_ARB 0x2003
|
||||
#define GL_NEED_PALETTE_ARB 0x2004
|
||||
#define GL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define GL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define GL_SWAP_METHOD_ARB 0x2007
|
||||
#define GL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define GL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define GL_TRANSPARENT_ARB 0x200A
|
||||
#define GL_SHARE_DEPTH_ARB 0x200C
|
||||
#define GL_SHARE_STENCIL_ARB 0x200D
|
||||
#define GL_SHARE_ACCUM_ARB 0x200E
|
||||
#define GL_SUPPORT_GDI_ARB 0x200F
|
||||
#define GL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define GL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define GL_STEREO_ARB 0x2012
|
||||
#define GL_PIXEL_TYPE_ARB 0x2013
|
||||
#define GL_COLOR_BITS_ARB 0x2014
|
||||
#define GL_RED_BITS_ARB 0x2015
|
||||
#define GL_RED_SHIFT_ARB 0x2016
|
||||
#define GL_GREEN_BITS_ARB 0x2017
|
||||
#define GL_GREEN_SHIFT_ARB 0x2018
|
||||
#define GL_BLUE_BITS_ARB 0x2019
|
||||
#define GL_BLUE_SHIFT_ARB 0x201A
|
||||
#define GL_ALPHA_BITS_ARB 0x201B
|
||||
#define GL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define GL_ACCUM_BITS_ARB 0x201D
|
||||
#define GL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define GL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define GL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define GL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define GL_DEPTH_BITS_ARB 0x2022
|
||||
#define GL_STENCIL_BITS_ARB 0x2023
|
||||
#define GL_AUX_BUFFERS_ARB 0x2024
|
||||
#define GL_NO_ACCELERATION_ARB 0x2025
|
||||
#define GL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define GL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define GL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define GL_SWAP_COPY_ARB 0x2029
|
||||
#define GL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define GL_TYPE_RGBA_ARB 0x202B
|
||||
#define GL_TYPE_COLORINDEX_ARB 0x202C
|
||||
#define GL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define GL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define GL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define GL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define GL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (APIENTRY * wglChoosePixelFormatARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ARB_render_texture
|
||||
*/
|
||||
#ifndef GL_ARB_render_texture
|
||||
#define GL_ARB_render_texture 1
|
||||
|
||||
#define GL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define GL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define GL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define GL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define GL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define GL_TEXTURE_RGB_ARB 0x2075
|
||||
#define GL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define GL_NO_TEXTURE_ARB 0x2077
|
||||
#define GL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define GL_TEXTURE_1D_ARB 0x2079
|
||||
#define GL_TEXTURE_2D_ARB 0x207A
|
||||
#define GL_NO_TEXTURE_ARB 0x2077
|
||||
#define GL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define GL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define GL_FRONT_LEFT_ARB 0x2083
|
||||
#define GL_FRONT_RIGHT_ARB 0x2084
|
||||
#define GL_BACK_LEFT_ARB 0x2085
|
||||
#define GL_BACK_RIGHT_ARB 0x2086
|
||||
#define GL_AUX0_ARB 0x2087
|
||||
#define GL_AUX1_ARB 0x2088
|
||||
#define GL_AUX2_ARB 0x2089
|
||||
#define GL_AUX3_ARB 0x208A
|
||||
#define GL_AUX4_ARB 0x208B
|
||||
#define GL_AUX5_ARB 0x208C
|
||||
#define GL_AUX6_ARB 0x208D
|
||||
#define GL_AUX7_ARB 0x208E
|
||||
#define GL_AUX8_ARB 0x208F
|
||||
#define GL_AUX9_ARB 0x2090
|
||||
typedef BOOL (APIENTRY * wglBindTexImageARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (APIENTRY * wglReleaseTexImageARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (APIENTRY * wglSetPbufferAttribARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#endif
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
/* NVIDIA specific extension */
|
||||
|
||||
/*
|
||||
* NV_texture_rectangle
|
||||
*/
|
||||
|
||||
#ifndef GL_NV_texture_rectangle
|
||||
#define GL_NV_texture_rectangle 1
|
||||
#define GL_TEXTURE_RECTANGLE_NV 0x84F5
|
||||
#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
|
||||
#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
|
||||
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NV_render_depth_texture
|
||||
*/
|
||||
|
||||
#ifndef GL_NV_render_depth_texture
|
||||
#define GL_NV_render_depth_texture 1
|
||||
#define GL_NO_TEXTURE_ARBxi 0x2077
|
||||
#define GL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define GL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define GL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define GL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define GL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NV_float_buffer
|
||||
*/
|
||||
#ifndef GL_NV_float_buffer
|
||||
#define GL_NV_float_buffer 1
|
||||
#define GL_FLOAT_R_NV 0x8880
|
||||
#define GL_FLOAT_RG_NV 0x8881
|
||||
#define GL_FLOAT_RGB_NV 0x8882
|
||||
#define GL_FLOAT_RGBA_NV 0x8883
|
||||
#define GL_FLOAT_R16_NV 0x8884
|
||||
#define GL_FLOAT_R32_NV 0x8885
|
||||
#define GL_FLOAT_RG16_NV 0x8886
|
||||
#define GL_FLOAT_RG32_NV 0x8887
|
||||
#define GL_FLOAT_RGB16_NV 0x8888
|
||||
#define GL_FLOAT_RGB32_NV 0x8889
|
||||
#define GL_FLOAT_RGBA16_NV 0x888A
|
||||
#define GL_FLOAT_RGBA32_NV 0x888B
|
||||
#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
|
||||
#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
|
||||
#define GL_FLOAT_RGBA_MODE_NV 0x888E
|
||||
#define GL_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#define GL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||
#define GL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||
#define GL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||
#define GL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||
#define GL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||
#define GL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||
#define GL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||
#define GL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||
#endif
|
||||
|
||||
|
||||
/* ATI specific extension */
|
||||
|
||||
/*
|
||||
* ATI_pixel_format_float
|
||||
*/
|
||||
#ifndef GL_ATI_pixel_format_float
|
||||
#define GL_ATI_pixel_format_float 1
|
||||
#define GL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#define GL_RGBA_FLOAT_MODE_ATI 0x8820
|
||||
#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ATI_texture_float
|
||||
*/
|
||||
#ifndef GL_ATI_texture_float
|
||||
#define GL_ATI_texture_float 1
|
||||
#define GL_RGBA_FLOAT32_ATI 0x8814
|
||||
#define GL_RGB_FLOAT32_ATI 0x8815
|
||||
#define GL_ALPHA_FLOAT32_ATI 0x8816
|
||||
#define GL_INTENSITY_FLOAT32_ATI 0x8817
|
||||
#define GL_LUMINANCE_FLOAT32_ATI 0x8818
|
||||
#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
|
||||
#define GL_RGBA_FLOAT16_ATI 0x881A
|
||||
#define GL_RGB_FLOAT16_ATI 0x881B
|
||||
#define GL_ALPHA_FLOAT16_ATI 0x881C
|
||||
#define GL_INTENSITY_FLOAT16_ATI 0x881D
|
||||
#define GL_LUMINANCE_FLOAT16_ATI 0x881E
|
||||
#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user