Passing an array to another cpp?

Previous topic - Next topic

matchy

On Linux/RPi, how can I fast pass an array (not command args nor serial) from a running GLBasic program to a running cpp (compiled with g++)?  :'( :S

Schranz0r

Write to a file or use a scriptlanguage like LUA?
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

matchy

A file (or serial) stream seems to be my only option and I will have to try this now. I have done this before with a webcam image crated in opengl then opened in glbasic. It just requires an incremented file and then a follow up clean up. I suppose I can research g++ to g++ later.

Kitty Hello

To another process or a linked library?

matchy

"Experimental demo of 1K of bitmap data from 3D GLB screen and then read on the RPi2 via cpp that runs the monochrome OLED.
In this case the GLBasic app is running on Windows and saving locally with a forced frame delay of 100ms without frame drops. The RPi2 is connected via network drive to read the data.
If could be faster if the bitmap array (even larger colour buffers) could be passed to the process directly and also the GLB app can run on the Rpi also.
This is similar to my Nokia monochrome LCD video stream demo."


UBERmonkeybot


erico

Funky groovy experimentation! Do you have a final intention with it?

matchy

Not entirely sure what a need would be but I am thinking how it might be more portable with the Pi0. I'm sure I could demo a game but the idea that GLBasic is drawing rather than cpp. Note it's not the re-imaging that's new here as it's simply writing/reading a file. I've done this with Arduino serial video but this time I was hoping to get this 1k file as an array directly to the process. As you can see I used the Rpi2, as I am hesitant to solder in header pin in the Pi0 just for a general demo video.

erico

So, you have a glb program running on PC that sends data to a glb program running on Pi and it uses this data to draw?
Is that what is actually happening?

matchy

No, it simply saves to a file. In this case over netbios but I was/am aiming for a RPi local version because the whole point to this thread is to casually find out how to get it sent to the process, not a cool demo otherwise my video wouldn't be unlisted.  :zzz:

Marmor

what is your goal ? i cant understand.

i build a sort of wrapper for 2d commands on the rpi , it reads the serial data from my micromite
and shows it.


matchy

#11
We really need to post less experimental video demos.   :'(

There's not more that I can imagine unless anyone has some ideas to share. The most sensible I can think of, aside from games, is 3D navigation mapping but doesn't seem practical.  :x


kanonet

So if I got it right, you want to send data from one program to an other? You can do this with SOCK_ command, thats what i did between 2 instances of my DDGui-Creator.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

matchy

That is how I send via a web server but with TCP not UCP like with the multiplayer game. Perhaps I wil try that then.  ;)