Horde3D
http://horde3d.org/forums/

Add functions to utility lib to draw debug primitives.
http://horde3d.org/forums/viewtopic.php?f=8&t=1906
Page 1 of 1

Author:  Zuck [ 11.10.2013, 12:47 ]
Post subject:  Add functions to utility lib to draw debug primitives.

I think a big missing feature, really useful for beginners and also for debug purpose, is to offer the possibility to draw simple primitives with less efforts (lines, quads, cubes, cylinders, spheres and cones).

Of course we could create an extension to do it, but it looks like this is a very frequent requested feature in Horde3D, so maybe the utility library is more appropriate (also because we already have most of the code already implemented in the "Renderer" class).

Any ideas or suggestions about how the API should look like?

I think it should be similar to the Overlays' one (and maybe we can move Overlays to utility lib too).

Author:  Siavash [ 13.10.2013, 05:04 ]
Post subject:  Re: Add functions to utility lib to draw debug primitives.

Zuck wrote:
I think a big missing feature, really useful for beginners and also for debug purpose, is to offer the possibility to draw simple primitives with less efforts (lines, quads, cubes, cylinders, spheres and cones).

Of course we could create an extension to do it, but it looks like this is a very frequent requested feature in Horde3D, so maybe the utility library is more appropriate (also because we already have most of the code already implemented in the "Renderer" class).

Yes I agree, this will be handy and utility library is the right place.

Zuck wrote:
Any ideas or suggestions about how the API should look like?

Maybe something like this:
Code:
h3dutDrawShapeCube
h3dutDrawShapeSphere


Zuck wrote:
I think it should be similar to the Overlays' one (and maybe we can move Overlays to utility lib too).

Good idea.

Author:  Volker [ 14.10.2013, 14:03 ]
Post subject:  Re: Add functions to utility lib to draw debug primitives.

The question is how customizable you want those debug geometry to be. Should it be able to be rendered by a custom, shader/material?
Maybe an additional function in the utility library that creates a model resource with a call to h3dutCreateGeometryRes and some default shader/material is already enough.

I'm currently seeing some kind of problems for a function like h3dutDrawShapeCube. What should this function exactly do, where will it be called? It has to fit into the rendering pipeline.
If you create an extension you may be able to better solve this problems. But maybe it's easier just to create a scene node that can be handled in the usual way and will be rendered
with a fixed color and a predefined shader (e.g. the defaultShaderVS and defaultShaderFS already existing in the egRendererBase). You can later change the material if you want it to be further customized.

Author:  Zuck [ 15.10.2013, 12:29 ]
Post subject:  Re: Add functions to utility lib to draw debug primitives.

My idea is to use the same render flow of Overlays, so two steps:

1) Define geometries (through public API) and store them in batches, already optimized by material.
2) Render them in the normal render pipeline flow before Overlays step.

Author:  Volker [ 15.10.2013, 13:11 ]
Post subject:  Re: Add functions to utility lib to draw debug primitives.

Zuck wrote:
My idea is to use the same render flow of Overlays, so two steps:

1) Define geometries (through public API) and store them in batches, already optimized by material.
2) Render them in the normal render pipeline flow before Overlays step.

Not sure if I did understand your concept yet, but if you want to render it somewhere within the normal render pipeline flow, you have to add the render call within the Horde3D core library, don't you?

Author:  Zuck [ 27.12.2013, 12:09 ]
Post subject:  Re: Add functions to utility lib to draw debug primitives.

Mmmm... As you suggested, Volker, maybe an extension is a better approach.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/