login about faq

Due to the large amount of spam accounts, we temporarily disabled new user sign ups. To override this, email newuser.lgqa@gmail.com and an admin will determine if you are permitted to join


Hey Lockergnome,

I am a iOS developer and I am currently using the Cocos2D engine to do all my drawing. The only problem with it is that I have no idea how OpenGLES works. Cocos2D is based on ES 1.1 which is sort-of outdated and the ES 2.0 version isn't stable yet.

I want to learn OpenGLES 2.0 myself and it's going ok. Right now I am mostly using the tutorials from www.raywenderlich.com/ and they teach me a lot!

The one thing that I just haven't gotten to work yet is the support for a retina display. Whith the iPhone 4+ and iPod Touch 3+ and now coming to the iPad it is very handy to know how to do this.

Google hasn't helped me a lot since a lot of method that are shown there don't exist for my projects for some reason (all the methods starting with gl and ending with EOS).

Do any of you know this or a place where I can find out? Please share!

This question is marked "community wiki".

asked Mar 09 '12 at 07:32

nitrocrime's gravatar image

nitrocrime
3.6k6277125


Ignorant me! I somehow thought it was just a single method call that would make my apps support Retina and it was, it just needed to be called on multiple places.

My main drawing class is a subclass of the UIView and somewhat converted into a CAEAGLLayer via the + (Class)layerClass; method. On that main view you need to set the contentScaleFactor to 2. On the eaglLayer object you also needed to set the contentScaleFactor to to.

Up to this I only got a black screen (which is why I asked the question) because my back-end buffer wasn't twice as big. Simply double the width and height values (only if retina is available!) in glRenderbufferStorage and you're done.

answered Mar 09 '12 at 08:26

nitrocrime's gravatar image

nitrocrime
3.6k6277125

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported


Join Us in the Chat Room

Tags:

×1,397
×863
×516
×39
×39
×13
×8
×4
×4

Asked: Mar 09 '12 at 07:32

Seen: 1,226 times

Last updated: Mar 09 '12 at 08:26