MD360Player4iOS icon indicating copy to clipboard operation
MD360Player4iOS copied to clipboard

跟IJK集成后,MDModeProjectionPlaneFit模式显示不正常

Open ben-kenobi opened this issue 8 years ago • 2 comments

把跟IJK集成的Demo下载下来后,将屏幕改成竖屏,projectionMode设置成MDModeProjectionPlaneFit,可是GLKit无法正确的展示在他的父容器上,出现超出父容器的情况,应该怎么解决,找了一天了还是不知道问题出在哪里

ben-kenobi avatar Mar 13 '17 05:03 ben-kenobi

我的也是这种情况

zcb1603999 avatar Mar 16 '17 02:03 zcb1603999

在 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"];
        }
    }
}

zhuyifan2013 avatar May 08 '17 08:05 zhuyifan2013