Jump to content
  • Advertisement

Daid

Member
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Daid

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
  1. So you have your own implementation of worker threads, which is exactly the point. As you now might have multiple thread pools with workers, and that can have more threads active at once then you would want, hurting performance. Immagine having a few of those libraries that think it's fine have their own internal threadpool, and you have a bunch of threadpools and no control left. I would recommend having the option to provide a custom threadpool/job-queue and provide a default implementation as well for people that don't want to hook it into anything else.
  2. Note that SFML is an open source library, and they have this issue ;-) I do have to say that your article is kinda limited to "the exact scope of your project". Even if it hits quite a few valid points. Also, about const, adding "const" can be important for other reasons then just API. It also impacts performance (as a result from a const function can be re-used by the compiler in certain cases). And occasionally what you are allowed to do (if you deal with rvalue temporaries) And also, there is no guarantee that a const does not modify an object, I've seen something along these lines: class A { public: Matrix4 getTransformationMatrix() const { if (matrix_outdated) (const_cast<A*>(this))->updateTransformationMatrix(); return transformation_matrix; } } Where a local cache is updated in a const function. It's const in the fact that it returns the same value every time, but it's not const in that it doesn't modify internal state and thus not thread safe for reading. I would never do this, but I've seen it.
  3. The core reason I've seen for this is because C++ doesn't have a stable ABI between different compilers. And then you get this mess: https://www.sfml-dev.org/download/sfml/2.5.1/ if you want to provide binaries. With with a C API, the ABI is the same for all compilers, and some other languages can hook directly in it (like python with ctypes)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!