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
386
386
387
387
-(void )syncWithView : (CC_VIEW<CCDirectorView> *)view ;
388
388
{
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 ];
396
391
}
397
392
398
393
@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
445
445
{NSAssert(NO , @" Must be overridden." );}
446
446
447
447
-(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
+ }
449
453
450
454
@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
189
189
190
190
-(void )syncWithView : (CC_VIEW<CCDirectorView> *)view ;
191
191
{
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 ];
197
194
}
198
195
199
196
@end
You can’t perform that action at this time.
0 commit comments