• Runtimes
  • spine with winform

Related Discussions
...

GDI doesn't do the textured triangles well, so you'll be missing the Mesh, Skinned Mesh, etc... attachments. Try to start by adding a Direct2D renderer to your form.

There is a C# runtime that Unity3d uses that you can base your code on top of, and you'll have to write a SkeletonRenderer.

Unity has a TON of additional features that you don't need to get off the ground, and Unity uses an entity system with reflection so you might be better off looking at the Cocos2d-x runtimes (based on C/C++) to get a better handle on what you need to do.


btw, .Net and GDI have their uses. I typically use them for tools, like atlas map packing or font generation.

Typically, when I see tool X being used for job Y the following adage pops into my head: If all you have is a hammer, then everything looks like a nail.

Which is to say that either (1.) your experience is considerably constrained (and prefer to work within your comfort zone) or (2.) you are creating a tool similar to what I use for game engines that somehow manipulates Spine animations.

If (1.) I seriously suggest that you take advantage of Unity and it's user friendly licensing scheme. It's still in C#
If (2.) then I invite you to read the runtime license, particularly the bit about derivative works. If you're creating an internal tool for your company to annotate spine animations, then by all means, go ahead. If you plan on releasing a tool to do anything other than play spine animations then you'll be in for a surprise.

Just some friendly advise to save you time, effort and/or legal troubles.

Thanks for reply,

I just trying to make internal tool for showing stopped spine image and selecting animation list for unity application.
I think it is not illegal.. is it your 'go ahead' case?

And the sample form code in the page of my early article is used spine-csharp and its imported data is ok but the result of its drawing is not valid.
I have to use direct2d to draw spine image in gdi+? If so, where can I find some example or reference?

Internal tool? Yeah, sounds fine.

I'm looking through the API and Direct3D might be easier to work with http://sharpdx.org samples: https://github.com/sharpdx/SharpDX-Samples/tree/master/Desktop All you really need is to be able to draw a list of textured triangles.

As far as setup/rendering goes, Cocos2dxis as bare bones as you can get while supporting all the features. The problem is that it's written in C++. You might be able to steal sections of code from the Unity runtime and modify them.

So..

  1. Setup drawing context that lets you draw a list of textured triangles on a wind.GDI form surrounded by your tools.

  2. Add Spine CSharp to your project to get it compiling.

  3. Write a wrapper class similar to cocos2dx, only in C#.