浏览代码

[glfw] Start of README and docs

Mario Zechner 5 月之前
父节点
当前提交
0b2f403562
共有 3 个文件被更改,包括 24 次插入1 次删除
  1. 2 1
      spine-cpp/README.md
  2. 19 0
      spine-glfw/README.md
  3. 3 0
      spine-glfw/example/main-cpp-lite.cpp

+ 2 - 1
spine-cpp/README.md

@@ -49,7 +49,8 @@ class MyTextureLoader : public spine::TextureLoader
 ```
 
 ## Runtimes extending spine-cpp
-
+- [spine-glfw](../spine-glfw)
+- [spine-sdl](../spine-sdl)
 - [spine-sfml](../spine-sfml/cpp)
 - [spine-cocos2dx](../spine-cocos2dx)
 - [spine-ue](../spine-ue)

+ 19 - 0
spine-glfw/README.md

@@ -0,0 +1,19 @@
+# spine-glfw
+
+The spine-glfw runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C or C++ and render them via [GLFW](https://www.glfw.org/) and [glbinding](https://github.com/cginternals/glbinding).
+
+## Licensing
+
+You are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.
+
+You can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own [Spine license](https://esotericsoftware.com/spine-purchase). Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.
+
+In order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a [Spine license](https://esotericsoftware.com/spine-purchase) at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.
+
+For the official legal terms governing the Spine Runtimes, please read the [Spine Runtimes License Agreement](http://esotericsoftware.com/spine-runtimes-license) and Section 2 of the [Spine Editor License Agreement](http://esotericsoftware.com/spine-editor-license#s2).
+
+## Spine version
+
+spine-cpp works with data exported from spine 4.2.xx.
+
+spine-cpp supports all spine features, except two color tinting.

+ 3 - 0
spine-glfw/example/main-cpp-lite.cpp

@@ -78,7 +78,10 @@ int main() {
 	// Create an AnimationState to drive animations on the skeleton. Set the "portal" animation
 	// on track with index 0.
 	spine_animation_state animation_state = spine_skeleton_drawable_get_animation_state(drawable);
+	spine_animation_state_data animation_state_data = spine_animation_state_get_data(animation_state);
+	spine_animation_state_data_set_default_mix(animation_state_data, 0.2f);
 	spine_animation_state_set_animation_by_name(animation_state, 0, "portal", true);
+	spine_animation_state_add_animation_by_name(animation_state, 0, "run", true, 0);
 
 	// Create the renderer and set the viewport size to match the window size. This sets up a
 	// pixel perfect orthogonal projection for 2D rendering.