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 | PVRTools

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.

OptionDescription
-aasamples=NSets the number of samples to use for full screen anti-aliasing, e.g., 0, 2, 4, 8.
-c=NSave a single screenshot or a range, for a given frame or frame range, e.g., -c=14, -c=1-10.
-colourbpp=N or -cbpp=NFrame buffer colour bits per pixel. When choosing an EGL config, N will be used as the value for EGL_BUFFER_SIZE.
-config=NForce the shell to use the EGL config with ID N.
-depthbpp=N or -dbpp=NDepth buffer bits per pixel. When choosing an EGL config, N will be used as the value for EGL_DEPTH_SIZE.
-discardframeallSelects whether to explicitly request a discard of all contents of the relevant framebuffer at the end of every frame to save bandwidth.
-discardframecolourSelects 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.
-discardframedepthSelects 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.
-discardframestencilSelects 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.
-displayEGL only. Allows specifying the native display to use if the device has more than one.
-forceframetime=N or -fft=NForce PVRShellGetTime to report fixed frame time.
-fpsOutput frames per second.
-fullscreen=[1,0]Runs in full-screen mode (1) or windowed (0).
-height=NSets the viewport height to N.
-infoOutput setup information to the debug output.
-posx=NSets the x coordinate of the viewport.
-posy=NSets the y coordinate of the viewport.
-powersaving=[1,0] or -ps=[1,0]Where available enable/disable power saving.
-priority=NSets the priority of the EGL context.
-quitafterframe=N or -qaf=NSpecify the frame after which to quit.
-quitaftertime=N or -qat=NSpecify the time after which to quit.
-rotatekeys=NSets the orientation of the keyboard input. N can be 0-3, where 0 is no rotation.
-screenshotscale=NAllows to scale up screenshots to a bigger size (pixel replication).
-swSoftware render.
-versionOutput the SDK version to the debug output.
-vsync=NWhere available modify the app's vsync parameters.
-width=NSets 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:

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.