Hello folks,
for weeks now, I am trying to merge the Oculus mobile SDK into AppGameKit Tier2, but with no success for now.
My idea is to use the OculusSDK rendering + Headtracking inside of AppGameKit programs.
I managed to simplify the folder structures inside the AppGameKit T2 project and inside the Oculus SDK project as much as I can.
Now my folder levels of (jni, java assets) are identical in both projects.
I managed to update AppGameKit from GLESv2 to GLESv3 and set the Android API level to 19, everything works fine by now.
But I have no idea where to start the merging.
I tried to build up another main activity, but I think this is not right at all:
(based on the OculusSDK example)
/************************************************************************************
Filename : MainActivity.java
Content :
Created :
Authors :
Copyright : None.
*************************************************************************************/
package com.thegamecreators.agk_player;
import android.content.Context;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.util.Log;
import android.content.Intent;
import com.oculus.vrappframework.VrActivity;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.CharBuffer;
import java.util.logging.Logger;
public class MainActivity extends VrActivity {
public static final String TAG = "GearVR";
/** Load jni .so on initialization */
static {
Log.d( TAG, "LoadLibrary" );
System.loadLibrary( "fmodL" );
System.loadLibrary( "gearvrnative" );
}
public static native long nativeSetAppInterface( VrActivity act, String fromPackageNameString, String commandString, String uriString );
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.d(TAG, "onCreate");
super.onCreate(savedInstanceState);
org.fmod.FMOD.init(this);
Intent intent = getIntent();
String commandString = VrActivity.getCommandStringFromIntent( intent );
String fromPackageNameString = VrActivity.getPackageStringFromIntent( intent );
String uriString = VrActivity.getUriStringFromIntent( intent );
setAppPtr( nativeSetAppInterface( this, fromPackageNameString, commandString, uriString ) );
}
}
I've attached the GLESv3 OculusSDK example.
https://en.file-upload.net/download-12296012/GearVRNative_optimal.rar.html
A quick and dirty java method could be found here:
https://github.com/judax/OculusMobileSDKHeadTracking
Do we acutally have some professionals for T2?