| Message ID | 20260810105942.1098192-4-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: > `glGetString()` should be available in all version of OpenGL and OpenGL ES, > so there should be no need to load it with `eglGetProcAddress()` like it is > done for extension functions. > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > --- > include/libcamera/internal/egl.h | 1 - > src/libcamera/egl.cpp | 6 ------ > 2 files changed, 7 deletions(-) > > diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h > index f8ae486a8d..6abb02bf3b 100644 > --- a/include/libcamera/internal/egl.h > +++ b/include/libcamera/internal/egl.h > @@ -142,6 +142,5 @@ private: > PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; > PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; > PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; > - PFNGLGETSTRINGPROC glGetString; > }; > } //namespace libcamera > diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp > index 900d2174df..0768a840e6 100644 > --- a/src/libcamera/egl.cpp > +++ b/src/libcamera/egl.cpp > @@ -410,12 +410,6 @@ int eGL::initEGLContext() > goto fail; > } > > - glGetString = (PFNGLGETSTRINGPROC)eglGetProcAddress("glGetString"); > - if (!glGetString) { > - LOG(eGL, Error) << "glGetString not found"; > - goto fail; > - } > - > if (eglChooseConfig(display_, configAttribs, &config, 1, &numConfigs) != EGL_TRUE) { > LOG(eGL, Error) << "eglChooseConfig fail"; > goto fail;
2026. 08. 10. 15:19 keltezéssel, Milan Zamazal írta: > Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes: > >> `glGetString()` should be available in all version of OpenGL and OpenGL ES, >> so there should be no need to load it with `eglGetProcAddress()` like it is >> done for extension functions. >> >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Sorry, I must have missed it in v1. > >> --- >> include/libcamera/internal/egl.h | 1 - >> src/libcamera/egl.cpp | 6 ------ >> 2 files changed, 7 deletions(-) >> >> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h >> index f8ae486a8d..6abb02bf3b 100644 >> --- a/include/libcamera/internal/egl.h >> +++ b/include/libcamera/internal/egl.h >> @@ -142,6 +142,5 @@ private: >> PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; >> PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; >> PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; >> - PFNGLGETSTRINGPROC glGetString; >> }; >> } //namespace libcamera >> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp >> index 900d2174df..0768a840e6 100644 >> --- a/src/libcamera/egl.cpp >> +++ b/src/libcamera/egl.cpp >> @@ -410,12 +410,6 @@ int eGL::initEGLContext() >> goto fail; >> } >> >> - glGetString = (PFNGLGETSTRINGPROC)eglGetProcAddress("glGetString"); >> - if (!glGetString) { >> - LOG(eGL, Error) << "glGetString not found"; >> - goto fail; >> - } >> - >> if (eglChooseConfig(display_, configAttribs, &config, 1, &numConfigs) != EGL_TRUE) { >> LOG(eGL, Error) << "eglChooseConfig fail"; >> goto fail; >
diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h index f8ae486a8d..6abb02bf3b 100644 --- a/include/libcamera/internal/egl.h +++ b/include/libcamera/internal/egl.h @@ -142,6 +142,5 @@ private: PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; - PFNGLGETSTRINGPROC glGetString; }; } //namespace libcamera diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp index 900d2174df..0768a840e6 100644 --- a/src/libcamera/egl.cpp +++ b/src/libcamera/egl.cpp @@ -410,12 +410,6 @@ int eGL::initEGLContext() goto fail; } - glGetString = (PFNGLGETSTRINGPROC)eglGetProcAddress("glGetString"); - if (!glGetString) { - LOG(eGL, Error) << "glGetString not found"; - goto fail; - } - if (eglChooseConfig(display_, configAttribs, &config, 1, &numConfigs) != EGL_TRUE) { LOG(eGL, Error) << "eglChooseConfig fail"; goto fail;
`glGetString()` should be available in all version of OpenGL and OpenGL ES, so there should be no need to load it with `eglGetProcAddress()` like it is done for extension functions. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- include/libcamera/internal/egl.h | 1 - src/libcamera/egl.cpp | 6 ------ 2 files changed, 7 deletions(-)