Commit cff111c4 authored by Jan Möbius's avatar Jan Möbius
Browse files

Group Documentation for DrawMode a bit more

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14803 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 82a8db48
......@@ -276,6 +276,11 @@ namespace DrawModes {
*/
DrawMode( ModeFlagSet _flags );
//===========================================================================
/** @name Operators
* @{ */
//===========================================================================
bool operator==(const DrawMode& _mode) const;
DrawMode operator&(const DrawMode& _mode) const;
......@@ -294,6 +299,58 @@ namespace DrawModes {
DrawMode operator~( ) const;
operator bool() const;
/** @} */
//===========================================================================
/** @name Layer Management
* @{ */
//===========================================================================
/** \brief add another layer on top of this drawmode
*
* This allows for combinations of DrawModes.
* The renderer will iterator over all layers of the drawmode
* and issue a new draw call for each layer.
* Example:
* layer 0 : flat shading properties
* layer 1 : edge drawing properties
*
* The result will be a flat shaded object with it's wireframe on top of it.
* Does duplicate check, in case the property set is already in the layer list.
*
* addLayer is also called in bitwise | operator for backwards compatibility with bitset DrawModes
*
* @param _props Property that should be added
*/
void addLayer(const DrawModeProperties* _props); // same as bitwise or operator
/** \brief returns the layer count
*/
unsigned int getNumLayers() const;
/** \brief returns the property set at layer i
*
* @param _i Layer that is requested
*/
const DrawModeProperties* getLayer(unsigned int _i) const;
/** \brief remove layer at index i
*
* @param _i Layer that is requested
*/
bool removeLayer(unsigned int _i);
/** \brief remove layer if it is in list
*
* @param _prop Property that should be removed if it's available
*/
bool removeLayer(const DrawModeProperties* _prop);
/** @} */
/** \brief get an index of the current drawMode
*
* If this drawMode is a combination of different drawModes, the returned value will be 0.
......@@ -328,8 +385,6 @@ namespace DrawModes {
*/
unsigned int maxModes() const;
operator bool() const;
/** \brief returns the base properties of this draw mode
*
......@@ -357,46 +412,6 @@ namespace DrawModes {
void setDrawModeProperties(const DrawModeProperties& _props);
/** \brief add another layer on top of this drawmode
*
* This allows for combinations of DrawModes.
* The renderer will iterator over all layers of the drawmode
* and issue a new draw call for each layer.
* Example:
* layer 0 : flat shading properties
* layer 1 : edge drawing properties
*
* The result will be a flat shaded object with it's wireframe on top of it.
* Does duplicate check, in case the property set is already in the layer list.
*
* addLayer is also called in bitwise | operator for backwards compatibility with bitset DrawModes
*
* @param _props Property that should be added
*/
void addLayer(const DrawModeProperties* _props); // same as bitwise or operator
/** \brief returns the layer count
*/
unsigned int getNumLayers() const;
/** \brief returns the property set at layer i
*
* @param _i Layer that is requested
*/
const DrawModeProperties* getLayer(unsigned int _i) const;
/** \brief remove layer at index i
*
* @param _i Layer that is requested
*/
bool removeLayer(unsigned int _i);
/** \brief remove layer if it is in list
*
* @param _prop Property that should be removed if it's available
*/
bool removeLayer(const DrawModeProperties* _prop);
private:
ModeFlagSet modeFlags_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment