--- /dev/null
+#include <msp/strings/format.h>
+#include "cullface.h"
+
+namespace Msp {
+namespace GL {
+
+void operator>>(const LexicalConverter &conv, FaceWinding &winding)
+{
+ if(conv.get()=="NON_MANIFOLD")
+ winding = NON_MANIFOLD;
+ else if(conv.get()=="CLOCKWISE")
+ winding = CLOCKWISE;
+ else if(conv.get()=="COUNTERCLOCKWISE")
+ winding = COUNTERCLOCKWISE;
+ else
+ throw lexical_error(format("conversion of '%s' to FaceWinding", conv.get()));
+}
+
+void operator>>(const LexicalConverter &conv, CullMode &cull)
+{
+ if(conv.get()=="NO_CULL")
+ cull = NO_CULL;
+ else if(conv.get()=="CULL_FRONT")
+ cull = CULL_FRONT;
+ else if(conv.get()=="CULL_BACK")
+ cull = CULL_BACK;
+ else
+ throw lexical_error(format("conversion of '%s' to CullMode", conv.get()));
+}
+
+} // namespace GL
+} // namespace Msp