This project is read-only.

simple example created

Mar 16, 2012 at 10:18 PM
Edited Mar 16, 2012 at 10:31 PM

Just a quick note that I've created a trivial example that's basically a port of the classic 'rotating cubes' example in the DXSDK (so it creates the resources and directly renders vs. going through the scene graph) . Might be useful for people just getting their feet wet with the SDK and comparing it to Hieroglyph3.

One thing I noticed whilst creating this: right now index buffers are always assumed to be 32 bit. (This caused me a bit of grief as nothing was rendering until I  realized that was the case and thus changed the indices in the dx example from word to uint).

Would it be possible to, as part of a config object or perhaps in the geometry object (whatever makes sense from an API perspective), to specify 32 or 16 bit? This can be handy as 16 bit yield a bit better performance as well, and most meshes don't need 32 bit anyway.

- JK

Mar 16, 2012 at 11:53 PM

Nice to see more content added, thank you!

Mar 17, 2012 at 5:21 AM
Edited Mar 17, 2012 at 5:22 AM

Great work - thanks for adding it!  Thats a good idea to provide a comparison of the two...  Sorry for the grief with the index buffers.  At one point I was working on the Stanford Bunny model, and I needed the extra range from the 32-bit indices. 

There isn't much code in GeometryDX11 that depends on the size of the indices, so perhaps it would be possible to use a template for it.  Or we could just create a secondary GeometryDX11 class that uses the appropriate size indices.

What do you think about this?

If you can send me a zip file with the project in it, I can add it to the repository as a new example...

Mar 17, 2012 at 5:14 PM
Edited Mar 17, 2012 at 5:14 PM

Heh, well not exactly earth-shattering stuff, but my feeling is you just gotta have rotating cube ;-) Here you go:

Rotating Cube

w.r.t. indices - I guess you're saying have a root class and 2 specializations? A template seems cleaner to me, but not sure to what degree that would ripple through a lot of the API (templates have a nasty way of doing that...). In either case as long as it works out well for the "indirect" use-case - i.e. using "SetGeometry( ExecutorPtr executor )", etc. so we can pass in whichever kind we want.


Mar 21, 2012 at 3:42 AM

I got the project added to Hieroglyph and building ok, but at runtime I get some errors for compiling the shader programs.  The "warnings-as-errors" is getting tripped up on a few places.  I will update and then run through the code and get it into the next commit.

Thanks again for the submission!

Mar 29, 2012 at 2:54 AM

This project is in the latest commit - I just had to add some *.xyz notations to float3 variables to get it to compile with warnings as errors, so no worries there.  Thanks again for the contribution!

Mar 30, 2012 at 3:02 PM