- Home /
Is OpenGL Causing a "applicationDidReceiveMemoryWarning" Crash? (version 4.1.2f1)
Hello all,
Our game is currently crashing with an "applicationDidReceiveMemoryWarning" error after running for ~20 minutes on an iPad 3. According to our investigation, the following "OnPostRender" function seems to be eating up all of the memory. This function uses GL to create a temporary quad and uses it to draw a material during each frame. Is there something in this function that we are doing incorrectly? Thanks.
public void OnPostRender() { GL.PushMatrix(); GL.LoadOrtho();
for (int i = 0; i < material.passCount; i++)
{
material.SetPass(i);
GL.Begin (GL.QUADS);
GL.TexCoord2(0,0); GL.Vertex3(0, 0, 0);
GL.TexCoord2(1,0); GL.Vertex3(1, 0, 0);
GL.TexCoord2(1,1); GL.Vertex3(1, 1, 0);
GL.TexCoord2(0,1); GL.Vertex3(0, 1, 0);
GL.End();
}
GL.PopMatrix ();
}
Your answer
Follow this Question
Related Questions
OpenGL error due to RenderTexture size set too high. Any way to change size during runtime? 0 Answers
App Crashing on iPhone due to Texture Memory 2 Answers
Loading external Image as Texture2D increases memory consumption dramatically on iOS 0 Answers
Why do textures take double memory on iOS and Android devices? 1 Answer
Several Memory Optimization Questions 0 Answers