Hi all,
I have created a simple library for drawing several geometric shapes (like rectangles or convex polygons) in retained mode instead of immediate mode. So instead of using the love.graphics.* functions to set the color and size of your shapes, you create objects, set their visual properties and then draw them on the screen. The shape objects are based on meshes, so you can texture them, transform them and whatnot.
Personally, I will use this library to draw elements in a classic retained mode GUI, but you might find it useful for other applications as well.
This is what the demo looks like:
Shape borders are smoothed in a similar way as implemented in the LÖVE drawing functions. I plan to use this smoothing technique for the shapes themselves as well in a future release, to further improve the rendering quality.
Oh, and I haven't implemented ellipses yet, but it's on my list.
Repository: https://github.com/binaryfs/loveshape
Best regards
loveshape: draw geometric shapes in retained mode
-
- Prole
- Posts: 15
- Joined: Sat Dec 21, 2013 4:28 pm
-
- Prole
- Posts: 15
- Joined: Sat Dec 21, 2013 4:28 pm
Re: loveshape: draw geometric shapes in retained mode
Hello all,
I released version 1.1.0 with the following major changes:
And this is what the soft edges look like:
I thought about implementing straight lines as well, but currently I have no use for them and technically they can be represented by rectangles. So at the moment I have no plans to add them.
Best regards
I released version 1.1.0 with the following major changes:
- Unit tests added. During the tests I discovered some issues and inconsistencies which I fixed along the way.
- Elliptical shapes added. Not that I badly needed them, but the library felt incomplete without them.
- Soft edges added. These can be used for both, simple anti-aliasing and some interesting visual effects.
- Revised LÖVE demo (you can see a screenshot of it in the initial post, which I updated)
And this is what the soft edges look like:
I thought about implementing straight lines as well, but currently I have no use for them and technically they can be represented by rectangles. So at the moment I have no plans to add them.
Best regards
Who is online
Users browsing this forum: No registered users and 3 guests