Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Though boilerplate is never acceptable, most of that is constant-factor overhead, not per-triangle overhead, and tutorialspoint is not a site you should trust under any circumstances. See my links above for better sources.

If you put more vertices and indices in Step 2 you can draw an arbitrarily complex 3-D object with this same code.

And there's a lot of stuff in GLSL where you can program directly with high-level concepts like vectors, normals, and partial derivatives, instead of expressing them by hand the way you would in C.



Using a framework is also constant factor overhead (at least in LoC, which is what I assume we're talking about here)


Right, and that's what the glslCanvas project I linked above is, though in this case it's negative overhead if you're just counting the lines of code you have to maintain :)


Ah gotcha. Yeah I was alluding to ThreeJS, a very powerful and standard framework for webgl


Yeah, ThreeJS is awesome! glslCanvas is just for drawing with shaders, not for general 3-D.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: