-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
10 changed files
with
68 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
## About: | ||
Demonstration of Skija APIs from Clojure. | ||
|
||
## Pre-requisite: | ||
## Pre-requisite | ||
|
||
- JDK 11 | ||
- Clojure 1.10.1 | ||
- `clojure` command-line tool 1.10.1.727 or later | ||
|
||
## Up & Running: | ||
## Configuring Skija dependency | ||
|
||
Clojure example requires latest master build of Skija installed locally: | ||
|
||
```sh | ||
./script/install.sh | ||
``` | ||
|
||
If you want to use pre-built Skija, in `deps.edn` replace `org.jetbrains.skija/skija-native {:mvn/version "0.0.0-SNAPSHOT"}` with one of: | ||
|
||
Artifact ID | `mvn/version` | ||
--------------------|------------- | ||
`skija-macos` | ![version](https://img.shields.io/badge/dynamic/xml?style=flat-square&label=latest&color=success&url=https%3A%2F%2Fpackages.jetbrains.team%2Fmaven%2Fp%2Fskija%2Fmaven%2Forg%2Fjetbrains%2Fskija%2Fskija-macos%2Fmaven-metadata.xml&query=//release) | ||
`skija-linux` | ![version](https://img.shields.io/badge/dynamic/xml?style=flat-square&label=latest&color=success&url=https%3A%2F%2Fpackages.jetbrains.team%2Fmaven%2Fp%2Fskija%2Fmaven%2Forg%2Fjetbrains%2Fskija%2Fskija-linux%2Fmaven-metadata.xml&query=//release) | ||
`skija-windows` | ![version](https://img.shields.io/badge/dynamic/xml?style=flat-square&label=latest&color=success&url=https%3A%2F%2Fpackages.jetbrains.team%2Fmaven%2Fp%2Fskija%2Fmaven%2Forg%2Fjetbrains%2Fskija%2Fskija-windows%2Fmaven-metadata.xml&query=//release) | ||
|
||
## Running | ||
|
||
From CLI run the below command: | ||
|
||
Windows/Linux: | ||
|
||
``` | ||
```sh | ||
clj -M -m lwjgl.main | ||
``` | ||
|
||
macOS: | ||
|
||
``` | ||
```sh | ||
clj -J-XstartOnFirstThread -M -m lwjgl.main | ||
``` |
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,8 +1,9 @@ | ||
{:deps {org.jetbrains.skija/skija-macos {:mvn/version "0.6.6"} | ||
{:deps {org.jetbrains.skija/skija-native {:mvn/version "0.0.0-SNAPSHOT"} | ||
org.lwjgl/lwjgl {:mvn/version "3.2.3"} | ||
org.lwjgl/lwjgl$natives-macos {:mvn/version "3.2.3"} | ||
org.lwjgl/lwjgl-glfw {:mvn/version "3.2.3"} | ||
org.lwjgl/lwjgl-glfw$natives-macos {:mvn/version "3.2.3"} | ||
org.lwjgl/lwjgl-opengl {:mvn/version "3.2.3"} | ||
org.lwjgl/lwjgl-opengl$natives-macos {:mvn/version "3.2.3"}} | ||
org.lwjgl/lwjgl-opengl$natives-macos {:mvn/version "3.2.3"} | ||
nrepl/nrepl {:mvn/version "0.8.3"}} | ||
:mvn/repos {"space-maven" {:url "https://packages.jetbrains.team/maven/p/skija/maven"}}} |
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,14 +1,26 @@ | ||
This demo displays most of the Skia/Skija APIs and is an excellent learning resource. | ||
|
||
## Configuring Skija dependency | ||
|
||
LWJGL example requires latest master build of Skija installed locally: | ||
|
||
```sh | ||
./script/install.sh | ||
``` | ||
|
||
Alternatively, you can use pre-built Skija. In `pom.xml` replace skija-native dependency with: | ||
|
||
`<artifactId>` | `<version>` | ||
--------------------|------------- | ||
`skija-macos` | ![version](https://img.shields.io/badge/dynamic/xml?style=flat-square&label=latest&color=success&url=https%3A%2F%2Fpackages.jetbrains.team%2Fmaven%2Fp%2Fskija%2Fmaven%2Forg%2Fjetbrains%2Fskija%2Fskija-macos%2Fmaven-metadata.xml&query=//release) | ||
`skija-linux` | ![version](https://img.shields.io/badge/dynamic/xml?style=flat-square&label=latest&color=success&url=https%3A%2F%2Fpackages.jetbrains.team%2Fmaven%2Fp%2Fskija%2Fmaven%2Forg%2Fjetbrains%2Fskija%2Fskija-linux%2Fmaven-metadata.xml&query=//release) | ||
`skija-windows` | ![version](https://img.shields.io/badge/dynamic/xml?style=flat-square&label=latest&color=success&url=https%3A%2F%2Fpackages.jetbrains.team%2Fmaven%2Fp%2Fskija%2Fmaven%2Forg%2Fjetbrains%2Fskija%2Fskija-windows%2Fmaven-metadata.xml&query=//release) | ||
|
||
## Running | ||
|
||
Then: | ||
|
||
``` | ||
```sh | ||
cd examples/lwjgl | ||
./script/exec.sh | ||
``` |
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
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
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