I am wondering whether it would be safe to use OpenGl inside of the ui of an VST/AU/RTAS plugin (if only it can be done) to perform some animations. Are there any pitfalls to avoid, or efficiency drawbacks of doing so? To be more specific, I would not like to do stuff related to the audio stream, but mostly fancy buttons or sliders.
Some voices inside of me are telling me that I’d want to stay away from this, but I am not really familiar with graphics programming, hence some hints would be greatly appreciated!
About “drawbacks and pitfalls”: if you use GL, be sure that it’s hardware accelerated. If it isn’t, rendering will be very, very, very slow. I don’t know any portable way of determining whether if it is accelerated or not. At least, document somewhere that your plugin needs fast (i. e. hardware accelerated) OpenGL.
Generally, I would only use GL if it’s really needed: say, if you want to do some optional fancy audio visualization which opens in an extra window. I personally would not use it to animate buttons. This is nothing that would justify the dependency on accelerated GL, imho.