grovesNL / glow

GL on Whatever: a set of bindings to run GL anywhere and avoid target-specific code
Apache License 2.0
1.16k stars 128 forks source link

get_query_parameter_u64_with_offset is broken #302

Open kvark opened 1 week ago

kvark commented 1 week ago

Looks like it accepts an offset and passes it to GL as a pointer? I think it needs to be 2 variations of this function: one where you pass a buffer with offset, and another where you pass a pointer. Similar to glReadPixels and friends.

grovesNL commented 4 days ago

Looks like it was added in #260

@Zoxc do you remember why it was set up this way, or maybe an example of how you were testing it with query objects? Just wondering if it's missing something here

Zoxc commented 4 days ago

I made it take usize because this library seem to prefer typical Rust types when possible. An additional variant which uses a pointer would also make sense. The offset variant makes it clear that you're not actually passing a pointer.

Zoxc commented 4 days ago

I used this function here and tested it with wgpu_profiler.