Le 17/03/2014 12:59, Agocs Laszlo a écrit :
> No, that is expected. After all it has to look up the versionFunction 
> internals from the hash table maintained by the context.
> With the design shown here, deriving GL_Model from QOpenGLFunctions* feels 
> like an overkill indeed.
>
> The options I see are:
>
> 1. Do not derive, just get an QOpenGLFunctions* instance. This of course 
> leads to the f->glBlah() type of code which some (myself not included) may 
> find ugly.

As you say, "some" find it ugly ;-) myself included, but I'm not the only one.

> 2. Use a different design. Separating the GL initialization/rendering into a 
> separate class (e.g. GL_ModelRenderer) with a single instance could avoid the 
> issue altogether.

This would probably be the best approach. However this is not a new project, 
we're
dealing with a huge (and old) code base, such a refactoring is not (yet) an 
option.

So I'm back to my initial question: can Glew be used nicely with Qt? Seems so 
in my quick
test program (even using QOpenGLShaderProgram), but I'm wondering in larger 
contexts.

Thanks anyway for your inputs Laszlo :-)

-- 
      /- 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."
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to