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

Yup. This is why my crappy little 3D game engine still uses canvas and not WebGL. I can’t feel good about myself and deal with all that.


Yeah, Canvas 2D is great, though it's not any more OO than WebGL, and I sometimes forget to create a new path and wonder why it keeps getting slower and slower with every frame. SVG is also pretty reasonable.


Neat, you do the math yourself and then render the tris/quads in canvas? I did something like that recently (in C/SDL, later RayLib). I found it amusing that to get performant 2D rendering you have to use a 3D API, so my "software rendered" 3D engine which just uses the gfx api for 2D draw calls ends up using 3D for the 2D under the hood...

There's at least one (great) game written like that though, Need for Madness with a custom 3D engine and just using java's 2D gfx api for rendering.


I did this in 02007 in JS: http://canonical.org/~kragen/sw/torus

Except that WebGL didn't exist so I just had to use the 2-D <canvas>. There's probably some trick for getting antialiased polygon edges in <canvas> to not show cracks...




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

Search: