Hi all,

I found a C++ OpenGL example of Volumetric Clouds a while back, and found it on my HDD while cleaning up.. so i am trying to make a GLScene port of it... now my C++ skills are urm some what limited, but i have managed to convert it (at least to the best of my knowledge).

It seems to compile ok without errors or warnings, but i can't seem to get it to work very well.

There are 2 main routines that need to be called, update and render (of course), if i just have update then the program runs, however if i have update and render then the program crashes on every 8 or 12 loop cycle with an 'Access Violation', now i suspect that it has something to do with the call to glDrawArrays(GL_QUADS, 0, Length(Cloud.vBuffer));, this routine is in both the RenderCloud3D procedure (called when rendering) and MakeCloudImpostor procedure (called when upating).

Its either because my conversion is rubbish, or i need to put some form of delay between updating and rendering, or some other means.
Any suggestions?

Heres the code to browse: Here

Many thanks
Nic

p.s. sorry the code is some what a mess....

EDIT:
I decided to double check the cloud data being read, would having the single values out of range cause access violations?

if so, is there a problem between the method i load the data file compared to the method from c++?