To increase performance make sure your data uses single-precision floats and change GL_DOUBLE to GL_SINGLE too, since most hardware will need to perform this conversion otherwise. If the data is static, or doesn't change often then using VBOs can save re-submitting the same data to the GPU every time. Also, make sure your data() call isn't doing more work than it needs to.

To increase performance make sure your data uses single-precision floats and change GL_DOUBLE to GL_SINGLE too, since most hardware will need to perform this conversion otherwise. If the data is static, or doesn't change often then using VBOs can save re-submitting the same data to the GPU every time. Also, make sure your data() call isn't doing more work than it needs to.

Hi Dan...

I'm using opengl with MFC, yes, is double buffered. I change double to float, but doesn't makes diference...

You will need to load the OpenGL functions used for buffer objects either yourself or using a loading library (recommended). There are quite a few tutorials out there for using buffer objects especially vertex buffer objects (VBOs).

A good tutorial on modern OpenGL usage is here, with the page introducing buffer objects here. Another tutorial can be found here, with the page about buffer objects here.