Framework
The PowerVR Graphics SDK provides a framework which is made up of PVRShell and PVRTools. PVRShell is a simple, light-weight architecture for the barebones of application setup, shutdown and event handling. It is designed to streamline the process of writing cross-platform graphics applications. PVRTools, on the other hand, is a cross-platform tools library containing the most commonly used functionality in a 3D graphics application.
PVRShell
PVRShell is used in all our Examples (except for HelloAPI) to provide a common framework for developing OpenGL ES applications on any PowerVR platform. The shell takes a set of command-line arguments which allow items like the position and size of the example to be controlled. The table below identifies these options.
| Option | Description |
|---|---|
| -aasamples=N | Sets the number of samples to use for full screen anti-aliasing, e.g., 0, 2, 4, 8. |
| -c=N | Save a single screenshot or a range, for a given frame or frame range, e.g., -c=14, -c=1-10. |
| -colourbpp=N or -cbpp=N | Frame buffer colour bits per pixel. When choosing an EGL config, N will be used as the value for EGL_BUFFER_SIZE. |
| -config=N | Force the shell to use the EGL config with ID N. |
| -depthbpp=N or -dbpp=N | Depth buffer bits per pixel. When choosing an EGL config, N will be used as the value for EGL_DEPTH_SIZE. |
| -discardframeall | Selects whether to explicitly request a discard of all contents of the relevant framebuffer at the end of every frame to save bandwidth. |
| -discardframecolour | Selects whether to explicitly request a discard of the frame colour of the relevant framebuffer at the end of every frame to save bandwidth. Default: false. |
| -discardframedepth | Selects whether to explicitly request a discard of the frame depth of the relevant framebuffer at the end of every frame to save bandwidth. Default: true. |
| -discardframestencil | Selects whether to explicitly request a discard of the frame stencil of the relevant framebuffer at the end of every frame to save bandwidth. Default: true. |
| -display | EGL only. Allows specifying the native display to use if the device has more than one. |
| -forceframetime=N or -fft=N | Force PVRShellGetTime to report fixed frame time. |
| -fps | Output frames per second. |
| -fullscreen=[1,0] | Runs in full-screen mode (1) or windowed (0). |
| -height=N | Sets the viewport height to N. |
| -info | Output setup information to the debug output. |
| -posx=N | Sets the x coordinate of the viewport. |
| -posy=N | Sets the y coordinate of the viewport. |
| -powersaving=[1,0] or -ps=[1,0] | Where available enable/disable power saving. |
| -priority=N | Sets the priority of the EGL context. |
| -quitafterframe=N or -qaf=N | Specify the frame after which to quit. |
| -quitaftertime=N or -qat=N | Specify the time after which to quit. |
| -rotatekeys=N | Sets the orientation of the keyboard input. N can be 0-3, where 0 is no rotation. |
| -screenshotscale=N | Allows to scale up screenshots to a bigger size (pixel replication). |
| -sw | Software render. |
| -version | Output the SDK version to the debug output. |
| -vsync=N | Where available modify the app's vsync parameters. |
| -width=N | Sets the viewport width to N. |
PVRShell also provides limited keyboard input which may vary depending on your actual platform. If your platform has full keyboard support, the Q key will quit the application and the cursor keys will allow looping through the application options.
The PVRShell source can be found in the Shell folder in the SDK package. Further documentation is available at Shell/Documentation.
PVRTools
The PVRTools library consists of various modules designed to facilitate common tasks associated with hardware accelerated graphics rendering. This includes:
Vector, matrix and quaternion mathematics: Helpers to calculate and operate transformation matrices and other associated mathematical operations.
OpenGL ES extension handling: This helps to load and use OpenGL ES extension functions and capabilities.
3D font drawing: A very flexible engine to handle font maps.
POD loader: Helpers to load and access the model data included in PowerVR Object Data (POD) files.
PVR loader: Helpers to upload and manage textures exported to the PVR texture container format.
PFX loader: Helpers to load and access PowerVR Effects (PFX) files, which contain vertex and fragment shaders.
The Tools library is used extensively throughout the PowerVR SDK. The PVRTools source can be found in the Tools folder in the SDK package. Further documentation is available at Tools/Documentation.

