OpenGL iOS 2d 4 inch display -


I am trying to work 4 inch display correctly in the 2D OpenGL iOS app. It works fine with a 3.5 inch display and all iPad displays, but chops off 88 pixels down in 4-inch display. I have tried different versions of the launch images and have not launched at all. I also got the main window Xib and no.xib have tried different forms.

The example of OpenGL in Xcode 5 works well for 3D apps, but I had big problems with it 2D. The code I am using is based on the old GLSprash sample.

It appears that the frame appears only when creating buffer. The following backingHeight is always thanks to 568 when it should be back as 480 pixels

  - (bool) createFramebuffer {glGenFramebuffersOES (1, & amp; viewFramebuffer); Glenzer BoforsOoS (1, & Videorbender); GlobindFevelopbroerOS (GL_FramMeFOAOS, ViewFramebuffer); GlobindorbuffarOS (GLINRBFFOOEES, seeRenderbuffer); [Reference renderbuffer storage: GL_RENDERBUFFER_OES from DRAWWABLE: (id & lt; EAGLDrawable & gt;) self Layer]; Glofrembfrrenderbfros (Jiel_framebfrfoaoos, Jiel_collo_tataititi 0_oas, Jielaianarbiffooiis, Dekenrenderbfr); Glagorndarfer Paramitivize (GLINRBUFFOOS, GLINRBUFFIUIDF_OS, and backingwidth); Glagorndarfer Paramitivisz (GLINRBFFOOS, GLINRBFFHHEEHEEOEES, and BackingHight); If (glCheckFramebufferStatusOES (GL_FRAMEBUFFER_OES) = GL_FRAMEBUFFER_COMPLETE_OES!) {NSLog (@ "full framebuffer failed to object% x", glCheckFramebufferStatusOES (GL_FRAMEBUFFER_OES)); no return; } Yes return; }   

Thanks everyone for the feedback. I believe that I really do not know what I am doing while setting up ideas and frame buffer. The following is how the initial view has been established. It refers to something called a "nib file", which I can not find is there any place in this code where I should put visual size logic? I also said that I tried to do any .xib file, but I was wrong. I do not feel like using GLKit, but I have not found any such common example, which gives me 2d background text as I want to do.

  // The GL view is stored in the Nib file. When it is removed from the collection -initWithCoder: - (id) initWithCoder: (NSCoder *) Coder {if ({{self initWithCoder: coder)) {// layer CAEAGLLayer * EaglLayer go = (CAEAGLLayer *) self.layer; EaglLayer.opaque = Yes; EaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool: FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, zero]; Context = [[[EAGLContext alloc] initWithAPI: KAAGLLRending API Open SOSA 1]; If (! Reference ||! [EAGL CONTEX SET SETTING CONTAINS: REFERENCES] ||! [Self Built-in Framebuffer]) [[Self-release]; Return zero; } Animating = FALSE; DisplayLinkSupported = FALSE; Animationframeinternval = 1; DisplayLink = Zero; Animation timer = zero; // 3.1 or more is required to use CADisplayLink NSTimer // class is used as a fallback when it is not available. NSString * reqSysVer = @ "3.1"; NSString * currSysVer = [[UIDwise current device] SystemWarson]; If ([currSysVer comparison: reqSysVer option: NSNumericSearch]! = NSOrderedAscending) displayLinkSupported = TRUE; [Auto setup view]; [Self draw]; } Healthy return; }   

The line is responsible for this [context renderbufferStorage: from GL_RENDERBUFFER_OESDrawable: ( Id & lt; EAGLDrawable & gt;) self.layer]; . If the return value for height is always 480 then the view is likely to keep its height of 480 (try confirming).

If so, then I think how to set it to search the altitude setframe: is overriding the method and adding breakpoint.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -