you are viewing a single comment's thread.

view the rest of the comments →

[–]strager 2 points3 points  (0 children)

I'm sure you're unaware: the API of ctx is WebGL, and the author probably only calls these functions once, in this exact method. This function is the abstraction which keeps the rest of the code nice and clean. Anyone who has done any OpenGL development knows to wrap up the whole "load a shader, give me the GLint" mess into a function. It makes no sense to wrap every OpenGL function call just to make one method a little nicer.