Exemple #1
0
  /** Uses the next clear value array in our list */
  public static void nextClearColor() {
    clearListNum++;
    if (clearListNum >= clearList.size()) clearListNum = 0;

    currentTheme.clearColor = clearList.get(clearListNum);
  }
Exemple #2
0
  public static void initialize() {
    // GLOW THEME
    GLOW_THEME.srcBlendFactor = GL_SRC_ALPHA;
    GLOW_THEME.dstBlendFactor = GL_ONE;
    GLOW_THEME.color = Color.white;
    GLOW_THEME.clearColor = new float[] {0.0f, 0.0f, 0.0f, 1.0f};

    // FLAT CIRCLE THEME
    FLAT_COLOR.srcBlendFactor = GL_SRC_ALPHA;
    FLAT_COLOR.dstBlendFactor = GL_SRC_COLOR;
    FLAT_COLOR.color = Color.white;
    FLAT_COLOR.clearColor = new float[] {0.0f, 0.0f, 0.0f, 1.0f};

    // SQUARE THEME
    SQUARE_THEME.srcBlendFactor = GL_SRC_ALPHA;
    SQUARE_THEME.dstBlendFactor = GL_ONE;
    SQUARE_THEME.color = Color.white;
    SQUARE_THEME.clearColor = new float[] {0.0f, 0.0f, 0.0f, 1.0f};

    float fColorOffset = 0.2f;
    clearList.add(new float[] {0.0f, 0.0f, 0.0f, 1.0f}); // BLACK
    clearList.add(new float[] {fColorOffset, fColorOffset, fColorOffset, 1.0f}); // WHITE
    clearList.add(new float[] {fColorOffset, 0.0f, 0.0f, 1.0f}); // RED
    clearList.add(new float[] {fColorOffset, fColorOffset, 0.0f, 1.0f}); // YELLOW
    clearList.add(new float[] {0.0f, fColorOffset, 0.0f, 1.0f}); // GREEN
    clearList.add(new float[] {0.0f, 0.0f, fColorOffset, 1.0f}); // BLUE

    themeList.add(GLOW_THEME);
    themeList.add(SQUARE_THEME);

    // pulling out the flat color theme as only radiosity and square themes will be used
    // themeList.add(FLAT_COLOR);
  }