File tree Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -386,13 +386,8 @@ -(void)bindWithClear:(GLbitfield)mask color:(GLKVector4)color4 depth:(GLclampf)d
386386
387387-(void )syncWithView : (CC_VIEW<CCDirectorView> *)view ;
388388{
389- CCGLView *glView = (CCGLView *)view;
390-
391- CGFloat contentScale = [CCDirector sharedDirector ].contentScaleFactor ;
392- self.sizeInPixels = CC_SIZE_SCALE (view.bounds .size , contentScale);
393- self.contentScale = contentScale;
394-
395- _fbo = glView.fbo ;
389+ [super syncWithView: view];
390+ _fbo = [(CCGLView *)view fbo ];
396391}
397392
398393@end
Original file line number Diff line number Diff line change @@ -445,6 +445,10 @@ -(void)bindWithClear:(GLbitfield)mask color:(GLKVector4)color4 depth:(GLclampf)d
445445{NSAssert(NO , @" Must be overridden." );}
446446
447447-(void )syncWithView : (CC_VIEW<CCDirectorView> *)view ;
448- {NSAssert(NO , @" Must be overridden." );}
448+ {
449+ CCDirector *director = [CCDirector sharedDirector ];
450+ self.sizeInPixels = director.viewSizeInPixels ;
451+ self.contentScale = director.contentScaleFactor ;
452+ }
449453
450454@end
Original file line number Diff line number Diff line change @@ -189,11 +189,8 @@ -(void)bindWithClear:(GLbitfield)mask color:(GLKVector4)color4 depth:(GLclampf)d
189189
190190-(void )syncWithView : (CC_VIEW<CCDirectorView> *)view ;
191191{
192- CCMetalView *metalView = (CCMetalView *)view;
193- self.sizeInPixels = CC_SIZE_SCALE (view.bounds .size , view.contentScaleFactor );
194- self.contentScale = view.contentScaleFactor ;
195-
196- _frameBufferTexture = metalView.destinationTexture ;
192+ [super syncWithView: view];
193+ _frameBufferTexture = [(CCMetalView *)view destinationTexture ];
197194}
198195
199196@end
You can’t perform that action at this time.
0 commit comments