mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +02:00
Enabled OpenGL ES 3 support for Windows/Linux/Android when SDL 2.0.4+ is used, since that SDL version fixed its EGL code for GLES 3+.
This commit is contained in:
@@ -28,8 +28,6 @@
|
|||||||
FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */; };
|
FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */; };
|
||||||
FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */; };
|
FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */; };
|
||||||
FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */; };
|
FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */; };
|
||||||
FA5D24901A96CAAE00C6FC8F /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248F1A96CAAE00C6FC8F /* ImageIO.framework */; };
|
|
||||||
FA5D24921A96CAB300C6FC8F /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24911A96CAB300C6FC8F /* MobileCoreServices.framework */; };
|
|
||||||
FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24931A96CABA00C6FC8F /* libz.dylib */; };
|
FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24931A96CABA00C6FC8F /* libz.dylib */; };
|
||||||
FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */; };
|
FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */; };
|
||||||
FA5D249C1A96CF4300C6FC8F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA5D249A1A96CF4300C6FC8F /* Images.xcassets */; };
|
FA5D249C1A96CF4300C6FC8F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA5D249A1A96CF4300C6FC8F /* Images.xcassets */; };
|
||||||
@@ -113,8 +111,6 @@
|
|||||||
FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; };
|
FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
|
FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
|
FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
FA5D248F1A96CAAE00C6FC8F /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/ImageIO.framework; sourceTree = DEVELOPER_DIR; };
|
|
||||||
FA5D24911A96CAB300C6FC8F /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };
|
|
||||||
FA5D24931A96CABA00C6FC8F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; };
|
FA5D24931A96CABA00C6FC8F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; };
|
||||||
FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
|
FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
FA5D24971A96CE1E00C6FC8F /* love-ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "love-ios.plist"; path = "ios/love-ios.plist"; sourceTree = "<group>"; };
|
FA5D24971A96CE1E00C6FC8F /* love-ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "love-ios.plist"; path = "ios/love-ios.plist"; sourceTree = "<group>"; };
|
||||||
@@ -146,8 +142,6 @@
|
|||||||
FA5D24C21A96D78000C6FC8F /* Foundation.framework in Frameworks */,
|
FA5D24C21A96D78000C6FC8F /* Foundation.framework in Frameworks */,
|
||||||
FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */,
|
FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */,
|
||||||
FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */,
|
FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */,
|
||||||
FA5D24921A96CAB300C6FC8F /* MobileCoreServices.framework in Frameworks */,
|
|
||||||
FA5D24901A96CAAE00C6FC8F /* ImageIO.framework in Frameworks */,
|
|
||||||
FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */,
|
FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */,
|
||||||
FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */,
|
FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */,
|
||||||
FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */,
|
FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */,
|
||||||
@@ -246,9 +240,7 @@
|
|||||||
FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */,
|
FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */,
|
||||||
FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */,
|
FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */,
|
||||||
FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */,
|
FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */,
|
||||||
FA5D248F1A96CAAE00C6FC8F /* ImageIO.framework */,
|
|
||||||
FA5D24931A96CABA00C6FC8F /* libz.dylib */,
|
FA5D24931A96CABA00C6FC8F /* libz.dylib */,
|
||||||
FA5D24911A96CAB300C6FC8F /* MobileCoreServices.framework */,
|
|
||||||
FA5D24811A96CA1800C6FC8F /* OpenAL.framework */,
|
FA5D24811A96CA1800C6FC8F /* OpenAL.framework */,
|
||||||
FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */,
|
FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */,
|
||||||
FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */,
|
FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ int w_newFont(lua_State *L);
|
|||||||
int w_newImageFont(lua_State *L);
|
int w_newImageFont(lua_State *L);
|
||||||
int w_newSpriteBatch(lua_State *L);
|
int w_newSpriteBatch(lua_State *L);
|
||||||
int w_newParticleSystem(lua_State *L);
|
int w_newParticleSystem(lua_State *L);
|
||||||
int w_newCanvas(lua_State *L); // comments in function
|
int w_newCanvas(lua_State *L);
|
||||||
int w_newShader(lua_State *L);
|
int w_newShader(lua_State *L);
|
||||||
int w_newMesh(lua_State *L);
|
int w_newMesh(lua_State *L);
|
||||||
int w_newText(lua_State *L);
|
int w_newText(lua_State *L);
|
||||||
|
|||||||
@@ -184,17 +184,19 @@ bool Window::createWindowAndContext(int x, int y, int w, int h, Uint32 windowfla
|
|||||||
bool debug = (debughint != nullptr && debughint[0] != '0');
|
bool debug = (debughint != nullptr && debughint[0] != '0');
|
||||||
|
|
||||||
// Different context attribute profiles to try.
|
// Different context attribute profiles to try.
|
||||||
// FIXME: OpenGL ES 3 is disabled on non-iOS because SDL's EGL code doesn't
|
|
||||||
// properly handle OpenGL ES 3 context creation requests (for now.)
|
|
||||||
// https://bugzilla.libsdl.org/show_bug.cgi?id=2865
|
|
||||||
std::vector<ContextAttribs> attribslist = {
|
std::vector<ContextAttribs> attribslist = {
|
||||||
{2, 1, false, debug}, // OpenGL 2.1.
|
{2, 1, false, debug}, // OpenGL 2.1.
|
||||||
#ifdef LOVE_IOS
|
|
||||||
{3, 0, true, debug}, // OpenGL ES 3.
|
{3, 0, true, debug}, // OpenGL ES 3.
|
||||||
#endif
|
|
||||||
{2, 0, true, debug}, // OpenGL ES 2.
|
{2, 0, true, debug}, // OpenGL ES 2.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SDL_version sdlversion = {};
|
||||||
|
SDL_GetVersion(&sdlversion);
|
||||||
|
|
||||||
|
// OpenGL ES 3+ contexts are only properly supported in SDL 2.0.4+.
|
||||||
|
if (sdlversion.major == 2 && sdlversion.minor == 0 && sdlversion.patch <= 3)
|
||||||
|
attribslist.erase(attribslist.begin() + 1);
|
||||||
|
|
||||||
// Move OpenGL ES to the front of the list if we should prefer GLES.
|
// Move OpenGL ES to the front of the list if we should prefer GLES.
|
||||||
if (preferGLES)
|
if (preferGLES)
|
||||||
std::rotate(attribslist.begin(), attribslist.begin() + 1, attribslist.end());
|
std::rotate(attribslist.begin(), attribslist.begin() + 1, attribslist.end());
|
||||||
|
|||||||
Reference in New Issue
Block a user