|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
GLEW QtHello
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 But i am getting the following error ****************************** ********
In file included from GLWidget.h:8, from GLWidget.cpp:6: /usr/include/GL/glew.h:84:2: error: #error gl.h included before glew.h /usr/include/GL/glew.h:87:2: error: #error glext.h included before glew.h ************************************' I have changed the order later . Unfortunately the same error Any Idea? Regards Sajjad ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Re: GLEW Qtami guru <dosto.walla@...> 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Fwd: GLEW QtHello Tom,
I think i restructured as you have suggested ,but still having the same error. So i think it is better to elaborate to make sure that i did follow you. 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. Then with use of qmake i have created a staic library put that inside the directory .../Lib/SiUtil.a There is a separate folder where i have the main application. I subclassed QGLwidget and in the header file i have included SiGLUtil.h Is that OK? Regards Sajjad **********************************'ERROR MESSAGE****************************** g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I. -I../../../Includes/SiUtil -I../../../Includes/SiMath -I/usr/X11R6/include -I../../../Build/displayListAndOther/Release -I. -o ../../../Build/displayListAndOther/Release/GLPrimitiveMainWindow.o GLPrimitiveMainWindow.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I. -I../../../Includes/SiUtil -I../../../Includes/SiMath -I/usr/X11R6/include -I../../../Build/displayListAndOther/Release -I. -o ../../../Build/displayListAndOther/Release/GLWidget.o GLWidget.cpp In file included from ../../../Includes/SiUtil/SiBasic.h:21, from ../../../Includes/SiUtil/SiGLUtil.h:5, from GLWidget.h:4, from GLWidget.cpp:6: /usr/include/GL/glew.h:84:2: error: #error gl.h included before glew.h /usr/include/GL/glew.h:87:2: error: #error glext.h included before glew.h In file included from ../../../Includes/SiUtil/SiBasic.h:21, from ../../../Includes/SiUtil/SiGLUtil.h:5, from GLWidget.h:4, from GLWidget.cpp:6: /usr/include/GL/glew.h:8422: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)' /usr/include/GL/glext.h:5201: error: 'PFNGLFRAGMENTLIGHTMODELFVSGIXPROC' has a previous declaration as 'typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)' /usr/include/GL/glew.h:8424: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)' /usr/include/GL/glext.h:5203: error: 'PFNGLFRAGMENTLIGHTMODELIVSGIXPROC' has a previous declaration as 'typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)' /usr/include/GL/glew.h:8426: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)' /usr/include/GL/glext.h:5197: error: 'PFNGLFRAGMENTLIGHTFVSGIXPROC' has a previous declaration as 'typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' /usr/include/GL/glew.h:8428: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)' /usr/include/GL/glext.h:5199: error: 'PFNGLFRAGMENTLIGHTIVSGIXPROC' has a previous declaration as 'typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)' /usr/include/GL/glew.h:8435: error: conflicting declaration 'typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' /usr/include/GL/glext.h:5210: error: 'PFNGLGETFRAGMENTMATERIALFVSGIXPROC' has a previous declaration as 'typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)' /usr/include/GL/glew.h:8436: error: conflicting declaration 'typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)' /usr/include/GL/glext.h:5211: error: 'PFNGLGETFRAGMENTMATERIALIVSGIXPROC' has a previous declaration as 'typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)' /usr/include/GL/glew.h:9866: error: 'PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC' does not name a type /usr/include/GL/glew.h:9867: error: 'PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC' does not name a type GLWidget.cpp:128: warning: unused parameter 'struct_string' make[3]: *** [../../../Build/displayListAndOther/Release/GLWidget.o] Error 1 make[3]: Leaving directory `/home/sajjad/QT/volumizer/SiMain/OpenGL/displayListAndOther' make[2]: *** [sub-displayListAndOther-make_default] Error 2 make[2]: Leaving directory `/home/sajjad/QT/volumizer/SiMain/OpenGL' make[1]: *** [sub-OpenGL-make_default] Error 2 make[1]: Leaving directory `/home/sajjad/QT/volumizer/SiMain' make: *** [sub-SiMain-make_default] Error 2 sajjad@sajjad:~/QT/volumizer$ *********************************** ---------- Forwarded message ---------- From: tom fogal <tfogal@...> Date: Sun, Feb 22, 2009 at 8:56 PM Subject: Re: [glew-users] GLEW Qt To: ami guru <dosto.walla@...> Cc: glew-users@... ami guru <dosto.walla@...> writes: Segregate the two. Use one file/class to handle the Qt side of things> 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 (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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Re: Fwd: GLEW QtHi Sajjid,
I don't see any GLEW libary in the command line for g++, so if you are including glew directly then you may have to declare the GLEW_STATIC as pre-processor define, check advance usage. Ketan On Sun, Feb 22, 2009 at 4:23 PM, ami guru <dosto.walla@...> wrote: > Hello Tom, > > I think i restructured as you have suggested ,but still having the same > error. > > So i think it is better to elaborate to make sure that i did follow you. > > > 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. > > Then with use of qmake i have created a staic library put that inside the > directory .../Lib/SiUtil.a > > > There is a separate folder where i have the main application. I subclassed > QGLwidget and in the header file i have included SiGLUtil.h > > Is that OK? > > > Regards > Sajjad > > **********************************'ERROR > MESSAGE****************************** > g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB > -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ > -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore > -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui > -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 > -I. -I../../../Includes/SiUtil -I../../../Includes/SiMath > -I/usr/X11R6/include -I../../../Build/displayListAndOther/Release -I. -o > ../../../Build/displayListAndOther/Release/GLPrimitiveMainWindow.o > GLPrimitiveMainWindow.cpp > g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB > -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ > -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore > -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui > -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 > -I. -I../../../Includes/SiUtil -I../../../Includes/SiMath > -I/usr/X11R6/include -I../../../Build/displayListAndOther/Release -I. -o > ../../../Build/displayListAndOther/Release/GLWidget.o GLWidget.cpp > In file included from ../../../Includes/SiUtil/SiBasic.h:21, > from ../../../Includes/SiUtil/SiGLUtil.h:5, > from GLWidget.h:4, > from GLWidget.cpp:6: > /usr/include/GL/glew.h:84:2: error: #error gl.h included before glew.h > /usr/include/GL/glew.h:87:2: error: #error glext.h included before glew.h > In file included from ../../../Includes/SiUtil/SiBasic.h:21, > from ../../../Includes/SiUtil/SiGLUtil.h:5, > from GLWidget.h:4, > from GLWidget.cpp:6: > /usr/include/GL/glew.h:8422: error: conflicting declaration 'typedef void (* > PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)' > /usr/include/GL/glext.h:5201: error: 'PFNGLFRAGMENTLIGHTMODELFVSGIXPROC' has > a previous declaration as 'typedef void (* > PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)' > /usr/include/GL/glew.h:8424: error: conflicting declaration 'typedef void (* > PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)' > /usr/include/GL/glext.h:5203: error: 'PFNGLFRAGMENTLIGHTMODELIVSGIXPROC' has > a previous declaration as 'typedef void (* > PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)' > /usr/include/GL/glew.h:8426: error: conflicting declaration 'typedef void (* > PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)' > /usr/include/GL/glext.h:5197: error: 'PFNGLFRAGMENTLIGHTFVSGIXPROC' has a > previous declaration as 'typedef void (* > PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' > /usr/include/GL/glew.h:8428: error: conflicting declaration 'typedef void (* > PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)' > /usr/include/GL/glext.h:5199: error: 'PFNGLFRAGMENTLIGHTIVSGIXPROC' has a > previous declaration as 'typedef void (* > PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)' > /usr/include/GL/glew.h:8435: error: conflicting declaration 'typedef void (* > PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' > /usr/include/GL/glext.h:5210: error: 'PFNGLGETFRAGMENTMATERIALFVSGIXPROC' > has a previous declaration as 'typedef void (* > PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)' > /usr/include/GL/glew.h:8436: error: conflicting declaration 'typedef void (* > PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)' > /usr/include/GL/glext.h:5211: error: 'PFNGLGETFRAGMENTMATERIALIVSGIXPROC' > has a previous declaration as 'typedef void (* > PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)' > /usr/include/GL/glew.h:9866: error: > 'PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC' does not name a type > /usr/include/GL/glew.h:9867: error: > 'PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC' does not name a type > GLWidget.cpp:128: warning: unused parameter 'struct_string' > make[3]: *** [../../../Build/displayListAndOther/Release/GLWidget.o] Error 1 > make[3]: Leaving directory > `/home/sajjad/QT/volumizer/SiMain/OpenGL/displayListAndOther' > make[2]: *** [sub-displayListAndOther-make_default] Error 2 > make[2]: Leaving directory `/home/sajjad/QT/volumizer/SiMain/OpenGL' > make[1]: *** [sub-OpenGL-make_default] Error 2 > make[1]: Leaving directory `/home/sajjad/QT/volumizer/SiMain' > make: *** [sub-SiMain-make_default] Error 2 > sajjad@sajjad:~/QT/volumizer$ > > > > *********************************** > > ---------- Forwarded message ---------- > From: tom fogal <tfogal@...> > Date: Sun, Feb 22, 2009 at 8:56 PM > Subject: Re: [glew-users] GLEW Qt > To: ami guru <dosto.walla@...> > Cc: glew-users@... > > > ami guru <dosto.walla@...> 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 > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > glew-users mailing list > glew-users@... > https://lists.sourceforge.net/lists/listinfo/glew-users > > ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Re: Fwd: GLEW Qtami guru <dosto.walla@...> writes:
> I think i restructured as you have suggested ,but still having the > same error. [snip] > 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. [snip] > 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. See: https://code.sci.utah.edu/svn/Tuvok/Renderer/GL/ 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: 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. HTH, -tom [snip] > ---------- Forwarded message ---------- > From: tom fogal <tfogal@...> > Date: Sun, Feb 22, 2009 at 8:56 PM > Subject: Re: [glew-users] GLEW Qt > To: ami guru <dosto.walla@...> > Cc: glew-users@... > > > ami guru <dosto.walla@...> 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Fwd: Fwd: GLEW QtHello 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. Regards Sajjad ---------- Forwarded message ---------- From: tom fogal <tfogal@...> Date: Mon, Feb 23, 2009 at 12:47 AM Subject: Re: [glew-users] Fwd: GLEW Qt To: glew-users@... ami guru <dosto.walla@...> writes: > I think i restructured as you have suggested ,but still having the [snip]> same error. > I have a file named SiGLUtil.h and SiGLUtil.cpp where i declare and define [snip]> 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 I might be misunderstanding, but this is different from what I> QGLwidget and in the header file i have included SiGLUtil.h intended. Basically you want the unit which includes QGLWidget to not include glew, and vice-versa. See: https://code.sci.utah.edu/svn/Tuvok/Renderer/GL/ 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: 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. HTH, -tom [snip] > ---------- Forwarded message ---------- > From: tom fogal <tfogal@...> > Date: Sun, Feb 22, 2009 at 8:56 PM > Subject: Re: [glew-users] GLEW Qt > To: ami guru <dosto.walla@...> > Cc: glew-users@... > > > ami guru <dosto.walla@...> 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
|
|
|
Re: Fwd: Fwd: GLEW QtSajjad,
I would simply suggest that the very first #include in GLWidget.h is glew.h. Likewise for all .h and .cpp files mixing Qt and OpenGL/GLEW. Another approach I can recommend is to provide dummy gl.h glext.h etc files, that #include glew.h. What Tom is suggesting should also work, but it forces things to be structured in a particular way that avoids mixing Qt and OpenGL code. That doesn't appeal to me due to both Qt and OpenGL being two of my favorite things. And for the most part, they live happily together - I can speak from experience. - Nigel ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Re: Fwd: Fwd: GLEW QtSajjad,
If you have a commercial Qt development license that includes support... Perhaps Qt could support being compiled against GLEW rather than the real OpenGL headers, with a -DQT_USE_GLEW, or something similar. Seems like a better solution in the longer term. - Nigel ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Fwd: Fwd: Fwd: GLEW QtHello Nigel,
Thats the very first thing i have tried. But did not work. **************************************** #ifndef GLWIDGET_H #define GLWIDGET_H /* non-qt headers are declared first */ #include <GL/glew.h> #include <QGLWidget> #include <QTime> //#include <GL/glew.h> class GLWidget : public QGLWidget { Q_OBJECT public: GLWidget(QWidget *parent = 0); ~GLWidget(); inline int xRotation() const { return xRot; } inline int yRotation() const { return yRot; } inline int zRotation() const { return zRot; } inline float getFPS() const { return fps; } public slots: void setXRotation(int angle); void setYRotation(int angle); void setZRotation(int angle); void drawDifferentMode(const QString& ); void drawDifferentStructure(const QString&); signals: void xRotationChanged(int angle); void yRotationChanged(int angle); void zRotationChanged(int angle); void frameRateChanged(const QString&); protected: void initializeGL(); void paintGL(); void resizeGL(int width, int height); void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); void initializeLights(); void setCamera(float posX, float posY, float posZ, float targetX, float targetY, float targetZ); /* create shader specific calls to setup shaders and clean them when we are done */ private: void normalizeAngle(int *angle); void calculateFPS(); //id for displaylist GLuint teaPotId; int xRot; int yRot; int zRot; //to store the elapsed time int t; int frame; int timeBase; float fps; int drawMode; float cameraDistance; QPoint lastPos; QTime time; }; #endif ***************************************** Regards Sajjad
---------- Forwarded message ---------- From: Nigel Stewart <nstewart@...> Date: Mon, Feb 23, 2009 at 4:14 AM Subject: Re: [glew-users] Fwd: Fwd: GLEW Qt To: "glew-users@..." <glew-users@...> Sajjad, I would simply suggest that the very first #include in GLWidget.h is glew.h. Likewise for all .h and .cpp files mixing Qt and OpenGL/GLEW. Another approach I can recommend is to provide dummy gl.h glext.h etc files, that #include glew.h. What Tom is suggesting should also work, but it forces things to be structured in a particular way that avoids mixing Qt and OpenGL code. That doesn't appeal to me due to both Qt and OpenGL being two of my favorite things. And for the most part, they live happily together - I can speak from experience. - Nigel ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Fwd: Fwd: Fwd: GLEW Qtworking with the open source version .
Any more hint? Sajjad ---------- Forwarded message ---------- From: ami guru <dosto.walla@...> Date: Mon, Feb 23, 2009 at 5:18 AM Subject: Fwd: [glew-users] Fwd: Fwd: GLEW Qt To: glew-users@... Hello Nigel, Thats the very first thing i have tried. But did not work. **************************************** #ifndef GLWIDGET_H #define GLWIDGET_H /* non-qt headers are declared first */ #include <GL/glew.h> #include <QGLWidget> #include <QTime> //#include <GL/glew.h> class GLWidget : public QGLWidget { Q_OBJECT public: GLWidget(QWidget *parent = 0); ~GLWidget(); inline int xRotation() const { return xRot; } inline int yRotation() const { return yRot; } inline int zRotation() const { return zRot; } inline float getFPS() const { return fps; } public slots: void setXRotation(int angle); void setYRotation(int angle); void setZRotation(int angle); void drawDifferentMode(const QString& ); void drawDifferentStructure(const QString&); signals: void xRotationChanged(int angle); void yRotationChanged(int angle); void zRotationChanged(int angle); void frameRateChanged(const QString&); protected: void initializeGL(); void paintGL(); void resizeGL(int width, int height); void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); void initializeLights(); void setCamera(float posX, float posY, float posZ, float targetX, float targetY, float targetZ); /* create shader specific calls to setup shaders and clean them when we are done */ private: void normalizeAngle(int *angle); void calculateFPS(); //id for displaylist GLuint teaPotId; int xRot; int yRot; int zRot; //to store the elapsed time int t; int frame; int timeBase; float fps; int drawMode; float cameraDistance; QPoint lastPos; QTime time; }; #endif ***************************************** Regards Sajjad
---------- Forwarded message ---------- From: Nigel Stewart <nstewart@...> Date: Mon, Feb 23, 2009 at 4:14 AM Subject: Re: [glew-users] Fwd: Fwd: GLEW Qt To: "glew-users@..." <glew-users@...> Sajjad, I would simply suggest that the very first #include in GLWidget.h is glew.h. Likewise for all .h and .cpp files mixing Qt and OpenGL/GLEW. Another approach I can recommend is to provide dummy gl.h glext.h etc files, that #include glew.h. What Tom is suggesting should also work, but it forces things to be structured in a particular way that avoids mixing Qt and OpenGL code. That doesn't appeal to me due to both Qt and OpenGL being two of my favorite things. And for the most part, they live happily together - I can speak from experience. - Nigel ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Re: Fwd: Fwd: Fwd: GLEW Qt> Thats the very first thing i have tried. But did not work.
Can we see the first 20 lines of GLWidget.cpp too? - Nigel > **************************************** > #ifndef GLWIDGET_H > #define GLWIDGET_H > > > /* > non-qt headers are declared first > */ > #include <GL/glew.h> > > #include <QGLWidget> > #include <QTime> > > //#include <GL/glew.h> > > class GLWidget : public QGLWidget > { > Q_OBJECT ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Fwd: Fwd: Fwd: Fwd: GLEW Qtthe corresponding .cpp file....
************** #include "GLWidget.h" #include <QtGui> #include <QtOpenGL> #include <QDebug> #include <cmath> #include "Teapot.h" GLWidget::GLWidget(QWidget *parent) : QGLWidget(parent) { /* setFormat(QGLFormat(QGL::DoubleBuffer | QGL::DepthBuffer | QGL::StencilBuffer)); */ /* instantiate the wrangler to make sure that the it is instantiated */ GLenum err = glewInit(); if (GLEW_OK != err) { /* Problem: glewInit failed, something is seriously wrong. */ //fprintf(stderr, "Error: %s\n", glewGetErrorString(err)); qDebug() << "Error: " << glewGetErrorString(err) << endl; } //fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); //cout << "Status: Using GLEW " << glewGetString(GLEW_VERSION) << endl; if (glewIsSupported("GL_VERSION_2_0")) qDebug() << "Ready for OpenGL 2.0" << endl; else { qDebug() << "OpenGL 2.0 not supported" << endl; //exit(1); } teaPotId = 0; xRot = 0; yRot = 0; zRot = 0; drawMode = 0; //use that to calculae the FPS time.start(); t = 0; timeBase = 0; frame = 0; fps = 0.0f; } **************** Now it compiles without any error. But now i have another issue now. The intialization process says that Device is not ready for OpenGL 2.0 which is strange. ************ Error: 0x7f3bc3a26c18 OpenGL 2.0 not supported ************ Any Insight? Sajjad ---------- Forwarded message ---------- From: Nigel Stewart <nstewart@...> Date: Mon, Feb 23, 2009 at 6:04 AM Subject: Re: [glew-users] Fwd: Fwd: Fwd: GLEW Qt To: "glew-users@..." <glew-users@...> Thats the very first thing i have tried. But did not work. - Nigel **************************************** ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
|
|
Fwd: Fwd: Fwd: Fwd: GLEW QtHello Nigel,
I think i found the trouble here. Previously i put all the glew initialization inside the constructor which caused the trouble. Now i have that iside the initializeGL() and it is fine now Regards Sajjad ---------- Forwarded message ---------- From: ami guru <dosto.walla@...> Date: Mon, Feb 23, 2009 at 11:35 AM Subject: Fwd: [glew-users] Fwd: Fwd: Fwd: GLEW Qt To: glew-users@... the corresponding .cpp file.... ************** #include "GLWidget.h" #include <QtGui> #include <QtOpenGL> #include <QDebug> #include <cmath> #include "Teapot.h" GLWidget::GLWidget(QWidget *parent) : QGLWidget(parent) { /* setFormat(QGLFormat(QGL::DoubleBuffer | QGL::DepthBuffer | QGL::StencilBuffer)); */ /* instantiate the wrangler to make sure that the it is instantiated */ GLenum err = glewInit(); if (GLEW_OK != err) { /* Problem: glewInit failed, something is seriously wrong. */ //fprintf(stderr, "Error: %s\n", glewGetErrorString(err)); qDebug() << "Error: " << glewGetErrorString(err) << endl; } //fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); //cout << "Status: Using GLEW " << glewGetString(GLEW_VERSION) << endl; if (glewIsSupported("GL_VERSION_2_0")) qDebug() << "Ready for OpenGL 2.0" << endl; else { qDebug() << "OpenGL 2.0 not supported" << endl; //exit(1); } teaPotId = 0; xRot = 0; yRot = 0; zRot = 0; drawMode = 0; //use that to calculae the FPS time.start(); t = 0; timeBase = 0; frame = 0; fps = 0.0f; } **************** Now it compiles without any error. But now i have another issue now. The intialization process says that Device is not ready for OpenGL 2.0 which is strange. ************ Error: 0x7f3bc3a26c18 OpenGL 2.0 not supported ************ Any Insight? Sajjad
Date: Mon, Feb 23, 2009 at 6:04 AM Subject: Re: [glew-users] Fwd: Fwd: Fwd: GLEW Qt To: "glew-users@..." <glew-users@...> Thats the very first thing i have tried. But did not work. - Nigel **************************************** ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/XcvMzF8H _______________________________________________ glew-users mailing list glew-users@... https://lists.sourceforge.net/lists/listinfo/glew-users |
| Free embeddable forum powered by Nabble | Forum Help |