3 This file is part of libmspgl
4 Copyright © 2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include "windingtest.h"
13 void operator>>(const LexicalConverter &conv, FaceWinding &winding)
15 if(conv.get()=="CLOCKWISE")
17 else if(conv.get()=="COUNTERCLOCKWISE")
18 winding = COUNTERCLOCKWISE;
20 throw InvalidParameterValue("Invalid FaceWinding");
23 WindingTest::WindingTest():
25 winding(COUNTERCLOCKWISE)
28 WindingTest::WindingTest(FaceWinding w):
33 void WindingTest::bind() const
39 glEnable(GL_CULL_FACE);
43 glDisable(GL_CULL_FACE);
47 void WindingTest::unbind()
50 glDisable(GL_CULL_FACE);
53 WindingTest &WindingTest::clockwise()
55 static WindingTest test(CLOCKWISE);
59 WindingTest &WindingTest::counterclockwise()
61 static WindingTest test(COUNTERCLOCKWISE);