Binsk
Member
Hello, everyone.
As far as I can tell, GameMaker uses 'actual' pointers in two cases:
1. Buffer addresses
2. Textures
Now generally when I want to pass a lot of data to a DLL I'll store it in a buffer, get the address, and pass that address in. I can then easily open it up as an array and get / modify the data from there.
Now I've come across a case where it would be mighty convenient if I could pass surfaces into a DLL. As you may or may not know, there is no direct way to do this. The method I had been using was to copy the surface data into a buffer and pass the buffer. This would be fine if I didn't have to do it every step but since I need to constantly update it it kills the framerate.
I recently discovered that textures in GameMaker, aka. the *_get_texture functions, are pointers. Buffers are easy to use in DLLs because we already know what data they will contain (we have to define it in GameMaker). However I haven't the slightest idea as to what data type the texture pointers point to.
Is there anyone out there that would know what this data type would be and whether or not it would actually be usable inside a DLL?
Any help on this would be great, thanks. There isn't exactly any info about this in the manual.
As far as I can tell, GameMaker uses 'actual' pointers in two cases:
1. Buffer addresses
2. Textures
Now generally when I want to pass a lot of data to a DLL I'll store it in a buffer, get the address, and pass that address in. I can then easily open it up as an array and get / modify the data from there.
Now I've come across a case where it would be mighty convenient if I could pass surfaces into a DLL. As you may or may not know, there is no direct way to do this. The method I had been using was to copy the surface data into a buffer and pass the buffer. This would be fine if I didn't have to do it every step but since I need to constantly update it it kills the framerate.
I recently discovered that textures in GameMaker, aka. the *_get_texture functions, are pointers. Buffers are easy to use in DLLs because we already know what data they will contain (we have to define it in GameMaker). However I haven't the slightest idea as to what data type the texture pointers point to.
Is there anyone out there that would know what this data type would be and whether or not it would actually be usable inside a DLL?
Any help on this would be great, thanks. There isn't exactly any info about this in the manual.