1. 17
  1.  

  2. 5

    It’s been more than ten years since I first did OpenGL (and not much since, forgetting everything), but wow has it gotten hard to jump into. It used to be here’s ten lines of code to draw a teapot. Now it’s way more than that, just for a triangle. I know why we switched to shaders, but still. ugh.

    1. 3

      I had the opposite experience where it took a bunch of lines to do something basic. I was sure better abstractions were possible that some people-oriented issue in the standards process were preventing from happening. Alan Kay et al’s STEPS project is illustrating that nicely by replacing Cairo’s 50,000 lines of C with an optimizing engine that just took 460 lines of code. I want see what an effort like that on OpenGL would do.

      http://www.vpri.org/pdf/tr2007008_steps.pdf

      1. 2

        Reading that basically made me think about abstraction in languages.

        Where do you find this stuff @nickpsecurity?

        1. 3

          The Google, ACM, and IEEE version of kung fu. Took almost decade of digging through stuff that wasnt worth reading. Although STEPS was in a HN comment, too.

      2. 2

        Grandpa Zawinski bitches about it [in depth(https://www.jwz.org/blog/2012/06/i-have-ported-xscreensaver-to-the-iphone/).

        He’s not correct in my opinion, mind you, but it’s a decent read.

      3. 3

        I wonder if there’d be an audience for a tutorial or book on doing software graphics from scratch?

        1. 1

          I’d read it.

        2. 2

          The site is completely nonfunctional for me. Opening the browser console, I see the errors:

          ReferenceError: hljs is not defined
          ReferenceError: LoadPage is not defined
          

          As well as security warnings about password fields on pages served over http.

          1. 2

            “Learning Modern 3D Graphics Programming” by Jason L. McKesson is another stunning OpenGL guide (free!); among the best out there.

            1. 2

              This is also a relevant hands-on walk through (writing your own renderer, in an effort to teach how higher level abstractions like OpenGL, DirectX, et al. works): https://github.com/ssloy/tinyrenderer/wiki

              1. 1

                This comes about 4 weeks too late. I just spent days figuring out why my matrix (and later normal calculations) didn’t work as expected. Turns out I a) confused row-major with column-major and b) accidentally used [x y x] as my normals instead of [x y z]