Hi,
I've been trying to do a first attempt at a library to turn on/off the parallax barrier on an LG Optimus 3D to do 3D side by side graphics. I've a few problems and would be grateful for any advice. The questions are below and I've put my Java code below them:
1) The Real3D constructor requires a surface holder, which would normally be got from getHolder(), but that doesn't work in my code because I want to use the B4A imageview holder. Is it possible to get the surfaceholder for the imageview to pass to my library function?
2) Apparently the LG real3d.jar file is stubbed. I think Erel mentioned in a different post that a wrapper would be needed. I'm not sure how to implement that in a B4A library, so wondered if that's being achieved in my code or if I need to do something else.
3) I'm manually adding relevant uses-feature and uses-library lines to the manifest under B4A. Is it possible to get the library to do that for me?
Sorry if these seem simple questions. I've managed to do a Java app that turns on the parallax barrier, but would really like to be able to do it in B4A
Many thanks,
Andrew. :sign0085:
import android.view.SurfaceHolder;
//import android.view.SurfaceView;
@ShortName("Real3D")
@Author("GeocomputingUK")
@Version(1f)
public class real3d
{
private Real3D mReal3D;
private Real3DInfo ss_info=new Real3DInfo(true, Real3D.REAL3D_TYPE_SS, 0);
private Real3DInfo none_info=new Real3DInfo(true, Real3D.REAL3D_TYPE_NONE, 0);
public void on(SurfaceHolder sh)
{
mReal3D = new Real3D(sh);
mReal3D.setReal3DInfo(ss_info);
}
public void off(SurfaceHolder sh)
{
mReal3D = new Real3D(sh);
mReal3D.setReal3DInfo(none_info);
}
}
I've been trying to do a first attempt at a library to turn on/off the parallax barrier on an LG Optimus 3D to do 3D side by side graphics. I've a few problems and would be grateful for any advice. The questions are below and I've put my Java code below them:
1) The Real3D constructor requires a surface holder, which would normally be got from getHolder(), but that doesn't work in my code because I want to use the B4A imageview holder. Is it possible to get the surfaceholder for the imageview to pass to my library function?
2) Apparently the LG real3d.jar file is stubbed. I think Erel mentioned in a different post that a wrapper would be needed. I'm not sure how to implement that in a B4A library, so wondered if that's being achieved in my code or if I need to do something else.
3) I'm manually adding relevant uses-feature and uses-library lines to the manifest under B4A. Is it possible to get the library to do that for me?
Sorry if these seem simple questions. I've managed to do a Java app that turns on the parallax barrier, but would really like to be able to do it in B4A
Many thanks,
Andrew. :sign0085:
import android.view.SurfaceHolder;
//import android.view.SurfaceView;
@ShortName("Real3D")
@Author("GeocomputingUK")
@Version(1f)
public class real3d
{
private Real3D mReal3D;
private Real3DInfo ss_info=new Real3DInfo(true, Real3D.REAL3D_TYPE_SS, 0);
private Real3DInfo none_info=new Real3DInfo(true, Real3D.REAL3D_TYPE_NONE, 0);
public void on(SurfaceHolder sh)
{
mReal3D = new Real3D(sh);
mReal3D.setReal3DInfo(ss_info);
}
public void off(SurfaceHolder sh)
{
mReal3D = new Real3D(sh);
mReal3D.setReal3DInfo(none_info);
}
}