Is it correct to call the repaint method inside of renderOpenGL()? The data is valid less than half of the time since renderOpenGL() is called more often then my frame rate. I then use g.drawimage inside of the paint(Graphics) function. The one issue I can see with this is that there is no guarantee when paint() will be called.
Pseudo Code snippet:
void VideoWindow::renderOpenGL(){
bool valid = getNewdata(dat);
if(valid){
change bitmap data in image repaint(); }
}
The issue is that renderOpenGL() is called often (60 times per second), but paint(), except initially, is never called again. This is why I was forcing the repaint() in renderOpenGL() so that my drawimage( which is in the paint() function) gets called. I saw in an older thread that you mentioned about getting the next frame of data in the renderOpenGL() function and doing the drawing in paint. I see no other way to trigger the paint() without calling repaint(). Should I just be drawing the image (a juce image) in the renderOpenGL() using "GL" methods?