mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 21:30:09 +00:00
Merge branch 'master' of https://github.com/bulletphysics/bullet3
This commit is contained in:
commit
87d44cbb74
@ -68,8 +68,8 @@ void MyMouseButtonCallback(int button, int state, float x, float y)
|
||||
}
|
||||
}
|
||||
|
||||
int sWidth = 1050;
|
||||
int sHeight = 768;
|
||||
int sWidth = 800;//1050;
|
||||
int sHeight = 600;//768;
|
||||
GLPrimitiveRenderer* primRenderer=0;
|
||||
//GwenOpenGL3CoreRenderer* gwenRenderer=0;
|
||||
Gwen::Renderer::Base* gwenRenderer =0;
|
||||
@ -107,7 +107,7 @@ sth_stash* initFont(GLPrimitiveRenderer* primRenderer)
|
||||
stash = sth_create(512,512,renderCallbacks);//256,256);//,1024);//512,512);
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
if (!stash)
|
||||
{
|
||||
fprintf(stderr, "Could not create stash.\n");
|
||||
@ -121,7 +121,7 @@ sth_stash* initFont(GLPrimitiveRenderer* primRenderer)
|
||||
float sx,sy,dx,dy,lh;
|
||||
GLuint texture;
|
||||
|
||||
|
||||
|
||||
|
||||
const char* fontPaths[]={
|
||||
"./",
|
||||
@ -131,16 +131,16 @@ sth_stash* initFont(GLPrimitiveRenderer* primRenderer)
|
||||
};
|
||||
|
||||
int numPaths=sizeof(fontPaths)/sizeof(char*);
|
||||
|
||||
|
||||
// Load the first truetype font from memory (just because we can).
|
||||
|
||||
|
||||
FILE* fp = 0;
|
||||
const char* fontPath ="./";
|
||||
char fullFontFileName[1024];
|
||||
|
||||
for (int i=0;i<numPaths;i++)
|
||||
{
|
||||
|
||||
|
||||
fontPath = fontPaths[i];
|
||||
//sprintf(fullFontFileName,"%s%s",fontPath,"OpenSans.ttf");//"DroidSerif-Regular.ttf");
|
||||
sprintf(fullFontFileName,"%s%s",fontPath,"DroidSerif-Regular.ttf");//OpenSans.ttf");//"DroidSerif-Regular.ttf");
|
||||
@ -151,7 +151,7 @@ sth_stash* initFont(GLPrimitiveRenderer* primRenderer)
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
assert(fp);
|
||||
if (fp)
|
||||
{
|
||||
@ -195,7 +195,7 @@ sth_stash* initFont(GLPrimitiveRenderer* primRenderer)
|
||||
}
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
sprintf(fullFontFileName,"%s%s",fontPath,"DroidSansJapanese.ttf");
|
||||
if (!(droidJapanese = sth_add_font(stash,fullFontFileName)))
|
||||
{
|
||||
@ -222,7 +222,7 @@ void keyCallback(int key, int value)
|
||||
{
|
||||
printf("key = %d, value = %d\n", key,value);
|
||||
//pCanvas->InputKey(key,value==1);
|
||||
|
||||
|
||||
|
||||
int gwenKey = -1;
|
||||
|
||||
@ -278,8 +278,8 @@ void keyCallback(int key, int value)
|
||||
gwenKey = Gwen::Key::Control;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
{
|
||||
@ -305,67 +305,70 @@ extern int avoidUpdate;
|
||||
int main()
|
||||
{
|
||||
|
||||
//#define TEST_OPENGL2_GWEN
|
||||
#ifdef TEST_OPENGL2_GWEN
|
||||
b3gDefaultOpenGLWindow* window = new b3gDefaultOpenGLWindow();
|
||||
window->setKeyboardCallback(keyCallback);
|
||||
b3gWindowConstructionInfo wci;
|
||||
wci.m_openglVersion = 3;
|
||||
wci.m_width = sWidth;
|
||||
wci.m_height = sHeight;
|
||||
// wci.m_resizeCallback = MyResizeCallback;
|
||||
|
||||
window->createWindow(wci);
|
||||
window->setResizeCallback(MyResizeCallback);
|
||||
window->setWindowTitle("render test");
|
||||
|
||||
// Gwen::Renderer::OpenGL_DebugFont* pRenderer = new Gwen::Renderer::OpenGL_DebugFont();
|
||||
gwenRenderer = new Gwen::Renderer::OpenGL_DebugFont();
|
||||
|
||||
int majorGlVersion, minorGlVersion;
|
||||
|
||||
skin.SetRender( gwenRenderer );
|
||||
if (!sscanf((const char*)glGetString(GL_VERSION), "%d.%d", &majorGlVersion, &minorGlVersion)==2)
|
||||
{
|
||||
printf("Exit: Error cannot extract OpenGL version from GL_VERSION string\n");
|
||||
exit(0);
|
||||
}
|
||||
if (majorGlVersion>=3 && wci.m_openglVersion>=3)
|
||||
{
|
||||
float retinaScale = 1.f;
|
||||
|
||||
pCanvas = new Gwen::Controls::Canvas( &skin );
|
||||
pCanvas->SetSize( sWidth, sHeight);
|
||||
pCanvas->SetDrawBackground( true );
|
||||
pCanvas->SetBackgroundColor( Gwen::Color( 150, 170, 170, 255 ) );
|
||||
|
||||
glClearColor(1,0,0,1);
|
||||
/* while( !window->requestedExit() )
|
||||
{
|
||||
window->startRendering();
|
||||
|
||||
// Main OpenGL Render Loop
|
||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
window->endRendering();
|
||||
}
|
||||
*/
|
||||
//exit(0);
|
||||
#else
|
||||
|
||||
float retinaScale = 1.f;
|
||||
|
||||
b3gDefaultOpenGLWindow* window = new b3gDefaultOpenGLWindow();
|
||||
window->setKeyboardCallback(keyCallback);
|
||||
b3gWindowConstructionInfo wci;
|
||||
wci.m_width = sWidth;
|
||||
wci.m_height = sHeight;
|
||||
// wci.m_resizeCallback = MyResizeCallback;
|
||||
window->createWindow(wci);
|
||||
|
||||
window->setResizeCallback(MyResizeCallback);
|
||||
window->setWindowTitle("render test");
|
||||
#ifndef __APPLE__
|
||||
glewInit();
|
||||
#ifndef _WIN32
|
||||
//we need glewExperimental on Linux
|
||||
glewExperimental = GL_TRUE;
|
||||
#endif // _WIN32
|
||||
glewInit();
|
||||
#endif
|
||||
|
||||
retinaScale = window->getRetinaScale();
|
||||
//we ned to call glGetError twice, because of some Ubuntu/Intel/OpenGL issue
|
||||
|
||||
primRenderer = new GLPrimitiveRenderer(sWidth,sHeight);
|
||||
GLuint err = glGetError();
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
retinaScale = window->getRetinaScale();
|
||||
|
||||
primRenderer = new GLPrimitiveRenderer(sWidth,sHeight);
|
||||
|
||||
sth_stash* font = initFont(primRenderer );
|
||||
|
||||
|
||||
gwenRenderer = new GwenOpenGL3CoreRenderer(primRenderer,font,sWidth,sHeight,retinaScale);
|
||||
|
||||
} else
|
||||
{
|
||||
//OpenGL 2.x
|
||||
gwenRenderer = new Gwen::Renderer::OpenGL_DebugFont();
|
||||
|
||||
|
||||
skin.SetRender( gwenRenderer );
|
||||
|
||||
pCanvas = new Gwen::Controls::Canvas( &skin );
|
||||
pCanvas->SetSize( sWidth, sHeight);
|
||||
pCanvas->SetDrawBackground( true );
|
||||
pCanvas->SetBackgroundColor( Gwen::Color( 150, 170, 170, 255 ) );
|
||||
|
||||
glClearColor(1,0,0,1);
|
||||
|
||||
}
|
||||
|
||||
sth_stash* font = initFont(primRenderer );
|
||||
|
||||
|
||||
gwenRenderer = new GwenOpenGL3CoreRenderer(primRenderer,font,sWidth,sHeight,retinaScale);
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
@ -376,7 +379,7 @@ glClearColor(1,0,0,1);
|
||||
//
|
||||
// Create a GWEN skin
|
||||
//
|
||||
|
||||
|
||||
|
||||
#ifdef USE_TEXTURED_SKIN
|
||||
Gwen::Skin::TexturedBase skin;
|
||||
@ -406,7 +409,7 @@ glClearColor(1,0,0,1);
|
||||
pUnit->SetPos( 10, 10 );
|
||||
|
||||
//
|
||||
// Create a Windows Control helper
|
||||
// Create a Windows Control helper
|
||||
// (Processes Windows MSG's and fires input at GWEN)
|
||||
//
|
||||
//Gwen::Input::Windows GwenInput;
|
||||
@ -418,8 +421,10 @@ glClearColor(1,0,0,1);
|
||||
// MSG msg;
|
||||
while( !window->requestedExit() )
|
||||
{
|
||||
|
||||
saveOpenGLState(sWidth,sHeight);
|
||||
if (majorGlVersion<3 || wci.m_openglVersion<3)
|
||||
{
|
||||
saveOpenGLState(sWidth,sHeight);
|
||||
}
|
||||
|
||||
// Skip out if the window is closed
|
||||
//if ( !IsWindowVisible( g_pHWND ) )
|
||||
@ -443,7 +448,7 @@ glClearColor(1,0,0,1);
|
||||
}
|
||||
|
||||
window->startRendering();
|
||||
|
||||
|
||||
// Main OpenGL Render Loop
|
||||
{
|
||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
@ -453,33 +458,33 @@ glClearColor(1,0,0,1);
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
//glColor4ub(255,0,0,255);
|
||||
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
// saveOpenGLState(width,height);//m_glutScreenWidth,m_glutScreenHeight);
|
||||
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
@ -491,28 +496,32 @@ glClearColor(1,0,0,1);
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
|
||||
|
||||
err = glGetError();
|
||||
assert(err==GL_NO_ERROR);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pCanvas->RenderCanvas();
|
||||
|
||||
|
||||
if (avoidUpdate<=0)
|
||||
avoidUpdate++;
|
||||
|
||||
// SwapBuffers( GetDC( g_pHWND ) );
|
||||
}
|
||||
window->endRendering();
|
||||
restoreOpenGLState();
|
||||
|
||||
if (majorGlVersion<3 || wci.m_openglVersion<3)
|
||||
{
|
||||
restoreOpenGLState();
|
||||
}
|
||||
}
|
||||
|
||||
window->closeWindow();
|
||||
delete window;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,28 @@
|
||||
|
||||
///See http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/
|
||||
|
||||
bool gIntelLinuxglDrawBufferWorkaround=false;
|
||||
|
||||
#include "GLRenderToTexture.h"
|
||||
#include "Bullet3Common/b3Scalar.h" // for b3Assert
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
bool gIntelLinuxglDrawBufferWorkaround=false;
|
||||
|
||||
GLRenderToTexture::GLRenderToTexture()
|
||||
:m_framebufferName(0)
|
||||
{
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
const GLubyte* ven = glGetString(GL_VENDOR);
|
||||
printf("ven = %s\n",ven);
|
||||
|
||||
if (strncmp((const char*)ven,"Intel",5)==0)
|
||||
{
|
||||
printf("Workaround for some crash in the Intel OpenGL driver on Linux/Ubuntu\n");
|
||||
gIntelLinuxglDrawBufferWorkaround=true;
|
||||
}
|
||||
#endif//!defined(_WIN32) && !defined(__APPLE__)
|
||||
|
||||
}
|
||||
|
||||
void GLRenderToTexture::init(int width, int height, GLuint textureId, int renderTextureType)
|
||||
|
@ -17,7 +17,6 @@ struct GLRenderToTexture
|
||||
bool m_initialized;
|
||||
int m_renderTextureType;
|
||||
public:
|
||||
|
||||
GLRenderToTexture();
|
||||
|
||||
void init(int width, int height, GLuint textureId, int renderTextureType=RENDERTEXTURE_COLOR);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -362,6 +362,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
|
||||
#define GLX_GPU_NUM_RB_AMD 0x21A7
|
||||
#define GLX_GPU_NUM_SPI_AMD 0x21A8
|
||||
|
||||
typedef void ( * PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef GLXContext ( * PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list);
|
||||
typedef GLXContext ( * PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int* attribList);
|
||||
typedef Bool ( * PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx);
|
||||
typedef unsigned int ( * PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx);
|
||||
typedef GLXContext ( * PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef unsigned int ( * PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int* ids);
|
||||
typedef int ( * PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void* data);
|
||||
typedef Bool ( * PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx);
|
||||
|
||||
#define glXBlitContextFramebufferAMD GLXEW_GET_FUN(__glewXBlitContextFramebufferAMD)
|
||||
#define glXCreateAssociatedContextAMD GLXEW_GET_FUN(__glewXCreateAssociatedContextAMD)
|
||||
#define glXCreateAssociatedContextAttribsAMD GLXEW_GET_FUN(__glewXCreateAssociatedContextAttribsAMD)
|
||||
#define glXDeleteAssociatedContextAMD GLXEW_GET_FUN(__glewXDeleteAssociatedContextAMD)
|
||||
#define glXGetContextGPUIDAMD GLXEW_GET_FUN(__glewXGetContextGPUIDAMD)
|
||||
#define glXGetCurrentAssociatedContextAMD GLXEW_GET_FUN(__glewXGetCurrentAssociatedContextAMD)
|
||||
#define glXGetGPUIDsAMD GLXEW_GET_FUN(__glewXGetGPUIDsAMD)
|
||||
#define glXGetGPUInfoAMD GLXEW_GET_FUN(__glewXGetGPUInfoAMD)
|
||||
#define glXMakeAssociatedContextCurrentAMD GLXEW_GET_FUN(__glewXMakeAssociatedContextCurrentAMD)
|
||||
|
||||
#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
|
||||
|
||||
#endif /* GLX_AMD_gpu_association */
|
||||
@ -555,6 +575,17 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
|
||||
|
||||
#endif /* GLX_ATI_render_texture */
|
||||
|
||||
/* --------------------------- GLX_EXT_buffer_age -------------------------- */
|
||||
|
||||
#ifndef GLX_EXT_buffer_age
|
||||
#define GLX_EXT_buffer_age 1
|
||||
|
||||
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
|
||||
|
||||
#define GLXEW_EXT_buffer_age GLXEW_GET_VAR(__GLXEW_EXT_buffer_age)
|
||||
|
||||
#endif /* GLX_EXT_buffer_age */
|
||||
|
||||
/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es2_profile
|
||||
@ -962,10 +993,10 @@ typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display* dpy, GLXVideoC
|
||||
|
||||
#endif /* GLX_NV_video_capture */
|
||||
|
||||
/* ---------------------------- GLX_NV_video_out --------------------------- */
|
||||
/* -------------------------- GLX_NV_video_output -------------------------- */
|
||||
|
||||
#ifndef GLX_NV_video_out
|
||||
#define GLX_NV_video_out 1
|
||||
#ifndef GLX_NV_video_output
|
||||
#define GLX_NV_video_output 1
|
||||
|
||||
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
@ -992,9 +1023,9 @@ typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf,
|
||||
#define glXReleaseVideoImageNV GLXEW_GET_FUN(__glewXReleaseVideoImageNV)
|
||||
#define glXSendPbufferToVideoNV GLXEW_GET_FUN(__glewXSendPbufferToVideoNV)
|
||||
|
||||
#define GLXEW_NV_video_out GLXEW_GET_VAR(__GLXEW_NV_video_out)
|
||||
#define GLXEW_NV_video_output GLXEW_GET_VAR(__GLXEW_NV_video_output)
|
||||
|
||||
#endif /* GLX_NV_video_out */
|
||||
#endif /* GLX_NV_video_output */
|
||||
|
||||
/* -------------------------- GLX_OML_swap_method -------------------------- */
|
||||
|
||||
@ -1047,16 +1078,6 @@ typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display* dpy, GLXDrawable drawable, i
|
||||
#ifndef GLX_SGIS_color_range
|
||||
#define GLX_SGIS_color_range 1
|
||||
|
||||
#define GLX_MIN_RED_SGIS 0
|
||||
#define GLX_MAX_GREEN_SGIS 0
|
||||
#define GLX_MIN_BLUE_SGIS 0
|
||||
#define GLX_MAX_ALPHA_SGIS 0
|
||||
#define GLX_MIN_GREEN_SGIS 0
|
||||
#define GLX_MIN_ALPHA_SGIS 0
|
||||
#define GLX_MAX_RED_SGIS 0
|
||||
#define GLX_EXTENDED_RANGE_SGIS 0
|
||||
#define GLX_MAX_BLUE_SGIS 0
|
||||
|
||||
#define GLXEW_SGIS_color_range GLXEW_GET_VAR(__GLXEW_SGIS_color_range)
|
||||
|
||||
#endif /* GLX_SGIS_color_range */
|
||||
@ -1393,7 +1414,7 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef GLEW_MX
|
||||
#define GLXEW_FUN_EXPORT
|
||||
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
#define GLXEW_VAR_EXPORT
|
||||
#else
|
||||
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
|
||||
@ -1420,6 +1441,16 @@ GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
|
||||
GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
|
||||
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
|
||||
|
||||
GLXEW_FUN_EXPORT PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC __glewXBlitContextFramebufferAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC __glewXCreateAssociatedContextAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __glewXCreateAssociatedContextAttribsAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC __glewXDeleteAssociatedContextAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTGPUIDAMDPROC __glewXGetContextGPUIDAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC __glewXGetCurrentAssociatedContextAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETGPUIDSAMDPROC __glewXGetGPUIDsAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXGETGPUINFOAMDPROC __glewXGetGPUInfoAMD;
|
||||
GLXEW_FUN_EXPORT PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __glewXMakeAssociatedContextCurrentAMD;
|
||||
|
||||
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
|
||||
|
||||
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
|
||||
@ -1555,6 +1586,7 @@ GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_buffer_age;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
|
||||
@ -1580,7 +1612,7 @@ GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_output;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
|
||||
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
|
||||
|
@ -1,546 +0,0 @@
|
||||
#ifndef __glxext_h_
|
||||
#define __glxext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: This software was created using the
|
||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||
** not been independently verified as being compliant with the OpenGL(R)
|
||||
** version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
#define GLX_GLXEXT_VERSION 2
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#define GLX_CONFIG_CAVEAT 0x20
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
#define GLX_SCREEN 0x800C
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||
#define GLX_PBUFFER_WIDTH 0x8041
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_visual_info
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_video_sync
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_make_current_read
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_video_source
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_visual_rating
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
/* reuse GLX_NONE_EXT */
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_import_context
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||
#define GLX_VISUAL_ID_EXT 0x800B
|
||||
#define GLX_SCREEN_EXT 0x800C
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
||||
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
||||
#define GLX_RGBA_BIT_SGIX 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
||||
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
||||
#define GLX_RENDER_TYPE_SGIX 0x8011
|
||||
#define GLX_X_RENDERABLE_SGIX 0x8012
|
||||
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
||||
#define GLX_RGBA_TYPE_SGIX 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
||||
/* reuse GLX_SCREEN_EXT */
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
||||
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
||||
#define GLX_WIDTH_SGIX 0x801D
|
||||
#define GLX_HEIGHT_SGIX 0x801E
|
||||
#define GLX_EVENT_MASK_SGIX 0x801F
|
||||
#define GLX_DAMAGED_SGIX 0x8020
|
||||
#define GLX_SAVED_SGIX 0x8021
|
||||
#define GLX_WINDOW_SGIX 0x8022
|
||||
#define GLX_PBUFFER_SGIX 0x8023
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_cushion
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_video_resize
|
||||
#define GLX_SYNC_FRAME_SGIX 0x00000000
|
||||
#define GLX_SYNC_SWAP_SGIX 0x00000001
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_dmbuffer
|
||||
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_swap_group
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIS_blended_overlay
|
||||
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIS_shared_multisample
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SUN_get_transparent_index
|
||||
#endif
|
||||
|
||||
#ifndef GLX_3DFX_multisample
|
||||
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||
#define GLX_SAMPLES_3DFX 0x8051
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_copy_sub_buffer
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_pixmap_colormap
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_release_buffers
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
|
||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
typedef void (*__GLXextFuncPtr)();
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_video_source
|
||||
typedef XID GLXVideoSourceSGIX;
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
typedef XID GLXFBConfigIDSGIX;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
typedef XID GLXPbufferSGIX;
|
||||
typedef struct {
|
||||
int type;
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came for SendEvent request */
|
||||
Display *display; /* display the event was read from */
|
||||
GLXDrawable drawable; /* i.d. of Drawable */
|
||||
int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
|
||||
int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
|
||||
unsigned int mask; /* mask indicating which buffers are affected*/
|
||||
int x, y;
|
||||
int width, height;
|
||||
int count; /* if nonzero, at least this many more */
|
||||
} GLXBufferClobberEventSGIX;
|
||||
#endif
|
||||
|
||||
#ifdef GL_NV_vertex_array_range
|
||||
#ifndef PFNGLXALLOCATEMEMORYNVPROC
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void *glXAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat);
|
||||
#endif
|
||||
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei, GLfloat, GLfloat, GLfloat);
|
||||
#endif
|
||||
#ifndef PFNGLXFREEMEMORYNVPROC
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXFreeMemoryNV (void *);
|
||||
#endif
|
||||
typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_VERSION_1_3 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
|
||||
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
|
||||
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
|
||||
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
|
||||
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
|
||||
extern void glXDestroyWindow (Display *, GLXWindow);
|
||||
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
|
||||
extern void glXDestroyPixmap (Display *, GLXPixmap);
|
||||
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
|
||||
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
|
||||
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
|
||||
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
|
||||
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
|
||||
extern GLXDrawable glXGetCurrentReadDrawable (void);
|
||||
extern Display * glXGetCurrentDisplay (void);
|
||||
extern int glXQueryContext (Display *, GLXContext, int, int *);
|
||||
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
|
||||
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_get_proc_address 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIS_multisample
|
||||
#define GLX_SGIS_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_visual_info
|
||||
#define GLX_EXT_visual_info 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#define GLX_SGI_swap_control 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXSwapIntervalSGI (int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_video_sync
|
||||
#define GLX_SGI_video_sync 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXGetVideoSyncSGI (unsigned int *);
|
||||
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
||||
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_make_current_read
|
||||
#define GLX_SGI_make_current_read 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
|
||||
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifdef _VL_H
|
||||
#ifndef GLX_SGIX_video_source
|
||||
#define GLX_SGIX_video_source 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
|
||||
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#endif
|
||||
|
||||
#endif /* _VL_H */
|
||||
#ifndef GLX_EXT_visual_rating
|
||||
#define GLX_EXT_visual_rating 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_EXT_import_context
|
||||
#define GLX_EXT_import_context 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Display * glXGetCurrentDisplayEXT (void);
|
||||
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
|
||||
extern GLXContextID glXGetContextIDEXT (GLXContext);
|
||||
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
|
||||
extern void glXFreeContextEXT (Display *, GLXContext);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
||||
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (GLXContext context);
|
||||
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
|
||||
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
#define GLX_SGIX_fbconfig 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
|
||||
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
|
||||
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
|
||||
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
|
||||
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
|
||||
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
|
||||
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
#define GLX_SGIX_pbuffer 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
|
||||
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
|
||||
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
|
||||
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
|
||||
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGI_cushion
|
||||
#define GLX_SGI_cushion 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXCushionSGI (Display *, Window, float);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_video_resize
|
||||
#define GLX_SGIX_video_resize 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
|
||||
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
|
||||
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
|
||||
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
|
||||
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
|
||||
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
|
||||
#endif
|
||||
|
||||
#ifdef _DM_BUFFER_H_
|
||||
#ifndef GLX_SGIX_dmbuffer
|
||||
#define GLX_SGIX_dmbuffer 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#endif
|
||||
|
||||
#endif /* _DM_BUFFER_H_ */
|
||||
#ifndef GLX_SGIX_swap_group
|
||||
#define GLX_SGIX_swap_group 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_barrier 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
|
||||
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SUN_get_transparent_index
|
||||
#define GLX_SUN_get_transparent_index 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_copy_sub_buffer
|
||||
#define GLX_MESA_copy_sub_buffer 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_pixmap_colormap
|
||||
#define GLX_MESA_pixmap_colormap 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_release_buffers
|
||||
#define GLX_MESA_release_buffers 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_MESA_set_3dfx_mode 1
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
extern Bool glXSet3DfxModeMESA (int);
|
||||
#endif /* GLX_GLXEXT_PROTOTYPES */
|
||||
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -446,6 +446,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
|
||||
|
||||
#endif /* WGL_ARB_render_texture */
|
||||
|
||||
/* ---------------- WGL_ARB_robustness_application_isolation --------------- */
|
||||
|
||||
#ifndef WGL_ARB_robustness_application_isolation
|
||||
#define WGL_ARB_robustness_application_isolation 1
|
||||
|
||||
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
|
||||
#define WGLEW_ARB_robustness_application_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_application_isolation)
|
||||
|
||||
#endif /* WGL_ARB_robustness_application_isolation */
|
||||
|
||||
/* ---------------- WGL_ARB_robustness_share_group_isolation --------------- */
|
||||
|
||||
#ifndef WGL_ARB_robustness_share_group_isolation
|
||||
#define WGL_ARB_robustness_share_group_isolation 1
|
||||
|
||||
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
|
||||
#define WGLEW_ARB_robustness_share_group_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_share_group_isolation)
|
||||
|
||||
#endif /* WGL_ARB_robustness_share_group_isolation */
|
||||
|
||||
/* ----------------------- WGL_ATI_pixel_format_float ---------------------- */
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
@ -1323,6 +1345,8 @@ WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_application_isolation;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_share_group_isolation;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
|
||||
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
|
||||
|
@ -1,466 +0,0 @@
|
||||
#ifndef __wglext_h_
|
||||
#define __wglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||
** file are subject only to the provisions of the License. You may not use
|
||||
** this file except in compliance with the License. You may obtain a copy
|
||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
**
|
||||
** http://oss.sgi.com/projects/FreeB
|
||||
**
|
||||
** Note that, as provided in the License, the Software is distributed on an
|
||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
**
|
||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||
** Copyright in any portions created by third parties is as indicated
|
||||
** elsewhere herein. All Rights Reserved.
|
||||
**
|
||||
** Additional Notice Provisions: This software was created using the
|
||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||
** not been independently verified as being compliant with the OpenGL(R)
|
||||
** version 1.2.1 Specification.
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
#define WGL_WGLEXT_VERSION 1
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define WGL_TRANSPARENT_ARB 0x200A
|
||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define WGL_SWAP_COPY_ARB 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||
#define WGL_BACK_LEFT_ARB 0x2085
|
||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||
#define WGL_AUX0_ARB 0x2087
|
||||
#define WGL_AUX1_ARB 0x2088
|
||||
#define WGL_AUX2_ARB 0x2089
|
||||
#define WGL_AUX3_ARB 0x208A
|
||||
#define WGL_AUX4_ARB 0x208B
|
||||
#define WGL_AUX5_ARB 0x208C
|
||||
#define WGL_AUX6_ARB 0x208D
|
||||
#define WGL_AUX7_ARB 0x208E
|
||||
#define WGL_AUX8_ARB 0x208F
|
||||
#define WGL_AUX9_ARB 0x2090
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||
#define WGL_ACCELERATION_EXT 0x2003
|
||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||
#define WGL_TRANSPARENT_EXT 0x200A
|
||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||
#define WGL_STEREO_EXT 0x2012
|
||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||
#define WGL_COLOR_BITS_EXT 0x2014
|
||||
#define WGL_RED_BITS_EXT 0x2015
|
||||
#define WGL_RED_SHIFT_EXT 0x2016
|
||||
#define WGL_GREEN_BITS_EXT 0x2017
|
||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||
#define WGL_BLUE_BITS_EXT 0x2019
|
||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||
#define WGL_SWAP_COPY_EXT 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_render_texture_rectangle
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_unknown_genlock_extension_name
|
||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||
#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
|
||||
#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
|
||||
#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_unknown_gamma_extension_name
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_unknown_digital_video_cursor_extension_name
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#endif
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFEREXT);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_ARB_buffer_region 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT);
|
||||
extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE);
|
||||
extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int);
|
||||
extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#define WGL_ARB_extensions_string 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern const char * WINAPI wglGetExtensionsStringARB (HDC);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *);
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *);
|
||||
extern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC);
|
||||
extern HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pbuffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *);
|
||||
extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB);
|
||||
extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC);
|
||||
extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB);
|
||||
extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_display_color_table
|
||||
#define WGL_EXT_display_color_table 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort);
|
||||
extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint);
|
||||
extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort);
|
||||
extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_extensions_string
|
||||
#define WGL_EXT_extensions_string 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern const char * WINAPI wglGetExtensionsStringEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC);
|
||||
extern HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pbuffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *);
|
||||
extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT);
|
||||
extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC);
|
||||
extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT);
|
||||
extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_EXT_pixel_format 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *);
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *);
|
||||
extern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
#define WGL_EXT_swap_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglSwapIntervalEXT (int);
|
||||
extern int WINAPI wglGetSwapIntervalEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_WGL_EXT_depth_float
|
||||
#define WGL_WGL_EXT_depth_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_WGL_3DFX_multisample
|
||||
#define WGL_WGL_3DFX_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_WGL_EXT_multisample
|
||||
#define WGL_WGL_EXT_multisample 1
|
||||
#endif
|
||||
|
||||
/* added by Cass -- but this should already be in here! */
|
||||
#ifndef WGL_NV_allocate_memory
|
||||
#define WGL_NV_allocate_memory 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern void * wglAllocateMemoryNV(int size, float readfreq, float writefreq, float priority);
|
||||
extern void wglFreeMemoryNV(void * pointer);
|
||||
#endif
|
||||
typedef void * (APIENTRY * PFNWGLALLOCATEMEMORYNVPROC) (int size, float readfreq, float writefreq, float priority);
|
||||
typedef void (APIENTRY * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
#endif
|
||||
|
||||
/* WGL_ARB_render_texture */
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_ARB_render_texture 1
|
||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int * piAttribList);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_render_texture_rectangle
|
||||
#define WGL_NV_render_texture_rectangle 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
#define WGL_NV_render_depth_texture 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -339,8 +339,10 @@ void MacOpenGLWindow::createWindow(const b3gWindowConstructionInfo& ci)
|
||||
|
||||
// https://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/CapturingScreenContents/CapturingScreenContents.html#//apple_ref/doc/uid/TP40012302-CH10-SW1
|
||||
//support HighResolutionOSX for Retina Macbook
|
||||
[m_internalData->m_myview setWantsBestResolutionOpenGLSurface:YES];
|
||||
|
||||
if (ci.m_openglVersion>=3)
|
||||
{
|
||||
[m_internalData->m_myview setWantsBestResolutionOpenGLSurface:YES];
|
||||
}
|
||||
NSSize sz;
|
||||
sz.width = 1;
|
||||
sz.height = 1;
|
||||
@ -354,29 +356,18 @@ void MacOpenGLWindow::createWindow(const b3gWindowConstructionInfo& ci)
|
||||
|
||||
[m_internalData->m_window setContentView: m_internalData->m_myview];
|
||||
|
||||
GLuint n = 1;
|
||||
GLuint vbo[3]={-1,-1,-1};
|
||||
|
||||
glGenBuffers(n, vbo);
|
||||
checkError("glGenBuffers");
|
||||
|
||||
|
||||
|
||||
[m_internalData->m_window setDelegate:(id) m_internalData->m_myview];
|
||||
glGenBuffers(n, vbo);
|
||||
checkError("glGenBuffers");
|
||||
|
||||
|
||||
[m_internalData->m_window makeKeyAndOrderFront: nil];
|
||||
|
||||
[m_internalData->m_myview MakeCurrent];
|
||||
m_internalData->m_width = m_internalData->m_myview.GetWindowWidth;
|
||||
m_internalData->m_height = m_internalData->m_myview.GetWindowHeight;
|
||||
|
||||
glGenBuffers(n, vbo);
|
||||
checkError("glGenBuffers");
|
||||
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
glGenBuffers(n, vbo);
|
||||
checkError("glGenBuffers");
|
||||
|
||||
|
||||
//[m_internalData->m_window setLevel:NSMainMenuWindowLevel];
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <pthread.h>
|
||||
extern bool gIntelLinuxglDrawBufferWorkaround;
|
||||
|
||||
GLint att[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };
|
||||
static bool forceOpenGL3 = true;
|
||||
@ -235,11 +234,6 @@ void X11OpenGLWindow::enableOpenGL()
|
||||
const GLubyte* ven = glGetString(GL_VENDOR);
|
||||
printf("GL_VENDOR=%s\n", ven);
|
||||
|
||||
if (strncmp((const char*)ven,"Intel",5)==0)
|
||||
{
|
||||
printf("Workaround for some crash in the Intel OpenGL driver on Linux/Ubuntu\n");
|
||||
gIntelLinuxglDrawBufferWorkaround=true;
|
||||
}
|
||||
const GLubyte* ren = glGetString(GL_RENDERER);
|
||||
printf("GL_RENDERER=%s\n",ren);
|
||||
const GLubyte* ver = glGetString(GL_VERSION);
|
||||
@ -276,7 +270,10 @@ printf("createWindow\n");
|
||||
|
||||
m_data->m_root = DefaultRootWindow(m_data->m_dpy);
|
||||
|
||||
|
||||
if (ci.m_openglVersion < 3)
|
||||
{
|
||||
forceOpenGL3 = false;
|
||||
}
|
||||
|
||||
if (forceOpenGL3)
|
||||
{
|
||||
|
@ -52,7 +52,18 @@
|
||||
files { projectRootDir .. "btgui/OpenGLWindow/GlewWindows/glew.c"}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
links{"GLEW"}
|
||||
configuration{"Linux"}
|
||||
if os.isdir("/usr/include") and os.isfile("/usr/include/GL/glew.h") then
|
||||
links {"GLEW"}
|
||||
else
|
||||
defines { "GLEW_STATIC"}
|
||||
--,"GLEW_NO_GLU"}
|
||||
includedirs {
|
||||
projectRootDir .. "btgui/OpenGLWindow/GlewWindows"
|
||||
}
|
||||
files { projectRootDir .. "btgui/OpenGLWindow/GlewWindows/glew.c"}
|
||||
end
|
||||
|
||||
end
|
||||
configuration{}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user