SpiderPig Posted March 29, 2017 Share Posted March 29, 2017 Hey guys, What I have is a large dynamic mesh, and Shape::PolyMesh() takes too long to be used in real-time. I want the shapes vertices to change along with the mesh's without using Shape::PolyMesh() all the time. Is it possible to manipulate the vertices of a shape without re-generating it? Quote Link to comment Share on other sites More sharing options...
martyj Posted March 29, 2017 Share Posted March 29, 2017 You could use a geometry shader with it. Allows you to change the verticies on the graphics card. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted March 29, 2017 Author Share Posted March 29, 2017 Do you think it will change the physics shape though? Or just the mesh? Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted March 29, 2017 Share Posted March 29, 2017 By default it won't change the physics shape. It is, however possible to send the output of the geometry shader to an output stream and then access it from the cpu. I have never done such a thing thoug and don't know how exactly that works, but it should be possible to generate the physics-shape from it. Some reading: https://www.khronos.org/opengl/wiki/Transform_Feedback https://www.khronos.org/opengl/wiki/Geometry_Shader#Output_streams Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted March 30, 2017 Author Share Posted March 30, 2017 Thanks for the info. It sounds good for changing a mesh in real time, however its the physics shape that has to be changed in real time too. I'd like to see a faster method of PolyMesh (), but i may have to come up with a differnt way of generating the shapes in realtime. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.