NW4C Sample Demos
Overview
These demos perform drawing by simultaneously using the gfx library, layout library and OpenGL library. You can use the gfx library to adjust the number of models being drawn and check the amount of data to be drawn at either 60 fps or 30 fps.
Compilation
Change directories to $Library/demos/Nw4cDemo/resource and execute the following, as resources must be rebuilt.
res_conv.bat
res_conv_lyt.bat
Change directories to $Library/demos/Nw4cDemo and execute the following.
% omake
The executable (.cci) file is generated in:
$Library/demos/Nw4cDemo/images/(platform)/(target)/
How to Use
- Touch Panel Operations
- Three tabs, Setting, Camera, and Help, are displayed on the touch panel screen.
- The Setting includes sliders that can be used to adjust the number of objects and/or particles drawn in the demo.
- The Camera tab displays a description of camera operations.
- The Help tab displays a description of pad operations.
- Pad Operations
- A Button: Play/pause the demo
- B Button: Restart the demo.
- X Button: Advance one frame while demo is paused
- R+A Buttons: Demo cost log output
- R+B Button: Toggle between command single/double buffer.
- R+X Button: Show/hide the CPU/GPU meters
- R+Y Button: Show/hide the layout
- START Button: Toggles between camera motion and free camera operation.
- Free Camera
- Slide pad: Camera control operations
- Left part of touch panel: Toggles between camera motion and free camera operation.
Description
These demos perform drawing by simultaneously using the gfx library, layout library and OpenGL library.
Models and particles that use the gfx library are drawn on the upper screen. A UI that uses the layout library and cost meters indicating the cost of using OpenGL are displayed.
A UI (slider) that uses the touch panel can be used to adjust the number of models or particles to be drawn. The amount of data to be drawn in 60 fps or 30 fps can be adjusted dynamically.
If all sliders are set to maximum, 3 clowns, three robots, 25 audience members, 13 particle sets, and 3 stage objects are drawn.
Cost meters (for the CPU and GPU) are displayed in the touch panel upper screen. The meter center represents operations at 60 fps, and the right end of the meter represents operations at 30 fps. The demo starts at 60 fps, but adjusted to operate at 30 fps when the number of drawings is maximized.
Description of the demos/Nw4cDemo/resource folder
Gfx and Layout data used by the demo is stored in demos/nw4cDemo/resource.
- toy_common folder
This folder includes textures, lights and light sets, and fog settings for the cube environment map used with toy_pierrot, toy_robot, toy_stage, and toy_audience.
- toy_camera folder
Stores camera animations used by the demo.
- toy_stage folder
Stores model data for the background and background decorations used by the demo.
- toy_particle folder
Stores particle data used by the demo.
- toy_pierrot_lyt_btn, toy_robot_lyt_btn, toy_stage_lyt_btn, toy_audience_lyt_btn, and toy_particle_lyt_btn folders
The folders store layout data for the button used to toggle the display of characters, background objects, and particles.
- toy_lyt_tab folder
Layout for switching screens by tab.
- toy_lyt_slider folder
Notes
Avoid using current source code as-is, as it has not be refactored.
CONFIDENTIAL