teapots/image-decoder/src/main/java/com/sample/helper/NDKHelper.java [159:206]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object loadCubemapTexture(String path, int face, int miplevel, boolean sRGB) {
        Bitmap bitmap = null;
        TextureInformation info = new TextureInformation();
        try {
            String str = path;
            if (!path.startsWith("/")) {
                str = "/" + path;
            }

            File file = new File(activity.getExternalFilesDir(null), str);
            if (file.canRead()) {
                bitmap = BitmapFactory.decodeStream(new FileInputStream(file));
            } else {
                bitmap = BitmapFactory.decodeStream(activity.getResources()
                        .getAssets().open(path));
            }
        } catch (Exception e) {
            Log.w("NDKHelper", "Coundn't load a file:" + path);
            info.ret = false;
            return info;
        }

        if (bitmap != null) {
            if (sRGB)
            {
//        		GLUtils.texImage2D(face, miplevel, bitmap, 0);
//        		GLUtils.texImage2D(face, miplevel,
//        				GLUtils.getInternalFormat(bitmap), bitmap, 0);
//        		int i = GLUtils.getInternalFormat(bitmap);
//        		if( i == GL10.GL_RGBA)
//        		{
//            		GLUtils.texImage2D(face, miplevel,
//            				GLES30.GL_SRGB, bitmap, 0);
//        		}
                //Leave them for now
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
            }
            else
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
        }
        info.ret = true;
        info.alphaChannel = bitmap.hasAlpha();
        info.originalWidth = getBitmapWidth(bitmap);
        info.originalHeight = getBitmapHeight(bitmap);

        return info;

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



teapots/choreographer-30fps/src/main/java/com/sample/helper/NDKHelper.java [159:206]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object loadCubemapTexture(String path, int face, int miplevel, boolean sRGB) {
        Bitmap bitmap = null;
        TextureInformation info = new TextureInformation();
        try {
            String str = path;
            if (!path.startsWith("/")) {
                str = "/" + path;
            }

            File file = new File(activity.getExternalFilesDir(null), str);
            if (file.canRead()) {
                bitmap = BitmapFactory.decodeStream(new FileInputStream(file));
            } else {
                bitmap = BitmapFactory.decodeStream(activity.getResources()
                        .getAssets().open(path));
            }
        } catch (Exception e) {
            Log.w("NDKHelper", "Coundn't load a file:" + path);
            info.ret = false;
            return info;
        }

        if (bitmap != null) {
            if (sRGB)
            {
//        		GLUtils.texImage2D(face, miplevel, bitmap, 0);
//        		GLUtils.texImage2D(face, miplevel,
//        				GLUtils.getInternalFormat(bitmap), bitmap, 0);
//        		int i = GLUtils.getInternalFormat(bitmap);
//        		if( i == GL10.GL_RGBA)
//        		{
//            		GLUtils.texImage2D(face, miplevel,
//            				GLES30.GL_SRGB, bitmap, 0);
//        		}
                //Leave them for now
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
            }
            else
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
        }
        info.ret = true;
        info.alphaChannel = bitmap.hasAlpha();
        info.originalWidth = getBitmapWidth(bitmap);
        info.originalHeight = getBitmapHeight(bitmap);

        return info;

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



teapots/classic-teapot/src/main/java/com/sample/helper/NDKHelper.java [159:206]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object loadCubemapTexture(String path, int face, int miplevel, boolean sRGB) {
        Bitmap bitmap = null;
        TextureInformation info = new TextureInformation();
        try {
            String str = path;
            if (!path.startsWith("/")) {
                str = "/" + path;
            }

            File file = new File(activity.getExternalFilesDir(null), str);
            if (file.canRead()) {
                bitmap = BitmapFactory.decodeStream(new FileInputStream(file));
            } else {
                bitmap = BitmapFactory.decodeStream(activity.getResources()
                        .getAssets().open(path));
            }
        } catch (Exception e) {
            Log.w("NDKHelper", "Coundn't load a file:" + path);
            info.ret = false;
            return info;
        }

        if (bitmap != null) {
            if (sRGB)
            {
//        		GLUtils.texImage2D(face, miplevel, bitmap, 0);
//        		GLUtils.texImage2D(face, miplevel,
//        				GLUtils.getInternalFormat(bitmap), bitmap, 0);
//        		int i = GLUtils.getInternalFormat(bitmap);
//        		if( i == GL10.GL_RGBA)
//        		{
//            		GLUtils.texImage2D(face, miplevel,
//            				GLES30.GL_SRGB, bitmap, 0);
//        		}
                //Leave them for now
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
            }
            else
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
        }
        info.ret = true;
        info.alphaChannel = bitmap.hasAlpha();
        info.originalWidth = getBitmapWidth(bitmap);
        info.originalHeight = getBitmapHeight(bitmap);

        return info;

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



teapots/more-teapots/src/main/java/com/sample/helper/NDKHelper.java [159:206]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object loadCubemapTexture(String path, int face, int miplevel, boolean sRGB) {
        Bitmap bitmap = null;
        TextureInformation info = new TextureInformation();
        try {
            String str = path;
            if (!path.startsWith("/")) {
                str = "/" + path;
            }

            File file = new File(activity.getExternalFilesDir(null), str);
            if (file.canRead()) {
                bitmap = BitmapFactory.decodeStream(new FileInputStream(file));
            } else {
                bitmap = BitmapFactory.decodeStream(activity.getResources()
                        .getAssets().open(path));
            }
        } catch (Exception e) {
            Log.w("NDKHelper", "Coundn't load a file:" + path);
            info.ret = false;
            return info;
        }

        if (bitmap != null) {
            if (sRGB)
            {
//        		GLUtils.texImage2D(face, miplevel, bitmap, 0);
//        		GLUtils.texImage2D(face, miplevel,
//        				GLUtils.getInternalFormat(bitmap), bitmap, 0);
//        		int i = GLUtils.getInternalFormat(bitmap);
//        		if( i == GL10.GL_RGBA)
//        		{
//            		GLUtils.texImage2D(face, miplevel,
//            				GLES30.GL_SRGB, bitmap, 0);
//        		}
                //Leave them for now
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
            }
            else
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
        }
        info.ret = true;
        info.alphaChannel = bitmap.hasAlpha();
        info.originalWidth = getBitmapWidth(bitmap);
        info.originalHeight = getBitmapHeight(bitmap);

        return info;

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



teapots/textured-teapot/src/main/java/com/sample/helper/NDKHelper.java [159:206]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object loadCubemapTexture(String path, int face, int miplevel, boolean sRGB) {
        Bitmap bitmap = null;
        TextureInformation info = new TextureInformation();
        try {
            String str = path;
            if (!path.startsWith("/")) {
                str = "/" + path;
            }

            File file = new File(activity.getExternalFilesDir(null), str);
            if (file.canRead()) {
                bitmap = BitmapFactory.decodeStream(new FileInputStream(file));
            } else {
                bitmap = BitmapFactory.decodeStream(activity.getResources()
                        .getAssets().open(path));
            }
        } catch (Exception e) {
            Log.w("NDKHelper", "Coundn't load a file:" + path);
            info.ret = false;
            return info;
        }

        if (bitmap != null) {
            if (sRGB)
            {
//        		GLUtils.texImage2D(face, miplevel, bitmap, 0);
//        		GLUtils.texImage2D(face, miplevel,
//        				GLUtils.getInternalFormat(bitmap), bitmap, 0);
//        		int i = GLUtils.getInternalFormat(bitmap);
//        		if( i == GL10.GL_RGBA)
//        		{
//            		GLUtils.texImage2D(face, miplevel,
//            				GLES30.GL_SRGB, bitmap, 0);
//        		}
                //Leave them for now
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
            }
            else
                GLUtils.texImage2D(face, miplevel, bitmap, 0);
        }
        info.ret = true;
        info.alphaChannel = bitmap.hasAlpha();
        info.originalWidth = getBitmapWidth(bitmap);
        info.originalHeight = getBitmapHeight(bitmap);

        return info;

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



