Skip to content

Commit

Permalink
Nix references to removed mach.sdl directory
Browse files Browse the repository at this point in the history
  • Loading branch information
pineapplemachine committed Sep 13, 2019
1 parent 80f41e6 commit 657fb47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 64 deletions.
61 changes: 1 addition & 60 deletions examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

## How to run

Examples in this directory which do not depend on `mach.sdl` can be run
simply using a command such as:
Examples in this directory can be run simply using a command such as:

``` text
rdmd -I"path/to/mach.d" "helloworld/helloworld.d"
Expand All @@ -12,29 +11,6 @@ rdmd -I"path/to/mach.d" "helloworld/helloworld.d"
Note that the **rdmd** tool is packaged with the **dmd** compiler, which can be
downloaded from the dlang website [here](https://dlang.org/download.html).

Examples which demonstrate the `mach.sdl` package depend on the Derelict
SDL2 and OpenGL3 bindings.
In order to run these examples, the [DerelictSDL2](https://github.com/DerelictOrg/DerelictSDL2),
[DerelictGL3](https://github.com/DerelictOrg/DerelictGL3), and
[DerelictUtil](https://github.com/DerelictOrg/DerelictUtil) dependencies must
be downloaded and placed in some directory and the examples can be run using
a command such as:

``` text
rdmd -I"path/to/mach.d" -I"path/to/dir/containing/derelict/deps" "movepineapple/movepineapple.d"
```

Note that mach typically depends on the most up-to-date versions of these
repositories, and downloading them automatically using **dub** may result in
compiler errors if the dub packages are not recent.

If running on **Windows**, the SDL2 DLLs must be available to the compiler.
If compilation fails with the above command, try placing the DLLs in the same
directory as the source file.
If running on **OSX**, the SDL2 dylibs must be installed on the system.
The DLLs and dylibs can be downloaded [here](https://www.libsdl.org/download-2.0.php)
or [here](https://www.libsdl.org/projects/).

## What's in this directory

### helloworld
Expand All @@ -59,38 +35,3 @@ modified content to an output file.

Traverses this examples directory and its subdirectories and
finds and prints the paths of all the D source files contained in them.

### movepineapple

Initializes a window using `mach.sdl` and draws an image to the
screen which can be moved using the WASD keys.

### resizewindow

Creates a resizable window which renders as text its current resolution,
updating when the window is resized.

### wireframe

An example of a very basic software 3D renderer using matrix transformations
and 2D rendering calls.

### playmusic

Plays music loaded from an OGG file, and pauses or resumes the music when the
left mouse button is clicked.

### playsamples

Plays audio samples loaded from WAV files when the left and right mouse buttons
are pressed.

### fragshader

An example of using an OpenGL fragment shader with mach. A shader loaded from an
external GLSL file is used to draw to the displayed window.

### sampler

Renders an image using a fragment shader and a sampler uniform, where the
sampled texture is loaded from an external file.
4 changes: 4 additions & 0 deletions mach/text/numeric/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ to a padded serialization function, a `NumberWriteError` will result except
for when compiling in release mode. (In release mode the check is omitted, and
the function may produce nonsense data.)

If you want to write a negative integer with one of these functions, then
you probably want to cast it to its unsigned complement before passing it
to the write function.

``` D
import mach.test.assertthrows : assertthrows;
assert(byte(16).writehex == "10"); // Positive signed inputs ok.
Expand Down
4 changes: 0 additions & 4 deletions readme.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ regularly tests on as many platforms as possible.)
The majority of this package depends only on the druntime and D's standard library,
Phobos, and I'm working on cutting out the remaining Phobos dependencies.
The `mach.sdl` package requires some additional dependencies.
See the [package readme](https://github.com/pineapplemachine/mach.d/blob/master/mach/sdl/readme.md)
for details.
## Usage
The `mach` folder should be placed where you are loading dependencies from.
Expand Down

0 comments on commit 657fb47

Please sign in to comment.