Je crée un projet ES opengl et j'essaie d'afficher des textures, tout fonctionne bien mais le problème est l'utilisation de la mémoire, toutes les 5 secondes par incréments de presque 1 Mb, je pense que je je fais quelque chose de mal, je ne suis pas à l'aide de tout cela apple recommendations je bac à coup sûr, mais je veux savoir si mon code ont un bug, il y a la façon dont je suis paiting:Code OpenGL ES à réviser
// Generate the vertex buffer object (VBO)
glGenBuffers(1, &ui32Vbo);
// Bind the VBO so we can fill it with data
glBindBuffer(GL_ARRAY_BUFFER, ui32Vbo);
// Set the buffer's data
// Calculate verts size: (3 vertices * stride (3 GLfloats per each vertex))
glBufferData(GL_ARRAY_BUFFER, uiSize, verts, GL_STATIC_DRAW);
// Bind the VBO so we can fill it with data
glBindBuffer(GL_ARRAY_BUFFER, ui32Vbo);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 20, 0); // Stride = 20 bytes
glBindTexture(GL_TEXTURE_2D, textID);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, 20, (void *)12);
glDrawArrays(GL_TRIANGLE_FAN, 4, 4);
// Bind the VBO so we can fill it with data
glBindBuffer(GL_ARRAY_BUFFER, 0);
Merci beaucoup!!!
Cela fonctionne !!! l'utilisation de la mémoire diminue drastiquement. JE VOUS REMERCIE!!! – Gustavo