Hi,
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: glfw — ImgBB
VSTGUI: vstgui — ImgBB
Could someone point me to some documentation on the topic, or a related example maybe ?
Thank you.
Baptiste