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 confused and a little mad.
Y'see, despite appearences I'm a very experienced and practical coder (no really), but I'm NOT an OS coder, I'm a console games coder; I code on hardware, specialised consoles and hardware/embedded systems, as such I seldom, if ever, have to deal with any kind of OS. I usually work with some kind of supplied framework that sets up draw/framebuffers for me to get straight to the system and work directly with CPU's/GPU's etc... Thats just how game systems work. Any access needed to files and input is usually done via an API that makes things simple. I don't code in Windows, Linux,SonyOS or anything else, I just code in C++. I never had any interest in writing tools/apps or anything else that was OS based. I've been working this way since ZX81 days, get into the box and take control.
So..it therefore goes without saying my knowledge of Linux, X11 and everything else for that matter is sketchy at best because, for my purposes all I care about is getting access to my hardware so I can get OpenGL(es) to do its thing, and I handle all my logic,rendering, thread/core management, input reponse and hardware needs, in my own code.
That means I nearly always work with a framework supplied by a hardware maker, and build on that. That framework, gets whatever it needs from the OS, sets up a framebuffer and leaves the OS behind.
But the Raspberry was different, I made a clear effort when I was considering writing about game coding, to choose a machine I knew nothing about, to emulate what my students must feel like when they start, and I picked the Raspberry because I didn't know squat about it, other than it had a solid set of specs that I could relate to, having worked on machines like the GameBoy Advance and DS, I knew ARM, so...should be easy right?
But I had no framework to get into the system, and after searching on line (here I'm pretty sure), I found an example of creating an EGL context that would then let me get OpenGLES up and running and voila I was off. It used DispmanX and I've built on that that last few years and comfortably written a lot of projects that happily work rendering to an EGL context displayed by DispmanX.
My error, and its a big one, compounded by my lack of understanding of Linux systems, was in thinking that DispmanX was some kind of replacement for X11, an assumption further compounded by my discovery that other SBC's I started to code on didn't have DispmanX and I had to cobble together a different framework using X11. I concluded that oh, Raspberry uses this, and Ubuntu uses that, but I got things working so I didn't dig too deep.
At no time did I ever twig that Raspbian is also using X11 (hell, I didn't even know X was X11) , I didn't even notice it was there, I maintained two seperate configs for SBC's one for Raspbian and 1 for every other Linux system thinking Raspberry was the exception to the X11 usage rule. That config to set up has hardly changed in 3 years of coding Raspberries, I didn't need to...it all worked fine, and then...I needed to get an OS cursor position and I thought that would be easy....
I'm happy and a little embarrassed to say my eyes are now a little more open, and I'm altering my systems to now make use of X11 to create my render systems and get cursor positions at my startup.
Can't say I won't have more stupid questions but I felt I should tell you all about the danger of assumptions, especially when you re-enforce them with an, it just works, mentality
Also, can I say, how much I really love coding on the Raspberry, despite strange things like this happening, when you work on machines like the PS4 and Switch, you more or less can do anything you want without having to think much about things, limits are seldom pushed. The Raspberry makes me think every time I try to do something and often leaves me befuddled about why I didn't know such and such. Its like learning all over again.
Last edited by Brian Beuken
on Wed Jan 22, 2020 10:51 am, edited 2 times in total.
Very old computer game programmer, now teaching very young computer game programmers, some very bad habits.
Wrote some book about coding Pi's and SBC's, it's out now...go get it!