void Render()

in ReplicaSDK/include/MirrorRenderer.h [48:83]


  void Render(
      const MirrorSurface& surface,
      pangolin::GlTexture& maskTexture,
      const pangolin::OpenGlRenderState& cam,
      const bool drawDepth=false
      ) {
    shader.Bind();
    shader.SetUniform("MVP_matrix", cam.GetProjectionModelViewMatrix());
    shader.SetUniform("MV_matrix", cam.GetModelViewMatrix());
    shader.SetUniform("reflectivity", surface.Reflectivity());
    shader.SetUniform("texSize", (float)colorTex.width, (float)colorTex.height);

    glActiveTexture(GL_TEXTURE0);
    colorTex.Bind();

    glActiveTexture(GL_TEXTURE1);
    maskTexture.Bind();

    if (!drawDepth) {
      glEnable(GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    }

    glDisable(GL_CULL_FACE);

    Draw(surface, surfaceOffset);

    glDisable(GL_BLEND);

    glActiveTexture(GL_TEXTURE1);
    maskTexture.Unbind();
    glActiveTexture(GL_TEXTURE0);
    colorTex.Unbind();

    shader.Unbind();
  }