Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-05-2008, 03:04 PM   #1 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 10
Default Drawing to a Texture

I'm working on a project that I started with the CrashLander sample code as a base (meaning I use the same EAGLView to setup the OpenGL view). I've got scenes rendering on my project is progressing well, but I've gotten stuck with the matter of drawing a whole scene to a texture (with alpha blending and such). I'm trying to follow the instructions given here:

Drawing to a texture - steinsoft.net

However, if at all possible I'd like to load the textures at startup in the applicationDidFinishLoading function. If I attempt to draw to a texture in my renderScene function (meaning using the program's main OpenGL context to draw in and clearing it afterward), I have no problems, but I don't seem to know enough about OpenGL and the iPhone's implementation to move the texture creation to a different context. I've found many documents regarding this subject, including drawing offscreen, but I don't quite get it.

Could anyone give me a hand with rendering to a texture?
nuudles is offline   Reply With Quote
Old 10-06-2008, 09:33 PM   #2 (permalink)
hkk
Registered Member
 
Join Date: Oct 2008
Posts: 11
Default

You want to use the framebuffer objects extension.
Take a look at this tutorial or this.
All the gory technical details are here.
hkk is offline   Reply With Quote
Old 10-06-2008, 11:33 PM   #3 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 10
Default

Quote:
Originally Posted by hkk View Post
You want to use the framebuffer objects extension.
Take a look at this tutorial or this.
All the gory technical details are here.
Thanks! That helped quite a bit!
nuudles is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 252
23 members and 229 guests
@sandris, AdamL, ADY, Dani77, diyora, FAED, fredidf, F_Bryant, GHuebner, HDshot, JasonR, mer10, Oral B, prchn4christ, Rudy, smithdale87, Speed, stekki, tgjorgoski, Thompson22, Touchmint, twerner, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,752
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:02 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0