Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[SofaOpenglVisual] Fix ogl perf problem #1069
This PR fix the opengl performance issue reported in ##1070
The fix is in OglModel.cpp/OglModel.h and is very simple, when the positions and normals array are containg double precision numbers they are converted into single precision one before sending the data to OpenGL. I'm sure we can optimize further the conversion loop...but I have not time for that (volunteer needed).
Because the code in OglModel was hard to read because of the #ifdef GLEW all around I first cleaned the whole SofaOpenglVisual code, by removing the #ifdef. I also updated the call to function with name *ARB because they are now part of any baseline opengl implementation since nearly a decade.
Reviewers will merge only if all these checks are true.
referenced this pull request
Jun 1, 2019
It is a good idea to finally remove the flag sofa_have_glew (it would be cool to remove it entirely in Sofa by the way), and I don't see anything wrong (code guidelines like prefixes etc, is not the point of this PR).