How to change viewport canvas size?

I’ve tried many things. I want to have a window that is size 1024x768 but I want the glViewPort to be 512x384. This is possible. Defining a window for Opengl is different from the viewport. What opengl will do is pixelate the difference since the window is two the size.

But I can’t find how to do this in JME3. setViewport, resize do not change the viewport.
I even created my own viewport but it is still the size of the window 1024x768.

I tried to change the main viewport to 512, and it reports back as 512, but during debugging, on the render window process, it sets the viewport back to 1024.

I can’t figure out how to change this at all.
Is it even possible?


You may want to post the code for the things you’ve tried.