GithubHelp home page GithubHelp logo

WebGL Code cleanup? about herebedragons HOT 2 OPEN

kosua20 avatar kosua20 commented on May 19, 2024
WebGL Code cleanup?

from herebedragons.

Comments (2)

kosua20 avatar kosua20 commented on May 19, 2024

First of all, thanks a lot for all this feedback!
I must apologize as I've realized that the WebGL version was in a worst state than I remembered...

As a learning experience I've tried to correct some of the aberrations that were present in my version (your remarks and your website were extremely useful, thank you again!). I've committed these changes, but I must admit that I have almost no experience with Javascript so some more general JS anti-patterns might remain in my code.
I have also removed the fixed resolution and the failed/unneeded attempt at handling HiDPI screens (in the C++ version I am using a fixed vertical rendering resolution), and now rely on CSS only.

Concerning VBO and extensions, my initial goal was to write a basic WebGL 1 version without any extensions as a kind of lowest common denominator. Maybe a WebGL 2 version with extensions would be different enough to live in its own webgl2 directory?

from herebedragons.

greggman avatar greggman commented on May 19, 2024

WebGL2 should probably be in another folder if you want to do that and you won't need extensions for vertex array objects. You can also do uniform buffer objects in WebGL2 but they are a little funky because there is no glMapBuffer in WebGL2.

My point with vertex array objects for WebGL1 is they're available on 99% of machines so for all intents and purposes they aren't are really an extension if that makes any sense. I'm only pointing that out if you wanted to try to keep the code similar since the C++ is using VAOs. Of course you can also leave it as is.

Thanks for the cool example. It's great to see so many versions.

from herebedragons.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.