Pointer question

BlitzMax Forums/BlitzMax Programming/Pointer question

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I would think all you do is pass `buffer` as the memory address that you want your static bank to use. OpenGL is going to fill your buffer variable with an address of a memory space, so now buffer=where mem is, so you just give buffer to CreateStaticBank (looks like that's whats in the code above).

If you were to do varptr(buffer) you'd be getting the pointer to the buffer variable itself and not the indirect contents of the buffer, nor the memory space it implies. You can create a static bank to the varptr of a variable, and then use poke/peek to change the variable's value, but that doesn't have anything to do with the contents of the memory space that the variable points to.