Tutorial by Examples

Encapsulating an OpenGL object in C++98/03 requires obeying the C++ rule of 3. This means adding a copy constructor, copy assignment operator, and destructor. However, copy constructors should logically copy the object. And copying an OpenGL object is a non-trivial undertaking. Equally importantly,...
C++11 offers tools that enhance the functionality of RAII-encapsulated OpenGL objects. Without C++11 features like move semantics, such objects would have to be dynamically allocated if you want to pass them around, since they cannot be copied. Move support allows them to be passed back and forth li...

Page 1 of 1