vs2012: updated to work on programmableGL branch