Random glcalllist command generation

based on the results of formula, I get commands to generate lines and pixels in an undefined pattern. I have no idea of the order of, and quantity of these commands. The formula I use could generate a hundred pixels, then a dozen lines, then a dozen pixels, etc. Is there a way to capture these events to generate a calllist? I can output the glVertex3f() and glBegin(GL_LINES)commands and data to a textfile, then play it back. I am thinking this would slower than my original code. It may take up to 15 seconds for the math to generate the image. My needs are to be able to select and zoom an area without doing a complete image regeneration.

I can output the glVertex3f() and glBegin(GL_LINES)commands and data to a textfile

No need to emit to a file. You could just store the data in a memory buffer. If you have two buffers, one for GL_LINE primitives and the other for GL_POINT (I’m guessing) then you could render the entire display by submitting the contents of the two buffers.

Tell me more. Please.

firstly, can you be more specific about what it is you get as the input? Can you show us an example of the specific data you are getting?

I checked out using the memory buffers as you suggested and found that when a capture just the x and y points, I ran out of space in the 1000000 line array. The code sometimes will turn on the same pixel 5 or 6 times before moving on to the next pixel.That’s probably why it is taking so long to generate an image. I have to backup and rethink my code. I appreciate your insite and pointing me in a direction I have not thought of.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.