[osg-users] GLBeginEndAdapter

John Farrier john.farrier at gmail.com
Thu Jul 20 13:11:50 PDT 2017


Hi,

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 e11e45a2e36de91bbe956223c43e8c5a50f9b72b.  

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.)


Code:
osg::GLBeginEndAdapter& gl = (state.getGLBeginEndAdapter());

gl.Color4fv(_surfaceColor.ptr());

bool drawBackSide = true;
bool drawFrontSide = true;

// draw back side.
if(drawBackSide)
{
  for(int i = 0; i + 1 <= _density; i++)
  {
    const auto az1 = _azMin + (i*azIncr);
    const auto az2 = _azMin + ((i + 1)*azIncr);

    gl.Begin(GL_QUAD_STRIP);
    for(int j = 0; j <= _density; j++)
    {
      ...



Thank you!

Cheers,
John
Code:




------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71289#71289







More information about the osg-users mailing list