A few questions on the use of opengl for 2D components.
I noticed that by attaching an OpenGLContext with a Component, the regular `paint’ method automatically uses an opengl frame buffer - this is really cool. I’m wondering which is the most efficient way to use images in this case.
For example, i create the same image in two ways, first as a normal Juce image and secondly as an image of
OpenGLImageType'. I understand the second lives in the opengl frame buffer. Now, it turns out that drawing both images inside the paint method work. Would i be correct in assuming the one of OpenGLImageType is more efficient, ie not requiring copy or conversion - or is it the same. Additionally, is there something else i should be doing to make maximum use of the opengl system here. If i'm applying a transform to these images, will this be processed by opengl in an efficient way? eg usingdrawImageTransformed’.
One other question is that if i try to perform some opengl 2D operations in `renderOpenGL’ (in addition to my paint stuff), it blows with opengl “out of memory”. not sure why this is. use of 3D stuff works here. this might be due to any use of the OPENGL_FIXED_FUNCTION stuff. am i correct to assume this is to be phased out.
Thanks for any answers.