Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Rendering Custom Meshes (via IDirect3DDevice9)

Author
Message
TC8
9
Years of Service
User Offline
Joined: 15th May 2009
Location:
Posted: 15th May 2009 15:20
I'm trying to write a plugin DLL for DBP. I would like to know if its possible to render custom meshes directly from DirectX into the scene.

I've been able to render some basic objects by inserting my render calls either before or after 'sync'. This is isn't a good method though, since transparent objects must be rendered after my opaque objects which would cause some weird looking results. What I'm looking to do is inject my mesh during the opaque scene pass but I couldn't see any functions for this in the DBP DLLs.

My alternative to this would be to obtain and replace the virtual function pointer to a specific command in the IDirect3DDevice9 function table then just watch for a certain object to be rendered (that I know would be in the opaque pass) then just draw my own content. Of course, this is far from a safe approach!
IanM
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th May 2009 13:11
The only supported way to do what you need is to get DBPro to render it for you as a standard object.

As DBPro already allows you to organise your object to render custom meshes (even on a frame-by-frame basis), why are you trying to add yet another method?

TC8
9
Years of Service
User Offline
Joined: 15th May 2009
Location:
Posted: 16th May 2009 13:29
I plan to render meshes which have a very specific format. DBP can't match this format since it uses FVF's for its vertex formats rather than vertex declarations. Additionally, I can optimize how batches of the objects are rendered (and even use instancing if available) as well as reduce overall state changes for the object groups.

The result is that the plugin would render its content faster than if the meshes were DBP objects.

Login to post a reply

Server time is: 2019-04-25 20:48:03
Your offset time is: 2019-04-25 20:48:03