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

raw, bvh node data to upload to the gpu #53

Closed
sivansh11 opened this issue Nov 9, 2022 · 1 comment
Closed

raw, bvh node data to upload to the gpu #53

sivansh11 opened this issue Nov 9, 2022 · 1 comment
Labels
question Further information is requested

Comments

@sivansh11
Copy link

I am currently workin on a raytrcer in opengl, do ou have a api to get the raw bvh node data (and any other essential data) to be uploaded to the gpu as a ssbo ?

@madmann91 madmann91 added the question Further information is requested label Nov 11, 2022
@madmann91
Copy link
Owner

For a Bvh bvh, the node data is simply bvh.nodes.get(). For indices, use bvh.indices.get(). There are no pointers, only indices, so it is suitable to use directly without any other operation. The BVH only holds the node count, the index count is a client-provided piece of information, so it is not kept in the BVH (there are as many indices as there are primitives in the BVH). Please re-open if that does not answer your question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants