コード例 #1
0
ファイル: Material.java プロジェクト: richardba/Rajawali
  /**
   * Sets the OpenGL texture handles for a newly added texture.
   *
   * @param texture
   */
  private void setTextureParameters(ATexture texture) {
    if (texture.getUniformHandle() > -1) return;

    int textureHandle = GLES20.glGetUniformLocation(mProgramHandle, texture.getTextureName());
    if (textureHandle == -1) {
      RajLog.d(
          "Could not get attrib location for "
              + texture.getTextureName()
              + ", "
              + texture.getTextureType());
    }
    texture.setUniformHandle(textureHandle);
  }
コード例 #2
0
ファイル: ATexture.java プロジェクト: salmankhalid/Rajawali
 /**
  * Copies every property from another ATexture object
  *
  * @param other another ATexture object to copy from
  */
 public void setFrom(ATexture other) {
   mTextureId = other.getTextureId();
   mUniformHandle = other.getUniformHandle();
   mWidth = other.getWidth();
   mHeight = other.getHeight();
   mBitmapFormat = other.getBitmapFormat();
   mMipmap = other.isMipmap();
   mShouldRecycle = other.willRecycle();
   mTextureName = other.getTextureName();
   mTextureType = other.getTextureType();
   mWrapType = other.getWrapType();
   mFilterType = other.getFilterType();
   mBitmapConfig = other.getBitmapConfig();
   mCompressedTexture = other.getCompressedTexture();
   mGLTextureType = other.getGLTextureType();
 }