Giter Site home page Giter Site logo

Details about DrawPasses about gstatsjs HOT 3 CLOSED

exponenta avatar exponenta commented on May 14, 2024
Details about DrawPasses

from gstatsjs.

Comments (3)

eXponenta avatar eXponenta commented on May 14, 2024 1

PixiJS use aggressive batching, and 20 or more elements can be rendered per 1 DC.
We cannot handle this behaviour, because only render buffer will he changed when batchable object is culled.

i render a 2000+ shapes in single DC :)
https://exponenta.games/games/map

from gstatsjs.

eXponenta avatar eXponenta commented on May 14, 2024

DC track a gl.drawElements command, it maybe be less that real used, but not a greater if update is called, PIXI v4 use only drawElements, need check how it works on v5.
useTick should be invoked after render pass every render, otherwise it will be delayed on frame.

https://github.com/eXponenta/gstatsjs/blob/master/src/GLHook.ts#L20

from gstatsjs.

AdrienLemaire avatar AdrienLemaire commented on May 14, 2024

Right, I'm using Pixi v5.

A grep for gl.draw returns calls to gl.drawElements, drawBuffersWEBGL, drawElementsInstanced and drawArraysInstanced.

useTick should be invoked after render pass every render, otherwise it will be delayed on frame.

I'm not sure how to verify this.
I've added useTick(() => stats?.update()); to my component.
That means app.ticker will add the stats.update function with a ticker listener, and start it

Starts the ticker. If the ticker has listeners a new animation frame is requested at this point.

I can't tell by reading the code if my tick is delayed on frame or not, but it's a fact that DC always return 1 for value and nothing else.

https://github.com/eXponenta/gstatsjs/blob/master/src/GLHook.ts#L20

I can confirm that GL is Hooked in my app.

Please let me know if you'd like me to try something if that can help 🤝

from gstatsjs.

Related Issues (3)

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.