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

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

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 11-07-2009, 03:13 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Sweden
Age: 31
Posts: 10
Default Render to texture problem (OpenGL ES)

Hi

I can't render to a texture larger than 256x256.
I would love to render to 512x512 as I wanna map it to the screen.

What could be the problem. Works in simulator but not on the device. I'm using OpenGL ES 1.1 on 3gs.

Quote:
glGenTextures(1, &drawTexture);
glBindTexture(GL_TEXTURE_2D, drawTexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kDrawTextureSize, kDrawTextureSize, 0, GL_RGBA, GL_UNSIGNED_BYTE, nil);

// create framebuffer
glGenFramebuffersOES(1, &textureFrameBuffer);
glBindFramebufferOES(GL_FRAMEBUFFER_OES, textureFrameBuffer);

// attach renderbuffer
glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, drawTexture, 0);
/mikael

Last edited by MikaelBartlett; 11-07-2009 at 05:27 PM. Reason: added code and more info.
MikaelBartlett is offline   Reply With Quote
Old 11-09-2009, 09:22 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Sweden
Age: 31
Posts: 10
Default

Fixed it!
MikaelBartlett is offline   Reply With Quote
Reply

Bookmarks

Tags
opengl es, renter to texture, resolution

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: 363
22 members and 341 guests
AdamSubach, anonymous@, benoitr007, bensj, Duncan C, gtyt38, Jeremy1026, lifeCoder45, maxus182, mox, Mr. Mojo Risin, Olesesy, Ovidius, Paul10, pofak, raheel, squidboy, ufbobbo, ultrayard077
Most users ever online was 965, 06-30-2010 at 04:26 AM.
» Stats
Members: 41,859
Threads: 49,768
Posts: 213,052
Top Poster: BrianSlick (3,138)
Welcome to our newest member, ultrayard077
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:49 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0