OpenGLComponent Question --


#1

This is probably a dumb question:

Can an OpenGLComponent be rendered BEHIND other components?

It seems that this is not the case…

Aaron


#2

From Jules… back in the day…

Sad… This makes a lot of sense though.


#3

So… I’ve resigned myself to not being able to draw over my opengl component – however, when I resize it, I get this terrible tearing effect where the OpenGL window sort of jumps weirdly.

I know there has to be some a way to prevent it.


#4

The only real way around this AFAIK is to implement your entire GUI as OpenGL.


#5

I still haven’t figured out the resize problem, however there was also a tearing problem in macs where there monitor refresh isn’t synchronized to the callback synchronization…

[code]
#include <OpenGL/OpenGL.h>

#ifdef JUCE_MAC
GLint MacHackVBL = 1;
CGLContextObj cglContext = CGLGetCurrentContext();;
CGLSetParameter(cglContext, kCGLCPSwapInterval, &MacHackVBL);
#endif
[/code][/code]


#6

That sounds odd. Mac is a double-buffered only system these days. It’s pretty hard to draw to the front buffer and get tearing. Could you be doing something else odd?

Bruce