Created
December 19, 2020 14:15
-
-
Save MikuAuahDark/2efb38e123240e11702c1ba4f96fbcad to your computer and use it in GitHub Desktop.
Force GL2 in LOVE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ... | |
-- Add before love.conf function, typically at top of the file | |
local function forceGL2() | |
local ffi = require("ffi") | |
if not pcall(function() return ffi.C._putenv end) then | |
ffi.cdef("int _putenv(const char *);") | |
end | |
return ffi.C._putenv("LOVE_GRAPHICS_USE_GL2=1") == 0 | |
end | |
forceGL2() | |
-- Rest of your conf.lua goes here | |
-- ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment