21 package com.arm.malideveloper.openglessdk.occlusionQueries;
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 =
"OcclusionQueries";
41 protected void onCreate(Bundle savedInstanceState)
43 super.onCreate(savedInstanceState);
58 setContentView(graphicsView);
63 graphicsView.onPause();
68 graphicsView.onResume();
81 Log.d(
LOGTAG,assetName +
" already exists. No extraction needed.\n");
85 Log.d(
LOGTAG, assetName +
" doesn't exist. Extraction needed. \n");
90 RandomAccessFile out =
new RandomAccessFile(
assetDirectory + assetName,
"rw");
91 AssetManager am = applicationContext.getResources().getAssets();
94 InputStream inputStream = am.open(assetName);
95 byte
buffer[] =
new byte[1024];
101 count = inputStream.read(
buffer, 0, 1024);
111 if(fileTest.exists())
113 Log.d(
LOGTAG,
"File extracted successfully");
static android.content.Context applicationContext
void extractAsset(String assetName)
void onCreate(Bundle savedInstanceState)
GLenum GLenum GLsizei count
static String assetDirectory
TutorialView graphicsView