sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.69k stars 641 forks source link

Extending the Pipeline sample #169

Closed RecursiveCall closed 10 years ago

RecursiveCall commented 10 years ago

It would be useful to see a sample demonstrating how to extend/override SharpDXTK's content pipeline.

If someone can provide a basic flow and key projects/code, I can give this a shot myself.

ArtiomCiumac commented 10 years ago

Currently I don't have time to implement a full sample, so you can try it yourself. For example, implement an example that will load content from a web service or a zip archive. As for custom content, you can implement a content reader that will read a list of geometric primitives which will be rendered together as a scene.

The related items are:

If you want to have some custom precompiled content - take a look at the SharpDX.Toolkit.Compiler assembly and its related classes.

xoofx commented 10 years ago

The only thing that is currently not really flexible is the extensibility of the Compiler part, as nothing was made for this (unlike in XNA with the content processors...etc.)

RecursiveCall commented 10 years ago

What are your rules around using non-original code. The sample I started with the is the XNA SpriteSheet sample (http://xbox.create.msdn.com/en-US/education/catalog/sample/sprite_sheet). I leave all copyright headers in the files intact when reusing code, but would this be acceptable in the SharpDX repo?

ArtiomCiumac commented 10 years ago

This can be done only if the original code and content license is compatible with the SharpDX MIT license. As an example would be the SpriteFont class which was ported from DirectXTk library.

RecursiveCall commented 10 years ago

Microsoft's CC samples are under MS-PL license. I looked into a number of threads on StackOverflow on its true meaning; answers are inconclusive.

I'll stick with a from-scratch sample.

ArtiomCiumac commented 10 years ago

The recently added Yaml support provides a good example on how the content pipeline can be extended. I'm closing this issue - feel free to reopen if you have something to add here.