speed: bmax vs c++

BlitzMax Forums/BlitzMax Beginners Area/speed: bmax vs c++

You cant, since all types are allocated on the Heap your array would just be a collection of pointers.

Youd have to do it manually, for example:
Local p:Byte Ptr = SomeBuffer
' depending on your byte order/pixelsize
p[x+y*width*4] = red
p[(x+y*width*4)+1] = green 
p([x+y*width*4)+2] = blue