Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: if vertex array count > 1000, glDrawArrays becomes slow?

  1. #1
    Intern Newbie
    Join Date
    Jul 2012

    if vertex array count > 1000, glDrawArrays becomes slow?

    I have painting app. Mouse event coordinates are stored to VertexArray. Then vertex array is being drawn to screen. My code structure looks like this

    Code :
    // I get mouse event coordinates and store them to VertexArray
    //some new matrix settings
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
    //now I draw first full size textured quad and later I draw vertexArray
    //and now I draw second full size textured quad on top of first quad ant that what have been drawn from vertex array
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
    //immediately after that I draw FBO to screen:
    glBindTexture(GL_TEXTURE_2D, fbTexture);
    //Code for drawing textured quad
    glBindTexture(GL_TEXTURE_2D, 0);

    So everything is redrawn every time when new mouse event coordinate is being registered. And if there are more than 1000 coordinates, drawing becomes really slow. Where could be my problem? I thing 1000 vertices for OpenGL is not much

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    No, 1000 vertices are nothing. 1000 draw calls, i.e. calls to glDrawArray, however, is a lot for something as simple as drawing 1000 verts. Please post you full code used to draw.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts