diff --git a/doc/coding-style.dox b/doc/coding-style.dox index 09fbdcb80..ad4b75de4 100644 --- a/doc/coding-style.dox +++ b/doc/coding-style.dox @@ -49,6 +49,21 @@ the operator is implemented (not of class in which the operator is implemented), thus efficiently connecting the two classes together in the documentation. +@subsubsection documentation-commands-ref_gl Links to related OpenGL functions and definitions + +If an function touches OpenGL, related OpenGL functions should be documented +in @c \@see block with @c \@fn_gl command. If only specific definition is used +in the function, document it with @c \@def_gl command. Example usage: +@code +// @see @fn_gl{Enable}/@fn_gl{Disable} with @def_gl{TEXTURE_CUBE_MAP_SEAMLESS} +inline static void setSeamless(bool enabled) { + enabled ? glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS) : glDisable(GL_TEXTURE_CUBE_MAP_SEAMLESS); +} +@endcode + +It produces link to the online manual, in this case @fn_gl{Enable}/@fn_gl{Disable} +with @def_gl{TEXTURE_CUBE_MAP_SEAMLESS}. + @subsubsection documentation-commands-extension Links to OpenGL extensions If an OpenGL extension is referenced in the documentation, it should be done