Debug draw duPolyToCol custom function (#253)

Add duDebugDraw::duPolyToCol to allow user to pick polygon color.
This commit is contained in:
Domenico Albani
2017-01-30 11:11:32 +01:00
committed by Jakob Botsch Nielsen
parent dfd40071c5
commit ad6e5de2e9
3 changed files with 24 additions and 12 deletions

View File

@@ -66,6 +66,11 @@ struct duDebugDraw
/// End drawing primitives.
virtual void end() = 0;
/// Compute a color for given polygon.
/// @param poly [in] the polygon to compute color for.
/// @return The color value.
virtual unsigned int polyToCol(const struct dtPoly* poly);
};
inline unsigned int duRGBA(int r, int g, int b, int a)