I am doing my iphone graphics using Opengl. In one of my projects i need to use an image, which i need to be used as a texture in opengl. The png image is 512 * 512 in size, its background is transparent and the image has a thick blue line in its center.
When i apply my image to a polygon in opengl, the texture appears as if, the transparent part in the image as black and the thick blue line is seen as itself. Inorder to remove the black part i used Blending.
glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
Then my black part of the texture in the polygon is removed. Now only the blue band is seen. Thus the problem is solved.
But, i want to add many such images and make many objects in opengl. I am able to do that, but the frame rate per second is very slow when i add more and more images to objects. But when i comment blending, fps is normal, but the images are not seen.
Since i do not have good fps, the graphics is bit slow and got a shaky effect.
So anyone please help me
1) Is there any other method than Blending to solve my problem?
2) How can i improve the fps of opengl app? What all steps need to be taken inorder to work my graphics properly?
Thanks in advance...