Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension needs to execute code between xrBeginFrame and xrEndFrame #224

Closed
erik-kallen opened this issue Nov 2, 2024 · 4 comments
Closed
Labels
discussion This issue needs to be discussed

Comments

@erik-kallen
Copy link

Hi!

I'm trying (like others, it seems) to implement the XR_META_environment_depth extension. I'm making decent progress, but I appear to have hit a wall:

There is a method (xrAcquireEnvironmentDepthImageMETA) that must be called between xrBeginFrame and xrEndFrame. I can't find any way to do this. _on_pre_render() is invoked before xrBeginFrame.

Is there anything I'm missing? Or is it possible to do this in some way I'm not thinking of?

@dsnopek dsnopek added the discussion This issue needs to be discussed label Nov 4, 2024
@dsnopek
Copy link
Collaborator

dsnopek commented Nov 4, 2024

I think that OpenXRExtensionWrapper::on_pre_draw_viewport() runs in-between xrBeginFrame() and xrEndFrame(), but it looks like we aren't exposing that to OpenXRExtensionWrapperExtension - I'm not sure why? It should be relatively easy to expose that! I'll make a PR and see if anyone on the XR team has any objections.

@dsnopek
Copy link
Collaborator

dsnopek commented Nov 4, 2024

I just posted PR godotengine/godot#98831 for Godot which exposes both of those virtual methods to GDExtension. Please let me know if they end up working for your use-case or not!

@erik-kallen
Copy link
Author

Thank you, though I probably won't have the time to check it out this week.

@dsnopek
Copy link
Collaborator

dsnopek commented Dec 17, 2024

Based on what you're doing in #232, I'm going to assume that _on_pre_draw_viewport() added in godotengine/godot#98831 is working for this!

So, I'm going to close it, however, if anything else is needed we can always re-open it

@dsnopek dsnopek closed this as completed Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue needs to be discussed
Projects
None yet
Development

No branches or pull requests

2 participants