21 package com.arm.malideveloper.openglessdk.foveatedrendering;
23 import android.content.res.AssetManager;
24 import android.os.Bundle;
25 import android.os.Environment;
26 import android.app.Activity;
27 import android.util.Log;
30 import java.io.InputStream;
31 import java.io.RandomAccessFile;
35 private static String
LOGTAG =
"FoveatedRendering";
41 protected void onCreate(Bundle savedInstanceState)
43 super.onCreate(savedInstanceState);
44 Log.i(
LOGTAG,
"Creating New Tutorial View");
72 graphicsView.onPause();
78 graphicsView.onResume();
87 Log.d(
LOGTAG,assetName +
" already exists. No extraction needed.\n");
91 Log.d(
LOGTAG, assetName +
" doesn't exist. Extraction needed. \n");
96 RandomAccessFile out =
new RandomAccessFile(
assetDirectory + assetName,
"rw");
97 AssetManager am = applicationContext.getResources().getAssets();
100 InputStream inputStream = am.open(assetName);
101 byte
buffer[] =
new byte[1024];
107 count = inputStream.read(
buffer, 0, 1024);
117 if(fileTest.exists())
119 Log.d(
LOGTAG,
"File extracted successfully");
static String assetDirectory
TutorialView graphicsView
void onCreate(Bundle savedInstanceState)
GLenum GLenum GLsizei count
static android.content.Context applicationContext
void extractAsset(String assetName)