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
Bart van Strien
0a423d3e67
Export boot.lua as love.boot, and make it return a function that 'does everything'
...
Of course love.cpp is modified accordingly (now calls the result of boot.lua)
2012-05-29 23:26:23 +02:00
Bart van Strien
f933d5983b
Add basic support for file:// uri scheme (issue #425 )
...
Note that this won't unescape, or anything, just remove the file:// prefix if present
2012-05-19 01:27:35 +02:00
Bart van Strien
cadde8947f
Use love.run's return value as return value (if valid), default to 0
2012-05-18 18:56:05 +02:00
Bart van Strien
db7fba1d3a
Now returns return value 1 on error
2012-05-18 18:12:25 +02:00
Bart van Strien
0f0a64819e
Add --fused command line argument, to override fused game detection
...
(Designed to make launchers work for 'fake-fused' games, for example
ones you'd easily distribute on linux.)
2012-05-18 15:15:03 +02:00
vrld
4370f6c9d6
Fix typo in PixelEffect:send() dispatcher when trying to send unsupported type
2012-04-23 19:11:04 +02:00
Bart van Strien
2e8939febe
Add automatic seeding to love.run
2012-02-05 23:13:42 +01:00
Bart van Strien
db9e264685
Update auto.lua to bring it into the wonderful 2012
2012-02-05 23:13:18 +01:00
Bill Meltsner
be55579a22
Happy New Year, have an enormous diff
2012-01-09 02:41:11 -06:00
vrld
d218291473
Fix issue #348 - strict mode. Use setCanvas instead of setRenderTarget in
...
love.releaseerrhand.
2012-01-04 14:01:14 +01:00
Bart van Strien
d3bd9b1156
Events now have 4 arguments (or less)
2011-12-20 19:17:26 +01:00
Bart van Strien
adf25991e8
Fix the joystick event handler names, to match the new event names
2011-12-19 14:15:48 +01:00
Bart van Strien
e37470f54d
No more Font:set(), instead love.graphics.setNewFont
2011-12-13 19:22:59 +01:00
Bart van Strien
9682ebecf9
Remove love.graphics.setFont([<file>,] <size>) shorthand, idiom is now love.graphics.newFont([<file>,] <size>):set()
...
This makes sure that setFont doesn't create any fonts.
2011-12-13 18:51:24 +01:00
Bart van Strien
083dd11185
Switch to a custom event system, where SDL pumps into
...
To do this we needed to take ThreadVariant out of love.thread, and move it to common.
This also changes event names, instead of 1/2-letter abbreviations, full names!
2011-12-13 17:50:38 +01:00