Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions C3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Getting Started

Here's an example for creating a 128x128 array of OpenSimplex2 noise

```c
// Create and configure noise state
FnlState noise = fnl::createState();
noise.noise_type = OPENSIMPLEX2;

// Gather noise data
float* noise_data = malloc(128 * 128 * float::size);
int index = 0;

for (int y = 0; y < 128; y++)
{
for (int x = 0; x < 128; x++)
{
noise_data[index++] = fnl::getNoise2D(&noise, x, y);
}
}

// Do something with this data...

// Free data later
free(noise_data);
```
Loading