numgroup removed but introduce a reto compatibility bug in Program serializer
hope nobody use it
This commit is contained in:
parent
bf1b4ec2bb
commit
195df4f811
@ -103,10 +103,6 @@ class OSG_EXPORT Program : public osg::StateAttribute
|
||||
void setParameter( GLenum pname, GLint value );
|
||||
GLint getParameter( GLenum pname ) const;
|
||||
|
||||
/** Set/get compute shader work groups */
|
||||
void setComputeGroups( GLint numGroupsX, GLint numGroupsY, GLint numGroupsZ );
|
||||
void getComputeGroups( GLint& numGroupsX, GLint& numGroupsY, GLint& numGroupsZ ) const;
|
||||
|
||||
/** Add an attribute location binding. */
|
||||
void addBindAttribLocation( const std::string& name, GLuint index );
|
||||
|
||||
@ -439,12 +435,6 @@ class OSG_EXPORT Program : public osg::StateAttribute
|
||||
GLint _geometryInputType;
|
||||
GLint _geometryOutputType;
|
||||
|
||||
|
||||
/** Parameter maintained with glDispatchCompute */
|
||||
GLint _numGroupsX;
|
||||
GLint _numGroupsY;
|
||||
GLint _numGroupsZ;
|
||||
|
||||
/**TransformFeedBack**/
|
||||
GLenum _feedbackmode;
|
||||
std::vector<std::string> _feedbackout;
|
||||
|
@ -92,8 +92,7 @@ void Program::ProgramBinary::assign(unsigned int size, const unsigned char* data
|
||||
|
||||
Program::Program() :
|
||||
_geometryVerticesOut(1), _geometryInputType(GL_TRIANGLES),
|
||||
_geometryOutputType(GL_TRIANGLE_STRIP),
|
||||
_numGroupsX(0), _numGroupsY(0), _numGroupsZ(0), _feedbackmode(GL_SEPARATE_ATTRIBS)
|
||||
_geometryOutputType(GL_TRIANGLE_STRIP), _feedbackmode(GL_SEPARATE_ATTRIBS)
|
||||
{
|
||||
}
|
||||
|
||||
@ -133,10 +132,6 @@ Program::Program(const Program& rhs, const osg::CopyOp& copyop):
|
||||
_geometryInputType = rhs._geometryInputType;
|
||||
_geometryOutputType = rhs._geometryOutputType;
|
||||
|
||||
_numGroupsX = rhs._numGroupsX;
|
||||
_numGroupsY = rhs._numGroupsY;
|
||||
_numGroupsZ = rhs._numGroupsZ;
|
||||
|
||||
_feedbackmode=rhs._feedbackmode;
|
||||
_feedbackout=rhs._feedbackout;
|
||||
}
|
||||
@ -173,15 +168,6 @@ int Program::compare(const osg::StateAttribute& sa) const
|
||||
if( _geometryOutputType < rhs._geometryOutputType ) return -1;
|
||||
if( rhs._geometryOutputType < _geometryOutputType ) return 1;
|
||||
|
||||
if( _numGroupsX < rhs._numGroupsX ) return -1;
|
||||
if( rhs._numGroupsX < _numGroupsX ) return 1;
|
||||
|
||||
if( _numGroupsY < rhs._numGroupsY ) return -1;
|
||||
if( rhs._numGroupsY < _numGroupsY ) return 1;
|
||||
|
||||
if( _numGroupsZ < rhs._numGroupsZ ) return -1;
|
||||
if( rhs._numGroupsZ < _numGroupsZ ) return 1;
|
||||
|
||||
if(_feedbackout<rhs._feedbackout) return -1;
|
||||
if(_feedbackmode<rhs._feedbackmode) return -1;
|
||||
|
||||
@ -386,20 +372,6 @@ GLint Program::getParameter( GLenum pname ) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Program::setComputeGroups( GLint numGroupsX, GLint numGroupsY, GLint numGroupsZ )
|
||||
{
|
||||
_numGroupsX = numGroupsX;
|
||||
_numGroupsY = numGroupsY;
|
||||
_numGroupsZ = numGroupsZ;
|
||||
}
|
||||
|
||||
void Program::getComputeGroups( GLint& numGroupsX, GLint& numGroupsY, GLint& numGroupsZ ) const
|
||||
{
|
||||
numGroupsX = _numGroupsX;
|
||||
numGroupsY = _numGroupsY;
|
||||
numGroupsZ = _numGroupsZ;
|
||||
}
|
||||
|
||||
void Program::addBindAttribLocation( const std::string& name, GLuint index )
|
||||
{
|
||||
_attribBindingList[name] = index;
|
||||
|
@ -121,29 +121,6 @@ static bool writeFeedBackMode( osgDB::OutputStream& os, const osg::Program& attr
|
||||
os << attr.getTransformFeedBackMode()<< std::endl;
|
||||
return true;
|
||||
}
|
||||
// _numGroupsX/Y/Z
|
||||
static bool checkComputeGroups( const osg::Program& attr )
|
||||
{
|
||||
GLint numX = 0, numY = 0, numZ = 0;
|
||||
attr.getComputeGroups( numX, numY, numZ );
|
||||
return numX>0 && numY>0 && numZ>0;
|
||||
}
|
||||
|
||||
static bool readComputeGroups( osgDB::InputStream& is, osg::Program& attr )
|
||||
{
|
||||
GLint numX = 0, numY = 0, numZ = 0;
|
||||
is >> numX >> numY >> numZ;
|
||||
attr.setComputeGroups( numX, numY, numZ );
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool writeComputeGroups( osgDB::OutputStream& os, const osg::Program& attr )
|
||||
{
|
||||
GLint numX = 0, numY = 0, numZ = 0;
|
||||
attr.getComputeGroups( numX, numY, numZ );
|
||||
os << numX << numY << numZ << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool checkBindUniformBlock( const osg::Program& node )
|
||||
{
|
||||
@ -190,11 +167,6 @@ REGISTER_OBJECT_WRAPPER( Program,
|
||||
ADD_USER_SERIALIZER( GeometryInputType ); // _geometryInputType
|
||||
ADD_USER_SERIALIZER( GeometryOutputType ); // _geometryOutputType
|
||||
|
||||
{
|
||||
UPDATE_TO_VERSION_SCOPED( 95 )
|
||||
ADD_USER_SERIALIZER( ComputeGroups ); // _numGroupsX/Y/Z
|
||||
}
|
||||
|
||||
{
|
||||
UPDATE_TO_VERSION_SCOPED( 116 )
|
||||
ADD_USER_SERIALIZER( FeedBackVaryingsName );
|
||||
|
Loading…
Reference in New Issue
Block a user