|
Post by alexfish on Dec 3, 2017 20:35:33 GMT 1
Hi All
Whilst doing the server bits needed a means to share variables
did find a problem with bacon on the ipc & shm
so Usec need to register the start
Here is a simple server & client using a integer array
the server will make a shared memory location and will wait until shm[0] is set by the client to 0
'tserver.bac PRAGMA INCLUDE <sys/types.h> PRAGMA INCLUDE <sys/ipc.h> PRAGMA INCLUDE <sys/shm.h>
PROTO perror CONST SHMSZ = 11
LOCAL shmid TYPE int LOCAL key TYPE key_t LOCAL * shm TYPE int
LET key = 5678
USEC if ((shmid = shmget(key, SHMSZ, IPC_CREAT | 0666)) < 0) { perror("shmget"); exit(1); } END USEC shm =(int*) shmat(shmid, NULL, 0) shm[0]=1
FOR t = 1 TO 9 shm[t]= t +10 PRINT shm[t] NEXT ' wait until the client sets shm[0] to 0 WHILE (shm[0] !=0) DO SLEEP 1 WEND
the client
'tclient.bac PRAGMA INCLUDE <sys/types.h> PRAGMA INCLUDE <sys/ipc.h> PRAGMA INCLUDE <sys/shm.h> PROTO perror CONST SHMSZ = 11
LOCAL shmid TYPE int LOCAL key TYPE key_t LOCAL * shm TYPE int LOCAL ptr TYPE int LET key = 5678
USEC if ((shmid = shmget(key, SHMSZ, 0666)) < 0) { perror("shmget"); exit(1); } END USEC
shm =(int*) shmat(shmid, NULL, 0)
FOR t = 1 TO 9 PRINT shm[t] NEXT 'Set shm[0] to close the server side LET shm[0]=0;
BR Alex
|
|
|
Post by alexfish on Dec 20, 2017 21:10:30 GMT 1
Hi All Whilst working on the openvg toolkit , came across a problem RE images. Not an easy one to resolve, but the results now looking good. Now added Cursors as a result. also the image buffer can be used for compositing etc etc. making gaming more attractive live mode updating on widgets and images now 25% faster. can see in the next demo. as a comparison GLXGEARS demo fullscreen 17 frames per second .. although the following demo is 2D, it is a full on live mode redraw all including a Desktop Image. this = 32/33 frames per second whilst at same time saving all buffers through -127 to 128 Hence ensure the graphics mem = 256. Also keyboard driver now in use , whilst on this found a way to get the Upper keys without resorting to the key map hence still a work in progress , if this works out as expected then looking to add UTF8 to the key maps. hence have yet another demo. First. need to ensure the system is Rasberry PI3 ,Debian Raspbarian/Pixel , and that the Desktop art is in the "/usr/share/rpd-wallpaper/" & the Wallpaper "aurora.jpg" exists. need to put all of the following in one folder "BaConEyes.png" "cursornormal.png" "cursordiag.png" "cursormove.png" "cursortextblack.png" "MyGBkeysMap.inc" Then "demoall2" Purpose of Demo Prevent Alpha Chanel's Penetraing through the Backing Buffer Esp if run on top of X11 and That the Alpha Blending Works on the user surface. + Blending in Particle mode not that this demo is using all buffering IE buffers are not deleted on Swap. Also note that there no other libs in use Exception .. X11 Dumb Window to blank callbacks on the Desktop IE the Demo Assumes X and the Desktop is running. and that is in the /opt/vc/ BR Alex
|
|
|
Post by rikky on Apr 19, 2018 6:38:55 GMT 1
error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory Rik.
|
|
|
Post by bigbass on Mar 19, 2019 8:00:21 GMT 1
Hello Alex this isn't directly related to what you are doing be patient my friend but it maybe a useful idea when you are on a frame buffer just for fun but we may have a good use for it sudo apt-get install netsurf-fb # you will get this sad error if you try to run it # Unable to initialise the font system # the fix however was easy we need some fonts cd /usr/share/fonts/truetype/dejavu sudo cp *.ttf /usr/share/netsurf #now run it netsurf-fb -b 24 basic-converter.proboards.com/#now you have a frame buffer running the browser ! #I am using a large screen tv so this works for me #but you get the idea to adjust it #netsurf-fb -w 1920 -h 1080 -b 32 basic-converter.proboards.com/Joe
|
|