phalanx
Posts: 3
Joined: Mon Aug 29, 2016 1:38 pm

OpenGL Demos Failing for graphics_get_display_size

Mon Aug 29, 2016 1:54 pm

Hello.
Following an unsuccessful attempt to build a basic OpenGL ES2.0 application I saw for the PI, which failed due to the function graphics_get_display_size,
I took a step backwards and started trying to build the samples which came along with my RespberryPI3.
the samples are located at /opt/vc/src
All samples have been built successfully. including hello_triangle2 .
Executing the applications ,however, they break for an assertion in the code for the internal graphics_get_display_size function . the return code is -1.
I tried updating the firmware using sudo raspi-update.
I updated all drivers and apps using sudo apt-get install update and later upgrade.
my kernel is at 4.4.13 ( if I am not mistaking- anyways , fully upgraded to the latest version)
yet in vain.
I thus went even further deeper for the hello_dispmanx sample , which is supposed to do some functionalities with the vc_dispmanx functions , even this application , which goes one level lower , returns some awkward printing of the screen resolution (4 x 13338890, which are basically , two wrong int32s ) .
I thus need the help of you guys. did any of you encounter such a thing ? is there a solution to this one?
Thank you .

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: OpenGL Demos Failing for graphics_get_display_size

Mon Aug 29, 2016 4:05 pm

Do you have the experimental GL driver enabled? You can disable it with by running raspi-config, then deselecting it in Advanced -> GL Driver. Make sure to reboot. I'm not sure that was the error that is caused by it and I can't confirm it at the moment, but you might give it a try.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

phalanx
Posts: 3
Joined: Mon Aug 29, 2016 1:38 pm

Re: OpenGL Demos Failing for graphics_get_display_size

Thu Sep 01, 2016 4:43 pm

Hello dividuum.
Thanks for the info.
This , though , seems like a double-edge sword :
Indeed, when I updated the raspi-config , seems the display discovery really went back to life and vc indeed detected the correct display .
While doing that , glxgears flicker in many colors and the OpenGL Samples seem not to work .
So , as I said before, this is a double-edge sword case , or Catch 22 case, if you want The advanced OpenGL features ( Which is my goal , of course ) , the VC library will not detect the displays , hence failing the demos. if I disable the advanced features , on the other hand , indeed , the display will get detected, but none of the shaders will compile and glxgears will flicker.
Any Idea as to how to correctly activate OpenGL ES 2.0 ?
Thanks again .

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: OpenGL Demos Failing for graphics_get_display_size

Thu Sep 01, 2016 5:12 pm

phalanx wrote:Any Idea as to how to correctly activate OpenGL ES 2.0 ?
If you disable the experimental GL drivers you can't use normal GL but only OpenGLES2. So the demos in /opt/vc/ should all work out of the box. At least they do for me. If they don't, maybe you have to configure more gpu_mem in /boot/config.txt? If that doesn't work, I don't know what's wrong.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

phalanx
Posts: 3
Joined: Mon Aug 29, 2016 1:38 pm

Re: OpenGL Demos Failing for graphics_get_display_size [SOLV

Fri Sep 09, 2016 3:27 pm

Greetings again.
Seems the solution was more trivial than expected, yet one I can not comprehend :
When the frustration got to a level I could do nothing , I went to the last resort - a clean re-install . went to the restore option on reboot and re-selected the raspibian .
Took it something like two hours ( a very slow SD interface if I may say with 0.6Mb/sec write rate) , and finally , the pi 3 rebooted like magic. everything magically works ( aside an awkward eth0 static configuration to which I will post at another forum ) yet all samples at /opt/vc/src/hello_pi play flawlessly and work.
The funny thing is , the pi needed this clean re-install after it didn't work well coming like that from the store . the process of making it work with
sudo apt-get update / dist-update / upgrade / autoclean is the same as I used before ....
Voodoo.... (which was an excellent card at the time , by the way ...)
Kind regards and thanks again .

Return to “OpenGLES”