Closed xoxor4d closed 1 month ago
@nv-nfreybler Firstly, thanks for taking the time to review this! I've made the required changes and squashed everything into one commit. I've remove almost all traces of bridgeApi
as requested with the exception to the bridge_c
header file as I'm not sure if the contents will stay in a separate file or if they'll be included within the remix_c
header?
Thanks for making all these changes! A couple things to note:
I've remove almost all traces of
bridgeApi
as requested with the exception to thebridge_c
header file as I'm not sure if the contents will stay in a separate file or if they'll be included within theremix_c
header?
Thanks for doing that, I know it can be a long and tedious task to rename things. I appreciate your calling it out in particular, as we are actively discussing the bridge_c
header file in particular. A decision will likely be reached in our own internal merge commit.
Just wanted to post an update here that we're currently actively internally reviewing and working on this PR, for the better part of the last couple weeks, to be honest. We appreciate your patience, and want to assure you that it is not forgotten.
Thank you for the update, really appreciate it! I hope this hasn't caused too much trouble internally 🙂
Please see commit 2dd0a0e. Binaries
We overhauled quite a bit from the original PR, mostly to eliminate the code duplication between the original bridge_c.h
and remix_c.h
. We also wanted 1:1 parity with the standard Remix API, so we went with a singular CreateLight
etc as opposed to extension-specific APIs. Additionally we found some memory leaks, and needed to refactor accordingly.
Thank you again for the PR. If you consider this sufficient, please go ahead and close this, or else we can.
I'll now close the PR because the latest builds are running great and everything seems to be ironed out and working as expected. Communication was great and it was a blast working on this. Thanks again to all the people involved! I really appreciate you all and am looking forward to the next PR 🙂
This PR adds a intermediary api called
to the bridge that allows x86 games to use parts of the x64 remix-runtime api.BridgeApi
Overview:
BridgeApiand sends the data of received api calls to the server client/bridge_api.cppBehavior on init:
CreateDevice
/CreateDeviceEx
InitializeD3D
if client optiongetEnableBridgeApi()
is true by callingremixapi_lib_loadRemixDllAndInitialize
with the optained device pointerUsage:
Using
BridgeApirequires the user to be internal (dll/asi injection or by other means - requires game process access)Client option
client.exposeRemixApi
true
Include bridge_c.h and a predefined macro:
Initialize the api:
If no game render logic is hooked (triggered once per frame) or if the dll/asi has to be game agnostic, a callback can be registered that triggers when
device->EndScene
is called:// somewhere after the api was initialized bridge.RegisterEndSceneCallback(on_endscene);