What exactly do you mean by 3D view resizing? Is your application running on a device, or on a windowed desktop system using our emulation libraries? PVRShell’s prefWidth and prefHeight are generally used to determine the size of a device’s screen, for example.
On iOS (or Android, when I come to porting the app), the OpenGL view does not take up all the screen size but sits inside a tabBar tab. I also want to handle device rotation as a resizing operation of the view (that’s basically what it is) instead of rotating the camera OpenGL.
On the desktop (currently MacOS) I want to do just the same. I have a resizable window containing the OpenGL view.
I have used this pattern before with objective-c implementations an it works very well. On view resizing I just start my render loop and set the new viewport size accordingly.
As I understand the PVRShell’s default pattern would be to assume the app is displayed full screen.
Which would be the most suitable way to support dynamic view resizing?
my first guess will be to use and extension of GLSurfaceView and complete the implementation of the GLSurfaceView.EGLContextFactory as describe in the doc .LIke that we can have a specific view to render and enabling the usage to the gui builder as a bonus.
Unfortunately without modification PVRShell will not be suitable for your requirements, as you’ve described. PVRShell is primarily intended to be used full-screen on devices in which the screen size does not change, and rotation is handled via a view matrix.
In order to support dynamic resizing you will unfortunately need to add this code yourself. However, it should not be too difficult to add, OS depending.