Skip to content

Find if accepting external OpenGL context is viable #66

Open

Activity

  1. added this to the 1.0.0 milestone on Dec 22, 2015
  2. removed this from the 1.0.0 milestone on Feb 19, 2016
  3. 9prady9 commented on Sep 1, 2016

    @9prady9
    MemberAuthor

    There are two possible approaches regarding this topic:

    • Find if user created OpenGL context can be used with Forge(glfw/sdl) windows. As of now, some internal state (loading default fonts, color maps etc.) is initialized during window object construction (Window constructor code). The logic in this initialization should be exposed via functions appropriately if external context usage is to be given as an option to the user.
    • Other approach would be to abstract renderable objects such as Image, Chart etc. to be able to render them on user provided OpenGL Window, where forge's window class is not used at all. In this case, just the Image/Chart objects are rendered to which ever viewport is active. The user has to do multiple views in single window by themselves.
  4. caseymcc commented on Apr 28, 2017

    @caseymcc
    Contributor

    I have a few questions here. I quickly hacked together an Qt5 window for forge that seems to work,
    caseymcc@a78f290

    But as far as I could tell from the quick overview it to implement this. forge really doesn't care about the window as long as you don't call the window functions. Seems if you created a Chart and just called render making sure the current openGL context is properly setup it would draw.

    Ill add a PR later for the Qt5 window (likely need a little info in the manner of how multiple windows are supposed the be handled), need to split it with the hunter functionality (cmake package manager) that I used.

  5. 9prady9 commented on Apr 29, 2017

    @9prady9
    MemberAuthor

    @caseymcc That is true - forge rendering user's can use their own windowing functionality - that was the intention behind the such design. As you said, the user has to take care of GL context. What do you need to know about multiple windows ?

  6. caseymcc commented on Apr 29, 2017

    @caseymcc
    Contributor

    Is it intended that the user can open multiple windows? If so in the the case of Qt5 I could make them dockable, dialogs or or split in the same window.

  7. 9prady9 commented on Apr 29, 2017

    @9prady9
    MemberAuthor

    Yes,we wanted to enable multi-window usage. However, this hasn't been tested extensively. You are welcome to try and report any bugs you may find!

  8. added this to the 1.0.4 milestone on Nov 17, 2018
  9. modified the milestones: 1.0.4, 1.0.5 on Mar 2, 2019
  10. modified the milestones: 1.0.5, 1.0.6 on Apr 8, 2020
  11. beojan commented on Jun 20, 2020

    @beojan

    Any updates here? Is it still possible to just draw into the current context without setting up a window?

  12. modified the milestones: 1.0.6, 2.0 on Jun 20, 2020
  13. 9prady9 commented on Jun 20, 2020

    @9prady9
    MemberAuthor

    @beojan Unfortunately, no, there has been much work done in this direction yet.

    Currently, fonts are currently set via window object. Thus this needs to be separated from Window so that the they will work out of the box. So basically, except font rendering rest of the stuff should work fine in a user provided OpenGL context even now.

    Because fonts won't work, chart won't make sense. Image object's should render fine though.

  14. 9prady9 commented on Jul 8, 2020

    @9prady9
    MemberAuthor

    @beojan A quick update. I have looked at the code and as of today font object used by Window object is separate from the font object's created for chart's internal use. Thus, even if Window class from forge isn't used, one should be able to still use rendering logic from other classes in a different OpenGL context.

    Note that, a valid OpenGL context should be available to use forge's non-Window classes in that fashion. Hope this helps for your use case.

  15. beojan commented on Jul 8, 2020

    @beojan

    It appears Chart's render member function still requires a reference to a Window. Is there a dummy Window to be passed?

  16. 9prady9 commented on Jul 8, 2020

    @9prady9
    MemberAuthor

    Ah right, my bad. Window is being passed, although it can easily worked around since the object is only used to get unique window ID that is in turn used for internal book keeping of VAO objects.

    If this object of Windows is replaced with a window identifier variable like int, then it should work out of the box. Unfortunately, that would require an API change and can't be done before 2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions