Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
This demo plays media/oggs/clip.ogg (be sure to put one there before testing) and prints some benchmarking information.
Legend
- Frame number - the index of the currently displayed frame
- Frames dropped - number of frames that couldn't be displayed to keep the video clip in sync
- Video time - current time in seconds of the playing video
- Decoding time - average time it took to decode the last frame,(in milliseconds)
- YUV--RGB time - average time it took to decode YUV pixels to an RGB buffer
- TexBlit time - average time it took to upload the current frame from RAM to the texture buffer on the display card
- Time per frame - average number of milliseconds it takes to prepare one video frame
- Max FPS - how many frames per second can be prepared (estimated)
- Precached frames - how many frames are prepared in advance
Code
The code is a modified and stripped down version of OGRE's CEGUI demo. It uses OGRE's sample framework headers.
The only demo relevant code is located in the ClipListener class and frameStarted() function.
- The demo loads clip.ogg located in one of the resource locations.
Material
- located in demos/media/materials/scripts/Example.material
material SimpleVideo { technique { pass { cull_software none cull_hardware none lighting off texture_unit { 'texture_source ogg_video' { 'filename clip.ogg' 'precache 50' 'play_mode play' } } } } }
As you can see, displaying a video in OGRE is as simple as putting a few lines in the material file.
See Material documentation for explanations of these parameters.
Contributors to this page: jacmoe
and
OgreWikiBot
.
Page last modified on Monday 28 of December, 2009 03:23:02 UTC by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
49
online users

