嗨我有困难设置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