Page 1 of 1

[Solved] COpenGLView and retina displays

Posted: Fri Dec 08, 2017 8:56 pm
by blegoff
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: 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.

Baptiste

Re: COpenGLView and retina displays

Posted: Sat Dec 09, 2017 4:00 pm
by Arne Scheffler
Hi,
the OpenGL stuff is not yet ready for HiDPI. I'm currently working on that.

Cheers
Arne

Re: COpenGLView and retina displays

Posted: Mon Dec 11, 2017 11:10 am
by blegoff
Hi Arne,

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

Best.

Baptiste

Re: COpenGLView and retina displays

Posted: Mon Dec 18, 2017 4:54 pm
by Arne Scheffler
Hi Baptiste,
this is now working in my private fork.(https://github.com/scheffle/vstgui)
If you like check it out and test it.

Cheers,
Arne

Re: COpenGLView and retina displays

Posted: Thu Feb 01, 2018 6:26 am
by blegoff
Hi Arne,

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

Thanks.

Baptiste

Re: COpenGLView and retina displays

Posted: Thu Mar 01, 2018 3:24 pm
by Arne Scheffler
Yes it is ;-)