Domanda

I am working in OpenGL ES 2.0 with C. (Not Android) I want to change the size of the egl surface so that i can render two different contexts on the screen at the same time.

Is it possible to resize the egl surface?

È stato utile?

Soluzione

What platform / window system is being used ? The windowsurface comes from the "window" - and hence depends on the windowsystem - for example, if using X, it will come from a client window. If using fullscreen "NULL" windowsystem, the size of the framebuffer. If Qt, a widgetsurface or similar.

Example using a NULL system is below:

https://github.com/prabindh/sgxperf/blob/master/sgxperf_gles20_vg.cpp

To answer - EGL only refers to a window already created, hence cannot resize it by itself. When a client window is resized, EGL then has to update its internals, not the other way round.

You can use glviewport to target different areas of the screen.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top