From Julien Valentin, "To sum up changes, I had:
-some extensions in GLExtensions - GL_TEXTURE_BUFFER as target in osg::StateSet - a VBO based transform feed back example " git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14651 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -599,6 +599,11 @@ class OSG_EXPORT GLExtensions : public osg::Referenced
|
||||
void (GL_APIENTRY * glGetTransformFeedbacki_v) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
|
||||
void (GL_APIENTRY * glGetTransformFeedbacki64_v) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
|
||||
|
||||
// Vertex Array Object
|
||||
void (GL_APIENTRY * glDeleteVertexArrays) (GLsizei size,const GLuint *handles);
|
||||
void (GL_APIENTRY * glGenVertexArrays) (GLsizei size, GLuint *handles);
|
||||
GLboolean (GL_APIENTRY * glIsVertexArray) (GLuint handle);
|
||||
void (GL_APIENTRY * glBindVertexArray) (GLuint handle);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -124,6 +124,33 @@ class OSG_EXPORT Program : public osg::StateAttribute
|
||||
/** Remove a uniform block binding. */
|
||||
void removeBindUniformBlock(const std::string& name);
|
||||
|
||||
/** Remove a TransformFeedBackVarying. */
|
||||
void removeTransformFeedBackVarying(const std::string& name)
|
||||
{
|
||||
for(std::vector<std::string>::iterator i=_feedbackout.begin(); i!=_feedbackout.end(); i++)
|
||||
{
|
||||
if (*i == name) {_feedbackout.erase(i);break; }
|
||||
}
|
||||
}
|
||||
|
||||
/** Add a TransformFeedBack Varying Name. */
|
||||
void addTransformFeedBackVarying(const std::string& outname)
|
||||
{
|
||||
_feedbackout.push_back(outname);
|
||||
}
|
||||
|
||||
/** Get number of TransformFeedBack Varyings. */
|
||||
inline unsigned int getNumTransformFeedBackVaryings() const { return _feedbackout.size(); }
|
||||
|
||||
/** Get const TransformFeedBack Varying at index i. */
|
||||
inline const std::string& getTransformFeedBackVarying(unsigned int i) const { return _feedbackout[i]; }
|
||||
|
||||
/** Set TransformFeedBack Mode. */
|
||||
void setTransformFeedBackMode(GLenum e) {_feedbackmode=e;}
|
||||
|
||||
/** Get TransformFeedBack Mode. */
|
||||
GLenum getTransformFeedBackMode() const {return _feedbackmode;}
|
||||
|
||||
/** Simple class for wrapping up the data used in glProgramBinary and glGetProgramBinary.
|
||||
* On the first run of your application Programs should be assigned an empty ProgramBinary.
|
||||
* Before your application exits it should retrieve the program binary via
|
||||
@@ -393,6 +420,10 @@ class OSG_EXPORT Program : public osg::StateAttribute
|
||||
GLint _numGroupsY;
|
||||
GLint _numGroupsZ;
|
||||
|
||||
/**TransformFeedBack**/
|
||||
GLenum _feedbackmode;
|
||||
std::vector<std::string> _feedbackout;
|
||||
|
||||
private:
|
||||
Program& operator=(const Program&); // disallowed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user