MD360Player4iOS
MD360Player4iOS copied to clipboard
跟IJK集成后,MDModeProjectionPlaneFit模式显示不正常
把跟IJK集成的Demo下载下来后,将屏幕改成竖屏,projectionMode设置成MDModeProjectionPlaneFit,可是GLKit无法正确的展示在他的父容器上,出现超出父容器的情况,应该怎么解决,找了一天了还是不知道问题出在哪里
我的也是这种情况
在 MDGLKViewController.m 中,修改如下方法为: @ben-kenobi
- (void)viewDidLayoutSubviews{
if (self.context == nil) return;
float width = [[UIScreen mainScreen] bounds].size.width;
float height = [[UIScreen mainScreen] bounds].size.height;
[self.view setFrame:CGRectMake(0, 0, width, height)];
if ([EAGLContext setCurrentContext:self.context]) {
if([self.rendererDelegate respondsToSelector:@selector(rendererOnChanged:width:height:)]){
int width = self.view.bounds.size.width;
int height = self.view.bounds.size.height;
[self.rendererDelegate rendererOnChanged:self.context width:width height:height];
[GLUtil glCheck:@"rendererOnChanged"];
}
}
}