[Interest] Usage of QAbstractOpenGLFunctions and derived classes
Yves Bailly
yves.bailly at sescoi.fr
Tue Dec 17 11:59:36 CET 2013
Le 17/12/2013 11:53, Sean Harmer a écrit :
> If you're planning on using the functions object in more than one class you
> may be better off obtaining a pointer to it from the
> QOpenGLContext::versionFunctions<QOpenGLFunctions_3_3_Core>() function rather
> than sub-classing. The object is owned by the context and is shared which is
> less overhead than having multiple classes of your own all of which subclass.
Then I'm back to my first point: I have a pointer, let's give it a short
name like "gl", then the code looks like:
gl->glGenBuffer(...);
gl->glBindBuffer(...);
gl->glDrawElements(...);
Again that repetitive prefix ("gl->" here) looks a bit odd and is quite
cumbersome... that's why I why looking for a way to get rid of it by
subclassing.
--
/- Yves Bailly - Software developer -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
More information about the Interest
mailing list