Package org.lwjgl.util

Examples of org.lwjgl.util.ReadableColor


    return sb.toString();
  }

  private static void initColorMap(IntBuffer colorMap, int stepSize, ReadableColor... colors) {
    for ( int n = 0; n < colors.length - 1; n++ ) {
      ReadableColor color = colors[n];
      int r0 = color.getRed();
      int g0 = color.getGreen();
      int b0 = color.getBlue();

      color = colors[n + 1];
      int r1 = color.getRed();
      int g1 = color.getGreen();
      int b1 = color.getBlue();

      int deltaR = r1 - r0;
      int deltaG = g1 - g0;
      int deltaB = b1 - b0;
View Full Code Here


  private void createCheckerTexture(final ReadableColor a, final ReadableColor b, final int size) {
    int i = 0;
    for ( int y = 0; y < HEIGHT; y++ ) {
      for ( int x = 0; x < WIDTH; x++ ) {
        ReadableColor c = (x / size) % 2 == 0 ? ((y / size) % 2 == 0 ? a : b) : ((y / size) % 2 == 0 ? b : a);
        texture.put(i + 0, c.getRedByte());
        texture.put(i + 1, c.getGreenByte());
        texture.put(i + 2, c.getBlueByte());
        i += 3;
      }
    }
  }
View Full Code Here

    return sb.toString();
  }

  private static void initColorMap(IntBuffer colorMap, int stepSize, ReadableColor... colors) {
    for ( int n = 0; n < colors.length - 1; n++ ) {
      ReadableColor color = colors[n];
      int r0 = color.getRed();
      int g0 = color.getGreen();
      int b0 = color.getBlue();

      color = colors[n + 1];
      int r1 = color.getRed();
      int g1 = color.getGreen();
      int b1 = color.getBlue();

      int deltaR = r1 - r0;
      int deltaG = g1 - g0;
      int deltaB = b1 - b0;
View Full Code Here

TOP

Related Classes of org.lwjgl.util.ReadableColor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.