save code
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.khronos.vulkan_samples;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Debug;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.google.androidgamesdk.GameActivity;
|
||||
|
||||
public class MainActivity extends GameActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
try {
|
||||
String native_lib_name = getResources().getString(R.string.native_lib_name);
|
||||
System.loadLibrary(native_lib_name);
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
Toast.makeText(getApplicationContext(), "Native code library failed to load.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
String[] argArray = new String[2];
|
||||
argArray[0] = "sample";
|
||||
argArray[1] = "hello_triangle";
|
||||
sendArgumentsToPlatform(argArray);
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.i("MainActivity", "onCreate: ");
|
||||
}
|
||||
private native void sendArgumentsToPlatform(String[] args);
|
||||
}
|
||||
Reference in New Issue
Block a user