Full setup of Transform Feedback(openGL)

随声附和 提交于 2019-12-05 07:59:10

Take a look at OpenGL Samples Pack. You might be interested in ogl-330-transform-feedback.cpp and ogl-400-transform-feedback-object.cpp. You might even check January 2011 OpenGL drivers status whether latest drivers have any issues with the provided examples.

Good luck.

Daniel Rakos has a demo with source code, implementing instance culling using transform feedback on OpenGL. It might help to look at it :

http://rastergrid.com/blog/2010/02/instance-culling-using-geometry-shaders/

You might want to check out Ogre 3D: http://www.ogre3d.org/forums/viewtopic.php?p=299736

They seem to have a working implementation of transform feedback.

I also experienced a similar problem that glBeginTransformFeedback generated "invalid operation". After I read the source code in file "gl-440-transform-feedback.cpp" from the package provided by Orhun, I found that adding

glEnable(GL_RASTERIZER_DISCARD);

before glBeginTransformFeedback() call just solves the problem.

Hope this can help.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!