Skip to content

Commit d7b5a4d

Browse files
committed
Update README, add CONTRIBUTING and LICENSE
1 parent eeef92e commit d7b5a4d

File tree

3 files changed

+157
-38
lines changed

3 files changed

+157
-38
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
How To Contribute
2+
=================
3+
4+
We welcome your feedback and input in how to make Lime better!
5+
6+
If you are interested in discussing new features, the direction the project or how to integrate some change, please open an issue so we can talk about.
7+
8+
1. Fork the repository
9+
10+
2. Make the desired change
11+
12+
3. Create a pull request
13+
14+
15+
You may consider creating a branch specific to the fix or improvement you wish to make, in case you have more than one that has not been accepted into the project, or to allow for item-specific changes.
16+
17+
It is our goal to help Lime evolve as a clean, easy-to-use (but powerful) layer for cross-platform development. Thanks for being a part of making this possible!
18+

LICENSE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
License
2+
=======
3+
4+
The MIT License (MIT)
5+
6+
Copyright (c) 2007-2014 OpenFL Technologies, LLC and contributors
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in
16+
all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
THE SOFTWARE.

README.md

Lines changed: 115 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,151 @@
1-
#lime
2-
---
3-
light media engine
4-
A lightweight OpenGL framework for [haxe](http://haxe.org).
1+
Lime
2+
====
53

6-
![lime](lime.png)
4+
![Lime](lime.png)
75

6+
Introduction
7+
------------
88

9-
A starting point for building OpenGL applications across Mac, Windows, Linux, Blackberry, HTML5(WebGL), Android, iOS and more.
9+
Lime (Light Media Engine) is an abstraction layer that makes it simple to go cross-platform with only one codebase; without the compromise of relying upon a scripting language or a virtual machine.
1010

11-
#What it does
12-
13-
lime exposes the following
11+
Lime leverages the power of the [Haxe](http://haxe.org/) programming language, compiling Haxe code directly to C++, JavaScript and other target languages. Haxe is a flexible, robust language, and the resulting applications are truly native.
1412

15-
- OpenGL
16-
- Audio
17-
- Input
18-
- Windowing
19-
- Useful native features
13+
Platforms
14+
---------
2015

21-
By setting up a bootstrap for your application, lime will handle all the low level events and call into your main class (this can be overridden) for you.
16+
Lime currently supports the following platforms:
2217

23-
#How it works
18+
* Windows
19+
* Mac
20+
* Linux
21+
* iOS
22+
* Android
23+
* BlackBerry
24+
* Tizen
25+
* Emscripten
26+
* HTML5
2427

25-
lime is a cross platform haxe library powered by [lime-tools](http://github.com/openfl/lime-tools), for building upon opengl across many platforms.
28+
With legacy support for:
2629

27-
### lime is two parts
28-
**One part** is the native code, the underlying platform templates and systems to expose the features.
29-
**The second part** is the haxe wrapper, forwarding the events to your application.
30+
* webOS
31+
* Flash
3032

31-
For example, frameworks like [OpenFL](http://github.com/openfl) leverage lime to implement a cross platform Flash API by leaning on the native portion, without using the current lime haxe classes at all.
33+
What It Does
34+
------------
3235

33-
#Things to note
36+
Lime exposes the following:
3437

35-
- lime (native, and wrapper) are low level. It does the bare minimum to give you access to the metal - without making it difficult.
36-
- The lime wrapper works by default by bootstrapping your application main class into the framework.
37-
- The lime wrapper will call functions into your class, for mouse, keys, gamepad and other system or windowing events (resizing, for example). Then, you handle them.
38-
- The lime wrapper exposes an API to talk to the windowing, audio and other API's across platforms.
38+
* OpenGL
39+
* Audio
40+
* Input
41+
* Windowing
42+
* Useful native features
43+
44+
By setting up a bootstrap for your application, Lime will handle all of the low-level events, and call into your main class (this can be overridden) for you.
3945

40-
- The lime GL wrapper code is based on WebGL Api. It matches very closely. Including types and constants.
41-
- The lime native parts were forked from [nme](http://github.com/haxenme/nme) (native media engine) and merged into openfl-native - but now (and lastly) been merged into lime and joined forces to create an agnostic, cross platform starting point to widen the haxe landscape for all frameworks and framework developers.
42-
- See the wiki for a 1.0 wrapper [roadmap](https://github.com/openfl/lime/wiki/lime-wrapper-1.0-Roadmap).
46+
The rendering API is very similar to WebGL, which in turn is similar to OpenGL ES. This enables us to support your code on platforms using OpenGL, OpenGL ES and WebGL.
4347

44-
Expect docs, diagrams and breakdowns of how to get started using lime soon. See the examples/ folder for the basics for now.
48+
How It Works
49+
------------
4550

46-
# Using Development Builds
51+
Lime comes together in three different parts.
52+
53+
The **first** are command-line tools, which manage the build, package, install and run process for each support platform.
54+
55+
The **second** is a native layer, which handles rendering, sound and other features with hand-written C++ (with a small amount of Objective-C and Java) in order to handle the core of each platform. This layer is not used when targeting HTML5.
56+
57+
The **third** is a Haxe wrapper (under development), which exposes this functionality and helps abstract differences (such as HTML5 vs native builds)
58+
59+
Lime is designed to power higher-level frameworks, in addition to exposing a sensible cross-platform API for "more direct" development. Most popularly, Lime is also used as the foundation for [OpenFL](https://github.com/openfl/openfl) which is an open-source, accelerated version of the Flash API, supporting all of the Lime targets as well as an HTML5 canvas implementations of the Flash API as well.
60+
61+
License
62+
-------
63+
64+
Lime is free, open-source software under the MIT license.
65+
66+
Installing Lime
67+
---------------
68+
69+
First you will need to first install Haxe 3.0 for [Windows](http://haxe.org/file/haxe-3.0.0-win.exe), [Mac](http://haxe.org/file/haxe-3.0.0-osx-installer.dmg) or [Linux](http://www.openfl.org/download_file/view/726/12426/).
70+
71+
Once Haxe has been installed, you can install a release version of Lime from a terminal or command-prompt with these commands:
72+
73+
haxelib install lime
74+
haxelib run lime setup
75+
76+
Some platforms will require some additional setup before you can use them. For example, you must have Visual Studio C++ in order to build native applications for Windows. Lime includes a "setup" command that can help you walk through the process for each target:
77+
78+
lime setup windows
79+
lime setup android
80+
lime setup blackberry
81+
lime setup tizen
82+
lime setup emscripten
83+
lime setup webos
84+
85+
In order to build for Mac or iOS, you should already have a recent version of Xcode installed. In order to build for Linux, usually only g++ is required, which may be installed with your distribution already. No setup is required for these platforms.
86+
87+
Development Builds
88+
------------------
89+
90+
If you would like to begin using Lime directly from the repository, or want to help contribute to its development, you will first want to clone the repository (or your fork of the repository) then tell "haxelib" where your development version is installed. You will also need to clone [lime-build](https://github.com/openfl/lime-build), which includes static libraries and headers required to recompile the Lime native layer from the source.
4791

4892
git clone https://github.com/openfl/lime
4993
haxelib dev lime lime
5094
git clone https://github.com/openfl/lime-build
5195
haxelib dev lime-build lime-build
5296

53-
After cloning, "lime/ndll" will be empty. You can build binaries for a platform, use "lime rebuild" or "openfl rebuild", such as:
97+
The "lime/ndll" directory will be empty, but you can easily rebuild the binaries for any platform using "lime rebuild", like:
5498

5599
lime rebuild windows
56100
lime rebuild windows,blackberry
57101
lime rebuild linux -64
58102
lime rebuild android -debug
59103

60-
If you are running Linux, you will (probably) need to install additional packages to build from the source. For an Ubuntu system, it may look like this:
104+
Most platforms do not require additional dependencies (other than usual dependencies) to rebuild, but if you are running linux you will development libraries for GL and GLU, as well as multilib versions of g++ if you plan to rebuild both 32- and 64-bit versions of the Lime native layer (which is done through "rebuild" by default)
61105

62106
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev g++ g++-multilib gcc-multilib
63-
64-
For other platforms, the dependencies will be similar to compiling standard Lime/OpenFL applications for the platform, for example, you will need Visual Studio for Windows builds, Xcode for Mac and iOS builds, etc. Platforms which require "setup" step, such as Android, should have that completed, such as "lime setup android"
65107

66-
The default "rebuild" for each target compiles all needed binaries, such as x86, armv5 and arm7 for release and debug. You can use "-debug", "-release", "-64" and "-32" to specify that you only want to rebuild one kind of binary. You can use commas to separate multiple builds.
108+
By default, "rebuild" will compile every binary needed for a target, including both release and debug, and for certain platforms, multiple architectures (such as x86 for an emulator or arm for a device). You can use "-debug", "-release", "-64" and "-32" to specify that you only want to rebuild one kind of binary, and you can use commas to separate multiple builds, in the same command.
67109

68-
There is also a helpful "-rebuild" flag you can use in combination with other Lime/OpenFL commands, to rebuild the required binaries in addition to the meaning of the original command. For example, this will test the current application for Windows, while first building release platform binary before packaging:
110+
There is also a helpful "-rebuild" flag you can use, that rebuilds only the required Lime binary, in addition to the meaning of the original command. For example, the following will test the current application, rebuilding the Windows release binary for Lime first:
69111

70112
lime test windows -rebuild
71113

72-
To return to release builds:
114+
To return to release builds of Lime, use:
73115

74116
haxelib dev lime
117+
118+
Using Lime
119+
----------
120+
121+
If you prefer a low-level API, you may want to use Lime directly. The Lime 1.0 wrapper is still under development, you can see the wiki for the 1.0 [roadmap](https://github.com/openfl/lime/wiki/lime-wrapper-1.0-Roadmap).
122+
123+
You can get a taste by trying the "SimpleOpenGL" or "HerokuShaders" samples:
124+
125+
lime create lime:SimpleOpenGL
126+
cd SimpleOpenGL
127+
lime test linux
128+
129+
You can substitute "HerokuShaders" for "SimpleOpenGL" in the above command, or use "lime create" to see all available samples. The "test" command combines "update", "build" and "run" into one step. If you are not running Linux, or would like to use a different target, you can try one of the following as well:
130+
131+
lime test windows
132+
lime test mac
133+
lime test ios
134+
lime test ios -simulator
135+
lime test android
136+
lime test android -emulator
137+
lime test blackberry
138+
lime test blackberry -simulator
139+
lime test tizen
140+
lime test tizen -simulator
141+
lime test emscripten
142+
lime test html5
143+
lime test webos
144+
lime test webos -simulator
145+
146+
If you do not prefer a low-level API, [OpenFL](https://github.com/openfl/openfl) is currently the easiest way to use Lime. Instead of making direct OpenGL calls, OpenFL uses a much simpler (but powerful) API, on top of the functionality of Lime. For example, in order to display an image, OpenFL would use:
147+
148+
var bitmap = new Bitmap (Assets.getBitmapData ("image.png"));
149+
addChild (bitmap);
150+
151+
This is far fewer steps than using OpenGL directly, so you should decide what level of API you prefer, even if you are not familiar (or do not prefer) the Flash API, as OpenFL also allows direct OpenGL calls using "OpenGLView" if you prefer.

0 commit comments

Comments
 (0)