created generic webgl skeleton to reuse