More readme updates
This commit is contained in:
parent
dbeea7470f
commit
9dc11a5288
13
README.md
13
README.md
@ -25,7 +25,7 @@ You will also need to modify the paths at the top of the samples lua scripts to
|
|||||||
The Wasm part of sokol might not be able to be utilized in this manner. However I do have plans to compile Luajit->wasm and embed sokol generated bytecode. It should be possible, but that is along term goal.
|
The Wasm part of sokol might not be able to be utilized in this manner. However I do have plans to compile Luajit->wasm and embed sokol generated bytecode. It should be possible, but that is along term goal.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
I have ported 5 examples from sokol, and will be adding more. These show how the ffi interface can be used.
|
I have ported examples from sokol, and will be adding more. These show how the ffi interface can be used.
|
||||||
|
|
||||||
How to use the example. Open a command window or powershell in the repo folder (Win64 powershell shown below)
|
How to use the example. Open a command window or powershell in the repo folder (Win64 powershell shown below)
|
||||||
|
|
||||||
@ -34,12 +34,6 @@ PS sokol-luajit> cd .\examples\
|
|||||||
PS sokol-luajit\examples> .\run_sample.bat cube_sapp
|
PS sokol-luajit\examples> .\run_sample.bat cube_sapp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Some notes:
|
|
||||||
- There are a number of objects that must be created as pointers. In ffi the easiest way to do this is to make an array object of size 1 and this way the handle in lua is a pointer and the object access uses the array indexing.
|
|
||||||
- No performance considerations have been taken into account. These are almost direct 1 to 1 mappings of the sokol C samples to luajit samples.
|
|
||||||
- pathing is not yet made friendly.
|
|
||||||
|
|
||||||
Use the run_sample bat file with one of the following parameters:
|
Use the run_sample bat file with one of the following parameters:
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
@ -55,6 +49,11 @@ Use the run_sample bat file with one of the following parameters:
|
|||||||
|```sdf_sapp``` | SDF from the Sokol samples |
|
|```sdf_sapp``` | SDF from the Sokol samples |
|
||||||
|```remotery_cube```| A spinning cube with Remotery backend. Open /tools/remotery/vis/index.html in your browser. |
|
|```remotery_cube```| A spinning cube with Remotery backend. Open /tools/remotery/vis/index.html in your browser. |
|
||||||
|
|
||||||
|
Some notes:
|
||||||
|
- There are a number of objects that must be created as pointers. In ffi the easiest way to do this is to make an array object of size 1 and this way the handle in lua is a pointer and the object access uses the array indexing.
|
||||||
|
- No performance considerations have been taken into account. These are almost direct 1 to 1 mappings of the sokol C samples to luajit samples.
|
||||||
|
- pathing is not yet made friendly (31/10/2024 - It has been improved dramatically. Little more to do.)
|
||||||
|
|
||||||
Feel free to contribute or post issues/ideas comment. I put this together yesterday, and its very rudimentary atm.
|
Feel free to contribute or post issues/ideas comment. I put this together yesterday, and its very rudimentary atm.
|
||||||
|
|
||||||
Screenshots:
|
Screenshots:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user