Added support for geometry shader attributes
This commit is contained in:
parent
7cd4641ece
commit
5400e570c7
@ -38,8 +38,9 @@
|
||||
#define VERSION_0027 27
|
||||
#define VERSION_0028 28
|
||||
#define VERSION_0029 29
|
||||
#define VERSION_0030 30
|
||||
|
||||
#define VERSION VERSION_0029
|
||||
#define VERSION VERSION_0030
|
||||
|
||||
/* The BYTE_SEX tag is used to check the endian
|
||||
of the IVE file being read in. The IVE format
|
||||
|
@ -29,6 +29,13 @@ void Program::write(DataOutputStream* out){
|
||||
}
|
||||
else
|
||||
throw Exception("Program::write(): Could not cast this osg::Program to an osg::Object.");
|
||||
|
||||
if ( out->getVersion() >= VERSION_0030 )
|
||||
{
|
||||
out->writeInt(getParameter(GL_GEOMETRY_VERTICES_OUT_EXT));
|
||||
out->writeInt(getParameter(GL_GEOMETRY_INPUT_TYPE_EXT));
|
||||
out->writeInt(getParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT));
|
||||
}
|
||||
|
||||
const AttribBindingList& abl = getAttribBindingList();
|
||||
out->writeUInt(abl.size());
|
||||
@ -71,6 +78,13 @@ void Program::read(DataInputStream* in)
|
||||
throw Exception("Program::read(): Expected Program identification.");
|
||||
}
|
||||
|
||||
if ( in->getVersion() >= VERSION_0030 )
|
||||
{
|
||||
setParameter(GL_GEOMETRY_VERTICES_OUT_EXT, in->readInt());
|
||||
setParameter(GL_GEOMETRY_INPUT_TYPE_EXT, in->readInt());
|
||||
setParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT, in->readInt());
|
||||
}
|
||||
|
||||
// reading in shaders.
|
||||
unsigned int size = in->readUInt();
|
||||
for(unsigned int ai=0; ai<size; ++ai)
|
||||
|
Loading…
Reference in New Issue
Block a user