1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Revert 263ddf4 because it does not work properly on old PC cards.

This commit is contained in:
Sergey Lipskiy 2016-11-14 20:45:32 +07:00
parent 3e84decd03
commit be6179cbcc
4 changed files with 16 additions and 11 deletions

View File

@ -145,7 +145,11 @@ void DepthBuffer::_initDepthBufferTexture(FrameBuffer * _pBuffer, CachedTexture
#ifdef GL_MULTISAMPLING_SUPPORT
if (_multisample) {
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, _pTexture->glName);
#if defined(GLES3_1)
glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling, fboFormats.depthInternalFormat, _pTexture->realWidth, _pTexture->realHeight, false);
#else
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling, fboFormats.depthInternalFormat, _pTexture->realWidth, _pTexture->realHeight, false);
#endif
_pTexture->frameBufferTexture = CachedTexture::fbMultiSample;
} else
#endif // GL_MULTISAMPLING_SUPPORT

View File

@ -141,10 +141,17 @@ void FrameBuffer::init(u32 _address, u32 _endAddress, u16 _format, u16 _size, u1
#ifdef GL_MULTISAMPLING_SUPPORT
if (config.video.multisampling != 0) {
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_pTexture->glName);
#if defined(GLES3_1)
if (_size > G_IM_SIZ_8b)
glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling, GL_RGBA8, m_pTexture->realWidth, m_pTexture->realHeight, false);
else
glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling, fboFormats.monochromeInternalFormat, m_pTexture->realWidth, m_pTexture->realHeight, false);
#else
if (_size > G_IM_SIZ_8b)
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling, GL_RGBA8, m_pTexture->realWidth, m_pTexture->realHeight, false);
else
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling, fboFormats.monochromeInternalFormat, m_pTexture->realWidth, m_pTexture->realHeight, false);
#endif
m_pTexture->frameBufferTexture = CachedTexture::fbMultiSample;
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, m_pTexture->glName, 0);

View File

@ -489,8 +489,13 @@ void TextureCache::init()
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, m_pMSDummy->glName);
#if defined(GLES3_1)
glTexStorage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling,
GL_RGBA8, m_pMSDummy->realWidth, m_pMSDummy->realHeight, false);
#else
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, config.video.multisampling,
GL_RGBA8, m_pMSDummy->realWidth, m_pMSDummy->realHeight, false);
#endif
activateMSDummy(0);
activateMSDummy(1);

View File

@ -223,15 +223,4 @@ void initGLFunctions()
glProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)glGetProcAddress("glProgramParameteri");
glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)glGetProcAddress("glTexStorage2D");
#ifndef GLESX
GLint majorVersion = 0;
glGetIntegerv(GL_MAJOR_VERSION, &majorVersion);
GLint minorVersion = 0;
glGetIntegerv(GL_MINOR_VERSION, &minorVersion);
if (majorVersion < 4 || (majorVersion == 4 && minorVersion < 3))
// Dirty hack to enable MSAA for GL below 4.3
glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)glTexImage2DMultisample;
#endif
}