Git Product home page Git Product logo

Comments (3)

mosra avatar mosra commented on April 28, 2024

Sure, I currently have implementation of MultiDraw* in progress, this will come next. The builtin shaders will then also need to be updated to support instancing, I don't yet know whether to use uniform arrays or instanced attributes for per-instance data, need to research on that a bit more.

As for the glVertexAttribDivisor, I planned to have it as a new function in Mesh, rather than per-attribute option, because all attributes in given interleaved buffer will share the same divisor value. So something like this:

const UnsignedInt divisor = 1;
mesh.addVertexBuffer(vertexBuffer, 0, MyShader::Position{}, MyShader::Normal{})
    .addVertexBufferInstanced(divisor, transformBuffer, 0,
        MyShader::TransformationMatrix{}, 
        MyShader::NormalMatrix{});

from magnum.

Jagholin avatar Jagholin commented on April 28, 2024

Right now i'm in a process of slowly transfering my app from OSG to Magnum, which uses instanced render combined with transform feedback at one point, so i might just implement this on my own, as it doesn't look too overcomplicated.

from magnum.

mosra avatar mosra commented on April 28, 2024

Instanced drawing is done in 20df20d, vertex attribute divisor in 71a5766. Now it is also merged into compatibility branch. I also did some changes to Mesh API and MeshTools functions to make them less confusing, mainly when working with per-instance (and not per-vertex) data.

from magnum.

Related Issues (20)

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.