Added rendering code to webGL controls