C++ OpenGL, OOP using inheritance