material refactoring for opengl support; d3d11 material implementation