- fixed rendering on macOS

This restores support for OpenGL implementations without persistent mapped buffers, and helps with strict core profile GLSL compilers
This commit is contained in:
alexey.lysiuk 2020-01-26 16:44:08 +02:00 committed by Christoph Oelckers
parent 687573d4c5
commit 2f4078d99e
3 changed files with 8 additions and 7 deletions

View file

@ -37,6 +37,7 @@
#include "gl_load.h"
//#include "glbackend.h"
#include "gl_buffers.h"
#include "v_video.h"
namespace OpenGLRenderer
{
@ -79,7 +80,7 @@ void GLBuffer::SetData(size_t size, const void *data, bool staticdata)
}
else
{
mPersistent = /*screen->BuffersArePersistent() &&*/ !staticdata;
mPersistent = screen->BuffersArePersistent() && !staticdata;
if (mPersistent)
{
glBufferStorage(mUseType, size, nullptr, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);