add switch for opengl/raster