Example #1
0
/* http://www.opengl.org/sdk/docs/man/xhtml/glClear.xml */
void glClear (GLbitfield mask)
{
    #ifdef DEBUG
        fprintf(stderr, "glClear(0x%4X)\n", mask);
    #endif

    if (wrap_glClear == NULL || QBState.enabled == GL_FALSE) {
        real_glClear(mask);
    }  else {
        wrap_glClear(mask);
    }
}
Example #2
0
static void drawit__Gv(int n, const void *context)
{
  int s3;
  uint64_t var_A8;

  wrap_glClear(GL_COLOR_BUFFER_BIT, context);
  wrap_glColor4f(1.0f, 1.0f, 1.0f, 1.0f, context);
  wrap_glPushMatrix(context);

  wrap_glRotatef(wheel, 1.0f, 0.0f, 0.0f, context);
  s3 = n;
  if (0 >= nlimit)
  {
    var_A8 = 0;
  }
  else
  {
    var_A8 = 1;

    do
    {
      int s0;
      int a0;

      // Set a0 to s3, but ensure it falls within -127 and 127
      if (s3 < 0)
        a0 = (abs(s3) & 127) * -1;
      else
        a0 = s3 & 127;

      if (a0 < 0)
        s0 = a0 + 128;
      else
        s0 = a0;

      if (s0 >= 128)
        s0 -= 128;

      {
        const float f14 = twixt__GiPff(s0, dzoom, t) * -0.5f;
        wrap_glTranslatef(0.0f, 0.0f, f14, context);
      }

      s3--;
    } while ((n - nlimit) < s3);

    if ((n - nlimit) < n)
      var_A8 = 1;
    else
      var_A8 = 0;
  }

  s3 = n;
  if (var_A8 != 0)
  {
    do
    {
      int s0;
      int a0;

      // Set a0 to s3, but ensure it falls within -127 and 127
      if (s3 < 0)
        a0 = (abs(s3) & 127) * -1;
      else
        a0 = s3 & 127;

      if (a0 < 0)
        s0 = a0 + 128;
      else
        s0 = a0;

      if (s0 >= 128)
        s0 -= 128;

      const float f30 = twixt__GiPff(s0, x, t);
      const float var_D0 = twixt__GiPff(s0, y, t);
      const float var_100 = twixt__GiPff(s0, dzoom, t);
      const float var_C8 = twixt__GiPff(s0, arm, t);
      const float f28 = twixt__GiPff(s0, wrist, t);
      const float var_108 = twixt__GiPff(s0, size, t);
      const float var_E0 = foldtwixt__GiPffT3(s0, spin, t, 360.0f);
      const float var_D8 = foldtwixt__GiPffT3(s0, flip, t, 360.0f);
      const float var_110 = twixt__GiPff(s0, dtwist, t);
      const float f26 = foldtwixt__GiPffT3(s0, hue, t, 1.0f);
      const float var_E8 = twixt__GiPff(s0, alpha, t);
      const float f24 = foldtwixt__GiPffT3(s0, light, t, 1.0f);
      const float var_F0 = twixt__GiPff(s0, alphaout, t);

      {
        hls_to_rgb__GfN21PfN24(colRGBA, &(colRGBA[1]), &(colRGBA[2]), f26, f24, 1.0f);
      }
      const float f5 = f26 + 0.5f;
      outlinecolRGBA[3] = var_F0;
      colRGBA[3] = var_E8;

      {
        float f12;
        if ((double)1.0 < (double)f5)
        {
          f12 = f5 + -1.0f;
        }
        else
        {
          f12 = f5;
        }

        hls_to_rgb__GfN21PfN24(outlinecolRGBA, &(outlinecolRGBA[1]), &(outlinecolRGBA[2]),
            f12, 1.0f - f24, 1.0f);
      }

      wrap_glPushMatrix(context);
      wrap_glTranslatef(f30, var_D0, 0.0f, context);
      wrap_glRotatef(var_E0, 0.0f, 0.0f, 1.0f, context);
      wrap_glTranslatef(0.0f, var_C8, 0.0f, context);
      wrap_glRotatef(var_D8, 0.0f, 1.0f, 0.0f, context);
      wrap_glTranslatef(f28, 0.0f, 0.0f, context);

      if (fill[s0] != 0)
      {
        wrap_glColor4f(colRGBA[0], colRGBA[1], colRGBA[2], 1.0f, context);
        drawshape__GiT1(1, context);
      }

      if (outline[s0] != 0)
      {
        wrap_glColor4f(outlinecolRGBA[0], outlinecolRGBA[1], outlinecolRGBA[2], 1.0f, context);
        drawshape__GiT1(0, context);
      }

      wrap_glPopMatrix(context);

      if (sflag == 0)
      {
        wrap_glScalef(1.0f, -1.0f, 1.0f, context);
        wrap_glPushMatrix(context);
        wrap_glTranslatef(f30, var_D0, 0.0f, context);
        wrap_glRotatef(var_E0, 0.0f, 0.0f, 1.0f, context);
        wrap_glTranslatef(0.0f, var_C8, 0.0f, context);
        wrap_glRotatef(var_D8, 0.0f, 1.0f, 0.0f, context);
        wrap_glTranslatef(f28, 0.0f, 0.0f, context);
        wrap_glScalef(var_108, var_108, 1.0f, context);

        if (fill[s0] != 0)
        {
          wrap_glColor4f(colRGBA[0], colRGBA[1], colRGBA[2], 1.0f, context);
          drawshape__GiT1(1, context);
        }

        if (outline[s0] != 0)
        {
          wrap_glColor4f(outlinecolRGBA[0], outlinecolRGBA[1], outlinecolRGBA[2], 1.0f, context);
          drawshape__GiT1(0, context);
        }

        wrap_glPopMatrix(context);
        wrap_glRotatef(180.0f, 0.0f, 0.0f, 1.0f, context);
        wrap_glPushMatrix(context);
        wrap_glTranslatef(f30, var_D0, 0.0f, context);

        wrap_glRotatef(var_E0, 0.0f, 0.0f, 1.0f, context);
        wrap_glTranslatef(0.0f, var_C8, 0.0f, context);
        wrap_glRotatef(var_D8, 0.0f, 1.0f, 0.0f, context);
        wrap_glTranslatef(f28, 0.0f, 0.0f, context);
        wrap_glScalef(var_108, var_108, 1.0f, context);

        if (fill[s0] != 0)
        {
          wrap_glColor4f(colRGBA[0], colRGBA[1], colRGBA[2], 1.0f, context);
          drawshape__GiT1(1, context);
        }

        if (outline[s0] != 0)
        {
          wrap_glColor4f(outlinecolRGBA[0], outlinecolRGBA[1], outlinecolRGBA[2], 1.0f, context);
          drawshape__GiT1(0, context);
        }

        wrap_glPopMatrix(context);
        wrap_glScalef(1.0f, -1.0f, 1.0f, context);
        wrap_glPushMatrix(context);
        wrap_glTranslatef(f30, var_D0, 0.0f, context);
        wrap_glRotatef(var_E0, 0.0f, 0.0f, 1.0f, context);
        wrap_glTranslatef(0.0f, var_C8, 0.0f, context);
        wrap_glRotatef(var_D8, 0.0f, 1.0f, 0.0f, context);
        wrap_glTranslatef(f28, 0.0f, 0.0f, context);
        wrap_glScalef(var_108, var_108, 1.0f, context);

        if (fill[s0] != 0)
        {
          wrap_glColor4f(colRGBA[0], colRGBA[1], colRGBA[2], 1.0f, context);
          drawshape__GiT1(1, context);
        }

        if (outline[s0] != 0)
        {
          wrap_glColor4f(outlinecolRGBA[0], outlinecolRGBA[1], outlinecolRGBA[2], 1.0f, context);
          drawshape__GiT1(0, context);
        }

        wrap_glPopMatrix(context);
        wrap_glRotatef(var_110, 0.0f, 0.0f, 1.0f, context);
        wrap_glTranslatef(0.0f, 0.0f, var_100, context);
      }

      s3--;
    } while ((n - nlimit) < s3);
  }

  wrap_glPopMatrix(context);
  wrap_glFinish(context);
  return;
}