android opengles g11,iphone - 在顶部显示摄像机作为背景与OpenGLES模型

嗨我有困难设置Iphone的4摄像机的背景和绘制简单的立方体顶部的openglES。达到这个目标的最佳方法是什么?我的项目结构很简单,我在委托中有一个opengl类,它完美地绘制了立方体,而控制器没有太多的工作。iphone - 在顶部显示摄像机作为背景与OpenGLES模型

所以aparently相机控制器是下面的代码哪些气体设置在opengl视图类,但它不工作。

UIImagePickerController* imagePicker = [[UIImagePickerController alloc] init];

imagePicker.delegate = self;

imagePicker.navigationBarHidden = YES;

imagePicker.toolbarHidden = YES;

imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;

imagePicker.showsCameraControls = NO;

imagePicker.cameraOverlayView = self;

// The 54 pixel wide empty spot is filled-in by scaling the image.

// The camera view's height gets stretched from 426 pixels to 480 pixels.

float bandWidth = 54;

float screenHeight = 480;

float zoomFactor = screenHeight/(screenHeight - bandWidth);

CGAffineTransform pickerTransform = CGAffineTransformMakeScale(zoomFactor, zoomFactor);

imagePicker.cameraViewTransform = pickerTransform;

m_viewController = [[UIViewController alloc] init];

m_viewController.view = self;

[m_viewController presentModalViewController:imagePicker animated:NO];

任何提示?

感谢

2011-03-20

marcg11

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值