fips (CMake wrapper) is used as a building system. Visual Studio solution (Mac OS X, iOS XCode projects, Linux, Android projects -- planned). At the moment, Windows build is supported.
Graphics APIs:
- OpenGL (through bgfx)
- OpenGL ES (through bgfx)
- DirectX (through bgfx)
Platforms:
- Windows (MSVC 2013)
- OS X (To be added)
- iOS (To be added)
- Linux (To be added)
- Android (To be added)
- bgfx (Rendering)
- ImGui (Widgets, GUI)
- NanoVg (2D graphics, debug drawing)
- Allman (BSD) Indenting
- camelCase
- Tabs for indentation
PascalCase (Upper CamelCase) (e.g.: ResourceManager)
camelCase (e.g.: compileShader)
PascalCase (e.g.: Rio:: )
The end of a namespace must appended by namespace
then its name.
Example:
namespace Rio
{
namespace Inner
{
...
} // namespace Inner
} // namespace Rio
In C++11, using
is a superset of typedef
. using
is preferred in this style guide.
// Using
using FooBar = std::pair<Foo, Bar>;
// Typedef
typedef std::pair<Foo, Bar> FooBar;
C++ style comments //
should be used. Don't use C-style comments /**/
. Reason: C-style comments cannot be nested and most IDEs/Editors can comments whole blocks in the C++ style which can allow for uncommenting a single line easily.
camelCase (e.g.: bufferBegin, isRunning)
No variable prefix should be used. Variable name is not about the variable type. Hungarian notation was just a workaround and it is a mistake to use it now.
Enum items : PascalCase (e.g.: BehaviorType
).
Strong enum is preferred (enum class
).
Example:
enum class BehaviorType
{
Idle,
Moving,
Fighting,
};
- TODO - todo, work in progress
- NOTE - note to reader
- IMPORTANT - important
- FIXME - fix as soon as possible (does not work as intended)