PDA

View Full Version : How to draw fast rectangle/triangle/circle



nileshsince1980
11th November 2008, 09:11
Hi
I am using GraphicsView/Scene architecture to draw 10,000 > rects/traingles/circles.
Can anybody tell what is the fastes way to draw these items.
Currently I am using drawRect, drawPolygaon and drawEllipse functions.
Currently size of items is 5x5 pixel.
Also I wanted to zoom them as well and there are lines drawn between them as well.
Can you tell me the rendering/ zooming becomes faster.

vpicaver
11th November 2008, 11:40
I would recommend using opengl. Although opengl is mostly used for accelerating 3d graphics, it can also accelerate your 2D graphics. I would recommend using a scenegraph, http://www.openscenegraph.org/projects/osg or http://www.ogre3d.org/, if you've never done any graphics programing before.