문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top