Irrlicht Engine Documentation

repository·master·Indexed 19 days ago

https://github.com/zaki/irrlicht

A cross-platform 3D engine. This documentation provides instructions for compiling the engine and its example applications across Windows (Visual Studio, MinGW, Code::Blocks), Linux, and macOS (Xcode). It includes details on SDK structure, system requirements, linking against Irrlicht.dll, and license attribution requirements.

Tokens
9.4K
Snippets
32
Records
57
Agent score
65%

What's inside Irrlicht

  1. Overview of the Irrlicht Engine SDK structure

    master

    The Irrlicht Engine SDK is organized into several key directories for development and usage:

    • \bin: Contains compiled libraries (Irrlicht.DLL) and demo/example applications (Windows only).
    • \doc: Engine documentation.
    • \examples: C++ examples and tutorials.
    • \include: Header files required for programming with the engine.
    • \lib: Libraries to link with your programs.
    • \media: Graphics and sound resources used by demos and examples.
    • \source: The engine source code (useful for debugging or recompilation).
    • \tools: Utility tools and their source code.
  2. Irrlicht Engine License and Attribution

    master

    The Irrlicht Engine is licensed under a custom license based on the zlib/libpng license.

    Key Requirements:

    • You may use the engine for any purpose, including commercial applications.
    • You must not misrepresent the origin of the software (do not claim you wrote it).
    • Altered source versions must be clearly marked.
    • Mandatory Attribution: Because the engine incorporates code from the Independent JPEG Group (IJG), zlib, and libpng, you must acknowledge the use of IJG code and libpng in your product documentation. It is also appreciated to mention the use of the Irrlicht Engine and zlib.
  3. Getting started with development (HelloWorld)

    master
    To begin developing your own applications or games, refer to the 01.HelloWorld example in the \examples directory. This directory also contains an .html tutorial file to guide you through the initial setup and usage.
  4. How to start using the Irrlicht Engine

    master

    Windows

    To see the engine in action, run the applications located in \bin\Win32-VisualStudio. The Demo.exe application showcases the most significant features.

    Linux

    On Linux, Irrlicht is a static library. To use it:

    1. Navigate to the source/Irrlicht directory.
    2. Run make to generate a precompiled version.
    3. To build all example applications, run the buildAllExamples script. Examples can then be run from the bin folder.
    4. To use Irrlicht as a shared object (libIrrlicht.so.versionNumber), run make sharedlib in the source folder.

    OSX

    For OSX, use the XCode project file located in source/Irrlicht/MacOSX. This builds the libIrrlicht.a library required for applications.

    # Linux: Build static library
    cd source/Irrlicht
    make
    
    # Linux: Build shared library
    cd source/Irrlicht
    make sharedlib
    
    # Linux: Build all examples
    ./buildAllExamples
  5. Run Irrlicht example applications on Linux

    master

    After compiling the engine and the example applications, you can run them by following these steps:

    1. Ensure an X Server is running on your system.
    2. Navigate to the directory containing the compiled example applications.
    3. Execute the applications directly from that directory.
  6. Decompress images with djpeg

    master

    Use djpeg to decode JPEG files back into conventional image formats.

    Usage Patterns:

    • Unix-like: djpeg [switches] [jpegfile] > imagefile (writes to stdout).
    • Non-Unix: djpeg [switches] jpegfile imagefile (explicit input/output files).
    • Script-friendly (All systems): djpeg [switches] -outfile imagefile jpegfile.

    Key Switches:

    • -colors N: Reduces the output to at most N colors (useful for colormapped displays).
    • -fast: Selects recommended options for fast, low-quality output (equivalent to -dct fast -nosmooth -onepass -dither ordered).
    • -grayscale: Forces grayscale output, even if the JPEG is color. Faster for monochrome displays.
    • -scale M/N: Scales the output image by factor M/N.
    • -bmp, -gif, -os2, -pnm, -rle, -targa: Select the output format. -pnm is the default.
    • -onepass: Uses one-pass instead of two-pass color quantization. Faster and uses less memory, but lower quality. Only works if -colors N is also specified.
    # Decompress to a BMP file
    djpeg -bmp input.jpg output.bmp
    
    # Quick preview (fastest case)
    djpeg -grayscale -scale 1/8 input.jpg > preview.pnm
  7. Use oldFontTool for simple Windows font creation

    master

    The oldFontTool is a legacy tool designed specifically for Windows. It generates a single, simple image file containing all the data required to display fonts in Irrlicht.

    Limitations:

    • Only works on Windows.
    • The resulting files do not contain alpha (transparency) information.
    • The character set is limited.

    Use the IrrFontTool.exe file located in the tools/IrrFontTool/ directory to run this tool.

    IrrFontTool.exe
  8. Build the Irrlicht Engine on macOS using Xcode

    master

    To compile only the Irrlicht Engine, open the Xcode project located in the source/Irrlicht/ directory.

    If you want to build both the Irrlicht Engine and all associated examples, use the examples/BuildAllExamples.xcworkspace file instead.

    # To build only the engine:
    Open source/Irrlicht/ (Xcode project)
    
    # To build engine + all examples:
    Open examples/BuildAllExamples.xcworkspace
  9. Build Irrlicht documentation on macOS

    master

    To generate the Irrlicht documentation, you must have doxygen installed.

    1. Install Doxygen: If you use Aptitude for OSX, run: sudo apt-get install doxygen
    2. Run the documentation script:
      • Open a terminal and navigate to scripts/doc/irrlicht.
      • Execute the documentation build script: ./makedocumentation.sh.
    sudo apt-get install doxygen
    cd scripts/doc/irrlicht
    ./makedocumentation.sh