|
Post by alexfish on Feb 29, 2016 14:19:48 GMT 1
Hi All
font lib has been Added :: see Post #2
this uses a modified version from high performance canvas , using an array to improved rendering speeds
BR Alex
|
|
|
Post by alexfish on Mar 18, 2016 21:38:45 GMT 1
Hi all
Just another update on progress
Now have the GL_TEXTURES implimented , as of just now. phew
this was a fun thing Not , how to draw textures then revert back to the standard glColor* , egl wise , mind blowing until the penny drops..
overall now happy with the interface , although have alterered the configs
eg previous frame rate at fullscreen = avr 50 frames a second
the cube demo with other redraws of standard libs / square circle etc
at full screen + the cube drawn full screen height .
72 frames per second.
Now need to combine the bits from the two beta's into one.
Looking to allow approx 4 weeks , hence the update = 'this will be a final release.'
It has been an interesting Journey . Raspy Wise.
BR Alex
|
|
|
Post by vovchik on Mar 18, 2016 23:11:16 GMT 1
Dear Alex, Great. You and Peter seem to work on things very quietly, and then bang. Right approach...and obviously good results. With kind regards, vovchik
|
|
|
Post by alexfish on Mar 20, 2016 14:15:31 GMT 1
Hi Vovchik
Like I say , about a month to go , esp testing wise,
although have made good progress at getting the Texture drawing simplified, + can draw cubes with 6 interface FACES IE FRONTFACE, BACKFACE
so here could not help myself ,
once the texture is loaded , this is the simple bits of the API, , X, Y, Z , TILING , ALPHA
REM point to the texture required / then draw a FRONTFACE BINDTEX(GL_TEXTURE_2D, mytexture1)
PERSPECTIVE TRANSLATE(0.0f, 0.f, -30) ROTATE(-90,0,0,1) ROTATE(-180,1,0,0) FRONTFACE(10,10,10,1,1,255)
REM FACES (size_x,size_y,size_z,tiles_x,tiles_y,alpha)
Hence a cube made up as long Rectangle as scaled in the Y = + different number of tiles
REM 1 tile FRONTFACE(10,15,10,1,1,255) REM 2*2 tile BACKFACE(10,15,10,2,2,255) REM 3*3 tile BOTTOMFACE(10,15,10,3,3,255) REM 4*4 tile TOPFACE(10,15,10,4,4,255) REM 5*5 tile RIGHTFACE(10,15,10,5,5,255) REM 6*6 tile LEFTFACE(10,15,10,6,6,255)
BR Alex
|
|
|
Post by alexfish on Dec 29, 2016 20:06:09 GMT 1
Hi Vovchik In view of resent post on glx thread In regards Pix buff & EGLES here is a demo from a while ago , this one is based on GTK/EGLES Exec only since all the bits are still in bits If have gtk and pix buff configured , then this should work , As Mentioned A While a go , a lot more has been done.. This loads the fonts . makes widgets . change property of geometric widgets etc.. click on the changing Polygon widget to score points So there is quite a bit going on . IE the text is been rendered a Letter at a Time ,, etc etc , Hope it works for you, and as mentioned it is dust a demo of a bit from the bits Press Escape To Quit Users :: do not Run this any other than a Raspberry PI3 BR Alex Attachments:demo.bz2 (39.29 KB)
|
|
|
Post by vovchik on Dec 29, 2016 20:31:15 GMT 1
Dear Alex, Works splendidly - smmoth and looks great. Nice to see PI graphics in action. With kind regards, vovchik
|
|
|
Post by alexfish on Dec 29, 2016 21:26:18 GMT 1
Hi Vovchik here is a demo based on the original gtk/egl Window Mode Note . leave the demo running... Beats the Pants off Glx And the Experimental open gl mesa BR Alex Attachments:WinDemo.bz2 (19.1 KB)
|
|
|
Post by vovchik on Dec 29, 2016 22:12:08 GMT 1
Dear Alex,
Very nice and smooth - and a cute mini-window. What does the source look like - if you are ready to post?
With kind regards, vovchik
|
|
|
Post by alexfish on Dec 30, 2016 6:11:04 GMT 1
Hi vovchik one last demo This demonstrates Client side XCB window in full screen mode without any event masks Client side Mouse ,writen by me , bench test shows this runs at approx 220,000 reads per Second for button and screen coords Direct render of buffer using Cairo , the render looks clichy , but look at the render then U will get it , esp when U look at the corners of the render Have not placed a widget in the Top Left to shutdown the Clients , although clicking top left 0,0,100,50 , should init a powerdown , if not Call me names + switch the PI off at the mains.. Also Note:: Not sure this will work on U'r Raspberry , since using 'ewmh' to talk to the window manager.. on Raspberry this be lib xcb-ewmh Yet be interesting to see if it fires up as is Click the left mouse button to enable the Cursor. now can also see the diff in the size of the Exec.. As I mentioned on the other thread , I am assuming to have most of the bits put together in about a week . BR Alex Client Side Raspberry PI EGL/Cairo demo Attachments:bcxcairoegl.bz2 (19.04 KB)
|
|
|
Post by vovchik on Dec 30, 2016 9:20:04 GMT 1
Dear Alex, It worked, after downloading and installing the xcb lib. I couldn't get out of the demo, having pressed all sorts of keys, so had to reboot, but it works nicely: a red rotating square with Hello & <world>. With kind regards, vovchik
|
|
|
Post by alexfish on Dec 30, 2016 11:46:13 GMT 1
Hi Vovchik Thanks for testing , can call me names if U like ,, OK. need to ask some basic Question's The red square,is that Central to Ur Monitor The Cursor, does it show at startup , it may be central to the square , it may may be off set , or may be that it does not show Did U click the mouse button first to init the coords. the reason for the offset , the init coords are hard coded , at 1920/2 on x and 1080/2 on the y possible reason that it does not show = reset to 0,0 or possible -1,-1 , do have a version that takes the screen coords from EGL inits , but find that they reset to the -1,-1 , so possible thinking , are the Init Stages correct. Some test's if the mouse pointer is off set , move the pointer to the left , then up to top of screen , all I need to know is did the pointer move , if the mouse pointer is moving then In theory the pointer can not go below 0,0 ,, Now if the coords have reset to -1,-1 the mouse pointer will not show , click the mouse button , then can try moving the pointer right , the up , if it does not show at this point Further , sort of thinking .. can post the test bits , but if can clarify , did the pointer move or did it not , after clicking the mouse that is. Which ever way I will be posting some demo testing code based on the above set up , but with an escape root , it be a case of Two Minds are better than one , esp at this sort of work. If wondering why XCB , XCB does not have a native tool kit ,, open door so to speak , and think one could have some fun with it. most of or the widget set up (callbacks) in the HPC could be ported very easily to work with XCB. Well for now , if can give me some feed back on the above ,will be a good starting point. BR + Have fun 'with the Raspberry
|
|
|
Post by alexfish on Dec 30, 2016 12:31:29 GMT 1
Hi All Looking further ahead on the XCB front XCB does not have a native get mouse or get char , XCB been client side needs to Query the Xserver, this slows things down the bit So digging around , found a little lib called gpm . this is client side for reading mouse events and getting chars,, could not find much in the way of demo code, except this snippet , from HERE may be worth reading beyond first page the snippet.. U may need to install libgpm from the repo's BR Alex // compile gcc -o testgpm testgpm.c -lgpm #include <stdio.h> #include <gpm.h> int my_handler(Gpm_Event *event, void *data) { printf("Event Type : %d\n at x=%d y=%d\n", event->type, event->x, event->y); return 1; } int main() { Gpm_Connect conn; int c; conn.eventMask = ~0; /* Want to know about all the events */ conn.defaultMask = 0; /* don't handle anything by default */ conn.minMod = 0; /* want everything */ conn.maxMod = ~0; /* all modifiers included */ if(Gpm_Open(&conn, 0) == -1) printf("Cannot connect to mouse server\n"); gpm_handler = my_handler; while(1) { while((c = Gpm_Getc(stdin)) != EOF) printf("char : %c\n", c); } Gpm_Close(); return 0; }
|
|
|
Post by alexfish on Dec 30, 2016 16:38:08 GMT 1
Hi Vovchik
Scrap the above , it works in blocking mode
So tried dev example , got stuck here with record and a couple of other bits have USEC'd the bits , and this work here as regards getting the keys frome the KeyBoard good thing here is it will pick up on the currency as in Here the "£"
any ideas;
OPTION PARSE FALSE USEC #include <linux/input.h> struct input_event ev[64] ; ENDUSEC
int fd, rd, value, size = sizeof (struct input_event) fd = open ( "/dev/input/event1", O_RDONLY)
WHILE 1 DO
IF ((rd = read (fd, ev, size * 64)) < size) THEN BREAK ENDIF
USEC value = ev[0].value; if (value != ' ' && ev[1].value == 1 && ev[1].type == 1){ printf ("Code[%d]n", (ev[1].code)); } END USEC WEND
run from the terminal :: Press 'CTRL C' to Quit
BR Alex
|
|
|
Post by alexfish on Dec 30, 2016 21:53:46 GMT 1
Hi Vovchik
as regards trying Chromium Browser PI3
Think there may be a problem Whilst been signed in the desktop began to freeze during a posting.
had a look in the Task Manager
there are three instances of chromium running
Memory usage is very high
case 1: 48.5 MB case 2: 24.0 MB case 4: 162.7 MB
A total usage of 235.2 MB of 313 MB out of 925 MB used
May be some second thoughts on this one
BR Alex
|
|
|
Post by vovchik on Dec 30, 2016 22:21:34 GMT 1
Dear Alex,
Thanks for the Chromium warning. I have been using it, but my PI experience is very limited - 3 days now since setting up a monitor and tweaking things. So far, it seems faster than Firefox on my normal desktop machine. I will look at the memory when I have multiple tabs open. Midori is small and fast and might come in handy as a replacemenet. I installed it and it works fine.
With kind regards, vovchik
|
|