<div dir="ltr"><div><div><div>Hi John,<br><br></div>The GLBeginEndAdapter was an interim solution while older parts of the OSG were migrated over to using vertex arrays and DrawArrays/DrawElements, once this migration work was completed the core OSG no longer required it, so I removed it to avoid bloat. This migration work was required as OpenGL ES and recent versions of OpenGL either don't support or deprecate glBegin/glEnd, Further pressure to migrate was due to the need to support Vertex Array Objects under recent versions of OpenGL and due to peculiarities of OpenGL support under OSX.<br><br></div>For yourself migrating to use osg::Geometry may well be the easiest. Sometimes this is straight forward, other times it can be a bit awkward as not all glBegin/glEnd(() style usage easily maps to using vertex arrays. It's worth the effort though as vertex arrays is how all modern graphics hardware work, the GLBeginEndAdapter hides lots of hacky dynamic setting up of vertex arrays internal to hide the difference between the old style and how modern hardware manage things. <br><br>By moving away from GLBeginEndAdapter you have to confront just how best to represent your data with modern vertex arrays but it'll be worth it - your application should be faster for the improvement.<br><br></div>Robert.<br><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 July 2017 at 21:11, John Farrier <span dir="ltr"><<a href="mailto:john.farrier@gmail.com" target="_blank">john.farrier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am compiling some code with the current git repository version of OSG and found that State's "getGLBeginEndAdapter" has been removed. Looking through the history, I see this happened at: commit e11e45a2e36de91bbe956223c43e8c<wbr>5a50f9b72b.<br>
<br>
The comment is only "Removed GLBeginEndAdapter as it is no longer needed". Well, my code seems to need it. What do I need to do to update my code to not need it? (I realize this is fixed pipeline code, but it's old code and it works. So a complete re-write is not desirable.)<br>
<br>
<br>
Code:<br>
osg::GLBeginEndAdapter& gl = (state.getGLBeginEndAdapter())<wbr>;<br>
<br>
gl.Color4fv(_surfaceColor.ptr(<wbr>));<br>
<br>
bool drawBackSide = true;<br>
bool drawFrontSide = true;<br>
<br>
// draw back side.<br>
if(drawBackSide)<br>
{<br>
for(int i = 0; i + 1 <= _density; i++)<br>
{<br>
const auto az1 = _azMin + (i*azIncr);<br>
const auto az2 = _azMin + ((i + 1)*azIncr);<br>
<br>
gl.Begin(GL_QUAD_STRIP);<br>
for(int j = 0; j <= _density; j++)<br>
{<br>
...<br>
<br>
<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
John<br>
Code:<br>
<br>
<br>
<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=71289#71289" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=71289#<wbr>71289</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>