Login Action Required

The NinevehGL Forum uses a new concept of "socialized forum" or as we like to say "Tweet Forum".


Here is the deal:
  1. No new registration is required. Just sign in with your Twitter account and authorize the NinevehGL Forum.
  2. Once you’re in, you'll be able to "Follow a Thread", that means every time that thread receive a new post or update you'll receive a mention on your twitter.
  3. Besides, you can enable "Auto Share", then every new post and/or thread you make will be tweeted on your timeline. (By default, auto-share is enabled only for your threads)

Forum Rules:

1. We understand human comunication can become "hot" sometimes. So some insults and bad words ARE allowed. Just don't push too much being an asshole all the time.

2. SPAMMERS are not allowed. There are penalties for this kind of user and they can be banned forever.

3. You can report other users, if you judge necessary. An user reported many times by many people can also be banned forever. However you can also receive penalties for report deliberately for no apparent reason.

If there is a similar thread title, make sure the other one doesn't already have the answer you're looking for.

This forum uses the BBCode (Bulletin Board Code), here are some instructions:

Bold: [b]text[/b]
Italic: [i]text[/i]
Underline: [u]text[/u]

Code: [code]text[/code]
Quote:
[quote=@username]text[/quote]
[quote]text[/quote]

List:
[ul] [*]item [/ul]
[ol] [*]item [/ol]

URL:
[url]http://url.com[/url]
[url=http://url.com]text[/url]

Image:
[img]http://imageurl.com[/img]

Embed (videos, code, 3D):
[embed]http://url.com[/embed]

Welcome to the NinevehGL's world!
NinevehGL is a 3D engine forged with pure Obj-C.
Welcome to the
Forum!
Hello, Guest.

Your current vote:

You can change your vote many times. But it's still one single vote.

iPhone 5 aspect ratio
Vote this thread:


@PawelDev

Posts: 4

NGLNewbie

Sun, Jan 13 2013


Hello,

I'm new to NinevehGL and getting some basic problems
I want to have my app ready for iPhone 5 and here I have some problems:
- I got retina resolution by simply using:
self.view.contentScaleFactor = 3.0f;

and it is working fine
- Now I want to get my app without black bars on top and bottom. How I do it? I'm using Nineveh template project and I'm unable to get what-I-want.
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Mon, Jan 14 2013


In response to: @PawelDev

Hi,

Please, never do that like that!

The "contentScaleFactor" in retina displays is 2.0 and it never should be bigger than that! Never! In fact, as you're using 3D render, which is already expensive, you should establish that the maxium value for you is 1.5.

Take a look at what apple says:
http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html

Now, about the NinevehGL template, remember that it's made to iOS 5, so it stills using the old auto rotation routine. To have your content on running well on iOS 6 you must change all the auto rotation routine.

Besides, if your app have the black bars it's because you don't have the file "Default-568h@2x.png". iOS automatically put the black bars when your project doesn't include this file.
100% like this - 1/1

@PawelDev

Posts: 4

NGLNewbie

Mon, Jan 14 2013


In response to: @dineybomfim

About contentScaleFactor: I read somewhere that it should be 4 for new Retina display... Because the performace was bad I changed it to 3. Thank you, for that

About the second thing: Really, it is working. I was thinking that there is an property that I must change... Thank you. On iOS there are many things that I don't understand...
0% like this - 0/0

@dineybomfim

Posts: 571

NGLAdmin

Tue, Jan 22 2013


In response to: @PawelDev

Dude... you read wrong or in a non reliable source... content scale is 2 on retina displays... the point about 4 is that each single pixel become 4 in retina displays. Don't mix these two concepts, please. The scale fact is 2, because the area size is multiplied by 2.

And as the Apple it self says, any number between 1.0 and 2.0 is a good number for retina displays. Here is quote from apple docs:
The scale factor determines how content in the view is mapped from the logical coordinate space (measured in points) to the device coordinate space (measured in pixels). This value is typically either 1.0 or 2.0. Higher scale factors indicate that each point in the view is represented by more than one pixel in the underlying layer. For example, if the scale factor is 2.0 and the view frame size is 50 x 50 points, the size of the bitmap used to present that content is 100 x 100 pixels.

For views that implement a custom drawRect: method and are associated with a window, the default value for this property is the scale factor associated with the screen currently displaying the view. For system views and views that are backed by a CAEAGLLayer object for, the value of this property may be 1.0 even on high resolution screens.


As performance is a crucial factor to 3D stuff, this value should never reach even 2.0. Here is another quote from Apple docs:
Use a fractional scale factor between 1.0 and 2.0. A scale factor of 1.5 provides better quality than a scale factor of 1.0 but needs to fill fewer pixels than an image scaled to 2.0.
(http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/SupportingHiResScreensInViews/SupportingHiResScreensInViews.html#//apple_ref/doc/uid/TP40010156-CH15)


Hope it helps
100% like this - 1/1
Technology

NinevehGL is a 3D engine built right on top of OpenGL ES and it uses all the programmable pipeline power, making it easy for you to create great application with shaders.

Share on


Follow NinevehGL
Fastest way to contact us:

Copyright © 2011 db-in. All rights reserved.