Dynamic array and OpenGL problem

Mikko Ronkainen mikoro at iki.fi
Sun Jan 13 14:53:41 PST 2008


Johan Granberg Wrote:

> A dynamic array is a pair of a size and a pointer so if you pass that to
> opengl which expects the array to be consecutive in memmory opengl will
> read the length part of the array as if it was part of the data and therfor
> producing garbage

Ok, thanks. I'm out of ideas now - how should I solve the problem of variable size framebuffer then? I mean when you resize the window, I would like to resize the framebuffer accordingly. I'm now using that static array, and I cannot see any method to resize it. Or alternatively having some sort of conversion before sending dynamic array to opengl?


More information about the Digitalmars-d-learn mailing list