Hello Tom,

>> https://code.sci.utah.edu/svn/imagevis3d/ImageVis3D/UI/RenderWindowGL.h

>>which implements a QGLWidget.  No compilation unit which includes
>>RenderWindowGL should have any sort of path to GLEW.

Then how RenderWindowGL be able to intantiate GLEW.

In my case the compilation is done  using qmake. But the directory that that contains the glew creation do not have any Qt related functions.

In  other directory i have only qt related stuff and from here i am calling  that file(SiGLUtil.h) that includes the SiBasic.h (it has all  the inclusion necessary for the project including glew.h ,but nothing Qt related).

The link that you have sent me , from there i need to see how glew is instantiated in the RenderWindowGL.cpp file inside the InitializeRenderer(). How does it know about glew(). Some other file must have included that one

#include "../Tuvok/Renderer/GL/GLFrameCapture.h" 
Its .cpp file is including that GLInclude file that is including the glew.h

It seems that mine is not that different from yours.


---------- Forwarded message ----------
From: tom fogal <tfogal@alumni.unh.edu>
Date: Mon, Feb 23, 2009 at 12:47 AM
Subject: Re: [glew-users] Fwd: GLEW Qt
To: glew-users@lists.sourceforge.net

ami guru <dosto.walla@gmail.com> writes:
> I think i restructured as you have suggested ,but still having the
> same error.
> I have a file named SiGLUtil.h and SiGLUtil.cpp where i declare and define
> all the Opengl related functions.
> I have defined function that instantiate the glew(). No Qt related functions
> reside here as you have suggested.
> There is a separate folder where i have the main application. I subclassed
> QGLwidget and in the header file i have included SiGLUtil.h

I might be misunderstanding, but this is different from what I
intended.  Basically you want the unit which includes QGLWidget to not
include glew, and vice-versa.



for the GLEW side of things; most files in that directory include
`GLInclude.h'.  No files should reference QGL-anything.  The renderer
is not even aware there is a window, per se.  Then see:


which implements a QGLWidget.  No compilation unit which includes
RenderWindowGL should have any sort of path to GLEW.



> ---------- Forwarded message ----------
> From: tom fogal <tfogal@alumni.unh.edu>
> Date: Sun, Feb 22, 2009 at 8:56 PM
> Subject: Re: [glew-users] GLEW Qt
> To: ami guru <dosto.walla@gmail.com>
> Cc: glew-users@lists.sourceforge.net
> ami guru <dosto.walla@gmail.com> writes:
> > i am trying compile opengl program with  the shader support and i am using
> > the opengl wrangler library for that.
> >
> >
> > I have subclassed the glwidget and included the glew header file before
> the
> > inclusion of QGLWidget
> Segregate the two.  Use one file/class to handle the Qt side of things
> (event handling, slots, etc.).  In the implementation of that class,
> call functions defined in a separate compilation unit.  In the second
> unit, don't include any Qt stuff -- make sure it's only OpenGL calls.
> This is how we handle it with at least one project I work on.  There's
> probably a way to get them both to coexist peacefully, but I consider
> the above to be a better design anyway.
> HTH,
> -tom

Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
glew-users mailing list