content: /*
   * Copyright 2014 Google Inc. All rights reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package io.agora.kit.media.gles;
  
  import io.agora.kit.media.gles.core.Drawable2d;
  
  /**
   * Base class for stuff we like to draw.
   */
  public class Drawable2dFull extends Drawable2d {
  
      /**
       * A "full" square, extending from -1 to +1 in both dimensions.  When the model/view/projection
       * matrix is identity, this will exactly cover the viewport.
       * <p>
       * The texture coordinates are Y-inverted relative to RECTANGLE.  (This seems to work out
       * right with external textures from SurfaceTexture.)
       */
      private static final float FULL_RECTANGLE_COORDS[] = {
              -1.0f, -1.0f,   // 0 bottom left
              1.0f, -1.0f,   // 1 bottom right
              -1.0f, 1.0f,   // 2 top left
              1.0f, 1.0f,   // 3 top right
      };
      private static final float FULL_RECTANGLE_TEX_COORDS[] = {
              0.0f, 0.0f,     // 0 bottom left
              1.0f, 0.0f,     // 1 bottom right
              0.0f, 1.0f,     // 2 top left
              1.0f, 1.0f      // 3 top right
      };
  
      public Drawable2dFull() {
          super(FULL_RECTANGLE_COORDS, FULL_RECTANGLE_TEX_COORDS);
      }
  }
  