最近 在做全景 这一块 从google上找了点资料 地址
http://code.google.com/p/panoramagl/downloads/detail?name=HelloPanorama_0.1_Beta_2.zip
现在 就是想在Activity里面写个 按钮单击事件 调用这个程序 该怎样写??菜鸟 求助
先谢谢 各位了
http://code.google.com/p/panoramagl/downloads/detail?name=HelloPanorama_0.1_Beta_2.zip
现在 就是想在Activity里面写个 按钮单击事件 调用这个程序 该怎样写??菜鸟 求助
先谢谢 各位了
解决方案 »
- android xml布局超出一个界面
- kernel 编译问题
- http请求,使用GZIP,但是不成功,急求各位~~!!
- eclipse调试出现Source not found
- 求 关于Google map 无法显示的错误 (Couldn't get connection factory client)
- 谁用过OpenGL中的glOrthof()或GLU.gluOrtho2D()画过图形啊????真心求教
- 通过action启动server问题
- 请问如何限制某些程序的安装?
- 求Android 4高级编程(第3版) 完整非扫描版
- 打开eclipse layout-1920x1080目录下的所有xml都打不开,报下面的错误。 eclipse版本4.2.0
- eclipse的android插件里面的logcat不能复制内容
- 使用support lib中的FragmentActivity的问题
import com.android.panoramagl.PLView;
import com.android.panoramagl.enumeration.PLViewType;
import com.android.panoramagl.structs.PLRange;import android.util.Log;public class HelloPanorama extends PLView
{
@Override
public void onGLContextCreated(GL10 g1)
{
super.onGLContextCreated(g1);
try
{
//设置定位图像(false)
this.setDeviceOrientationEnabled(false);
//You can use accelerometer你可以用加速计
this.setAccelerometerEnabled(false);
this.setAccelerometerLeftRightEnabled(true);
this.setAccelerometerUpDownEnabled(false);
//Scrolling and Inertia滚动和惯性
this.setScrollingEnabled(true);
this.setInertiaEnabled(true);
//setFovRange determines Zoom range. Range values from -1.0f to 1.0f设置缩放范围
this.getCamera().setFovRange(PLRange.PLRangeMake(0.0f, 1.0f));
//Example with Sphere type (you need one image)球面型为例,你需要一张图片
this.setType(PLViewType.PLViewTypeSpherical);//设置风格球形景观类型
// this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.pano)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.aa)));
/*
//Example with Cube Faces type (you need an image for each cube face)
this.setType(PLViewType.PLViewTypeCubeFaces);
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.front)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.back)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.left)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.right)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.top)));
this.addTextureAndRelease(PLTexture.textureWithImage(this.getImageWithResouce(R.drawable.bottom)));
*/
}
catch(Throwable ex)
{
Log.e("HelloPanorama::onGLContextCreated", "Error:" + ex.getMessage());
}
}
}
01-01 14:00:18.350: D/libEGL(4897): loaded /system/lib/egl/libGLES_android.so
01-01 14:00:18.350: D/libEGL(4897): loaded /system/lib/egl/libEGL_imx51.so
01-01 14:00:18.350: D/libEGL(4897): loaded /system/lib/egl/libGLESv1_CM_imx51.so
01-01 14:00:18.350: D/libEGL(4897): loaded /system/lib/egl/libGLESv2_imx51.so
01-01 14:00:18.370: E/imx5x.gralloc(4897): handle 0x1f6b78 not locked
01-01 14:00:18.380: E/imx5x.gralloc(4897): handle 0x1f6b78 not locked
01-01 14:00:18.410: D/dalvikvm(4897): GC_EXTERNAL_ALLOC freed 56K, 49% free 2769K/5379K, external 716K/1038K, paused 29ms
01-01 14:00:18.940: D/dalvikvm(4897): GC_EXTERNAL_ALLOC freed 1K, 49% free 2772K/5379K, external 18294K/20342K, paused 29ms
01-01 14:00:19.190: E/HelloPanorama::onGLContextCreated(4897): Error:Invalid texture size. Texture max size is 1024 x 1024
01-01 14:00:19.190: D/dalvikvm(4897): Trying to load lib /data/data/panoramagl.examples/lib/libglues.so 0x2afbe390
01-01 14:00:19.190: D/dalvikvm(4897): Added shared lib /data/data/panoramagl.examples/lib/libglues.so 0x2afbe390
01-01 14:00:19.190: D/dalvikvm(4897): No JNI_OnLoad found in /data/data/panoramagl.examples/lib/libglues.so 0x2afbe390, skipping init