Giter Site home page Giter Site logo

Comments (16)

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

(eg on hosts where we can't have valid X server connection )

I believe in that case you wouldn't need dcv:plot module at all, right? If that is so, you could just link against dcv:core and dcv:io. Would that do?

from dcv.

timotheecour avatar timotheecour commented on August 23, 2024

sorry, that's just not a good solution, suppose you have some complex code that is intended to work both with and without plotting depending on platform / architecture support. Inserting static if(has_gl) or version(with_gl) everywhere is too much trouble for client code.
Instead, we should allow runtime loading on demand via dlopen+friends of C shared libraries as done in other projects. I can provide references if needed.

Side question: is there a simple way to get libgl on ubuntu?

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

I'm sorry, I'm not sure I understand the situation completely. But if you've encountered this in a production-like environment, than it is clear this should be done. So, how do we do this? What do we do with the rest of the dcv.plot code in runtime if glfwInit fails?

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

What do we do with the rest of the dcv.plot code in runtime if glfwInit fails?

(thinking out loud here) We could throw an exception at any call that depends on glfwInit?

from dcv.

timotheecour avatar timotheecour commented on August 23, 2024

Exactly. Currently, it wont even allow code imports plotting but doesnt call plotting functions. With this, it will allow importing such code and all is fine so long plotting isnt used.

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

Awesome. @9il I believe we're OK with throwing Exceptions in the dcv.plot module. This is definitely a higher-level module with no (or very little) performant-critical code inside. Do you agree with this solution, or do you have some other proposition to solve it?

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

Side question: is there a simple way to get libgl on ubuntu?

Sorry for ignoring this, didn't catch it before. Do you mean glfw? If so sudo apt-get install glfw3 will do, I think.

from dcv.

timotheecour avatar timotheecour commented on August 23, 2024

No, libgl. Theres a recursive dub dependency on libgl (maybe after brew install ffmpeg, i forgot where it arose from)

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

Isn't libGL.so present by default? I believe even unity depends on it :). Anyhow, if you're failing to link against it, maybe it's not named the way dcv's dub.json expects it. Sorry, I'm not much of a help here, since I don't have ubuntu machine. Hope you'll manage.

from dcv.

timotheecour avatar timotheecour commented on August 23, 2024

That's another point: linker is case sensitive and libGL may be present but dub.json specifies libgl

from dcv.

timotheecour avatar timotheecour commented on August 23, 2024

Supporting Ubuntu would be great, given its popularity... parallels or virtualbox are pretty easy to setup :)

from dcv.

9il avatar 9il commented on August 23, 2024

Awesome. @9il I believe we're OK with throwing Exceptions in the dcv.plot module. This is definitely a higher-level module with no (or very little) performant-critical code inside. Do you agree with this solution, or do you have some other proposition to solve it?

Agreed

from dcv.

9il avatar 9il commented on August 23, 2024

#109

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

Agreed

Awesome! @timotheecour I'll try fix this by the end of the day.

from dcv.

ljubobratovicrelja avatar ljubobratovicrelja commented on August 23, 2024

That's another point: linker is case sensitive and libGL may be present but dub.json specifies libgl

What's really interesting is that I've developed much of dcv on ubuntu. And that gl linking that was put there in dub.json seemed to be working. :) Anyhow, hope your linking is fine after Ilya's fix. And thanks for pointing this out!

from dcv.

timotheecour avatar timotheecour commented on August 23, 2024

tracked in #113 so closing this

from dcv.

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.