[iPhone] Why framebuffer is used in OpenGL ES examples ??

Hi.
I'm quite new to the OpenGL ES on iPhone.
In the OpenGL ES sample codes, the rendering seems to be performed like this:
[EAGLContext setCurrentContext:context];
glBindFramebufferOES(GLFRAMEBUFFEROES, viewFramebuffer);
... Draw something...
glBindRenderbufferOES(GLRENDERBUFFEROES, viewRenderbuffer);
[context presentRenderbuffer:GLRENDERBUFFEROES];
When I removed the framebuffer part, the application shows nothing.
Is there any reason to do rendering through a framebuffer ?
Or, is this how OpenGL ES scene is rendered on a view ?

I am no sure I understand your problem, especially because glTexImage2D is available. Such are glMultiTexCoord and glActiveTexture. Were you talking about glDrawPixels (which is not)?
You could also grab data with glReadPixels and after a few computations send them back as a new texture.
Not sure I can help, but it will at least be a 'up'.

Similar Messages

  • How to use getAncestor(n),getdescendant(child,child) in sql why they are use please give me example

    how to use getAncestor(n),getdescendant(child,child) in sql why they are use please give me example
    jitendra

    Below are a few examples that demonstrate these hierarchyid data type methods.  See the hierarchyid reference in the SQL Server Books Online for more examples of these and other methods (http://technet.microsoft.com/en-us/library/bb677193.aspx).
    --return a child of this node ('/1/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(NULL, NULL).ToString();
    --returns a child of this node greater than child node '/1/' ('/2/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(CAST('/1/' AS hierarchyid), NULL).ToString();
    --returns a child of this node less than chold node '/1/' ('/0/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(NULL, CAST('/1/' AS hierarchyid)).ToString();
    --returns a child of this node greater than child node '/1/' and less than child node '/2/' ('/1.1/')
    SELECT CAST('/' AS hierarchyid).GetDescendant(CAST('/1/' AS hierarchyid), CAST('/2/' AS hierarchyid)).ToString();
    --return ancestor of node 1 level up from this node ('/1/2/')
    SELECT CAST('/1/2/3/' AS hierarchyid).GetAncestor(1).ToString();
    --return ancestor of node 2 levels up from this node ('/1/')
    SELECT CAST('/1/2/3/' AS hierarchyid).GetAncestor(2).ToString();
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Why not to use static methods - with example

    Hi Everyone,
    I'd like to continue the below thread about "why not to use static methods"
    Why not to use static methods
    with a concrete example.
    In my small application I need to be able to send keystrokes. (java.awt.Robot class is used for this)
    I created the following class for these "operations" with static methods:
    public class KeyboardInput {
         private static Robot r;
         static {
              try {
                   r = new Robot();
              } catch (AWTException e) {
                   throw new RuntimeException(e + "Robot couldn't be initialized.");
         public static void wait(int millis){
              r.delay(millis);
         public static void copy() {
              r.keyPress(KeyEvent.VK_CONTROL);
              r.keyPress(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_CONTROL);
         public static void altTab() {
              r.keyPress(KeyEvent.VK_ALT);
              r.keyPress(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_ALT);
                   // more methods like  paste(), tab(), shiftTab(), rightArrow()
    }Do you thinks it is a good solution? How could it be improved? I've seen something about Singleton vs. static methods somewhere. Would it be better to use Singleton?
    Thanks for any comments in advance,
    lemonboston

    maheshguruswamy wrote:
    lemonboston wrote:
    maheshguruswamy wrote:
    I think a singleton might be a better approach for you. Just kill the public constructor and provide a getInstance method to provide lazy initialization.Thanks maheshguruswamy for advising on the steps to create a singleton from this class.
    Could you maybe advise also about why do you say that it would be better to use singleton? What's behind it? Thanks!In short, it seems to me that a single instance of your class will be able to coordinate actions across your entire application. So a singleton should be enough.But that doesn't answer why he should prefer a singleton instead over a bunch of static methods. Functionally the two are almost identical. In both cases there's only one "thing" on which to call methods--either a single instance of the class, or the class itself.
    To answer the question, the main reason to use a Singleton over a classful of static methods is the same reason the drives a lot of non-static vs. static decisions: Polymorphism.
    If you use a Singleton (and and interface), you can do something like this:
    KeyboardInput kbi = get_some_instance_of_some_class_that_implements_KeyboardInput_somehow_maybe_from_a_factory();And then whatever is calling KBI's public methods only has to know that it has an implementor of that interface, without caring which concrete class it is, and you can substitute whatever implementation is appropriate in a given context. If you don't need to do that, then the static method approach is probably sufficient.
    There are other reasons that may suggest a Singleton--serialization, persistence, use as a JavaBean pop to mind--but they're less common and less compelling in my experience.
    And finally, if this thing maintains any state between method calls, although you can handle that with static member variables, it's more in keeping with the OO paradigm to make them non-static fields of an instance of that class.

  • Why is my library no longer accessable on my iphone g3?  It used to be there.

    Why is my library no longer accessable on my iphone g3?  It used to be there.  Now I've got a partially list of audiobooks, (why aren't all of them there?) and NONE of the music or videos that are in my itunes folder on my computer.  What happened and how do I reload?  Regular syncing does nothing, nor can I drag files to the phone from the computer.  Thank you!

    Called in and discovered I needed to adjust sync settings after loading Mavericks last year.  (Rarely use my phone for music, hence not noticing til now.)  Did that on my laptop in the iTunes library using the iphone button that shows when it's connected to the phone.  Works perfectly now.  Thanks so much for your suggestion! 

  • My free apps purchased using my cousin's apple id won't open anymore on my iphone but apps donwloaded using my own apple id still works. Why is it like that and how can I make apps purchased using my cousin's apple id work on my iphone? Help!

    My free apps purchased using my cousin's apple id won't open anymore on my iphone but apps donwloaded using my own apple id still works. Why is it like that and how can I make apps purchased using my cousin's apple id work on my iphone? Help!

    Welcome to the Apple Community.
    Delete the apps purchased by your cousin and purchase your own.

  • Why i cant use facebook on my iphone 3gs

    why i cant use facebook on my iphone 3gs?

    If you want to use the Facebook app and you don't have an older version saved in your iTunes library, then you won't be able to download it on that device.  Either use Safari to access Facebook or get a device that can run iOS 7 and install Facebook.

  • Why when I use personal hotspot at my iPad mini retina for my iPhone it doesn't stay for long,it disconnect after 5minute

    Please...
    Why when I use personal hotspot at my iPad mini retina for my iPhone it doesn't stay for long,it disconnect after 5minute

    Assuming you are using OSX, connect iphone ny usb then go to system preferences. Go to network pane and scroll down to "wheel" and from the drop down select service order. If you see the iphone then drag it to the top of the list then select apply.

  • Since being in Mexico both my iPad and iPhone seem to be using up their batteries more quickly.  Any thoughts on why that might be?

    since being in Mexico both my iPad and iPhone seem to be using up their batteries more quickly.  Any thoughts on why that might be?

    Did they drink the water? 
    Using the battery level meter in this manner is comparable to using your car's fuel gauge to calculate miles per gallon. The only thing that matters is the total amount of operating time from full charge to auto-shutdown.
    Use the wall-mount charger that came with the iPad or another 10W/12W Apple charger and, one at a time, charge both units overnight.  Do NOT use an iPod/iPhone (5W) charger.  Do NOT use a computer's USB port.  Then, operate it normally until auto shut-down (ignore any low level alerts that may appear).  An irony is that doing that test to determine the total operating time is also the procedure necessary to calibrate the battery level meter.
    I'm not claiming that you do not have a problem.  I am stating, however, that we don't yet know.  If the above test does, in fact, indicate a problem, read this.
    Also, according to Apple:
    Use Your iPad Regularly
    For proper reporting of the battery’s state of charge, be sure to go through at least one charge cycle per month (charging the battery to 100% and then completely running it down).
    Elsewhere, Apple elaborates and explains that two half-discharges (or four quarter-discharges, etc.) equals one full discharge.

  • My MacBook Pro will not sync address book changes with my IPhone.  Why?  It used to.

    My MacBook Pro will not sync address book changes with my IPhone.  Why?  It used to.

    Then you may have to try manually resetting the syncservices folder by following Julian Write's post (from https://discussions.apple.com/message/9274781#9274781):
    Ok, as you can't reset SyncServices in the "normal" way, you'll have to resort to the "other" way:
    Although it's not advised to do so in normal circumstances, you'll need to manually delete the SyncServices folder.
    Before doing so, you MUST make a backup of both your Contacts and Calendars:
    In Address Book, choose *Export > Address Book Archive...* from the File menu.
    In iCal, choose *Back up iCal...* from the File menu.
    Then, make a backup of the SyncServices folder located at:
    ~/Library/Application Support/SyncServices
    By backing everything up first, you don't risk losing anything.
    Finally delete the aforementioned SyncServices folder and restart the Mac. This will force Mac OS X to recreate the SyncServices folder, and hopefully fix your problem.
    I believe in Snow Leopard you can back up your calendar in File>Export>iCal Archive rather than File>Back up iCal as posted above.

  • I recently lost my iPhone and tried to use "Find my iPhone" but did not see my phone listed. Why is that?

    I recently lost my iPhone and tried to use "Find my iPhone" but did not see my phone listed. Why is that?

    If it is not turned on and connected to the Internet it will not show up.  If has been restored to factory condition it will not show up.

  • I can't sync my photo events using iTunes; only some of them appear on my IPhone Why?

    I can't sync my photo events using iTunes; only some of them appear on my IPhone Why?

    Solved here...
    Photos app not syncing with iTunes

  • On iPad & iPhone why can't I send emails using my Contacts Groups

    On iPad & iPhone why can't I send emails using my Contacts Groups?

    daywm wrote:
    But I can send to all members in a "Group" on my Mac-Mini Mail by just enterig the "group name" in the TO:
    I thought thet iPad & Iphone Mail would provide the same capability
    I also thought that but it's not true.

  • Why has my ipad mini stopped connecting with my iPhone 4S? I used to use it to download books, or transfer emails to my ipad mini. It was fine 3 days ago, now I get a message saying " cannot join with iPhone" Any help greatly appreciated.

    Why has my ipad mini stopped connecting with my iPhone 4S? I used to use it to download books, or transfer emails to my ipad mini. It was fine 3 days ago, now I get a message saying " cannot join with iPhone" Any help greatly appreciated.

    You can try resetting your iPad and iPhone by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.

  • HT4623 its my first time to purchase using my new iphone, why security verification is needed?

    its my first time to purchase using my new iphone, why security verification is needed?

    To make sure you are the authorized user of your purchase method.

  • HT204380 why apple does not provide iphone 4 ability to use facetime using cellular/3G data?

    Why apple does not provide iPhone 4 ability to use facetime using cellular/3G data?

    Because you can't. That's why.
    No one here can address any question as to "why" Apple made the decision they did. We do not represent Apple.
    Speculation is prohibited by the TOU.
    The fact is, you can't do it. If that's not acceptable, then buy a new phone.

Maybe you are looking for

  • Awful Experience with Delivery and Installation of Appliances from BBY

    I went to the Best But in College Park, MD on 02 March 2015 with the intention of buying an appliance suite (refrigerator, range, and dish washer). A sales associated assisted me promptly upon entering the store, and I let him know what I needed to p

  • I can't get itunes to open on additional computer

    I have itunes loaded on one computer and just loaded on new laptop with Windows 7.  When I try to log in to itunes store on new computer, it only loads 1/2 way and then stops.  Still works fine on old computer.

  • UDDI - inquiry/publish API

    Hi all, i want to use the UDDI server from XI. With the UDDI client from XI i can publish my web services. But now i want to configure the UDDI Client in transaction suddireg in order to get access to UDDI from ERP (transaction wsadmin). But i have a

  • [10.1.2] Automate Attribute Property assignments in View Objects

    My JHeadstart based application has over 300 tables, and many of these tables have field properties that are repeated (e.x. a discontinued checkbox, choice pull downs, naming conventions, and so on...) Is there anyway to automate via scripting, a bat

  • RV_ORDER_FLOW_INFORMATION

    Hello, I have a invoice of sale (SD) with two positions ( 10 and 11 ) The two positions refer to the same accounting document (FI) Accounting is correct! I can not find a relationship in  table "BSEG"  to select the BUZEI that corresponds to the posi