I have an app that draws 2d line-graphs with a lot of points. Using graphics' strokePath / fillRectList this becomes really slow (i.e. can go below 1 fps with 'only' a few thousand points. Note that whether or not I limit the number of points being passed with each call, as some forum members suggested, doesn't help the situation hugely).
So I tried using an approach like in OpenGlDemo - creating a graphics object from the glRenderer, and then using these strokePath / fillRectList functions on that graphics object, but this also results in the same performance.
From profiling, it appears that all of the cost is not in the actual graphics drawing, but in the juce code that is fiddling with the values passed before passing them on to the lower-level APIs (i.e. opengl), i.e. in all kinds of 'EdgeTable' stuff.
So the assumption would be that calling opengl functions directly should avoid all that overhead, and get an order of magnitude or so improvement pretty easily .... however I've gotten really stuck trying to simply i.e. draw a single line with opengl using direct opengl calls such as glScalef, glTranslatef, glBegin(GL_LINE_STRIP) + glVertex2f + glEnd / glDrawArrays etc ..., and just have it actually appear on the screen. Note I have experience using opengl before, I just seem stuck with fitting getting this basic opengl 2d line-drawing setup working within the juce framework.
I would be really grateful if someone could provide a simple 'hello worldy' example of how one does a most basic 2d opengl thing in juce like this - draw a single line with opengl in the renderOpenGL() method of one's OpenGLRenderer. I've been trying using various examples but can't get anything that actually results in anything being visible on the screen - as soon as I have that I'm sure I'd be fine .... Ideally this line drawing wouldn't clash with whatever (i.e. line/text-drawing) calls are being made before/after through the juce functions on the graphics object, i.e. so I can just replace the performance critical parts but still make use of the juce Graphics functions for everything else.