mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
MacOS platform support.
This commit is contained in:
parent
57dfeb829a
commit
dd64004eaf
89 changed files with 1228 additions and 5098 deletions
|
|
@ -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
|
||||
|
|
@ -156,14 +135,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) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue