opengl es - iOS: GLPaint can't draw on large frame -


apple example of freehand drawing glpaint, painting using opengl es can't draw large frame. need draw on large canvas more {2410, 1808}. when attempt draw, message on console saying,

 2012-06-05 14:29:40.780 glpaint[3390:707] frame of drawingview: {{-827.222, -567.004}, {2410, 1808}} 2012-06-05 14:29:40.884 glpaint[3390:707] failed make complete framebuffer object 8cd6  

on code have set frame as-

//paintingviewgl performing freehand drawing of opengl es //drawingview uiview dynamic frame size  paintingviewgl = [[paintingviewgl alloc] initwithframe:drawingview.frame]; paintingviewgl.backgroundcolor = [uicolor clearcolor];  [drawingview addsubview:paintingviewgl]; paintingviewgl.center = drawingview.center; paintingviewgl.hidden = no; 

i getting nice result frame size {1435, 1076} , on little larger frame {1600, 1200} drawing brush gone wave , start dancing on screen. received memory warning. level=1 on case.

for devices older ipad 2, maximum texture size 2048 x 2048, can't draw texture or framebuffer object larger that. you'll see errors , black screen. on newer devices (ipad 2, retina ipad, iphone 4s), texture size limit has been increased 4096 x 4096.

your solution drawing on larger canvas create tiling mechanism in opengl es, catiledlayer within core animation. luck this, though, because significant undertaking if you're not familiar opengl es rendering.

also, run memory issues large scenes in opengl es, particularly on older ios devices. 1600x1200 image mention seeing warnings about, every uncompressed frame takes ~7.7 mb of memory itself. if have multiple layers or textures, can add , use available memory on device if you're not careful. 2410x1808 image, you're looking @ 17.4 mb per frame, that's reason want tile work tiles need @ instant.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -