Class MogreQuickStart (ex clOgre)

feanor91

17-09-2008 16:37:52

Hello

I have posted the code of my class in Mogre Wiki, so everybody can play with it. I create this topic, if somebody want to discuss about improvement/debugging....

You can find the thing here : http://www.ogre3d.org/wiki/index.php/ClOgre

Beauty

17-09-2008 22:12:46

Nice that you put it to the wiki :)
I styled up the source code (by using the tags <pre>...</pre>) and made some little changes to the text.
If you need help with the wiki, you can look to the help page (in menu) or just ask me :wink:

It would be nice if you can translate the comments to english. Than it's more understandable for the world wide users.
Update: Now I saw it's also in english. Maybe it's good to write the english comments in front of the french one. (or write only english comments for better overview?)

feanor91

18-09-2008 06:54:25

Hi....VIVE LA FRANCE: :D

I know it's less readable to have the two comments, but it's important to me to have both, because, we have so few thing for us french people as source on mogre, and I have a lot of difficulties to understand notions involved by use of ogre in english (math and so on). So, if I can help newbies french people to Ogre, I will be happy. I will poste the same page on french wiki too.

Nexam

18-09-2008 08:22:55

Cool source :)

Merci bien !

feanor91

18-09-2008 08:29:00

Nexam : De rien! C'est plaisir.

Beauty : I want to add my source to the liste of Mogre addon under C letter, but I don't manage to edit that part of the wiki. We have no rights to do that or I'm stupid?

feanor91

18-09-2008 09:11:10

Hi,

I add the source of oFusionLoader, the dll that permit to load osm scene file. It can be found elswhere on wiki, but I think it's better to not have to look for it.

I add, also, the different dll and files that you need to use that class.

Beauty

18-09-2008 09:11:10

Nice that you work with the wiki.
You have to log in with your forum name/password. Then you can edit.

The Mogre Add-on page is still not ready.
For many add-ons the content is empty and also there are problems because of outdated wiki software.
It uses wiki templates to create the boxes.

Here is a stub for a new add-on:
{{LayoutBox_MogreAddon|1=
{{MogreAddon
|autor_ifNoPort=
|autor_ifPortedFromOgre=
|porter_ifPortedFromOgre=
|version=
|originalVersion_ifPorted=
|status=
|licence=
}}
; Category

...

; Description

...


; More information

See '''[[]]'''
}}

Write in what you need and leave blank the rest. Then add it at the end of the Add-on page. If you have questions, just ask.

By the way - is this class realy an add-on?
If not - shell we add it to the list, too?

Beauty

18-09-2008 09:23:49

I add the source of oFusionLoader, the dll that permit to load osm scene file. It can be found elswhere on wiki, but I think it's better to not have to look for it.
I didn't know about that. I sounds interesting.
The OFusion page I linked. A download link for the compiled ofusionLoader.dll would be fine. If you don't have a webspace I could add it to my one.

feanor91

18-09-2008 09:42:02

Thanks

Well, I don't know if it's an addon or not, I think no, in fact, but I didn't find a place to put it...In fact it's more a kind of wrapper above MOGRE than other thing, it embeded all I need to re-use ogre from soft to soft or form to form without rewriting all the stuff (a job of a class after all).

Beauty

18-09-2008 10:49:26

Yes, it would be a good place to find. So we can add it.
By the way - for Ogre itself is not even a simple Add-on overview.
So we Mogre users are outriders :lol:

Beauty

18-09-2008 11:09:41

The name clOgre is a little bit confusing to me. I always think about if the second character is a small L or a capital I.
It would be good if the name somehow includes the meaning of the class or just have a good readable name.
Also the name could include Mogre instead of Ogre.

What do you think about to change the name?
Some ideas: quickMogre or qMogre or qsMogre (for quick start) or QSMogre or easyMogre or MogreStartup or something with Framework (but not MogreFramework - this is used for an SDK package) ...

feanor91

18-09-2008 11:54:29

Well, if you want, for me, cl is for class and Ogre...for Ogre, so we can change Ogre to Mogre and want to reflect that it embeded all te stuff to start quicly to have a working soft..So what about MogreQuickStart ?

If so, I let you change the wiki, or explain to me how to do, because, i saw that links are automaticly made, and I don't now how to change titles or link...And if link change, I have post on french forum a link to clOgre....

Beauty

18-09-2008 15:52:24

Your idea sounds good. I would say that we wait for some days. Maybe someone else want to give an opinion.
The wiki changes I would do. Links to the current URL will be redirected.

feanor91

18-09-2008 17:30:10

Great

Beauty

16-12-2008 09:43:05

Now I renamed the project to MogreQuickStart in the wiki.
feanor91, it would be nice if you can change the library names / class names etc. to make the renaming consistent.

feanor91

16-12-2008 11:42:14

Hi

Done

feanor91

05-06-2009 12:27:04

Hi

I have updated the wiki to add the new functions of the class that permit the video capture.

mikel3361

15-09-2011 13:28:55

Has anyone converted the project to VB 2010 runnable. I tried it by myself, but my knowledge in C# is very poor so i have many errors after converting the code with the Free Converter Site.

feanor91

15-09-2011 14:01:56

Hello

Mogre Class is made in VB.NET 2005 I have C# code on it? I didn't remember and so, it does't work on VB2010 even by using project conversion from VB?

Beauty

15-09-2011 21:20:32

There are some online converters in the web for VB <-> C#
It should do the most work. Sometimes some changes you have to do by hand. (Or try an other converter.)
Maybe it's useful for you.

For example try this converter:
http://www.developerfusion.com/tools/co ... harp-to-vb

mikel3361

16-09-2011 08:21:15

Possible i have converted 99% of the C# code to VB, only a problem in one function - requieres a rewrite i think, some statements and types not in vb usable.
/************************************************************************/
/* read a resource completely as a byte array */
/************************************************************************/
public byte[] ReadResource( string _groupName, string _fileName )
{
// if the file does not exist there is no way to load it
if( !CheckResourceExists( _groupName, _fileName ) )
return null;

// open resource for reading
DataStreamPtr streamPtr = ResourceGroupManager.Singleton.OpenResource( _fileName, _groupName );
uint length = streamPtr.Size();
uint readLength = 0;

// create buffer to load resource into
byte[] buffer = new byte[ (int) length ];
if( length != 0 )
{
unsafe
{
fixed( byte* bufferPtr = &buffer[ 0 ] )
{
// read resource into buffer
readLength = streamPtr.Read( bufferPtr, length );
}
}
}

// if reading the resource failed, just get rid of the buffer
if( readLength != length )
buffer = null;

// close the resource stream
streamPtr.Close();

// return buffer of loaded resource or null if failed
return buffer;
}

I marked the statements red i cannot convert to a runnable code - maybe the returntype of byte array of the function must converted - i don't know

feanor91

16-09-2011 09:39:09

It is in what part of the code.

To know, all the c# code was get here and there on the net as I found software that I need to advance. The VB code is from me but not C# one.

I suppose it is in the video capture part? If yes, you could removce all that stuff from the code because even if it works, it was not really easy to tweak for a good frame rate

mikel3361

16-09-2011 10:04:31

It's in the Modules\ResourceManager.cs Code - the function itself is never called in the Quickstart so i don't know what it does.
Looks like the function reads an entire resource into an bytearray, don't know for what reasons.

I prefer for now to remove this function from my vb 2010 code to test it.

feanor91

16-09-2011 10:55:19

I'm really sorry but I don't remember what is that. in the ofusion part perhaps? It was almost 2 years I work on that, I have sleep a lot since....

Beauty

16-09-2011 18:50:01

function itself is never called in the Quickstart
Maybe just replace the content of this method by throwing a NotImplementedException ...

mikel3361

21-09-2011 08:05:18

function itself is never called in the Quickstart
Maybe just replace the content of this method by throwing a NotImplementedException ...

This solution seems better as only remove the function, i will do the trick.