Commit Graph

179 Commits

Author SHA1 Message Date
Alex Szpakowski c9003750fa Removed extension and "."'s from default filesystem identity (issue #568) 2013-05-03 15:43:10 -03:00
Alex Szpakowski 77c6efd8fd Fixed love.mouse.setPosition when called in love.load (issue #611) 2013-05-02 07:05:14 -07:00
Alex Szpakowski 0130b726de Improved error messages when sending bad values to a shader (also issue #587) 2013-04-24 23:19:37 -07:00
Alex Szpakowski 6142352cd4 love._openConsole is now called before main.lua is loaded 2013-04-18 17:03:32 -03:00
Alex Szpakowski ba3a363fd3 Potentially worked around an SDL resize event bug in windows causing initial window creation to happen twice 2013-04-12 14:20:00 -03:00
Alex Szpakowski 7391d9821f Merged love.graphics.origin into default (issue #124) 2013-04-11 17:59:32 -03:00
Alex Szpakowski 63ac9aa52a De-obfuscated more shader error message tracebacks 2013-03-27 19:44:50 -03:00
Alex Szpakowski a55c7e871e fixed canvas:clear() when multi-canvas rendering is active, changed some names and wording
--HG--
branch : MRTs
2013-03-26 04:58:43 -03:00
Alex Szpakowski 2ea065c68b Added MRT support to canvases via love.graphics.setCanvases(c1, c2, ...), and an 'effects' callback function in shaders.
- Simultanious rendering to multiple canvases requires all canvases to be the same size (limitation of pre-GL3.0 framebuffers)
- love.graphics.isSupported("mrtcanvas") was added
- love_Canvases[n] (0-based array of active canvases) can be written to in pixel shaders in the 'effects' callback function
- everything drawn to multiple canvases at once will be duplicated to all canvases if no shader is active or the standard 'effect' shader function is used

--HG--
branch : MRTs
2013-03-24 02:20:15 -03:00
Alex Szpakowski 9e9eb42f1d Fixed filedata not being cleaned up when love.image.newImageData(filepath) fails 2013-03-19 09:01:15 -03:00
Alex Szpakowski f3290d84b7 Improved error handling and error messages when love.graphics.newShader fails 2013-03-18 22:55:41 -03:00
Alex Szpakowski 991b15d670 More renaming of "fragment" to "pixel" 2013-03-18 04:07:18 -03:00
Bart van Strien 7efe11b11f Add centered flag to setMode, optionally centers the window (on by default, as before) (issue #463) 2013-03-10 23:00:31 +01:00
Alex Szpakowski 6b1222366d Removed 'moved' suffix from new joystick callbacks
--HG--
branch : joystickevents
2013-03-05 12:31:11 -04:00
Alex Szpakowski a844ac2389 Added love.joystickaxismoved, love.joystickballmoved, and love.joystickhatmoved callbacks
--HG--
branch : joystickevents
2013-03-04 18:49:25 -04:00
Alex Szpakowski 2d7dd87eb5 Removed PixelEffect compatibility functions (love.graphics.newPixelEffect is now love.graphics.newShader, etc)
Also removed love.graphics.isSupported("pixeleffect") in favor of love.graphics.isSupported("shader")
2013-03-04 14:01:04 -04:00
Bart van Strien 3d0c5761ce Merge in default, update changelog
--HG--
branch : minor
2013-03-03 19:51:04 +01:00
vrld 5f586390d8 Add module love.math. Implements xorshift RNG.
Contains just a RNG for now, but may include other functionality (e.g.
transforms) later on.

New Functions:

-- as in the lua math library:
love.math.randomseed(number) -- set random seed
love.math.random()           -- get random number in [0:1) (uniformly distributed)
love.math.random(high)       -- get integer random number in [1:high]
love.math.random(low, high)  -- get integer random number in [low:high]

-- additional functions
love.math.randnormal()     -- get normally distributed number with zero mean
                           -- and unit variance
love.math.randnormal(o)    -- get normally distributed number with zero mean
                           -- and standard deviation `o`
love.math.randnormal(m, o) -- get normally distributed number with mean `m`
                           -- and standard deviation `o`
2013-02-25 18:32:54 +01:00
Alex Szpakowski 083218742a Added love.graphics.origin(): resets the coordinate system (replaces the current transformation matrix with the identity)
--HG--
branch : love.graphics.origin
2013-02-24 14:07:03 -04:00
Alex Szpakowski 3cf03fee8f Fixed the lua header generator script to output the correct year in the copyright text 2013-02-06 23:53:22 -04:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Bart van Strien 0fd4b147a4 Merge in default
--HG--
branch : minor
2013-01-27 19:15:55 +01:00
Alexander Szpakowski ce75b3af69 Merge from root 2013-01-17 20:29:48 -04:00
Bart van Strien a72c981c32 Make sure love.errhand gets a local reference to print as well, and find the error handler at errortime (partial #390) 2013-01-18 00:55:28 +01:00
Alexander Szpakowski e24d721381 Renamed all instances of 'ShaderEffect' (previously 'PixelEffect') to 'Shader'. 2013-01-16 07:21:41 -04:00
Alexander Szpakowski 69dc6c76e8 Better boolean shader extern support 2013-01-11 00:47:15 -04:00
Alexander Szpakowski ca1a9caf91 Added boolean value support to ShaderEffect:send 2013-01-11 00:21:28 -04:00
Alexander Szpakowski 3a9659b608 More minor graphics.lua cleanup 2013-01-09 01:01:13 -04:00
Alexander Szpakowski f1e72efd30 Cleaned up graphics.lua script a bit 2013-01-08 23:59:48 -04:00
Alexander Szpakowski 609ef2c4e4 Format luaL_error strings properly in ShaderEffect lua wrapper code 2013-01-07 06:39:33 -04:00
Alexander Szpakowski 88af7239c3 Removed unnecessary tabs from empty lines 2013-01-07 06:21:15 -04:00
Alexander Szpakowski 0968fa6f11 More cleanup and some overdone comments 2013-01-05 15:59:01 -04:00
Alexander Szpakowski 37191a5953 Minor cleanup 2013-01-04 05:05:25 -04:00
Alexander Szpakowski dcf9825226 Uniform value defines now exist in both the vertex and fragment shaders 2013-01-04 01:45:46 -04:00
Alexander Szpakowski c13b1fb03b Changed vertex shader callback function name from 'transform' to 'position', added more vertex shader defines (some to make it easier to eventually have a GLES2 backend), hopefully updated Visual Studio project with changed filenames 2013-01-04 01:20:38 -04:00
Alexander Szpakowski 15a1fd3552 Re-added "pixeleffect" graphics isSupported string for compatibility 2012-12-31 06:18:43 -04:00
Alexander Szpakowski d62878fbb8 Use GLSL #line preprocessor directive instead of manually trying to convert error message lines; flag shader objects for lazy-deletion after linking with program object instead of detaching them immediately (debuggers can now view source code of shader programs) 2012-12-28 21:32:13 -04:00
Alexander Szpakowski f54c270042 minor cleanup and fixes 2012-12-24 17:07:29 -05:00
Alexander Szpakowski 5252ed28cd changed shadereffect texture image unit counter and map to be non-static, get max texture units from max combined TIUs instead of max fragment shader TIUs, added the current MVP matrix as an argument to the vertex shader transform function, reduced code duplication in ShaderEffect::sendImage and sendCanvas 2012-12-21 05:03:50 -04:00
Alexander Szpakowski 0611234067 changed PixelEffect name to ShaderEffect, added lua-side support for vert/frag shader combinations with love.graphics.newShaderEffect, added tentative support for single-file vertex+fragment shaders 2012-12-20 21:51:31 -04:00
Bart van Strien a67a23e10f Maerge in default
--HG--
branch : minor
2012-11-18 19:28:57 +01:00
vrld f3bf2bbfe5 Fix bug where the compat message crashed love.
If in conf.lua `t.screen' is set to false or nil, the OpenGL context will not
be initialized, leading to a crash in 'Font::print()' when printing the compat
message later on.
2012-10-17 18:36:32 +02:00
Bart van Strien 8867f6c329 Merge in default
--HG--
branch : minor
2012-10-14 17:23:35 +02:00
vrld 5e3e24dcfb love.run(): Sleep after presenting graphics buffer.
Less sluggish controls w/o vsync.
2012-10-01 22:11:51 +02:00
vrld e35854acdc Remove love_ScreenSize from shaders.
PixelEffects would fail to load when screen_coords were unused.

Reopens issue #435: "PixelEffects have flipped screen_coords.y".
2012-10-01 21:39:52 +02:00
vrld 87c6646705 Fix #435 (for real this time). Unfixes #324.
Add a extern vec2 love_ScreenSize to the pixel effects that will
be (re)set upon PixelEffect::loadVolatile() and is used to flip
the fragment coordinate.

Unfixes #324 because canvases can have different dimensions than
the screen.
2012-08-05 16:08:22 +02:00
vrld 6f1ff69b61 Fix issue #435: PixelEffects have flipped screen_coords.y. 2012-08-03 19:39:41 +02:00
Bart van Strien bddee1753b Use a flags table for setMode now, implement resizable and borderless windows, and add resize event
Example setMode invocation: love.graphics.setMode(800, 600, {fullscreen = false, vsync = true, borderless = true})
t.screen.resizable and t.screen.borderless are available in love.conf
And love.resize(w, h) gets called if it exists on a resize event.
NOTE: love.handlers.resize(w, h) does the required setMode, but that does mean a visual reload

--HG--
branch : minor
2012-07-23 11:53:13 +02:00
vrld 85fa71c519 Make love.graphics.getFont() return (and set) default font when no font set.
Use closures instead of love.graphics.print(f)1() and love.graphics.newFont1.
2012-07-05 16:14:44 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00