Merge branch 'master' into 12.0-development

This commit is contained in:
Alex Szpakowski
2021-06-06 11:43:54 -03:00
16 changed files with 2768 additions and 1421 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ static const char global_functions[] = R"(
#if __VERSION__ >= 300 || defined(GL_OES_texture_3D)
precision lowp sampler3D;
#endif
#if __VERSION__ >= 300
#if __VERSION__ >= 300 && !defined(LOVE_GLSL1_ON_GLSL3)
precision lowp sampler2DShadow;
precision lowp samplerCubeShadow;
precision lowp sampler2DArrayShadow;
+14 -3
View File
@@ -122,6 +122,20 @@ bool OpenGL::initContext()
if (!gladLoadGLLoader(LOVEGetProcAddress))
return false;
initVendor();
bugs = {};
if (GLAD_ES_VERSION_3_0 && !GLAD_ES_VERSION_3_1)
{
const char *device = (const char *) glGetString(GL_RENDERER);
if (getVendor() == VENDOR_VIVANTE && strstr(device, "Vivante GC7000UL"))
bugs.brokenGLES3 = true;
}
if (bugs.brokenGLES3)
GLAD_ES_VERSION_3_0 = false;
if (GLAD_VERSION_3_2)
{
GLint profileMask = 0;
@@ -132,9 +146,6 @@ bool OpenGL::initContext()
coreProfile = false;
initOpenGLFunctions();
initVendor();
bugs = {};
#if defined(LOVE_WINDOWS) || defined(LOVE_LINUX)
// See the comments in OpenGL.h.
+7
View File
@@ -185,6 +185,13 @@ public:
**/
bool brokenSRGB;
/**
* Some Android graphics drivers claim to support GLES3.0 but have bugs
* with certain aspects that users expect to work. For example:
* https://github.com/love2d/love-android/issues/204
**/
bool brokenGLES3;
/**
* Other bugs which have workarounds that don't use conditional code at
* the moment:
+6
View File
@@ -29,6 +29,12 @@ static void loveSTBIAssert(bool test, const char *teststr)
throw love::Exception("Could not decode image (stb_image assertion '%s' failed)", teststr);
}
// Workaround when building for iOS with deployment target=8.0
#include "common/config.h"
#if defined(LOVE_IOS)
#define STBI_NO_THREAD_LOCALS
#endif
// stb_image
#define STBI_ONLY_JPEG
// #define STBI_ONLY_PNG
+10
View File
@@ -31,8 +31,18 @@ namespace physics
namespace box2d
{
// TODO: Make this not static.
float Physics::meter = Physics::DEFAULT_METER;
Physics::Physics()
{
meter = DEFAULT_METER;
}
Physics::~Physics()
{
}
const char *Physics::getName() const
{
return "love.physics.box2d";
+3
View File
@@ -61,6 +61,9 @@ public:
**/
static const int DEFAULT_METER = 30;
Physics();
virtual ~Physics();
// Implements Module.
const char *getName() const;
virtual ModuleType getModuleType() const { return M_PHYSICS; }