Hi JS, Thanks for being quick on the ball with these changes. Hopefully we'll be able to get things resolved pretty quick and things compiling cleanly once again.
On Wed, Oct 6, 2010 at 5:10 PM, Jean-Sébastien Guay <[email protected]> wrote: > First of all, all the glu*() functions in the source files are declared with > GLAPIENTRY. This doesn't exist currently, but GL_APIENTRY does (witn an > underscore after GL). Do you want to define both, or change GLAPIENTRY to > GL_APIENTRY in the new files? > > Second, the forward declarations of those functions in include/osg/GLU don't > specify GLAPIENTRY or GL_APIENTRY, leading to "error C2373: > 'gluSomeFunction' : redefinition; different type modifiers". The fix is to > add GLAPIENTRY (or GL_APIENTRY) to all functions declared in > include/osg/GLU. Attached is a modified file, using GLAPIENTRY - change this > to GL_APIENTRY if you choose to go that route. I did add the OSG_EXPORT which I assumed would be sufficient - this approach is used elsewhere in the OSG when declaring C functions. What is the issue that you are seeing here? The lack of direct mapping between glu.h and our GLU header? FYI, I'm expecting issues with users mixing the actual glu library with the OSG down the line so am expecting to need to put our glu functions declarations and implementations into the osg namespace, perhaps even use a name change. My first priority is to get things compiling across platforms without the namespace - one thing at a time. > Also in that file, GLUtesselator is first declared as a class (class > GLUtesselator) and then defined as a struct (in tess.h), leading to "warning > C4099: 'GLUtesselator' : type name first seen using 'class' now seen using > 'struct'". I changed it to struct in the GLU header, but you could go the > other way and change it to class in tess.h (and make sure you add > public:...) I've merged this change as is. > After these changes, I still get this warning: > > ..\..\..\src\osg\glu\libtess\tess.cpp(504) : warning C4611: interaction > between '_setjmp' and C++ object destruction is non-portable I will need to have a dig around the code, most likely just replacing C style exception handling with C++ equivalents or our own mechanism. > And I also get lots of undeclared identifier errors, which I've attached in > a text file (because they're long lines and T-Bird will wrap the lines > making them hard to read). I don't know how you want to address these. Do > you want to add the definitions to the file where they're used, kind of like > in include/osg/Texture and other places? > > #ifndef GL_TEXTURE_3D > #define GL_TEXTURE_3D 0x806F > #endif > > Or perhaps some/all of these are already defined somewhere else and just > need to be moved to some more general place, perhaps include/osg/GL? I > searched for GL_UNPACK_SKIP_IMAGES and only found it in mipmap.cpp, but > perhaps others are already defined elsewhere. I would prefer to put the required includes into the source files rather than expanding the GLU header w.r.t including other files. I will have a scan through you error listing and see what I might have to include and where. More info soon. Robert. > Anyways, until we fix this the build is still broken on Windows. If this is > in flux I'll just stop building until you tell me it should be OK. > > Thanks, > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay [email protected] > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
