Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remogatto/shapes
A package for rendering simple two-dimensional shapes on an OpenGL ES 2 context
https://github.com/remogatto/shapes
Last synced: 2 months ago
JSON representation
A package for rendering simple two-dimensional shapes on an OpenGL ES 2 context
- Host: GitHub
- URL: https://github.com/remogatto/shapes
- Owner: remogatto
- License: mit
- Created: 2014-01-19T10:51:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-31T13:51:38.000Z (almost 11 years ago)
- Last Synced: 2024-06-19T10:14:17.680Z (7 months ago)
- Language: Go
- Size: 453 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shapes [![GoDoc](https://godoc.org/github.com/remogatto/shapes?status.png)](http://godoc.org/github.com/remogatto/shapes)
shapes is a small package for drawing simple two-dimensional
shapes on an OpenGL ES 2 context. Used in conjuction with
[Mandala](https://github.com/remogatto/mandala) it provides a quick way to represent geometric
2D objects on Android games.# Example API
~~~go
// Create a 100x100 pixels² box
box := NewBox(100, 100)// Place the box at a given position
box.Position(10, 10)// Assign a color to it
box.Color(color.White)// Attach the box to a world object (see World interface)
box.AttachToWorld(world)// Render the box on the surface
box.Draw()// swap the buffers
~~~# Supported shapes
* Box
* Segment# Test
See [test](test/) for a black-box testing approach.
# LICENSE
See [LICENSE](LICENSE)