fix debug builds
add debug defines to examples
optional OpenGL build