Fix merge conflict and add check for unix and not apple for glx

Merge branch 'development-gg' into gladdev

# Conflicts:
#	Tools/CMake/libraries/glad.cmake
This commit is contained in:
Jeff Hutchinson 2016-11-02 21:55:24 -04:00
commit 0296e6d3fd
728 changed files with 83679 additions and 66879 deletions

View file

@ -103,27 +103,6 @@ void STDCALL glAmdDebugCallback(GLuint id, GLenum category, GLenum severity, GLs
Con::printf("AMDOPENGL: %s", message);
}
// >>>> OPENGL INTEL WORKAROUND @todo OPENGL INTEL remove
PFNGLBINDFRAMEBUFFERPROC __openglBindFramebuffer = NULL;
void STDCALL _t3d_glBindFramebuffer(GLenum target, GLuint framebuffer)
{
if( target == GL_FRAMEBUFFER )
{
if( GFXGL->getOpenglCache()->getCacheBinded( GL_DRAW_FRAMEBUFFER ) == framebuffer
&& GFXGL->getOpenglCache()->getCacheBinded( GL_READ_FRAMEBUFFER ) == framebuffer )
return;
}
else if( GFXGL->getOpenglCache()->getCacheBinded( target ) == framebuffer )
return;
__openglBindFramebuffer(target, framebuffer);
GFXGL->getOpenglCache()->setCacheBinded( target, framebuffer);
}
// <<<< OPENGL INTEL WORKAROUND
void GFXGLDevice::initGLState()
{
// We don't currently need to sync device state with a known good place because we are
@ -157,14 +136,11 @@ void GFXGLDevice::initGLState()
String vendorStr = (const char*)glGetString( GL_VENDOR );
if( vendorStr.find("NVIDIA", 0, String::NoCase | String::Left) != String::NPos)
mUseGlMap = false;
if( vendorStr.find("INTEL", 0, String::NoCase | String::Left ) != String::NPos)
{
// @todo OPENGL INTEL - This is a workaround for a warning spam or even crashes with actual framebuffer code, remove when implemented TGL layer.
__openglBindFramebuffer = glBindFramebuffer;
glBindFramebuffer = &_t3d_glBindFramebuffer;
}
// Workaround for all Mac's, has a problem using glMap* with volatile buffers
#ifdef TORQUE_OS_MAC
mUseGlMap = false;
#endif
#if TORQUE_DEBUG
if( gglHasExtension(ARB_debug_output) )
@ -200,8 +176,10 @@ void GFXGLDevice::initGLState()
GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
mAdapterIndex(adapterIndex),
mNeedUpdateVertexAttrib(false),
mCurrentPB(NULL),
mDrawInstancesCount(0),
mCurrentShader( NULL ),
m_mCurrentWorld(true),
m_mCurrentView(true),
mContext(NULL),
@ -211,8 +189,6 @@ GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
mMaxFFTextures(2),
mMaxTRColors(1),
mClip(0, 0, 0, 0),
mCurrentShader( NULL ),
mNeedUpdateVertexAttrib(false),
mWindowRT(NULL),
mUseGlMap(true)
{