Hello Josef, On 02/08/2011 03:30 AM, Josef Grunig wrote:
I've applied this patch too, but cant find the definition of bool osgGlCheckError(const char *file, int line, const char *msg);Unfortunately I cant get sources from sourceforge because of some attack at they site. Can you point me in the right direction? CVS seems to be set up again only within the end of the week
the patch did not contain the new file OSGGL.cpp (and the .h was missing the *_DLLMAPPING decoration to work on windows), sorry about that. I've attached both files.
Cheers, Carsten
/*---------------------------------------------------------------------------*\ * OpenSG * * * * * * Copyright (C) 2011 by the OpenSG Forum * * * * www.opensg.org * * * * contact: d...@opensg.org, gerrit.v...@vossg.org, jb...@zgdv.de * * * \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ * License * * * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Library General Public License as published * * by the Free Software Foundation, version 2. * * * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ * Changes * * * * * * * * * * * * * \*---------------------------------------------------------------------------*/ #include "OSGGL.h" #include "OSGLog.h" OSG_BEGIN_NAMESPACE /*! Checks for OpenGL errors, prints a warning for all that are currently queued and returns false if any errors where detected. The arguments can be used to identify the location of the error, file and line are usually __FILE__ and __LINE__ respectively. Only in debug builds (preprocessor token OSG_DEBUG defined) the actual error checking is performed. */ bool osgGlCheckError(const char *file, int line, const char *msg) { bool retVal = true; #ifdef OSG_DEBUG GLenum glErr; while((glErr = glGetError()) != GL_NO_ERROR) { FWARNING(("(%s,%d): %s failed: %s (%#x)\n", file, line, msg, gluErrorString(glErr), glErr)); retVal = false; } #endif return retVal; } OSG_END_NAMESPACE
/*---------------------------------------------------------------------------*\ * OpenSG * * * * * * Copyright (C) 2000-2002 by the OpenSG Forum * * * * www.opensg.org * * * * contact: d...@opensg.org, gerrit.v...@vossg.org, jb...@zgdv.de * * * \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ * License * * * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Library General Public License as published * * by the Free Software Foundation, version 2. * * * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ * Changes * * * * * * * * * * * * * \*---------------------------------------------------------------------------*/ #ifndef _OSGGL_H_ #define _OSGGL_H_ #ifdef __sgi #pragma once #endif #include <OSGConfig.h> #ifdef OSG_NOGLSUBDIR #include <gl.h> #elif defined(__APPLE__) #include <OpenGL/gl.h> #else #include <GL/gl.h> #endif // Need to define a definitely unused constant // OpenGL doesn't provide one... :( #define OSG_GL_UNUSED 0xffff #include <OSGGLU.h> OSG_BEGIN_NAMESPACE bool OSG_BASE_DLLMAPPING osgGlCheckError(const char *file, int line, const char *msg); #ifdef OSG_DEBUG #define glErr(text) \ { \ osgGlCheckError(__FILE__, __LINE__, (text)); \ } #else #define glErr(text) #endif OSG_END_NAMESPACE #define OSGGL_HEADER_CVSID "@(#)$Id: $" #endif /* _OSGGL_H_ */
------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users