Moved global GL calls into relevant Context3D containers