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

View Single Post
Old 11-07-2009, 04:13 PM   #1 (permalink)
MikaelBartlett
Registered Member
 
Join Date: Jan 2009
Location: Sweden
Age: 32
Posts: 16
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 06:27 PM. Reason: added code and more info.
MikaelBartlett is offline   Reply With Quote
 

» Advertisements
» Online Users: 273
18 members and 255 guests
ADY, apatsufas, BdR, ckgni, Duncan C, F_Bryant, glenn_sayers, Guthook, ilmman, joeallenpro, ketaskin, michelle, Music Man, NSeven, smethorst, Sunny46, zbynda, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,709
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.