Skip to content

Instantly share code, notes, and snippets.

@MikuAuahDark
Created December 19, 2020 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikuAuahDark/2efb38e123240e11702c1ba4f96fbcad to your computer and use it in GitHub Desktop.
Save MikuAuahDark/2efb38e123240e11702c1ba4f96fbcad to your computer and use it in GitHub Desktop.
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