From Chris Hanson, build fixes for Solaris-64

This commit is contained in:
Robert Osfield 2010-04-15 11:41:37 +00:00
parent 72e6867679
commit 7db9f18619
3 changed files with 10 additions and 10 deletions

View File

@ -2158,7 +2158,7 @@ bool GL2Extensions::getProgramInfoLog( GLuint program, std::string& result ) con
{
GLchar* infoLog = new GLchar[bufLen];
glGetProgramInfoLog( program, bufLen, &strLen, infoLog );
if( strLen > 0 ) result = infoLog;
if( strLen > 0 ) result = reinterpret_cast<char*>(infoLog);
delete [] infoLog;
}
return (strLen > 0);
@ -2175,7 +2175,7 @@ bool GL2Extensions::getShaderInfoLog( GLuint shader, std::string& result ) const
{
GLchar* infoLog = new GLchar[bufLen];
glGetShaderInfoLog( shader, bufLen, &strLen, infoLog );
if( strLen > 0 ) result = infoLog;
if( strLen > 0 ) result = reinterpret_cast<char*>(infoLog);
delete [] infoLog;
}
return (strLen > 0);
@ -2194,7 +2194,7 @@ bool GL2Extensions::getAttribLocation( const char* attribName, GLuint& location
if( linked == GL_FALSE ) return false;
// is there such a named attribute?
GLint loc = glGetAttribLocation( program, attribName );
GLint loc = glGetAttribLocation( program, reinterpret_cast<const GLchar*>(attribName) );
if( loc < 0 ) return false;
location = loc;
@ -2217,7 +2217,7 @@ bool GL2Extensions::getFragDataLocation( const char* fragDataName, GLuint& locat
if (_glGetFragDataLocation == NULL) return false;
// is there such a named attribute?
GLint loc = glGetFragDataLocation( program, fragDataName );
GLint loc = glGetFragDataLocation( program, reinterpret_cast<const GLchar*>(fragDataName) );
if( loc < 0 ) return false;
location = loc;

View File

@ -490,7 +490,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
itr != programBindlist.end(); ++itr )
{
osg::notify(osg::NOTICE)<<"Program's vertex attrib binding "<<itr->second<<", "<<itr->first<<std::endl;
_extensions->glBindAttribLocation( _glProgramHandle, itr->second, itr->first.c_str() );
_extensions->glBindAttribLocation( _glProgramHandle, itr->second, reinterpret_cast<const GLchar*>(itr->first.c_str()) );
}
// set any explicit vertex attribute bindings that are set up via osg::State, such as the vertex arrays
@ -502,7 +502,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
itr != stateBindlist.end(); ++itr )
{
osg::notify(osg::NOTICE)<<"State's vertex attrib binding "<<itr->second<<", "<<itr->first<<std::endl;
_extensions->glBindAttribLocation( _glProgramHandle, itr->second, itr->first.c_str() );
_extensions->glBindAttribLocation( _glProgramHandle, itr->second, reinterpret_cast<const GLchar*>(itr->first.c_str()) );
}
}
@ -511,7 +511,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
for( FragDataBindingList::const_iterator itr = fdbindlist.begin();
itr != fdbindlist.end(); ++itr )
{
_extensions->glBindFragDataLocation( _glProgramHandle, itr->second, itr->first.c_str() );
_extensions->glBindFragDataLocation( _glProgramHandle, itr->second, reinterpret_cast<const GLchar*>(itr->first.c_str()) );
}
// link the glProgram
@ -562,7 +562,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
if( loc != -1 )
{
_uniformInfoMap[name] = ActiveVarInfo(loc,type,size);
_uniformInfoMap[reinterpret_cast<char*>(name)] = ActiveVarInfo(loc,type,size);
osg::notify(osg::INFO)
<< "\tUniform \"" << name << "\""
@ -594,7 +594,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
if( loc != -1 )
{
_attribInfoMap[name] = ActiveVarInfo(loc,type,size);
_attribInfoMap[reinterpret_cast<char*>(name)] = ActiveVarInfo(loc,type,size);
osg::notify(osg::INFO)
<< "\tAttrib \"" << name << "\""

View File

@ -500,7 +500,7 @@ void Shader::PerContextShader::compileShader(osg::State& state)
}
GLint compiled = GL_FALSE;
const char* sourceText = source.c_str();
const GLchar* sourceText = reinterpret_cast<const GLchar*>(source.c_str());
_extensions->glShaderSource( _glShaderHandle, 1, &sourceText, NULL );
_extensions->glCompileShader( _glShaderHandle );
_extensions->glGetShaderiv( _glShaderHandle, GL_COMPILE_STATUS, &compiled );