Пример #1
0
  protected void allocate() {
    release(); // Just in the case this object is being re-allocated.

    context = pgl.getContext();

    if (screenFb) {
      glFboID = 0;
    } else {
      glFboID = pg.createFrameBufferObject();
    }

    // create the rest of the stuff...
    if (multisample) {
      createColorBufferMultisample();
    }

    if (packedDepthStencil) {
      createPackedDepthStencilBuffer();
    } else {
      if (0 < depthBits) {
        createDepthBuffer();
      }
      if (0 < stencilBits) {
        createStencilBuffer();
      }
    }
  }