Commit Graph

320 Commits

Author SHA1 Message Date
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
vrld d4c59d3508 Fix issue #406: Empty glyphs cause some ATI cards to crash in Font::addGlyph(). 2012-04-03 13:55:12 +02:00
vrld 340ee8442d Fix issue #397: printf does not center string correctly. 2012-03-22 13:11:35 +01:00
vrld 39e1c59989 Actually copy existing buffer data to temporary memory region in VBO::map(). 2012-03-07 23:33:27 +01:00
vrld 6dee041a9d Throw exception when VBO cannot allocate enough memory in VBO::map(). 2012-03-07 23:26:03 +01:00
vrld 3f365857ee Replace glMapBufferARB() with temp memory + glBufferSubDataARB().
Instead of letting OpenGL manage the memory mapping, allocate a temporary
block of memory upon VBO:map(). Upon VBO::unmap() the block is copied to
graphics memory using glBufferSubDataARB() and then released.

Hopefully this will fix some weird error with Windows XP + old drivers, where
VBOs can be created, but the mapped memory cannot be allocated resulting in
the sprite batch drawing nothing at all.

According to the interwebs this could actually faster than using OpenGL mapped
memory, because there is no unnecessary syncing involved.
2012-03-07 23:24:29 +01:00
vrld 2b6cc4ea8c Move VertexBuffer::Bind implementation to header to hint inlining 2012-03-07 23:01:05 +01:00
vrld 4947498488 Add VertexBuffer::Mapper for RAII vbo mapping 2012-03-07 22:59:23 +01:00
vrld 17dc8760b9 Replace VertexArray with VertexBuffer in SpriteBatch (less confusing). 2012-03-07 22:35:21 +01:00
vrld 1dd40b690b Some idiot put a != where there should be a ==. 2012-03-05 22:14:00 +01:00
vrld febd7757fc Make sure all error flags are cleared before calling glBufferDataARB() in VBO::load(). 2012-03-05 20:58:17 +01:00
vrld c0ffa5b07e Add error checking in VBO::load().
VertexBuffer should now be able to fall back to vertex arrays if
glBufferDataARB() fails (possible due to lack of memory).
2012-03-05 20:46:46 +01: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
vrld e02a2679c2 Add love.graphics.getPixelEffect() (issue #372) -- thanks, slime73! 2012-02-09 13:19:52 +01:00
Bill Meltsner 86abc9323b Add ParticleSystem:getPosition (issue #368) 2012-02-04 11:31:07 -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
Bart van Strien 386dd53780 Make VertexBuffers use size_t, raising the limit of vertices that can be stored
This means more sprites in SpriteBatches, yay!
2012-01-24 23:02:35 +01:00
vrld 94bd960cc7 Fix number of arguments check in w_ParticleSystem_setSizes. 2012-01-20 14:07:22 +01:00
vrld 3904e49c75 Check argument sanity in w_ParticleSystem_setColors. 2012-01-19 14:59:36 +01:00
vrld 1a9eafb76a Fix buffer over-read in draw_overdraw() (thanks, Boolsheet!). 2012-01-15 14:36:51 +01:00
Bart van Strien 9bf6f43a4e Adding the files is a crucial step, you know
And I so blame slime73 for his incorrect diff
2012-01-10 15:39:44 +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
Bill Meltsner 21516fc658 Add padding around every glyph in a Font texture, fixing the fringing seen with scaled text (actually fixes issue #321) 2012-01-08 20:59:52 -06:00
Bill Meltsner 4c5d11d582 Backout changeset e90d89c7b9712297c14ba73eda37ec28f25101f9 2012-01-08 20:14:27 -06:00
Bart van Strien 5fa0a4cfa3 Drastically improve the font scaling quality (issue #321)
Note that it isn't perfect yet, but a lot better.
2012-01-08 14:11:40 +01:00
Bart van Strien 1509403ca7 Add SpriteBatch:getImage (issue #321) 2012-01-08 13:46:01 +01:00
Bart van Strien e0b420c988 Properly export love modules to lua, package.loaded is correct now 2012-01-07 14:08:41 +01:00
Bart van Strien 870973197c Only bind images when they weren't (issue #353) 2012-01-07 11:37:50 +01:00
vrld 9c9b1810b7 Decrese core-line width when overdrawing to preserve original line width. 2011-12-30 14:09:26 +01:00
vrld 6178aea6ef Discard active stencil when switching canvas. 2011-12-29 15:27:04 +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 a855a01f02 Fix two particle system typos (thanks, Boolsheet!) 2011-12-26 21:29:47 +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
Bart van Strien c707a4ca45 Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations) 2011-12-24 01:10:40 +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 951d420db7 Eliminate more warnings 2011-12-20 21:02:59 +01: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
Bill Meltsner 969c53e592 make love build on OS X again - there's no need to include gl.h directly, GLee.h does that for us in a cross-platform way 2011-12-19 00:28:45 -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 7c8fff979a Create love.window, abstract SDL out of love.graphics 2011-12-11 16:55:52 +01:00