-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from odin-lang/better-structure
Better structure and new README
- Loading branch information
Showing
27 changed files
with
47 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,32 @@ | ||
# Odin Examples | ||
|
||
This repository contains examples of how certain things can be accomplished in idiomatic [Odin](https://github.com/odin-lang/Odin), allowing you learn its semantics, as well as how to use parts of the `core` and `vendor` package collections. | ||
Learn [Odin](https://github.com/odin-lang/Odin) through idiomatic examples that show you how to: | ||
- Use the language | ||
- Use `core` libraries | ||
- Use `vendor` libraries | ||
|
||
The code examples are published in the hope they are found useful, and are in the [Public Domain](https://unlicense.org) or under [Odin's BSD-3 license](https://github.com/odin-lang/Odin/blob/master/LICENSE), per your choice. | ||
The examples are meant to be well written while following Odin best practices. | ||
|
||
Assets and third-party libraries are provided under their own license. If in doubt, check the `LICENSE*` and `COPYING*` file(s) in a particular directory for clarification. | ||
|
||
## By Example | ||
|
||
1) [Hellope](https://github.com/odin-lang/examples/tree/master/by_example/hellope) | ||
2) [Strings](https://github.com/odin-lang/examples/blob/master/by_example/strings/basic_string_example.odin) | ||
3) [Dynamic Arrays](https://github.com/odin-lang/examples/blob/master/by_example/dynamic_arrays/dynamic_arrays.odin) | ||
4) [Command Line Arguments](https://github.com/odin-lang/examples/tree/master/by_example/os_args) | ||
5) [Read Console Input](https://github.com/odin-lang/examples/tree/master/by_example/read_console_input) | ||
6) [Directory Info](https://github.com/odin-lang/examples/tree/master/by_example/dir_info) | ||
|
||
## Formats | ||
|
||
* [JSON](https://github.com/odin-lang/examples/tree/master/json/load_json) | ||
## Running the examples | ||
|
||
## Graphics | ||
Clone this repository. Most examples can be run by navigating into the folder and executing: `odin run .` | ||
|
||
* [D3D11 with SDL](https://github.com/odin-lang/examples/blob/master/sdl2/d3d11) | ||
* [Metal with SDL](https://github.com/odin-lang/examples/tree/master/sdl2/metal) | ||
* [OpenGL with SDL](https://github.com/odin-lang/examples/tree/master/sdl2/opengl) | ||
* [GLFW (Simple Window)](https://github.com/odin-lang/examples/tree/master/glfw/window) | ||
* [SDL with PNG loader using `core:image`](https://github.com/odin-lang/examples/tree/master/sdl2/hellope) | ||
* [MicroUI with SDL](https://github.com/odin-lang/examples/tree/master/sdl2/microui) | ||
* [MicroUI with Raylib](https://github.com/odin-lang/examples/tree/master/raylib/microui) | ||
* [Nanovg Examples](https://github.com/odin-lang/examples/tree/master/nanovg) | ||
Some examples have a `README` with additional information and instructions. | ||
|
||
## Math | ||
## License | ||
The contents of this repository is available under two licenses. Choose the one that you prefer: | ||
|
||
* [Simplex Noise Generation](https://github.com/odin-lang/examples/tree/master/math/noise/draw_texture) | ||
- [Public Domain](https://unlicense.org) | ||
or | ||
- [Odin's BSD-3 license](https://github.com/odin-lang/Odin/blob/master/LICENSE) | ||
|
||
## Games | ||
|
||
* [Tetroid (Tetris-like Game) with Raylib](https://github.com/odin-lang/examples/tree/master/raylib/tetroid) | ||
* [Chase in Space with SDL2](https://github.com/odin-lang/examples/tree/master/sdl2/chase_in_space) | ||
|
||
## Learn Metal | ||
|
||
* [00-window](https://github.com/odin-lang/examples/tree/master/learn_metal/00-window) | ||
* [01-primitive](https://github.com/odin-lang/examples/tree/master/learn_metal/01-primitive) | ||
* [02-argbuffers](https://github.com/odin-lang/examples/tree/master/learn_metal/02-argbuffers) | ||
* [03-animation](https://github.com/odin-lang/examples/tree/master/learn_metal/03-animation) | ||
* [04-instancing](https://github.com/odin-lang/examples/tree/master/learn_metal/04-instancing) | ||
* [05-perspective](https://github.com/odin-lang/examples/tree/master/learn_metal/05-perspective) | ||
* [06-lighting](https://github.com/odin-lang/examples/tree/master/learn_metal/06-lighting) | ||
* [07-texturing](https://github.com/odin-lang/examples/tree/master/learn_metal/07-texturing) | ||
* [08-compute](https://github.com/odin-lang/examples/tree/master/learn_metal/08-compute) | ||
* [09-compute-to-render](https://github.com/odin-lang/examples/tree/master/learn_metal/09-compute-to-render) | ||
Assets and third-party libraries are provided under their own license. If in doubt, check the `LICENSE*` and `COPYING*` file(s) in a particular directory for clarification. | ||
|
||
## Orca | ||
## Contributions | ||
Contributions via Pull Requests are warmly welcome. Before submitting your Pull Request, make sure of the following: | ||
|
||
* [breakout](https://github.com/odin-lang/examples/tree/master/orca/breakout) | ||
* [clock](https://github.com/odin-lang/examples/tree/master/orca/clock) | ||
* [ui](https://github.com/odin-lang/examples/tree/master/orca/ui) | ||
- The example compiles with flags `-vet -strict-style -vet-tabs -disallow-do -warnings-as-errors` | ||
- Add the example to `.github/workflows/check.yml` | ||
- The example follows Odin best practices. Look at code in `core` for inspiration on how to write idiomatic Odin. | ||
- Your code follows the Odin naming convention: https://github.com/odin-lang/Odin/wiki/Naming-Convention (exception can be made for direct ports of examples that need to match 1:1 to the source of the port). | ||
- Note that your code will fall under the licenses listed above. Only for third-party dependencies are other licenses allowed. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.