From: Charles L. <ch...@cn...> - 2009-07-08 15:07:11
|
I believe it's GLU we use for that, i.e. gluBuildMipMaps. Strangely, I am having a hard time figuring out what license the compiled release of this is under. The header file for it is under a much more restrictive license which makes me nervous. http://www.opengl.org/resources/libraries/glx/ contains the information on GLU. It appears to be under the following license: http://www.sgi.com/products/software/opensource/glx/glxlicense.txt . I do not understand if we are exempt from it, since we're only linking to the project (i.e. like the LGPL) or if there's something of more significance going on here. We can use freeglut, but we don't as of now. freeglut is primarily for opening windows and controlling input. The X Consortium License is actually the MIT/X11 license, which is, as far as I understand 100% forward compatible with the NewBSD license, which we are under now. (Freeglut is OK, but unneeded) There's no reason for us to include freeglut in all the GL headers if we don't use it. Charles Lohr Josh wrote: > Right now we use freeglut for at least a few things. I know we use it > for mipmaps. > It is under the X-Consortium license. Is this compatible with our license? > > > > cn...@us... wrote: > >> Revision: 416 >> http://hgengine.svn.sourceforge.net/hgengine/?rev=416&view=rev >> Author: cnlohr >> Date: 2009-07-08 05:27:14 +0000 (Wed, 08 Jul 2009) >> >> Log Message: >> ----------- >> remove need for freeglut on Linux, and enable compilation and running on systems missing the not-universal >> glProgramParameteriEXT function. >> >> Modified Paths: >> -------------- >> Mercury2/src/GLHeaders.h >> Mercury2/src/Shader.cpp >> >> Modified: Mercury2/src/GLHeaders.h >> =================================================================== >> --- Mercury2/src/GLHeaders.h 2009-07-08 05:25:47 UTC (rev 415) >> +++ Mercury2/src/GLHeaders.h 2009-07-08 05:27:14 UTC (rev 416) >> @@ -15,7 +15,7 @@ >> #include <OGLExtensions.h> >> #else >> #include <GL/glext.h> >> -#include <GL/freeglut.h> >> +#include <GL/glu.h> >> #endif >> >> #include <GLHelpers.h> >> @@ -34,4 +34,4 @@ >> assert(0); } } >> >> >> -#endif >> \ No newline at end of file >> +#endif >> >> Modified: Mercury2/src/Shader.cpp >> =================================================================== >> --- Mercury2/src/Shader.cpp 2009-07-08 05:25:47 UTC (rev 415) >> +++ Mercury2/src/Shader.cpp 2009-07-08 05:27:14 UTC (rev 416) >> @@ -5,12 +5,20 @@ >> #include <GLHeaders.h> >> #include <string.h> >> >> +//Because we need to dynamically check for glProgramParameteriEXT, even in Linux. >> +#include <GL/glx.h> >> + >> using namespace std; >> >> REGISTER_ASSET_TYPE( Shader ); >> >> Shader * Shader::CurrentShader = NULL; >> >> +//On many GL Implementations, this is super wonky. >> +//It may not even exist at all, so we make it optional. >> +bool IsCustomGLProgramParISet = false; >> +PFNGLPROGRAMPARAMETERIEXTPROC CustomGLProgramParI; >> + >> ShaderAttribute * ShaderAttributesSet::GetHandle( const MString & sName ) >> { >> ShaderAttribute * ret = m_AllShaderAttributes[sName]; >> @@ -31,6 +39,16 @@ >> iTimeCode[0] = 0; >> iTimeCode[1] = 0; >> iTimeCode[2] = 0; >> + >> +#ifdef WIN32 >> + CustomGLProgramParI = glProgramParameteriEXT; >> +#else >> + if( !IsCustomGLProgramParISet ) >> + { >> + CustomGLProgramParI = (PFNGLPROGRAMPARAMETERIEXTPROC)glXGetProcAddress( (GLubyte*)"glProgramParameteriEXT" ); >> + IsCustomGLProgramParISet = true; >> + } >> +#endif >> } >> >> Shader::~Shader() >> @@ -272,10 +290,10 @@ >> glLinkProgramARB( iProgramID ); >> >> //If we're using a geometry shader, we have to do a little extra. >> - if( geometryShader ) >> + if( CustomGLProgramParI && geometryShader ) >> { >> - glProgramParameteriEXT( iProgramID, GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES ); >> - glProgramParameteriEXT( iProgramID, GL_GEOMETRY_OUTPUT_TYPE_EXT, GL_TRIANGLE_STRIP ); >> + CustomGLProgramParI( iProgramID, GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES ); >> + CustomGLProgramParI( iProgramID, GL_GEOMETRY_OUTPUT_TYPE_EXT, GL_TRIANGLE_STRIP ); >> >> int ierror, i; >> GLint imaxvert; >> @@ -288,7 +306,7 @@ >> } >> for( i = 1; i < imaxvert; i++ ) >> { >> - glProgramParameteriEXT(iProgramID,GL_GEOMETRY_VERTICES_OUT_EXT,imaxvert/i); >> + CustomGLProgramParI(iProgramID,GL_GEOMETRY_VERTICES_OUT_EXT,imaxvert/i); >> if( glGetError() == 0 ) >> break; >> } >> >> >> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. >> >> ------------------------------------------------------------------------------ >> Enter the BlackBerry Developer Challenge >> This is your chance to win up to $100,000 in prizes! For a limited time, >> vendors submitting new applications to BlackBerry App World(TM) will have >> the opportunity to enter the BlackBerry Developer Challenge. See full prize >> details at: http://p.sf.net/sfu/Challenge >> _______________________________________________ >> Hgengine-cvs mailing list >> Hge...@li... >> https://lists.sourceforge.net/lists/listinfo/hgengine-cvs >> >> > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Hgengine-devs mailing list > Hge...@li... > https://lists.sourceforge.net/lists/listinfo/hgengine-devs > |