Suggestion about the API Documentation

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
AutoDMC
Posts: 104
Joined: Sat Sep 18, 2004 3:44 pm

Suggestion about the API Documentation

Post by AutoDMC »

I've been reading the API Documentation in my free time, trying to get a better handle on Irrlicht.

This is basically how I learned the HAM development kit over at ngine.de for Gameboy Advance development. I browsed the Docs.

However, I've been having a bit of a difficult time doing the same thing with the Irrlicht docus, and I couldn't figure out why. Untill last night, when I tried to set up a GUI.

No example code.

See, HAM was relatively simple. It doesn't use a class hierarchy, no interfaces, no templates. In fact, it was originally designed to be a set of macros to help low level development on the console.

However, Irrlicht is a little more difficult. If you are wise in the ways of C++, I guess it's not too bad... however, I stayed strictly C for the longest time, and now I'm taking a crash course on C++. And I keep shooting my own foot.

So, what I'm really saying is that the API Docu could be made much more readable as a reference if example code were included. For example, in the API Documentation for the IGUIWindow class, after the "Constructor & Destructor Documentation" section, you would add a "Example Code" section, that looks like this:
//Create Irrlicht Device
IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<s32>(640, 480));
// Set up the GUI Environment
IGUIEnvironment* env = device->getGUIEnvironment();
// Set up the window
IGUIWindow* window = env->addWindow(rect<s32>(100, 100, 300, 200), true, L"WindowCaption");
(forgive me if this is bad code, I slapped it togeather from the GUI tutorial)

This isn't a complete tutorial that shows how to make a MDI application. All it is is a code fragment that shows the steps required to make a window. First you need the "device," then you need the "env"ironment, then you "addWindow" to the environment. C++ beginners (Me, specifically!) then don't try something like

Code: Select all

IGUIWindow window = IGUIWindow->IGUIWindow(rect<s32>(100, 100, 300, 200), true, L"This no work");
It looked like it made sense to me, but then I learned better.

I don't know how hard (or easy) this might be. I know that the docus are made with Deoxygen, and come from the header files themselves. And Neko problebly doesn't need another gripe to be thrown upon him.

I'd like to patch togeather my own examples as I painfully learn them into my own. I'm looking up some CHM editors so I can add the snippets as I get to them. I guess I was just pointing out that if it wasn't too difficult to add, it'd be a great addition![/code][/quote]
zardoz
Posts: 11
Joined: Sat Dec 18, 2004 5:18 pm

Post by zardoz »

Hi,

This is the only freeware CHM decompiler I could find:
http://www.gridinsoft.com/downloads/chm.zip

It will decompile CHM to a bunch of HTML files.

Compiling back to CHM is easy (there are a lot of free tools for that).
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

About adding more examples to the docs: There are already some in the docs, but only some very few. I planned to add some more, but I wanted to start this not before the interface would not change a lot any more.
I'm looking forward to your examples, this would mean less work for me. :)
Post Reply