Hacker News new | ask | show | jobs
by vanderZwan 1656 days ago
> The key thing is that I don't intend to make thousands of draw calls this way either. I just want to make a couple dozen of exactly the draw calls I need, preferably today, not next week. It's a radically different use case from what game engines need, which is what the current industry APIs are really mostly tailored for.

Whenever I try to learn WebGL (or similar technology) I give up after a while. In my head I imagine it as if the entire automotive industry was only aimed at F1 race cars, and people who want to do practical day-to-day things with cars only had F1 tech to work with, including the cost and complexity.

2 comments

If you just want to put some 3D models on the screen, you could use something like ThreeJS. They have tons of examples and each one has a link to its source code.

https://threejs.org/examples/

If you prefer to do it more "from scratch", it's not terribly difficult to get some textured triangles on the screen using WebGL. There are an incredible amount of resources on OpenGL and WebGL out there. Many focus on getting started by drawing a single, flat-shaded triangle. From there, you can add on more code as needed to get different results - a moving camera, some basic lighting, texturing, etc.

Why not learn Unity then?
Because I'm not interested in making games. Recommending Unity is like saying "well if F1 is too high-tech for you try NASCAR" - it sort of helps but it's honestly missing the point.