Giter VIP home page Giter VIP logo

Comments (19)

oxheron avatar oxheron commented on May 27, 2024 1

Don't know if ill have time today.

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Please create repro by modifying some existing example.

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

how to build the examples?

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

https://bkaradzic.github.io/bgfx/build.html#quick-start

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Any luck with repro?

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

Sorry I've been gone for the past day ish. I should have it working by tomorrow

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Whenever you can.

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

As i was trying to get the bug to work it ends up crashing on a call to bgfx::update() because of the fact that the initial memory size is for the buffer is 0, even though BGFX_BUFFER_RESIZEABLE is set. I don't know if this is intentional or not, and it might be connected to the original bug. I haven't been able to get the original bug to work in a simple example yet. If I cannot get it to work after a bit more playing ill probably just upload my code (with the bug).

Here is a link to a repo with the example code (just cloned bgfx and it is example 50 but it is in the example 5 folder). https://github.com/0xheron/bgfx

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Yes, you should have some number other than 0 as your number.
https://github.com/0xheron/bgfx/blob/7a0e660bd6802c343b1c8a8da4fa8f647399d3cb/examples/50-bug/instancing.cpp#L285

First argument here is start vertex (see https://bkaradzic.github.io/bgfx/bgfx.html#_CPPv4N4bgfx6updateE25DynamicVertexBufferHandle8uint32_tPK6Memory), so this code makes no sense:
https://github.com/0xheron/bgfx/blob/7a0e660bd6802c343b1c8a8da4fa8f647399d3cb/examples/50-bug/instancing.cpp#L305

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Also you're using bgfx::makeRef with data that's on the stack, which is incorrect too. You should use bgfx::copy instead.

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Also you're not releasing dynamic vertex buffer you're creating, which will cause leak.

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

Thats just me being stupid then. That being said, on my code the bug still occurs with a fixed size.

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

Oh, because I couldn't figure out the build system I ended up hacking one of the existing examples for the last 2 points. However i still am using 0 which is the main focus of this. (example 5)

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

Also, the code that in my case causes the bug (could just be my fault again, but i have tried a few things) is here.
https://github.com/0xheron/engine

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

134 & 135 are the lines of the bgfx::update call.

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

Everything you need to know about build system is explained here:
https://bkaradzic.github.io/bgfx/build.html#getting-source

It's fine that you used existing example. You should just make it correct, so that repro of your issue you're claiming exist is focused only on the issue.

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

Just out of curiosity, did you look at it anymore with some of the resources I sent? Also, sorry for not doing more with repro as I did fail to get a replicated copy of the bug and because I had a solution I didn't do anymore. Thanks for your time.

from bgfx.

bkaradzic avatar bkaradzic commented on May 27, 2024

I sent you my feedback here: #3126 (comment)

from bgfx.

oxheron avatar oxheron commented on May 27, 2024

Of the repro? Because that never demonstrated the bug I initially talked about. That was my bad as I rushed to finish it. However, after the fact I was still never able to replicate the bug in the repro context. At a certain point I decided it didnt matter for my case. However, it may affect someone else. The repo I posted, with a pretty self explanatory build system does demonstrate this bug, in case you want to look at it further.

from bgfx.

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.