1 #include <msp/strings/format.h>
2 #include "windingtest.h"
7 void operator>>(const LexicalConverter &conv, FaceWinding &winding)
9 if(conv.get()=="CLOCKWISE")
11 else if(conv.get()=="COUNTERCLOCKWISE")
12 winding = COUNTERCLOCKWISE;
14 throw lexical_error(format("conversion of '%s' to FaceWinding", conv.get()));
17 WindingTest::WindingTest():
19 winding(COUNTERCLOCKWISE)
22 WindingTest::WindingTest(FaceWinding w):
27 void WindingTest::bind() const
33 glEnable(GL_CULL_FACE);
37 glDisable(GL_CULL_FACE);
41 void WindingTest::unbind()
44 glDisable(GL_CULL_FACE);
47 WindingTest &WindingTest::clockwise()
49 static WindingTest test(CLOCKWISE);
53 WindingTest &WindingTest::counterclockwise()
55 static WindingTest test(COUNTERCLOCKWISE);