I would like to use GUI components of JUCE in a OpenGL project that I begin few days ago. Basically, I just want to know if it's possible to attach components of JUCE with a glut window, without launching a JUCE application.
If yes, how ? Because I draw a glut window, and I created a GUIComponent class that inherits from Component. But after this, I know that I should override paint function but I need the Graphics instance.
I'm not 100% sure I understand what you're trying to do, but I wouldn't recommend trying to integrate juce components into an app where something else provides the GL context - the amount of infrastructure you'd need to re-write to make that work would be enormous. Surely vastly easier to just have a juce app that creates the context, and do your other drawing using that?
I finally take the decision to use a juce application generated by the Introjucer. So basically, I would like to have a viewport for OpenGL rendering and have some GUI components from JUCE.
I created a class that inherits from OpenGLRenderer and Component that contains a OpenGLContext. In the constructor, I did this:
But when I run the application, I only see my base window, no opengl rendering. I'm not sure how to do so can someone explains me how combine openGL viewport in which I can draw a scene and JUCE GUI components please ? :)
After reading all posts in the forum and proofread my code, actually I realized that I made a stupid thing, I forgot to set the size of the OpenGL component... it works now.