WidgetViewport Camera question

Hi Mark,

I’m working on a widget that will allow multiple views of a scene or viewing of multiple scenes in the jME window.

To get this this to work I think I need to be able to change the camera’s viewport. Currently neither the Camera interface nor AbstractCamera class have methods allowing access to the viewport.

I’m thinking about adding methods to the Camera classes to allow changing the width, height and location of the Camera’s viewport. Also I thought I would move the width and height attributes in LWJGLCamera into AbstractCamera and make them protected.

What do you think about making the changes? It shouldn’t disturb any existing use of the Camera, but I wanted to run it by you first.



Hi Gregg,

Yep, you are right. I forgot to add the ability to alter the viewport. So, yes, feel free to make these changes. The attributes for the viewport is defined in AbstractCamera viewPortLeft, viewPortRight, etc. The onViewPortChange method sets the viewport in OpenGL. That’s in LWJGLCamera.