[Solved] COpenGLView and retina displays

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
blegoff
Posts: 17
Joined: Tue Aug 23, 2016 2:15 pm
Contact:

[Solved] COpenGLView and retina displays

Postby blegoff » Fri Dec 08, 2017 8:56 pm

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
Last edited by blegoff on Mon Mar 05, 2018 10:38 am, edited 1 time in total.

Arne Scheffler
Posts: 187
Joined: Mon Jun 20, 2016 7:53 am

Re: COpenGLView and retina displays

Postby Arne Scheffler » Sat Dec 09, 2017 4:00 pm

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

Cheers
Arne

blegoff
Posts: 17
Joined: Tue Aug 23, 2016 2:15 pm
Contact:

Re: COpenGLView and retina displays

Postby blegoff » Mon Dec 11, 2017 11:10 am

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

Arne Scheffler
Posts: 187
Joined: Mon Jun 20, 2016 7:53 am

Re: COpenGLView and retina displays

Postby Arne Scheffler » Mon Dec 18, 2017 4:54 pm

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

blegoff
Posts: 17
Joined: Tue Aug 23, 2016 2:15 pm
Contact:

Re: COpenGLView and retina displays

Postby blegoff » Thu Feb 01, 2018 6:26 am

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

Arne Scheffler
Posts: 187
Joined: Mon Jun 20, 2016 7:53 am

Re: COpenGLView and retina displays

Postby Arne Scheffler » Thu Mar 01, 2018 3:24 pm

Yes it is ;-)


Return to “VSTGUI”

Who is online

Users browsing this forum: No registered users and 1 guest