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
@Ka-lua Afaik, that line makes sure the loaded buffer is filled with 0, in case a NULL data buffer is created (as used in the provided example).
That code was contributed so I don't know if that's the best approach, is there any reason we don't want that kind of initialization for the buffer? Could there be any issue if we avoid that kind of initialization?
raysan5
changed the title
rlLoadShaderBuffer(size, *data, usageHint) copies the data to the buffer, then immediately clears it
[rlgl] rlLoadShaderBuffer() data clear just after data copying
Jun 18, 2023
That's right, it clears the buffer to 0 which might be what you want, but that makes the data parameter useless. You could do this to only clear the buffer if data is the null pointer:
The buffer clearing is probably some debugging artifact? This line should be removed:
raylib/src/rlgl.h
Line 4102 in 2e00d16
The text was updated successfully, but these errors were encountered: