Implemented WGL code.