Go to advanced search

by Brian Beuken
Mon Feb 17, 2020 11:45 am
Forum: The MagPi
Topic: Coding book, from beginning to intermediate
Replies: 10
Views: 1814

Re: Coding book, from beginning to intermediate

Try my bookie wookie, its aimed at game progammers and does base most of the methods on usig a PC, but you can also use the methods on a raspberry with code:blocks or other IDE Is based on C++ though, I don't reccomend assembler for beginners, and python isn't the best way to fully get a handle on w...
by Brian Beuken
Fri Jan 24, 2020 3:30 pm
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

AFAIK None of out educational resources cover open gl/gles as it is a pretty advanced topic. Googling the error message is normally the first port of call when debugging these days. Finding the code that logs it gives a pretty good idea of what you're doing wrong. I think they should, while its a f...
by Brian Beuken
Fri Jan 24, 2020 8:19 am
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

ok I'll make a few changes to use the mesa libs and report back, but have to agree with PeterO, its not supposed to be a treasure hunt.
by Brian Beuken
Thu Jan 23, 2020 4:09 pm
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

hmmm no
on a 3B with KMS full drivers trying to set up an X11 system results in this error
* failed to add service - already in use?

thrown when I try to call eglGetDisplay(EGL_DEFAULT_DISPLAY);

wibble wobble....sigh....
by Brian Beuken
Thu Jan 23, 2020 2:31 pm
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

I always use Legacy drivers and OpenGLES2.0 OpenGL is nice but there's a few things emulated that impact on performance, much better in my mind to use the systems the GPU was intended to use. Apologies, I wasn’t clear: I meant that getting GPU accelerated OpenGL or GLES in an X window requires usin...
by Brian Beuken
Thu Jan 23, 2020 1:45 pm
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

I always use Legacy drivers and OpenGLES2.0
OpenGL is nice but there's a few things emulated that impact on performance, much better in my mind to use the systems the GPU was intended to use.
by Brian Beuken
Thu Jan 23, 2020 11:58 am
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

of course, I'm probably totally wrong... I've been wrong about everything else :D
by Brian Beuken
Thu Jan 23, 2020 11:34 am
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

I'm only going on comments I've seen where the compositor has been fingered for causing bottle necks and slow frame rates. Suggestions to turn it off (not sure how) come with warnings about poor performance when repositioning windows with the mouse. The slow down I saw with mesa EGL and GLESv2 was ...
by Brian Beuken
Thu Jan 23, 2020 10:20 am
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

Is it ? I though the "compositor" got in on the act somewhere (but where is the diagram that shows how it all fits together ????) PeterO I'm getting to that...wibble wobble, just kill me, I can't keep track phase..... All I know is that code works 100% on all Rpi's up to the 4 and the X11 code work...
by Brian Beuken
Thu Jan 23, 2020 9:52 am
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

I've not looked back to my 3B+ since I got a 4B, but it is my understanding that the EGL interface is only available on the 4B and that on earlier models you still have to use DispmanX to get a rendering surface. But I could be wrong :shock: But I've often said that the documentation on the whole g...
by Brian Beuken
Thu Jan 23, 2020 9:43 am
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

Gavinmc42 wrote:
Thu Jan 23, 2020 1:48 am
I just notice mesa 19.3.2 is released.
Was curious and checked 19.3.0, I don't remember seeing so many v3d changes before.
What version are you using?
I installed it yesterday so assume it was the latest version of Mesa, didn't check te version number.
by Brian Beuken
Wed Jan 22, 2020 10:30 pm
Forum: OpenGLES
Topic: Where's my Triangle??
Replies: 44
Views: 4067

Re: Where's my Triangle??

I'm having some issues like this also. I just realised that I was able to use X11 to render my OpenGLES2.0 project on Rpi3, (there's a long thread in the C++ programming sub forum) and have been converting my systems to run X11 rather than using DispmanX to make transporting between different SBC's ...
by Brian Beuken
Wed Jan 22, 2020 9:49 am
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

Just as quick note to say thank you and sorry.... Thank you for pointing me in the right direction to (almost) solve my issue, and sorry, because I must have caused a lot of frustation. I've been proceeding for a very very long time on a totally false assumption which has clearly made me seem confus...
by Brian Beuken
Tue Jan 21, 2020 1:57 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

jamesh wrote:
Tue Jan 21, 2020 1:14 pm
I do not know why you are using dispmanx at all.
Following systems on line to get an OpenGLES system up and running,
by Brian Beuken
Tue Jan 21, 2020 1:56 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

I've made it clear earlier that I need to access the Raspbian mouse position...while I do various setups and info gathering... For that I need the accuracy and precision, under whatever resolution the display is in...

THEN I take it over and have my own control systems.
by Brian Beuken
Tue Jan 21, 2020 12:31 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

ok so PeterO's question about whether it was a GUI or Terminal, led me to check something on my SSH debug settings on Visual GDB, and I found a checkbox that was currently disabled for LinuxGUI(X11) with had 3 options, Forward to Windows (via XMing), Show on Target and Disable. I changed it from Dis...
by Brian Beuken
Tue Jan 21, 2020 12:22 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

Im trying to get the cursor position from Raspbian... As I said right at the start that should be easy....I'm stumped as to why its so hard.
by Brian Beuken
Tue Jan 21, 2020 12:15 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

. Once my code kicks linux out, Im happy as a pig in muck once my own code is in control. So are you trying to move towards to a "bare metal" application without the Linux kernel ? PeterO Its always there, and I need it for some file handling and input events but other than that my code is selfcont...
by Brian Beuken
Tue Jan 21, 2020 12:11 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

As I thought, can't open a display Window root; Screen *screen; /* * X11 native display initialization */ x_display = XOpenDisplay(NULL); if (x_display == NULL) { printf("Sorry to say we can't create an Xwindow and this will fail"); exit(0); // we need to trap this; } else printf("we got an xwindow...
by Brian Beuken
Tue Jan 21, 2020 12:08 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

(*) Unless your own code has created one, in which case you would already know where it is on the screen! Sadly I don't seem to be making myself clear, I'm sorry. Once my own code creates render systems and sets up a cursor I can indeed place it anywhere on screen, and control it with the delta val...
by Brian Beuken
Tue Jan 21, 2020 11:54 am
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

Thanks, but I really just need to get the Raspbian OS cursor, nothing else. There is no such thing..... As far as I know the only cursor ever(*) generated on a PI is the X11 cursor. What exactly do you mean by "open a window" because your definition of "window" seems different to the normal one. Pe...
by Brian Beuken
Tue Jan 21, 2020 11:52 am
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

As I thought, can't open a display Window root; Screen *screen; /* * X11 native display initialization */ x_display = XOpenDisplay(NULL); if (x_display == NULL) { printf("Sorry to say we can't create an Xwindow and this will fail"); exit(0); // we need to trap this; } else printf("we got an xwindow\...
by Brian Beuken
Tue Jan 21, 2020 11:33 am
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

But... to settle this, give me 10 mins to see if I can indeed open an xwindow
by Brian Beuken
Tue Jan 21, 2020 11:31 am
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

well I don't instansiate an xwindow (except on Pi4 which is X11,), I create a dispmanx window on pi 1,2,3 ... no X11 in sight so no way to use XQueryPointer You need to open a connection to the X11 server - exactly the same as on a Pi4.... ok, so, again trying to be clear... Its my understanding, t...
by Brian Beuken
Tue Jan 21, 2020 11:13 am
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1818

Re: Mouse position in C++ Not with X11 but DispmanX

I'll just throw this is as an alternative .... It's also possible to go further up the "GUI stack" and use GTK features to track the mouse cursor by setting an up an event handler for "motion-notify" events in a drawing area or and event box. I have working code that uses openGLES to draw in an oth...

Go to advanced search