Commit Graph

138 Commits

Author SHA1 Message Date
Alexander Szpakowski ce75b3af69 Merge from root 2013-01-17 20:29:48 -04:00
Bart van Strien 501beb7d02 Add blend mode 'none' (issue #536) 2013-01-18 00:48:36 +01:00
Alexander Szpakowski e24d721381 Renamed all instances of 'ShaderEffect' (previously 'PixelEffect') to 'Shader'. 2013-01-16 07:21:41 -04:00
Alexander Szpakowski 331c883c77 Improved clarity of some comments, variable names, and functions 2013-01-15 20:20:35 -04:00
Alexander Szpakowski 8fdd6cbbb2 Merged in from main repository (originally from love-mipmap fork) 2013-01-12 18:07:14 -05:00
Alexander Szpakowski 808a09f786 Changed shader source list from a vector of sources to a map of shader types to source codes 2013-01-07 19:13:19 -04:00
Alexander Szpakowski a6f4a3ab0f Removed names of unused parameters to quiet noisy compilers 2013-01-07 07:29:04 -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 8b3fb1d71c Code cleanup 2013-01-02 17:19:41 -04:00
Alexander Szpakowski 1678252b7a Applied patch from issue #542 (texture filtering inconsistencies) in main LÖVE repository 2013-01-01 21:29:38 -04:00
Alexander Szpakowski da661e8e2f Bind texture id 0 (no texture) instead of disabling/re-enabling texturing entirely, when drawing graphics primitives. This both allows shaders to potentially use their own textures when drawing textureless primitives, and reduces overhead caused by constant GL state changes when drawing many graphics primitives. 2013-01-01 04:08:30 -04:00
Alexander Szpakowski 83204c5dc5 ShaderEffects now take a dynamically sized list of source codes instead of one vertex and one fragment shader string 2012-12-22 22:47:07 -04:00
Alexander Szpakowski 16f925affa improved GL texture binding api to take texture units into consideration 2012-12-21 20:35:32 -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
Alexander Szpakowski 28e3b105e9 added C++side support for combinations of vertex and fragment shaders in pixeleffects 2012-12-20 03:42:48 -04:00
vrld 6882c2c32c Close issue #519: Maximum stack depth reached error message. 2012-11-23 09:08:36 +01:00
vrld e6711b2837 Fix multiplicative blend mode. 2012-10-12 13:52:16 +02:00
vrld ccdf6e1c00 Fix Issue #476: Add HDR Canvas (thanks, Alexander Szpakowski!).
* Add `love.graphics.isSupported("hdrcanvas")' to query whether the hardware
  actually supports HDR canvases.

* Add optional third argument to `love.graphics.newCanvas(w,h, type)', where
  `type' is one of "normal" or "hdr" and defaults to "normal". HDR canvases
  use floating point that can have values > 1 to store pixels, allowing for
  HDR rendering and other higher level lighting techniques when combined with
  pixel effects.

* Add `canvas:getType()'.
2012-10-11 22:22:10 +02:00
Marc Lepage e5c4f7f43c Remove call to glAlphaFunc as alpha testing is never enabled. 2012-07-17 21:33:16 -04:00
Marc Lepage 4cc0056a21 Fix some typos in comments. 2012-07-12 00:21:25 -04:00
vrld 6d02057864 Close issue #408: printf-justify alignment.
Add letter_spacing argument to Font::print(). Might be worth to expose to Lua
at some point. Justify alignment may result in mushy/blurred glyphs.
2012-07-08 13:37:09 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Bart van Strien bc4e59ba24 Apply the line width patch 2012-06-11 17:06:57 +02:00
Bart van Strien 1b568fdf39 Make setMode get the actual width and height after setting, fixes bug with width and height 0 (aka desktop resolution) 2012-05-18 17:46:00 +02:00
Bart van Strien 1e00f0f981 Move the default image filter to the Image class, instead of Graphics applying it on newImage 2012-05-18 17:35:51 +02:00
vrld 26780681ea Remove artifacts at line endings (see 4f9c5db78143). 2012-05-09 17:45:50 +02:00
vrld b5f3addd35 Remove antialiasing artifacts when drawing lines at a very big scale.
When drawing lines at scales>1 the inner workings (gradients) of the
antialiasing too were upscaled and became visible. When the scale was very
large this produced interesing yet unexpected visuals.
2012-05-09 17:17:16 +02:00
Bill Meltsner b956813e8e Freeze, Allman police! 2012-03-03 20:41:42 -05:00
Bill Meltsner fc6a9df304 Report lack of support for the subtract blendmode through the Blue Screen of LÖVE instead of stderr spam. 2012-03-03 20:33:55 -05:00
Bill Meltsner 57b4d2c5b9 Add support for falling back to glBlendEquationEXT if necessary.
This should help keep LÖVE from crashing on old cards with crappy drivers.
2012-03-03 19:25:42 -05:00
Bill Meltsner d69ec266be Call PixelEffect::detach() in Graphics::reset, not Graphics::clear (fixes issue #379) 2012-03-02 19:26:40 -05:00
Bill Meltsner 84634affd5 Make love.graphics.toggleFullscreen properly handle graphics state. 2012-02-29 18:55:08 -05:00
Bill Meltsner 8f781e9f13 Add "combine" color mode, for colorizing images (see https://love2d.org/forums/viewtopic.php?f=4&t=7648 ) 2012-01-26 15:00:40 -05:00
Bill Meltsner a0be14869f Fix state saving to handle any blend/colormode 2012-01-26 14:46:59 -05:00
vrld 1a9eafb76a Fix buffer over-read in draw_overdraw() (thanks, Boolsheet!). 2012-01-15 14:36:51 +01:00
Bart van Strien 2ac4a9e6d0 Manually keep track of bound textures, so we don't have to poll each frame
Patch submitted by slime73.
2012-01-10 15:36:18 +01:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
vrld 9c9b1810b7 Decrese core-line width when overdrawing to preserve original line width. 2011-12-30 14:09:26 +01:00
vrld b0fbff108c Better line smoothing.
- Overdraw now uses only one array buffer.
- Line endings are overdrawn if the line is not closed.
- Includes more magic.
2011-12-29 15:16:53 +01:00
vrld cde8b92113 Remove some type conversion warnings. 2011-12-28 14:17:10 +01:00
vrld a7e040001b Reset current color after drawing smooth lines.
GL_COLOR_ARRAY used by line smoothing leaves the current color
undefined after calling glDrawArrays. This makes it defined again.
2011-12-27 23:32:11 +01:00
Bart van Strien 864c800e10 Fix some warnings 2011-12-27 21:25:06 +01:00
vrld 247f57c10b Fix issue 246: Add line antialiasing through 'overdraw'.
Points to consider:
- Make softness customizable (`halo' in Graphics::polyline()).
- Add overdraw at beginning and ending edge of the line.
2011-12-25 19:05:04 +01:00
Bill Meltsner bc278cf2b8 love.graphics.arc is now better and actually draws in the right direction 2011-12-22 03:37:34 -06:00
Bart van Strien 53e010a832 Remove all uses of LOVE_UNUSED, and simply not name the arguments instead 2011-12-20 20:26:17 +01:00
Bart van Strien 7c8fff979a Create love.window, abstract SDL out of love.graphics 2011-12-11 16:55:52 +01:00
Bart van Strien 5fb4f2c63d Request ALL the bits 2011-11-30 17:50:41 +01:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00