Alex Szpakowski
3792dee4b4
Backout changeset 57172a7f03452a6b07f346e850f3e1020e230f46
2014-06-05 14:59:29 -03:00
Alex Szpakowski
e9e303c1e8
Changed embedded Lua scripts to be included in the love source via C++11's raw string literals instead of a generated header file. Removed auto.lua.
...
As a result, love can be compiled immediately after editing an embedded Lua script.
Visual Studio 2013 or newer is required for C++11 raw string literals in Windows.
2014-06-05 13:42:03 -03:00
Alex Szpakowski
4d0bbb97d8
Fixed Lua pattern matching for detecting the 'position' and 'effect' shader functions (thanks lpghatguy!)
2014-05-31 00:42:18 -03:00
Alex Szpakowski
0372977dfa
Backout changeset 6dd72101871f163ee0e644c751f80773d45f339f
...
The change should only be done for GLES, not desktop GL - their specifications differ on this.
2014-05-03 22:21:45 -03:00
Alex Szpakowski
5428a5d75f
Backout changeset b3928e24add23da69dcd90c34985cd6a05454be0
2014-05-03 22:07:32 -03:00
Alex Szpakowski
4bc96f1bf6
Internally compose and pass an array of shader source codes to OpenGL, instead of relying on #line to make sure the line number is correct for shader error messages (resolves issue #882 )
2014-05-03 21:43:20 -03:00
Bart van Strien
9972153696
Use '#line 1' instead of '#line 0' in shader sources, for compatibility with GLES ( fixes #882 )
2014-05-03 14:50:08 +02:00
Alex Szpakowski
f65e9826d9
Disabled shader code for instancing
2014-03-29 17:51:33 -03:00
Alex Szpakowski
c5c788e976
Added a built-in variable readable in shaders: ‘love_ScreenSize’. Its x and y components contain the width and height of the current viewport. Resolves issue #841 .
2014-01-27 02:58:34 -04:00
Alex Szpakowski
73f1ce0d40
Added instancing support to Meshes via Mesh:setInstanceCount. Added a new built-in variable to vertex shaders: int love_InstanceID.
...
love.graphics.draw(mesh) will draw the mesh instancecount times, using hardware instancing when available. The only way to draw individual instances differently from each other is to use the love_InstanceID variable in a vertex shader.
Added love.graphics.isSupported(“instancing”). Hardware instancing is supported if true, otherwise a (slower) pseudo-instancing fallback is used internally when drawing instanced meshes.
2014-01-21 06:01:50 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
aa69a695d3
Canvases can now be used in SpriteBatches, ParticleSystems, and Meshes (resolves issue #782 ).
...
Canvases and Images are now subclasses of the new Texture class.
Added setTexture and getTexture methods for Meshes, ParticleSystems, and SpriteBatches (the old set/getImage methods are deprecated but not removed.)
Canvas texture coordinates are no longer flipped.
2014-01-03 17:07:12 -04:00
Alex Szpakowski
d815374a9b
Renamed the 'ModelViewMatrix' and 'ModelViewProjectionMatrix' built-in shader variables to 'TransformMatrix' and 'TransformProjectionMatrix', respectively.
2013-08-16 03:17:55 -03:00
Alex Szpakowski
123889dfed
Converted code for Shader:send from Lua to C++
2013-05-21 20:41:26 -03: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
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
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
Alex Szpakowski
96161c66f6
Updated copyright text for the new year
2013-02-05 05:32:49 -04: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
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
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
vrld
4370f6c9d6
Fix typo in PixelEffect:send() dispatcher when trying to send unsupported type
2012-04-23 19:11:04 +02:00
Bill Meltsner
be55579a22
Happy New Year, have an enormous diff
2012-01-09 02:41:11 -06: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
f9077ee1a6
Store the vera font as file data, instead of doing that every time it is loaded
2011-11-08 22:33:08 +01:00
vrld
6b7b68ebd0
Fix issue #314 : Can't use #define in shader code.
2011-10-12 12:37:09 +02:00