21 package com.arm.malideveloper.openglessdk.normalmapping;
24 import java.io.InputStream;
25 import java.io.RandomAccessFile;
27 import android.os.Bundle;
28 import android.app.Activity;
29 import android.content.res.AssetManager;
30 import android.util.Log;
35 private static String
LOGTAG =
"NormalMapping";
42 protected void onCreate(Bundle savedInstanceState)
44 super.onCreate(savedInstanceState);
54 setContentView(graphicsView);
59 graphicsView.onPause();
64 graphicsView.onResume();
73 Log.d(
LOGTAG,assetName +
" already exists no extraction needed\n");
77 Log.d(
LOGTAG, assetName +
" doesn't exist extraction needed \n");
82 RandomAccessFile out =
new RandomAccessFile(
assetDirectory + assetName,
"rw");
83 AssetManager am = applicationContext.getResources().getAssets();
86 InputStream inputStream = am.open(assetName);
87 byte
buffer[] =
new byte[1024];
93 count = inputStream.read(
buffer, 0, 1024);
102 if(fileTest.exists())
104 Log.d(
LOGTAG,
"File Extracted successfully");
static String assetDirectory
static android.content.Context applicationContext
TutorialView graphicsView
GLenum GLenum GLsizei count
void onCreate(Bundle savedInstanceState)
void extractAsset(String assetName)