Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6644097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:07:40+00:00 2026-05-26T00:07:40+00:00

I´m creating an opengl ES project and I´m trying to show some textures, all

  • 0

I´m creating an opengl ES project and I´m trying to show some textures, all works good but the problem is the use of the memory, every 5 seconds increments almost 1 Mb, I think I´m doing something wrong, I´m not using any of this apple recommendations I will tray for sure, but I want to know if my code have some bug, there is how I´m paiting:

    // 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);

Thank you very much!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:07:40+00:00Added an answer on May 26, 2026 at 12:07 am

    You should generate the vertex buffer object only once, the use it draw.

    It seems you create a new one each frame.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a simple opengl application which obviously includes some 3d-objects and textures.
I am creating a very simple project on OpenGL and I'm stuck with rotations.
Creating a server-side socket will fail if I'm trying to use the same port
I'm creating an OpenGL application on windows. I can't use GLUT, because I would
I'm creating an Android app utilising OpenGL ES, and need some help with the
I'm creating a kinect project in Visual Studio 2008 using OpenNi, NITE and OpenGL.
I was creating a opengl android application. I was trying to render a opengl
I'm creating a game engine using wxWidgets and OpenGL. I'm trying to set up
I'm very new to creating games (and working in OpenGL in general). I'm trying
I've been trying to make use of the GPU as part of a project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.