Render to part of screen

I want my main game to be only on part of the screen with a interface on the rest. What would the easist way of doing this? Think a split screen game except one half is a ui instead. (Note its the non ui side i want to know about)

Normally you would render you interface on top of the 3d scene.



But you can render your with a TextureRenderer to a texture, apply te texture to are otho-quad and place the orthoquad were you want on your screen…



See JME-Tests, like TestRenderToTexture (or simlar name)



Cu

snare

You can also setup the viewport to render to only one part of the screen i believe

renanse said:

You can also setup the viewport to render to only one part of the screen i believe


I think this is probably your best option. Set your camera to have dimensions on half of the screen.

or you can apply a ClipState to your rootNode. As the name says, it will just clip the unwanted parts, in which you can then render something else (with a different rootNode)

What kind of UI are you talking about? If you want to do straight swing and java components, then putting jME on a canvas is the way to go. If you want the UI to be 'inside' the game window, no matter how much of the game it covers, then you still have to render the whole screen.