|
Post by alexfish on Jan 30, 2017 0:51:28 GMT 1
Hi Vovchik Found a nasty bug whilst running the demo , hope it be fixed MM: one must call make current in the main loop for the gl code IE glXMakeContextCurrent(display, drawable, drawable, context); // must do glLoadIdentity(); glClearColor(0.2, 0.4, 0.9, 0.0); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity();
//Rest of code BR Alex ADDED :: well after first test that appear to fix the bug , then thought test one more time and then it throw's a fit :: sigh new archive for testing // press any keyboard to exit else ctlr/c Attachments:helloxcb.bz2 (5.18 KB)
|
|
|
Post by vovchik on Jan 30, 2017 9:49:00 GMT 1
Dear Alex, Works find on my Pi. Thanks. With kind regards, vovchik
|
|
|
Post by alexfish on Jan 30, 2017 21:34:31 GMT 1
Thanks for the feed back, since we have fresh PIe from the butchers to test. this one has been butchered to bits. ha ha.. in all honesty I am surprised little PI still works as well as it does. happy days BR Alex
|
|
|
Post by alexfish on Feb 1, 2017 0:00:44 GMT 1
Hi Vovchik & All This Evening have done an apt_get update + upgrade RPI3 The results look very Favourable, example :: GLXGEARS flickering has gone and frame rate shows up to 150 to 170 frames per second screen shot BR Alex Attachments:
|
|
|
Post by vovchik on Feb 1, 2017 0:37:10 GMT 1
Dear Alex, Thanks. I just did the same and also did "sudo rpi-update", which updates the firmware. Everything went smoothly and I see that some VideoCore libs were also updated. The firmware update takes some 10 minutes. Everything seems to be working after a reboot. With kind regards, vovchik
|
|
|
Post by vovchik on Feb 3, 2017 23:11:05 GMT 1
Dear Alex, Here is a little script that frees a lot of memory on the PI (it also works nicely in Mint 17). With kind regards, vovchik Attachments:clearram.tar.gz (692 B)
|
|
|
Post by alexfish on Feb 4, 2017 16:13:01 GMT 1
Hi Vovchik I get this. ./clearram: line 13: bc: command not found ./clearram: line 14: bc: command not found This script will clear cached memory and free up your ram.
At the moment you have MiB cached and MiB free memory. ./clearram: line 29: bc: command not found ./clearram: line 32: bc: command not found This freed MiB, so now you have MiB of free RAM. BR Alex
|
|
|
Post by vovchik on Feb 4, 2017 16:46:50 GMT 1
Dear Alex, I have it in my PI3 and don't remember installing in manually. To install it, just use "sudo apt-get install bc". The actual memory purge takes place with or without bc, but bc does a nice job at spitting out the cacluated difference. I suppose a simple bash function called "bc" could actually do the same. With kind regards, vovchik PS. After Xscreensaver runs a few times, I end up losing up to 300MB - all of which is reclaimed and available again after running "sudo ~/bin/clearram".
|
|
|
Post by alexfish on Feb 4, 2017 19:28:46 GMT 1
Hi Vovchik
here keep resources down
have adapted the script to us vmstat
#!/bin/bash ## Bash Script to clear cached memory on (Ubuntu/Debian) Linux ## By Philipp Klaus ## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-Raspberry PI/> ## mod by Alexfish to use
if [ "$(whoami)" != "root" ] then echo "You have to run this script as Superuser!" exit 1 fi
# Get Memory Information freemem_before=$(cat /proc/meminfo | grep MemFree | tr -s ' ' | cut -d ' ' -f2) && freemem_before=$(echo "$freemem_before/1024.0") cachedmem_before=$(cat /proc/meminfo | grep "^Cached" | tr -s ' ' | cut -d ' ' -f2) && cachedmem_before=$(echo "$cachedmem_before/1024.0")
# Output Information echo -e "This script will clear cached memory and free up your ram.\n"
# Test sync if [ "$?" != "0" ] then echo "Something went wrong, It's impossible to sync the filesystem." exit 1 fi
echo -e "VM Stats\n\n" vmstat # Clear Filesystem Buffer using "sync" and Clear Caches sync && echo 3 > /proc/sys/vm/drop_caches
echo -e "\n\n\nVM Stats now\n" # Output Summary vmstat exit 0
BR Alex
PS Looking at the bits ,, possible to make similar using EXEC$
|
|
|
Post by vovchik on Feb 4, 2017 20:15:11 GMT 1
Dear Alex, vmstat is fine, as is free. Getting the relevent fields via xargs | cut is, for "us" types, also easy as PI. With kind regards, vovchik
|
|
|
Post by alexfish on Feb 5, 2017 0:09:44 GMT 1
Hi Vovchik Not sure if U fallen asleep at the Wheel Touch Down :: Now have EGL Xll basic window fired up now need to see if can get same drawing contexts as in hugrpi getting a screen shot of this is Weird.. anyway for now the EGLX11 ,, with nothing in as yet . except the white lines of the whilst screen shot select area.. BR Alex Attachments:
|
|
|
Post by vovchik on Feb 5, 2017 0:48:32 GMT 1
Dear Alex, Almost asleep at the wheel now. ZZZZZZZ Great about that EGLX11 window. I think a hug-like set of functions is on the horizon. With kind regards, vovchik
|
|
|
Post by alexfish on Feb 5, 2017 18:11:51 GMT 1
Dear Alex, Almost asleep at the wheel now. ZZZZZZZ Great about that EGLX11 window. I think a hug-like set of functions is on the horizon. With kind regards, vovchik Hi Vovchik just an update on the egl the benosteen-opengles-book-samples-5ff2dc9 LinuxX11 will compile and run Here have managed to configure the egl/X11 without the typedef structs have not tested the shaders as yet but they should work. been testing the GL API binding / the binding indicates a success an the Open GL commands are accepted . No Cigar Yet. should be able to get this working Hug Style. one way or another :: IE shader mode or Standard Open Gl using #include <GLES2/gl2.h> #include <EGL/egl.h> #include <EGL/eglext.h> #include <GLES/gl.h>
// & in the egl configs int result = eglBindAPI(EGL_OPENGL_ES_API); will not be able to further this till next week BR Alex a simple demo of a Egl window , and as said with No Cigar , there will be a DRI2 warning but should not fail , I think says he. + must Press any Key To De-Init + Clean Up .. Attachments:eglx11.bz2 (8.88 KB)
|
|
|
Post by vovchik on Feb 5, 2017 18:27:16 GMT 1
Dear Alex, I'll have a look. Your demo gives me a nicely decorated window with a bluish background. And amy keystroke dismisses. So, I think it is working. With kind regards, vovchik
|
|
|
Post by basica on Feb 5, 2017 18:54:45 GMT 1
Dear Alex, Here is a little script that frees a lot of memory on the PI (it also works nicely in Mint 17). With kind regards, vovchik Good day Alex and Vovchik, As usual, I'm way behind in dipping any of my toe stems into the Raspberry juice. (Maybe afraid of possible thorns ). Just wondering why cache freeing is of particular interest for the "Pi", as my general understanding is that cached memory is normally available if needed. Best Regards, basica (A neighbor has offered a free older model "Pi" to me and normally I would not turn down something free, but my sense is that I'd be better off just buying a new one to save my sanity)
|
|