Practices in c++ and openGL