12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- About
- -----
- This application is meant to be an example on how to show OpenGL ES content on top of camera viewfinder
- in a Symbian^3 device. Profiling graphics resource (GPU memory) usage is also added as an add-on feature.
- The application consists of 3 basic containers which are used to show the different features.
- Currently all 3 containers are either visible or invisible at the same time. Visibility can be
- controlled using left softkey (start/stop). Containers can be shown separately but logic for showing
- and hiding different containers needs to be added to the application.
- When all containers are visible the content from bottom to top in that case is:
- 1) Viewfinder - shows camera viewfinder.
- 2) OpenGL - shows animated OpenGL scene on top of viewfinder. Purely an example on how
- transparency and animation can work with camera viewfinder. Cube animation code is copied
- almost as-is from Forum Nokia "Simple Cube" example [1].
- 3) Info - shows the amount of free graphics memory on top of viewfinder and OpenGL content. This should give you
- an idea on how much graphics memory is left for OpenGL textures and other resources. It is recommended to leave at
- least 1MB of memory free for system use. The value is updated once a second.
- Implementation details
- ----------------------
- - Camera needs to be prepared in video mode to save some resources for e.g. OpenGL texture use.
- This also enables the use of 16:9 aspect ratio for viewfinder, giving the opportunity to use full
- screen (640x360) viewfinder.
- - OpenGL window has to be separately set transparent using native API.
- - GPU memory profiling data is provided as an example. The values could be used in real use case
- e.g. for releasing cached resources in case of low memory.
- Dependencies:
- -------------
- - CAlfCompositionSource class is needed for enabling transparency for the OpenGL surface.
- This is not a public API normally provided with the SDKs. One option to get hands on the API would be
- getting the sources from Symbian Foundation repository and compiling the needed classes in local environment.
- - In this project we are exporting needed headers and libraries from project's exported folder to proper place
- in the environment before compiling.
- - MCameraUseCaseHint interface is used for hinting CCamera our use case before reserving camera.
- This helps to speed up camera startup and also keeps resource usage during startup to the minimum.
- Links
- -----
- [1] | Simple Cube example | http://library.forum.nokia.com/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-441D327D-D737-42A2-BCEA-FE89FBCA2F35/OpenGLEx/SimpleCube/doc/index.html
|