Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

GLES3.0 :D at last

Thu Jun 27, 2019 9:23 am

So the Pi4 has GLES3.0

Fantastic, I can't wait to try out a few things on the Raspberry.
But while I wait for my micro monitor cables to arrive (I mistook my mini HDMI convertors for micro), to arrive I installed the new Buster on my 3B+ to see what it could do, and all was fine. Buster seems stable and reliable out of the box and all my Stretch examples build fine on it.

But.. I noticed there were no GLES3 dirs, only GLES and GLES2

Shouldn't there be a GLES3 folder? Is that becuase it detected a GLES2.0 system (the Pi3B+) or do we have to do a mesa libs install to get the 3.0 folders?
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!
http://www.scratchpadgames.net/

namanix
Posts: 1
Joined: Thu Jun 27, 2019 1:28 pm

Re: GLES3.0 :D at last

Thu Jun 27, 2019 1:29 pm

I would also want to know this. I can't seem to build GLES3.0 applications.

User avatar
hexelpdkk
Posts: 177
Joined: Fri Feb 24, 2012 4:40 pm

Re: GLES3.0 :D at last

Thu Jun 27, 2019 5:33 pm

Install libgles2-mesa-dev, this gives both the GLES2 and GLES3 headers.

With cmake installed, it was trivial to build all the samples from https://github.com/danginsburg/opengles3-book. Everything I have tried has worked.

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:03 pm

ok I have mesa installed, but ....its all so slow...are there no drivers at all yet? Mesa seems to be running in full emulation mode and any decent graphics demo is overloading and overheating it. I get 5FPS on a game demo that runs at 60FPS on a P2/3

I hope this is just a case of the drivers are on their way?
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!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5073
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:28 pm

Which game is running that slow ?
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:37 pm

My Maze hunt demo

I have it working now on the 4 but becuase there's literally no hardware acceleration, its emulating everything and runnig at 5 fps
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!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5073
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:40 pm

You are doing some thing wrong ! My (quite simple) demos are running at 60 fps and hardly any CPU load.

What configuration have you changed ? (Hint: I've changed nothing).

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:42 pm

Unless I've made a huge error.... it does seem that switching to mesa-> x11 means that your projects run with 0 hardware gpu at all? Its all emulated

And that trying to build an older OpenGLES2.0 project with dispmanx and EGL will simply not run on a Pi 4 at this time?

Can someone from tech confirm this?
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!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5073
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:43 pm

Oh, hang on, you're doing this on a Pi3 ?
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:46 pm

PeterO wrote:
Sun Jun 30, 2019 7:40 pm
You are doing some thing wrong ! My (quite simple) demos are running at 60 fps and hardly any CPU load.

What configuration have you changed ? (Hint: I've changed nothing).

PeterO
well the key point in that statment is "quite simple".... even emulating you can push a few dozen poly's around with no effort at 100fps. But I'm tyring to run a few 10's for thousands of tris, and need hardware GPU to do it... 2's manage around 40fps 3B and 3B+ get to 60
With the Pi 4, I'm simply not getting it

I've taken out the Broadcom and dispmanX systems and replaced them with mesa and X11, there's no more reference to those systems, and its running pure mesa...at 5FPS and the CPU is on fire....
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!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 7:47 pm

PeterO wrote:
Sun Jun 30, 2019 7:43 pm
Oh, hang on, you're doing this on a Pi3 ?
PeterO
no, I have this demo running on all Pi's only the zero suffers slow down. The 2's and 3's manage 50-60FPS, the Pi4 with mesa and X11 barely makes 5FPS
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!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 8:01 pm

its basically this demo with more models added and the camera at eye level

http://tinymonstersplayinggames.blogspo ... video.html
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!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5073
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 8:24 pm

Where can we find the code to try out ?
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 8:25 pm

I'll upload it to my site hang on but you'll need visualGDB to build it

actually no, the current demo is too messy trying to fix the Pi4 stuff. But you can get a general version here
http://www.scratchpadgames.net/Files/Un ... edtest.rar
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!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5073
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 8:34 pm

Brian Beuken wrote:
Sun Jun 30, 2019 8:25 pm
I'll upload it to my site hang on but you'll need visualGDB to build it
Sorry, can't help you then.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Sun Jun 30, 2019 8:39 pm

no worries, I think its pretty clear that currently there is no hardware access to the GPU, I just want to get that confirmed by someone at the foundation and an estimate of when hardware drivers will be available. Until then the Pi4 is no use to me.
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!
http://www.scratchpadgames.net/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23888
Joined: Sat Jul 30, 2011 7:41 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 9:04 am

Brian Beuken wrote:
Sun Jun 30, 2019 8:39 pm
no worries, I think its pretty clear that currently there is no hardware access to the GPU, I just want to get that confirmed by someone at the foundation and an estimate of when hardware drivers will be available. Until then the Pi4 is no use to me.
Absolutely and categorically wrong. You have removed all the HW accelerated drivers from your system judging from your posts above, so not really very surprising that you are not getting HW acceleration.

Install and run Neverball - you should get 60fps on 1080p60. If you don't, your install is borked.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 11:05 am

What did I do that removed them?

I only installed libgles2-mesa-dev and xorg-dev
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!
http://www.scratchpadgames.net/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23888
Joined: Sat Jul 30, 2011 7:41 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 11:28 am

Brian Beuken wrote:
Sun Jun 30, 2019 7:46 pm
I've taken out the Broadcom and dispmanX systems and replaced them with mesa and X11, there's no more reference to those systems, and its running pure mesa...at 5FPS and the CPU is on fire....
This statement.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 11:37 am

jamesh wrote:
Mon Jul 01, 2019 11:28 am
Brian Beuken wrote:
Sun Jun 30, 2019 7:46 pm
I've taken out the Broadcom and dispmanX systems and replaced them with mesa and X11, there's no more reference to those systems, and its running pure mesa...at 5FPS and the CPU is on fire....
This statement.
they are still on the board, I meant I took out all references to them in the code, instead of linking EGL_static or brcmEGL, I now link EGL from Mesa.. and no longer set up dispmanx, so no bcm_host, but X11 for xwindow...this is the advice given on these forums?
Last edited by Brian Beuken on Mon Jul 01, 2019 11:50 am, edited 1 time 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!
http://www.scratchpadgames.net/

User avatar
PeterO
Posts: 5073
Joined: Sun Jul 22, 2012 4:14 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 11:44 am

Brian,

Try to compile this on the Pi

https://wiki.maemo.org/SimpleGL_example

It's worked for everyone else.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 11:48 am

PeterO wrote:
Mon Jul 01, 2019 11:44 am
Brian,

Try to compile this on the Pi

https://wiki.maemo.org/SimpleGL_example

It's worked for everyone else.

PeterO
thanks Peter, I will do that later as Im not at my pi desk, but reading the code, it is very much the same basic systems I use to set up OpenGL/EGL (I listed it elsewhere)

It will probably work fine, but as I noted before also, this is doing 5 tristrips......not many, and even emulated mesa libs can do that at 60fps.. its not really comparable, I can get my demo to run, its just not accelerated.

I'll let you know how I get on.
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!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 12:10 pm

PeterO wrote:
Mon Jul 01, 2019 11:44 am
Brian,

Try to compile this on the Pi

https://wiki.maemo.org/SimpleGL_example

It's worked for everyone else.

PeterO
since it might be a while before I can get to my pi desk Peter, I have an idea,;try putting the draw in a loop and draw 1000 of those quads, its not good to do so many draw calls, but even so, you should still get it runniing around 60fps... if not you will be having the same issues as me.
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!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Mon Jul 01, 2019 11:11 pm

PeterO wrote:
Mon Jul 01, 2019 11:44 am
Brian,

Try to compile this on the Pi

https://wiki.maemo.org/SimpleGL_example

It's worked for everyone else.

PeterO
ok so yes... I got this to build, and run(I had to cast win to a NativeWindowType but otherwise it was as you provided it.) ... but here's the thing... only with Mesa Libs in place.... and glxinfo already informed me that as soon as I installed mesa libs I lost acceleration
I also got this
libEGL warning: DRI2: failed to authenticate

Even running locally, via ssh, or on target terminal... same result, btw frame rate is 25ish FPS...for one quad!!!

I note in the other thread, that as soon as do apt-get install libgles2-mesa-dev
glxinfo reports that I lose my acceleration and revert to emulation modes.

So indeed I can get any project to run, with mesa libs installed, but not accelerated.
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!
http://www.scratchpadgames.net/

Brian Beuken
Posts: 177
Joined: Fri Jan 29, 2016 12:51 pm

Re: GLES3.0 :D at last

Tue Jul 02, 2019 1:06 am

Problem solved, I did switch off the GL Fake KMS libs...in an early effort to get normal gles2.0 to work, and left it off, as a result mesa didn't have any access to drivers to work with and emulated.

still error on my part, but hey, now we know and if you have similar issues this will help others
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!
http://www.scratchpadgames.net/

Return to “OpenGLES”