Friday, October 30, 2009

cegui ogre and theora plugin work

For past few days, i was struggling with cegui theora and ogre plugin work. Today i got it working with help from Vamsi...

This documentation is for windows operating system. I specifically tried on window XP but i am not sure if this work on other versions or not. However if we have operating system compatible libraries for each required component of setup then we can hope that it'll work.

First we should get OGRE installed on the machine. Set the (OGRE_HOME) variable.
Get the CEGUI setup working on machine. So make sure that CEGUI and OGRE based dll and lib files are present on the system. If possible, try one CEGUI-OGRE based hello world kind of program.... This is an appropriate application to start and test OGRE and CEGUI...

http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_7


Once we have CEGUI and OGRE working then open this page and try to compile the theora-videoplugin...

The bad part about this video plug-in is that there is very less to no documentation available on internet...

For compiling.. Following points need to be kept in mind...
1. Create a folder TheoraPluginThingy
2. cd into the folder

[...All steps in this "TheoraPluginThingy" directory...]
1. Get libogg
2. Get libtheora
3. Get libvorbis
4. Get ptypes
5. Install tortoiseSVN [if you don't have] and get the Theora-Videoplugin code

Start with libogg...
Search for dynamic solution file and compile it...
Check for the size of .dll created in output directory... This directory is set in properties... so check there...

Now cd to libvorbis directory
Search for dynamic solution file and compile it...
There is a readme file so dont forget to read that..
Also you may need to correctly specify the version of "libogg" that you use in file "libogg.vsprops".

Now one problem here is with file vorbis.def...
In this file you may need to modify one line...
_analysis_always_output One may need to put a semicolon before this line...


Now cd to libtheora directory
Search for dynamic solution file and compile it...
Don't forget to read the readme file and set the versions of both libogg and libvorbis in the corresponding .vsprops files...

Also one file lib/theora.def might be missing so get it from this location http://svn.xiph.org/trunk/theora/lib/theora.def

Now enter the ptypes folder and create a static multi-threaded library...
for this.. there are multiple solution files so pick ptypes_lib and compile and build it... Check for generated static lib in output folder...

In project settings.. make sure that in configuration properties... it is set to static lib
and C++/code generation is set to "multithreaded dll"

Now follow the instruction on the "theoraplugin" compilation web page and copy all the includes, dll and lib files to appropriate locations...
also copy ogremain.lib and ceguibase.lib files to appropriate folder in TheoraVideoPLugin folders lib directory...

Now change the project setting and include the Ogre_home/include location as well...
Mine looks like this... for all for solution files ....
..\..\TheoraVideoPlugin\include;..\include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\samples\include"

Now theoraplugin dll will be ready after compiling....

Now to run the demos in demos/player folder...
Check the properties...
Change the resources.cfg file.... put it at appropriate location..
points to media folder at appropriate place...
Change the plugins.cfg file and get TheoraVideoPlugin and other dlls like libogg, libhteora and libvorbis..
Run the application... Debug a little and read the log files generated ...

Hopefully this will make your things work....

Will refine this draft later... SJ

Wednesday, October 28, 2009

password problem for ubuntu

I remember once i forgot my ubuntu password and because i was not aware of hacking fixes so i had to reinstall my OS. I was thinking about that and found this useful forum page which explains in detail that how vulnerable are Unix and Windows machine to hackers.... and how important it is to set a grub password...

http://ubuntuforums.org/archive/index.php/t-3609.html

Tuesday, October 27, 2009

cl : Command line error D8003 : missing source filename

This error was coming because i misplaced a quote around library inclusion in the properties window of the project.
Wasted my 35 precious mins...

SJ

Sunday, October 25, 2009

CEGUI OGRE THEORA

This link will help in cracking some of the issues that i am facing.
http://www.wreckedgames.com/forum/index.php/topic,894.0.html

This will also help in basic setup...
http://www.cegui.org.uk/phpBB2/viewtopic.php?f=4&t=154&start=15

Next thing is to download ogg, vorbis, theora, ptypes and theora video plugin...

Do a static build for each of them in the order... and get basic theora set up ready..
If this much work is done then i can focus on rest...

SJ

Stuck with OGRE-CEGUI-Theora plugin...

Nowdays i am stuck with OGRE-CEGUI and theora plugin....
There is no explicit documentation available....

Seems to render the video, i need to extract the video texture and audio texture of the file... Once i have that then i need to load the material to render that texture...

Once i render it, it should run... Will try once more and then will write the tutorial...

till than njoy.... deadline... tomorrow... wuhuhuhuhu

Thursday, October 22, 2009

Some java concepts:

Purpose of defining the constructor private:

1. To make the class singleton
2. Making constructor private will not allow any other class to make object of this class or in other words, this class can not be sub classed...

Tuesday, October 20, 2009

Virtual memory

I found this link to be very concise and beutiful.
http://williamstallings.com/Extras/OS-Notes/h9.html

Read in detail sometime..

Thanks

Monday, October 12, 2009

Problem fixes...

Nowdays i am not frequently logging all my problems...
so lets do it now...

1. .player file generated in player-client assignment of robotics class...
I worked with Makefile. Problem was that initially i was using eclipse C++ plugin to program all the stuff.. i had to put libraries for compilation and linking so i was not adding linker library or may be the path was wrong.. I tried many things and one of them worked.. Basically point was to look into all the properties of building and change some things in compile and linker... in compile i was supposed to add the path and same with linker .. somewhere i was also supposed to specify .so file name....

Apart from this... i was supposed to find that where those files exists in the system so for that use of pkg-lib command was handy...

Second .. once i removed ported my project to department machine then i was supposed to change entries in makefiles....
so for that i used pkg-lib command to bring all the libraries...
then i used -I flag in makefile compile thing....

once i'll see it again.. i will recall exact syntax...

Now i am stuck with CEGUI and OGRE work of my RA....

Thanks
SJ

Saturday, October 10, 2009

Significance of virtual destructors...

Earlier i thought that virtual destructor are used to make sure that all the data pointers, memory blocks are freed when object gos out of scope...

But the actual significance of virtual keyword is that it allows the derived classes to override the base class destructors... this way when we delete the object of derived class at the end of all our work then derived class destructor is also called...


This link explains this better...
http://www.codersource.net/cpp_virtual_destructors.html

Saturday, October 3, 2009

Player - Stage work

I am totally stuck with this player/stage thingy...
Trying to work on my assignment of robotics where i need to move a robot on a plane while avoiding all the obstacles...
Just wondering how would i get the world information...

1. May be some way to read from world file... but not able to find any API to read from world file or finding the obstacle information...

2. Passing separate file which specify the environment... Logically this idea is offensive... so not possible...

3. Using sensor... Dont know how would this work.. This seems to be the ideal solution to my problem...
Let me try this...

Friday, October 2, 2009

C++ vs Java

Java-- garbage collection..
C++ no collection...

Java-- No virtual keyword.. Java has equivalent final keyword but notion is opposite...
i mean in java we have to explicitly say final but in C++ we explicitly say virtual....
[credit.. Will]
C++ Virtual keyword

Java-- Package
C++ Namespace

Java-- No operator based polymorphism
C++ Polymorphism

Many other.... will write later... Tried a bit now...