glkview

OpenGL ES 2.0 textures for retina display?

Deadly 提交于 2020-01-05 05:27:42
问题 I have got a GLKView, where I try to draw a couple of cubes and I create textures from a view and map them onto the cubes. However, when I start the app on a retina device, the textures are correctly sized but they look terrible. I have tried to set the contentScaleFactor of the GLKView to the scale of the main screen - to no avail. I have also tried to multiply the the buffers dimensions by the scale, which resulted in textures that looked crisp, but were only 1/4 of the original size...

glkview drawinrect delegate method called only once

≯℡__Kan透↙ 提交于 2020-01-03 15:33:43
问题 I am trying to add GLKViewController to my UserInterfaceViewController.I am using the example project from raywenderlich tutorials(http://www.raywenderlich.com/5235/beginning-opengl-es-2-0-with-glkit-part-2) Here is my code snippet #import <UIKit/UIKit.h> @interface UserInterfaceViewController : UIViewController @end @implementation UserInterfaceViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle

CIImage display MTKView vs GLKView performance

喜你入骨 提交于 2019-11-27 07:03:41
问题 I have a series of UIImages (made from incoming jpeg Data from server) that I wish to render using MTKView. Problem is it is too slow compared to GLKView. There is lot of buffering and delay when I have a series of images to display in MTKView but no delay in GLKView. Here is MTKView display code: private lazy var context: CIContext = { return CIContext(mtlDevice: self.device!, options: [CIContextOption.workingColorSpace : NSNull()]) }() var ciImg: CIImage? { didSet { syncQueue.sync {