That's odd, I'm seeing ~50fps. I converted it into C (I don't do C++) but had to add -I/opt/vc/include so gcc could find gl2.hdom wrote: ↑Tue Jun 25, 2019 7:46 pmWhat resolution are you running and what framerate are you seeing?PeterO wrote: ↑Tue Jun 25, 2019 7:04 pmWhat I'm not clear about is how the new architecture interacts with the hardware..
The frames per second performance of that example is not what would have expected, which leads me to think it isn't using the hardware to
got the openGLES rendering but is using slower arm side "new" stuff ?.
I'm seeing about 24fps at 1080p.
But it then goes on to link with libGLES2.so from /usr/lib/gnueabihf/libGLESv2.so
The c++ version wont compile as it complains about a couple of things...
Code: Select all
test.cc: In function ‘int main()’:
test.cc:287:62: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘EGLNativeWindowType’ {aka ‘void*’} [-fpermissive]
egl_surface = eglCreateWindowSurface ( egl_display, ecfg, win, NULL );
^~~
In file included from test.cc:22:
/opt/vc/include/EGL/egl.h:266:27: note: initializing argument 3 of ‘void* eglCreateWindowSurface(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*)’
EGLNativeWindowType win,
~~~~~~~~~~~~~~~~~~~~^~~
I didn't look at the shader code so I didn't realise it was quite so maths heavy !That will be using hardware. For every pixel it is calculatingwhich is a *lot* of trig operations per second.Code: Select all
vec4( 1., 0.9, 0.7, 1.0 ) * \ cos( 30.*sqrt(pos.x*pos.x + 1.5*pos.y*pos.y) \ + atan(pos.y,pos.x) - phase );
PeterO
PS: Maybe we should take this over to the graphics programming/OpenGLES forum ?