Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
I've noted before that I had some trouble with ubuntu systems throwing up strange errors unable to open Displays causing failure of our test projects I thought it was limited to Ubuntu, but today I had it on a Tinkerboard system which is Debian, it did however throw a much more useful No Protocol supplied, error, which after a bit of googling resulted in some answers.
I can't honestly explain much about how any flavour of Linux works, its a total mystery to me and the way it seems to over protect things you want to directly access is frustrating, but it does seem that some of our issues are related to lock of display system by the OS.
If you don't have root access we know some things get hard to use, like keys and mouse, but it seems also the screen....
One solution is to enter
xhost +
on a terminal, and then you can finally open the screens.
But then of course you have all kinds of other issues
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
09-23-2018, 05:52 PM
(This post was last modified: 09-23-2018, 05:55 PM by Brian Beuken.)
I've tested this now on both the XU4 and Tinkerboard and indeed this fixes the problem of access to the screen and with it the OpenGLES set up allowing your openGL init to work.
However I am still having issues getting a display, so I'll review this and report back when I get some new info
It also seems to be ok if you are running as a root user (which makes sense)
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
making sticky
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
Small update, the display issues, which is basically a blank screen, is explained by an issue with my depth buffers....but the problem is I don't know why I'm having an issue with my depth buffers. If I don't enable them, I get screen updates, but with polygons clearly not being properly sorted....if I do enable the depth buffer...I get blank screen
This is only happening on X11 based systems though, Raspbian and Windows PC tests are totally fine.. So its a bit of a head scratcher, which will probably turn to to be blindingly obvious when found, but for now I'm a bit stumped.
I'll do more research and see what I can come up with
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
09-28-2018, 05:38 PM
(This post was last modified: 01-10-2020, 11:45 AM by Brian Beuken.)
Aha, I found it, and it was a bug...my bug, of course, but very strangly it only showed up on X11 systems.
Basically, xhost + fixed the inability to open a window, but my test project uses a shadow framebuffer which I was clearing, but I wasn' t clearing the main frame buffer,
Quite strange it worked on Raspbian and most Debian systems. But hey ho, just a bug, a good example of making sure your project runs on lots of different targets.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
Also try to log in as root, then everything is open to you
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Posts: 192
Threads: 21
Joined: Aug 2018
Reputation:
17
You could try just running 'su -' when logged in as a user to get to root.
So, running 'sudo' before running the program did not work?
Posts: 693
Threads: 186
Joined: Jan 2018
Reputation:
1
I don't run the programs from the console, always from Visual Studio...in principle I can add a sudo command before the run but it means messing with the commandline and I don't like to complicate things.
I knew nothing about linux when I started the book and I still know nothing about it
Its just not an interesting OS for me and its annoying insistance on ownership of things is frustrating to say the least.
I just want to type code, press build&run and see my efforts....anything that gets in the way of that is noise.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's