// SoftIds.C: C++ wrapper for soft id rendering utilities in softids.c

#include "SoftIds.H"

static SGL_PIXEL PatchPointer(PATCH *P)
{
  return (SGL_PIXEL)P;
}

Soft_ID_Renderer::~Soft_ID_Renderer(void) {
  sglClose(sgl);
}

void Soft_ID_Renderer::init(void)
{
  SGL_CONTEXT *oldsgl = sglGetCurrent();
  sgl = SetupSoftFrameBuffer();
  SoftRenderPatches(PatchPointer);
  sglMakeCurrent(oldsgl);	/* make the old one current again */
}
