2 textures in onGUI drops fps to 30

i have a standard 60fps on my iphone 4 when rendering a scene. i then draw 2 textures in onGUI like this:

void OnGUI() 
	GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),textureBack);
        GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),textureFront);

and the FPS drops to ~30fps. The front image needs to have alpha so i set it to be overriden to RGBA 2bits, this image apparently has now 3 mb, the back image is 1.5mb, both have a resolution of 1024x768.

Is there a way to better handle this problem? i want the images to take max 10fps because… 30fps is absurde!

You can’t cover the screen with transparent textures and expect to get any kind of decent framerate on an iPhone 4. The hardware simply is not fast enough.

Never use OnGUI to draw Texture !
Don’t use this if you want display textures in Unity :).

Use GUITexture ( http://docs.unity3d.com/Documentation/Components/class-GuiTexture.html ) instead of OnGUI with GUI.DrawTexture( … );

One tutorial here if this can help you : - YouTube

If you need more explanations, I can give you more later :wink: