example icon indicating copy to clipboard operation
example copied to clipboard

Reordered null at the end of strings for clarity.

Open Aurora2500 opened this issue 1 year ago • 0 comments

I had issues just following the code when it comes to null termination. Usually in go you don't deal with worrying about strings having them, so I reordered it such that the null is added inside the compileShader code rather than it already existing on the strings.

I'm creating this PR as in my opinion it is much clearer at a glance that this is neccesary, as some people (like me) will skip over the addition on the shader sources and would pay closer attention to the compileShader function, assuming the input string is standard & hasn't been doctored beforehand to deal with the idiosyncrasies of needing to worry about null at the end of strings.

Aurora2500 avatar Nov 23 '24 18:11 Aurora2500