Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Force GL2 in LOVE
-- ...
-- 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