[Solved] COpenGLView and retina displays


I’m currently developing a test VST3 plugin using a restricted set of VSTGUI features to draw pure OpenGL.
It works fine, except that I can’t get it to work properly on retina displays.
My rendering lib is based upon NanoVG and it works fine when hosted by GLFW.

In GLFW, i have access to two functions: glfwGetWindowSize and glfwGetFramebufferSize, which allow me to retrieve the window’s dimensions and the frame buffers’ ones.
I then set my OpenGL viewport size to the frame buffer dimensions and feed my renderer with window’s dimensions and resulting pixel ratio (2 in this case).

Inside the VST3 plugin I have a view class which inherits from VSTGUI::COpenGLView and I’m able to retrieve the pixel ratio from CFrame::getScaleFactor.
The drawing shows correct position from the elements but they are aliased.

Here are the resulting rendering from both cases:
GLFW: https://ibb.co/gk36aG
VSTGUI: https://ibb.co/cPa8pb

Could someone point me to some documentation on the topic, or a related example maybe ?

Thank you.


the OpenGL stuff is not yet ready for HiDPI. I’m currently working on that.


Hi Arne,

That’s a good timing for me then :slight_smile:
Let me know if you want me to try stuff, I’d be glad to help.



Hi Baptiste,
this is now working in my private fork.(https://github.com/scheffle/vstgui)
If you like check it out and test it.


Hi Arne,

Sorry for the delay.
Everything works fine, as expected.
Do you think this will be part of the next VST3 SDK release ?



Yes it is :wink: