Browse Source

Doc++

pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
43770ada63
  1. 24
      doc/building.dox
  2. 5
      src/SceneGraph/Drawable.h
  3. 2
      src/SceneGraph/FeatureGroup.h

24
doc/building.dox

@ -16,25 +16,28 @@ Minimal set of tools and libraries required for building is:
>= 3.1. >= 3.1.
- **CMake** >= 2.8.8 (needed for `OBJECT` library target) - **CMake** >= 2.8.8 (needed for `OBJECT` library target)
- **GLEW** - OpenGL extension wrangler (only if targeting desktop OpenGL) - **GLEW** - OpenGL extension wrangler (only if targeting desktop OpenGL)
- **Corrade** - Plugin management and utility library. You can get it at - **Corrade** - Plugin management and utility library. See
http://github.com/mosra/corrade or at http://mosra.cz/blog/corrade.php. @ref building-corrade "Corrade download and installation guide" for more
information.
@section building-download Downloading the sources @section building-download Downloading the sources
The source is available on GitHub: https://github.com/mosra/magnum. Clone the The source is available on GitHub: https://github.com/mosra/magnum. Clone the
repository with your favorite IDE or Git GUI, download currrent snapshot as repository with your favorite IDE or Git GUI, download currrent snapshot as
compressed archive or use the command line: compressed archive or use the command line:
git clone git://github.com/mosra/magnum.git git clone git://github.com/mosra/magnum.git
If you need toolchains for crosscompiling, run also the following commands or, If you need toolchains for crosscompiling, run also the following commands, or,
if you build from source archive, download snapshot of toolchains repository if you build from source archive, download snapshot of toolchains repository
from https://github.com/mosra/toolchains and put them in `toolchains/` from https://github.com/mosra/toolchains and put them in `toolchains/`
subdirectory: subdirectory.
git submodule init git submodule init
git submodule update git submodule update
@section building-compilation Compilation, installation @section building-compilation Compilation, installation
The library (for example with support for GLUT applications) can be built and The library (for example with support for GLUT applications) can be built and
installed using these four commands. See below for more information about installed using these four commands. See below for more information about
optional features. optional features.
@ -50,6 +53,7 @@ If you want to build with another compiler (e.g. Clang), pass
`-DCMAKE_CXX_COMPILER=clang++` to CMake. `-DCMAKE_CXX_COMPILER=clang++` to CMake.
@subsection building-optional Enabling or disabling features @subsection building-optional Enabling or disabling features
By default the engine is built for desktop OpenGL. If you want to target By default the engine is built for desktop OpenGL. If you want to target
OpenGL ES, set `TARGET_GLES` to `ON` or pass `-DTARGET_GLES=ON` to CMake. Note OpenGL ES, set `TARGET_GLES` to `ON` or pass `-DTARGET_GLES=ON` to CMake. Note
that some features are available for desktop OpenGL only, see @ref requires-gl. that some features are available for desktop OpenGL only, see @ref requires-gl.
@ -79,6 +83,7 @@ None of the application libraries is built by default, regardless to
- `WITH_SDL2APPLICATION` - SDL2 application. Requires **SDL2** library. - `WITH_SDL2APPLICATION` - SDL2 application. Requires **SDL2** library.
@subsection building-tests Building and running unit tests @subsection building-tests Building and running unit tests
If you want to build also unit tests (which are not built by default), pass If you want to build also unit tests (which are not built by default), pass
`-DBUILD_TESTS=ON` to CMake. Unit tests use Corrade's @ref Corrade::TestSuite `-DBUILD_TESTS=ON` to CMake. Unit tests use Corrade's @ref Corrade::TestSuite
"TestSuite" framework and can be run using "TestSuite" framework and can be run using
@ -88,6 +93,7 @@ If you want to build also unit tests (which are not built by default), pass
in build directory. Everything should pass ;-) in build directory. Everything should pass ;-)
@subsection building-doc Building documentation @subsection building-doc Building documentation
The documentation (which you are currently reading) is written in **Doxygen** The documentation (which you are currently reading) is written in **Doxygen**
(version 1.8 with Markdown support is used, but older versions should do good (version 1.8 with Markdown support is used, but older versions should do good
job too) and additionally uses **Graphviz** for class diagrams and **TeX** job too) and additionally uses **Graphviz** for class diagrams and **TeX**
@ -100,6 +106,7 @@ will be in `build/doc/` directory. You might need to create `build/` directory
if it doesn't exist yet. if it doesn't exist yet.
@section building-arch Building ArchLinux packages @section building-arch Building ArchLinux packages
In `package/archlinux` directory is currently one PKGBUILD for Git development In `package/archlinux` directory is currently one PKGBUILD for Git development
build. The package is also in AUR under the same name. build. The package is also in AUR under the same name.
@ -117,6 +124,7 @@ Both development PKGBUILDs can detect when Clang is used and remove
unsupported CXX flags. unsupported CXX flags.
@section building-win Crosscompiling for Windows using MinGW @section building-win Crosscompiling for Windows using MinGW
@note This guide is tailored mainly for crosscompiling from ArchLinux. For @note This guide is tailored mainly for crosscompiling from ArchLinux. For
this system there is also prepared `mingw32-magnum` development package in this system there is also prepared `mingw32-magnum` development package in
root, named `PKGBUILD-mingw32`. root, named `PKGBUILD-mingw32`.
@ -131,7 +139,8 @@ Corrade), i.e. these ArchLinux packages:
Make sure you have `toolchains` submodule updated, as Make sure you have `toolchains` submodule updated, as
@ref building-download "explained above". Then create build directory and run @ref building-download "explained above". Then create build directory and run
cmake and make: cmake and make. You may need to modify the `basic-mingw32.cmake` file and
`CMAKE_INSTALL_PREFIX` to suit your distribution filesystem hierarchy.
mkdir build-win mkdir build-win
cd build-win cd build-win
@ -140,8 +149,7 @@ cmake and make:
-DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32 -DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32
make make
You may need to modify the `basic-mingw32.cmake` file and Then you can install the package using `make install` to make it available for
`CMAKE_INSTALL_PREFIX` to suit your distribution filesystem hierarchy. If depending projects.
everything goes well, in `build-win/` subdirectories will be the DLLs.
*/ */
} }

5
src/SceneGraph/Drawable.h

@ -48,7 +48,7 @@ typedef SceneGraph::Scene<SceneGraph::MatrixTransformation3D<>> Scene3D;
class DrawableObject: public Object3D, SceneGraph::Drawable3D<> { class DrawableObject: public Object3D, SceneGraph::Drawable3D<> {
public: public:
DrawableObject(Object* parent, SceneGraph::DrawableGroup3D<>* group): Object3D(parent), SceneGraph::Drawable3D<>(this, group) { DrawableObject(Object* parent = nullptr, SceneGraph::DrawableGroup3D<>* group = nullptr): Object3D(parent), SceneGraph::Drawable3D<>(this, group) {
// ... // ...
} }
@ -59,7 +59,8 @@ class DrawableObject: public Object3D, SceneGraph::Drawable3D<> {
@endcode @endcode
Then you add these objects to your scene and some drawable group and transform Then you add these objects to your scene and some drawable group and transform
them as you like: them as you like. You can also use DrawableGroup::add() and
DrawableGroup::remove() for that.
@code @code
Scene3D scene; Scene3D scene;
SceneGraph::DrawableGroup3D<> group; SceneGraph::DrawableGroup3D<> group;

2
src/SceneGraph/FeatureGroup.h

@ -72,6 +72,7 @@ template<std::uint8_t dimensions, class Feature, class T = GLfloat> class Featur
* @brief Add feature to the group * @brief Add feature to the group
* *
* If the features is part of another group, it is removed from it. * If the features is part of another group, it is removed from it.
* @see remove(), AbstractGroupedFeature::AbstractGroupedFeature()
*/ */
void add(Feature* feature) { void add(Feature* feature) {
/** @todo Assert the same scene for all items? -- can't easily /** @todo Assert the same scene for all items? -- can't easily
@ -90,6 +91,7 @@ template<std::uint8_t dimensions, class Feature, class T = GLfloat> class Featur
* @brief Remove feature from the group * @brief Remove feature from the group
* *
* The feature must be part of the group. * The feature must be part of the group.
* @see add()
*/ */
void remove(Feature* feature) { void remove(Feature* feature) {
CORRADE_ASSERT(feature->_group == this, CORRADE_ASSERT(feature->_group == this,

Loading…
Cancel
Save