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 8004301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:52:37+00:00 2026-06-04T16:52:37+00:00

I’m working on a simple opengl application where I plot a bunch of data

  • 0

I’m working on a simple opengl application where I plot a bunch of data represented as a line. For performance reasons, I split up the data into multiple chunks and upload them into several VOBs. Later, I render each VBO individually. The following is some example code:

n_COORDINATES_PER_VERTEX = 2
NBR_DATA_POINTS_PER_VBO = 1000

# plot each VBO
for segment in range(segments):

    # bind the named buffer object so we can work with it.
    glBindBuffer(GL_ARRAY_BUFFER, vbos[segment])

    # specifies the location and data format of an array of vertex coordinates to use when rendering
    glVertexPointer(n_COORDINATES_PER_VERTEX, GL_FLOAT, 0, 0)

    # render primitives from array data
    glDrawArrays(GL_LINE_STRIP, 0, NBR_DATA_POINTS_PER_VBO)

This works really well, but unfortunately the there’s a visual gap between the last point of the previous VBO and the first point of the next VBO. This makes sense, since the GL_LINE_STRIP is only created for the data inside each VBO.

Therefore my question: How can I achieve that the multiple VBOs are rendered as one single line, without jumps inbetween?

  • 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-06-04T16:52:39+00:00Added an answer on June 4, 2026 at 4:52 pm

    You can do this by

    1. Duplicating the last point in one VBO as the first point in the next VBO or
    2. Use GL_LINES instead and add the first point of the next VBO to the previous VBO.

    To make an unbroken polyline, you need to share common points across VBOS (I see no other option), you may choose any method you wish.

        n_COORDINATES_PER_VERTEX = 2
        NBR_DATA_POINTS_PER_VBO = 1000
    
        # One extra point that is the first vertex of the next batch
        NBR_DATA_POINTS_REAL = NBR_DATA_POINTS_PER_VBO + 1
    
        # Use GL_LINE_STRIP and duplicate vertices
        # plot each VBO
        for segment in range(segments):
    
            # Duplicate
            if (not_last_segment)
                vbos[segment][NBR_DATA_POINTS_REAL - 1] = vbos[segment + 1][0];
    
            # bind the named buffer object so we can work with it.
            glBindBuffer(GL_ARRAY_BUFFER, vbos[segment])
    
            # specifies the location and data format of an array of vertex coordinates to use when rendering
            glVertexPointer(n_COORDINATES_PER_VERTEX, GL_FLOAT, 0, 0)
    
            # render primitives from array data
            glDrawArrays(GL_LINE_STRIP, 0, NBR_DATA_POINTS_REAL)
    

    Something like that – it looks like you can’t render all the points in one go – so I’ll skip my solution that involved glDrawElements which you can use to draw an indexed mesh.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I am currently running into a problem where an element is coming back from
I want to construct a data frame in an Rcpp function, but when I

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.