Gamedev Framework (gf)  0.2.0
A C++11 framework for 2D games
Developper documentation

Table of Contents

Git workflow

Gamedev Framework (gf) follows the successful Git branching model from Vincent Driessen.

successful Git branching model

Versioning

gf uses Semantic Versioning 2.0.0.

Coding style and guidelines

  1. Follow the existing style.
  2. See 1.

Namespaces

The library is put inside a gf namespace. Additionally, the classes are put in an inline namespace called v1 (or v2 or ...) to preserve ABI compatibility.

namespace gf {
inline namespace v1 {
// can be accessed with gf::Foo
class Foo {
};
}
}

If an ABI-breaking change occurs, then the old class is put in a non-inline namespace called v1 and the new one in an inline namespace called v2 so that the old class still exist and old code that uses it do not need to be recompiled.

namespace gf {
inline namespace v2 {
// new version of Foo
class Foo {
};
}
namespace v1 {
// old version of Foo
class Foo {
};
}
}

OpenGL loader

gf uses glad as its OpenGL loader. The loader is generated with the following command in the library/vendor directory.

1 glad --api gles2=2.0 --generator c --spec gl --out-path glad --generator c --no-loader

The resulting file src/glad.c is then renamed to src/glad.cc.

Related documentation