Sapphire Plug-ins
Posted: Tue Aug 04, 2009 3:58 pm
Hi, would it be possible to add a plug-in mechanism to Sapphire? (or more powerfully - a way for fully fledged plug-ins to interact with the Sapphire render viewport)
It wouldn't need to be all the complex I don't think. I imagine a system where Sapphire makes a call to my plugin's OnRender function immediately after you're done rendering the usual Sapphire bits. I can then make various GL calls to render 3D elements into the scene.
Everything else would be kind of a luxury really (unless I've forgotten anything really obvious), however two other things spring to mind as being very helpful:
* The mouse position projected onto the terrain in world space (as you have it for the terrain brush)
* The HWND of the Sapphire window so I can get the render size for any 2D overlays, and also to create simple toolbox windows, etc.
Anyway I'm just throwing the idea out there as I think it'll help broaden the development effort, and maybe yield tools that can be rolled into the main application in future?
If you're wondering about the uses I have in mind - things like placing buildings / vegatation / props, and road layout ( like this http://freeworld3d.org/tutorials/roadsystem.html ) are high on my list. I like the idea of using L3DT for as much as possible in my world creation pipeline, but I can't expect you to create all my tools for me!
It wouldn't need to be all the complex I don't think. I imagine a system where Sapphire makes a call to my plugin's OnRender function immediately after you're done rendering the usual Sapphire bits. I can then make various GL calls to render 3D elements into the scene.
Everything else would be kind of a luxury really (unless I've forgotten anything really obvious), however two other things spring to mind as being very helpful:
* The mouse position projected onto the terrain in world space (as you have it for the terrain brush)
* The HWND of the Sapphire window so I can get the render size for any 2D overlays, and also to create simple toolbox windows, etc.
Anyway I'm just throwing the idea out there as I think it'll help broaden the development effort, and maybe yield tools that can be rolled into the main application in future?
If you're wondering about the uses I have in mind - things like placing buildings / vegatation / props, and road layout ( like this http://freeworld3d.org/tutorials/roadsystem.html ) are high on my list. I like the idea of using L3DT for as much as possible in my world creation pipeline, but I can't expect you to create all my tools for me!