You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sources have to either be null terminated or have their length represented in the last argument. In my case, @embedFile makes a null terminated string.
I started zig recently, and I don't really know what should be done here, so I could do it if you can give me some input on that.
My solutions are either:
we make the last argument optional and if null then send null pointer
don't take a third argument (after all, it's a wrapper) as the second argument already knows its size with src_ptrs.len. Currently, it seems that the wrapper still uses the same function signature but "translated" so this might not be desirable
don't change anything and tell me the secret to tricking zig in sending a null pointer
don't change anything, and I create an array of the size manually.
I tried to use this package for a simple triangle example and failed to load my shader. my code looks like
I struggled to get my second argument right, but the last one seems wrong to me.
Here is the documentation of the function : https://docs.gl/gl4/glShaderSource
The sources have to either be null terminated or have their length represented in the last argument. In my case,
@embedFile
makes a null terminated string.I started zig recently, and I don't really know what should be done here, so I could do it if you can give me some input on that.
My solutions are either:
src_ptrs.len
. Currently, it seems that the wrapper still uses the same function signature but "translated" so this might not be desirablezopengl/src/wrapper.zig
Lines 2759 to 2776 in 27f5f22
The text was updated successfully, but these errors were encountered: