05-06-2002, 07:45 PM
Got a small problem. I inherited some code where I work that has run into some speed problems. Basically the problem is this: using code that was designed to draw small rectangular rasters is now being used to draw LARGE rectangular rasters. The data is broken up into triangle strips and glDrawArrays(…) is being used to actually draw the data. How can I speed this up? If the entire raster is being shown, fine, it’s going to be somewhat slow. I can accept that. If only a small portion of the data is being shown, well, it’s still slow, the code is still drawing the WHOLE raster. This brute force approach worked well when the images were tiny, but now that the rasters have grown there is no need to draw the whole thing when only a small portion is used. What can I do? I thought about throwing the data into some sort of gridded data structure and only draw the grids that are on the screen. Anyway, I welcome some comments.