bitmap image vs. svg image drawing speed

After working with flash/3D/openFrameworks for some time, I’ve always come across the most common slow down in computer programing; drawing to the screen is the most processing intensive part.

In the past, I’ve been dabbling with openFrameworks to create an interactive particle system for the iPad. Each particle (all 5000 of them) needed to be an image of a logo that was transparent, so I tried to use .png files. Testing the program on the desktop iPad simulator worked great, but as soon as I put it on the iPad, it wasn’t so great in frame rate; it was no where near acceptable.

Recently I’ve been pondering if it would be less processor intensive to use a SVG file instead of the png files I’ve been using.

its hard to say without testing.
for best results with svg, id parse the svg data first and save it into a FBO.
you can then draw straight from the FBO which should be very fast.

Thanks for the reply julapy, I’m trying out your method of using FBO, but I’m having trouble finding a working version of ofxFBOTexture addon; I keep getting compiler errors. Unless I’m looking in the wrong places. I’m trying to use v0.062 of openframeworks (iphone version)

I’d get the fbo addon from here: https://github.com/openframeworks/openF-…-ons/ofxFbo

as far as I know this has been tested and is working on the Apple phone/pad.

I’ve got to be doing something wrong. I get the following errors when I put the FBO addon into the “addon” folder, and try to compile it. This is without adding any code to the default “testApp.cpp”/“testApp.h” files. All of these errors come from the ofxFbo.cpp file. Would it have something to do with the SDK? I’m using 4.2 (please don’t yell at me if I did something dumb :frowning: )

‘GL_TEXTURE_RECTANGLE_ARB’ was not declared in this scope
‘GL_MAX_COLOR_ATTACHMENTS_OES’ was not declared in this scope
‘GL_MAX_DRAW_BUFFERS’ was not declared in this scope
‘GL_MAX_SAMPLES_OES’ was not declared in this scope
‘GL_DEPTH_COMPONENT’ was not declared in this scope
‘GL_STENCIL_INDEX’ was not declared in this scope
‘glRenderbufferStorageMultisampleOES’ was not declared in this scope
‘ofPushView’ was not declared in this scope
‘ofSetupScreenPerspective’ was not declared in this scope
‘ofViewport’ was not declared in this scope
‘ofPopView’ was not declared in this scope
‘glPushAttrib’ was not declared in this scope
‘GL_READ_BUFFER’ was not declared in this scope
‘GL_READ_FRAMEBUFFER_OES’ was not declared in this scope
‘GL_DRAW_FRAMEBUFFER_OES’ was not declared in this scope
‘glDrawBuffer’ was not declared in this scope
‘glReadBuffer’ was not declared in this scope
too few arguments to function ‘GLvoid glRenderbufferStorageMultisampleAPPLE(GLenum, GLsizei, GLenum, GLsizei, GLsizei)’
‘glPopAttrib’ was not declared in this scope
‘GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES’ was not declared in this scope
‘GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES’ was not declared in this scope
‘GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_OES’ was not declared in this scope

I’m also hit by similar compile errors, although I’m not building for GL ES.

My first one is
‘GL_MAX_COLOR_ATTACHMENTS’ was not declared in this scope

which should be in glext.h
including <OpenGL/glext.h> doesn’t do the trick so it seems to be that there are a few glext.h and the wrong one that doesn’t have these elements in gets included. I removed the OpenGL framework but this didn’t fix things for me. This probably isn’t the way to go about it, but I don’t know what to do.

Any help?