From: <be...@be...> - 2014-06-24 10:30:49
|
My question is not about the spec, it's about Android. If things work already with just GLESv2 I hope we can avoid re-introducing multiple .so FreeGLUT libs, which is a PITA to maintain in the long run. - Sylvain On Tue, Jun 24, 2014 at 11:33:05AM +0300, Matti Lehtonen wrote: > Hi, > > > On 24 June 2014 11:14, <be...@be...> wrote: > > > Hi, > > > > Do we *have* to link with libGLESv3 ? > > Does it work with GLES2 as with other platforms? > > > > The Khronos API Implementers Guide (4th edition) says following in > *Table 1. Header > File Names and Locations for Uncontrolled Platforms* (e.g. Linux): > OpenGL® ES 3.xGLES3gl3.h > <http://www.khronos.org/registry/gles/api/3.0/gl3.h>#include <GLES3/gl3.h> > Khronosgl3platform.h > <http://www.khronos.org/registry/gles/api/3.0/gl3platform.h>Included by > gl3.hKhronos, possibly modified by *Vendor > <http://www.khronos.org/registry/implementers_guide.html#gls_vendor>* > or *Implementer > <http://www.khronos.org/registry/implementers_guide.html#gls_implementer>* > gl3ext.h <http://www.khronos.org/registry/gles/api/3.0/gl3ext.h>#include > <GLES3/gl3ext.h>Khronosglu{,3}.hReserved for future use > while libraries > OpenGL ES 3.xCore without EGLGLESv2[f > <http://www.khronos.org/registry/implementers_guide.html#ftn.idm58020557104> > ]UtilitiesGLUESv2[e > <http://www.khronos.org/registry/implementers_guide.html#ftn.fnreserved>] > For Vendor Controlled Platform (e.g Android): > > *Implementers > <http://www.khronos.org/registry/implementers_guide.html#gls_implementer>* > should follow any linkage specifications established by the *platform > vendor <http://www.khronos.org/registry/implementers_guide.html#gls_vendor>* > . > > - > > Use the header files, (e.g., for OpenGL ES, gl.h, glext.h & egl.h) > provided by the *platform vendor > <http://www.khronos.org/registry/implementers_guide.html#gls_vendor>*. > - > > Package header files in the same containing folder used by the *platform > vendor <http://www.khronos.org/registry/implementers_guide.html#gls_vendor>* > . > - > > Use the library names specified by the *platform vendor > <http://www.khronos.org/registry/implementers_guide.html#gls_vendor>*. > > > However, the Android NDK (API 18 & 19) have libGLESv3.so libraries. > > > Matti L > > > > > > > - Sylvain > > > > On Tue, Jun 24, 2014 at 11:07:37AM +0300, Matti Lehtonen wrote: > > > Hi, > > > > > > > > > On 24 June 2014 10:06, Diederick C. Niehorster <dc...@gm...> > > wrote: > > > > > > > Hi All, > > > > > > > > Merged Vinnie's changes. Matti, a test would still very much be > > > > appreciated when you get the time. > > > > > > > > > > I have attached a patch file, which is required to build a separate > > library > > > (libfreeglut-gles3.*) using non-standard GLES 3 headers and library. If a > > > separate library is not wanted, feel free to modify the patch > > accordingly. > > > > > > How ever, when I try to build the demos, the linking fails. May I assume > > > that this is the expected result for demos. > > > > > > I will test later in the evening with the generated FreeGLUT ES library > > and > > > my application which uses occlusion queries (introduced in OpenGL [ES] > > 3.x) > > > > > > > > > Matti L > > > > > > On Sat, Jun 21, 2014 at 11:05 AM, Diederick C. Niehorster > > > <dc...@gm...> wrote: > > > > Hi Sylvain, Matti, > > > > > > > > On Sat, Jun 21, 2014 at 10:15 AM, <be...@be...> wrote: > > > >> On Sat, Jun 21, 2014 at 08:21:32AM +0200, Diederick C. Niehorster > > wrote: > > > >>> Hi Guys, > > > >>> > > > >>> On Fri, Jun 20, 2014 at 9:23 PM, <be...@be...> wrote: > > > >>> > I'd add that according to: > > > >>> > https://developer.android.com/about/dashboards/index.html > > > >>> > there's still a large userbase not using API level 18 nor 19. > > > >>> > > > > >>> > Forcibly compiling FreeGlut against GLES3 would make your > > application > > > >>> > fail to load for them. > > > >>> > > > > >>> > I don't own a GLES3 device so I can't test if libGLES3 is > > mandatory. > > > >>> > > > >>> Thanks for al the tests! So is the above a concern with the proposed > > > >>> patch, or is it only minor and I should apply? > > > >> > > > >> That was about the suggestion to link against libGLESv3, which is only > > > >> deployed in <25% of registered Android devices, hence not practical. > > > >> And I meant I didn't know if it was mandatory *for requesting a GLES3 > > > >> context*, but other modes run fine without in FreeGLUT. > > > >> > > > >> The patch itself doesn't break anything AFAICT so do apply :) > > > > > > > > Thanks for finding the time to test and discuss! That explains.. > > > > > > > > As Matti hopes to find some time to test as well (till end of weekend > > > > otherwise I'll merge and of course accept patches to it later), I'll > > > > wait for that and then apply the patch. > > > > > > > > Also, I received your message on updating the shapes test app. As I > > > > cannot test, hope one of the others might want to have a look. Lets > > > > remember, it do needs to be done before a release. > > > > > > > > All the best, > > > > Dee > > > > > > > > ------------------------------------------------------------------------------ > > > > > > > Open source business process management suite built on Java and Eclipse > > > > Turn processes into business applications with Bonita BPM Community > > Edition > > > > Quickly connect people, data, and systems into organized workflows > > > > Winner of BOSSIE, CODIE, OW2 and Gartner awards > > > > http://p.sf.net/sfu/Bonitasoft > > > > _______________________________________________ > > > > Freeglut-developer mailing list > > > > Fre...@li... > > > > https://lists.sourceforge.net/lists/listinfo/freeglut-developer > > > > > > > > > > > > > > > > -- > > > Life is complex. It has real and imaginary parts. > > > > > diff --git a/freeglut/freeglut/CMakeLists.txt > > b/freeglut/freeglut/CMakeLists.txt > > > index d45b9a5..1519a07 100644 > > > --- a/freeglut/freeglut/CMakeLists.txt > > > +++ b/freeglut/freeglut/CMakeLists.txt > > > @@ -41,6 +41,7 @@ ENDIF() > > > > > > # OpenGL ES support > > > OPTION(FREEGLUT_GLES "Use OpenGL ES (requires EGL)" OFF) > > > +OPTION(FREEGLUT_USING_NONSTANDARD_GLES3 "Use OpenGL ES with > > non-standard OpenGL ES 3 headers and library" OFF) > > > > > > > > > SET(FREEGLUT_HEADERS > > > @@ -204,7 +205,13 @@ ENDIF() > > > # GLES1 and GLES2 libraries are compatible and can be co-linked. > > > IF(FREEGLUT_GLES) > > > ADD_DEFINITIONS(-DFREEGLUT_GLES) > > > - LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) > > > + IF(FREEGLUT_USING_NONSTANDARD_GLES3) > > > + ADD_DEFINITIONS(-DFREEGLUT_USING_NONSTANDARD_GLES3) > > > + LIST(APPEND LIBS GLESv3) > > > + ELSE() > > > + LIST(APPEND LIBS GLESv2) > > > + ENDIF() > > > + LIST(APPEND LIBS GLESv1_CM EGL) > > > ELSE() > > > FIND_PACKAGE(OpenGL REQUIRED) > > > LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) > > > @@ -364,7 +371,11 @@ ELSE() > > > # won't have to link them explicitly (they shouldn't have to know > > that we depend > > > # on Xrandr or Xxf86vm) > > > IF(FREEGLUT_GLES) > > > - SET(LIBNAME freeglut-gles) > > > + IF(FREEGLUT_USING_NONSTANDARD_GLES3) > > > + SET(LIBNAME freeglut-gles3) > > > + ELSE() > > > + SET(LIBNAME freeglut-gles) > > > + ENDIF() > > > ELSE() > > > SET(LIBNAME glut) > > > ENDIF() > > > @@ -483,7 +494,11 @@ IF(WIN32) > > > SET(PC_LIBS_PRIVATE "-lopengl32 -lwinmm -lgdi32 -lm") > > > ELSEIF(FREEGLUT_GLES) > > > IF(ANDROID) > > > - SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv2 -lGLESv1_CM -lEGL > > -lm") > > > + if(FREEGLUT_USING_NONSTANDARD_GLES3) > > > + SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv3 -lGLESv1_CM -lEGL > > -lm") > > > + ELSE() > > > + SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv2 -lGLESv1_CM -lEGL > > -lm") > > > + ENDIF() > > > ELSEIF(BLACKBERRY) > > > IF(PLAYBOOK) > > > SET(PC_LIBS_PRIVATE "-lbps -lscreen -lGLESv2 -lGLESv1_CM -lEGL > > -lm") > > > @@ -502,8 +517,14 @@ SET(PC_LIBNAME "glut") > > > SET(PC_FILENAME "freeglut.pc") > > > IF(FREEGLUT_GLES) > > > SET(PC_CFLAGS "-DFREEGLUT_GLES") > > > - SET(PC_LIBNAME "freeglut-gles") > > > - SET(PC_FILENAME "freeglut-gles.pc") > > > + IF(FREEGLUT_USING_NONSTANDARD_GLES3) > > > + SET(PC_CFLAGS "-DFREEGLUT_USING_NONSTANDARD_GLES3") > > > + SET(PC_LIBNAME "freeglut-gles3") > > > + SET(PC_FILENAME "freeglut-gles3.pc") > > > + ELSE() > > > + SET(PC_LIBNAME "freeglut-gles") > > > + SET(PC_FILENAME "freeglut-gles.pc") > > > + ENDIF() > > > ENDIF() > > > CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freeglut.pc.in > > ${CMAKE_BINARY_DIR}/freeglut.pc @ONLY) > > > INSTALL(FILES ${CMAKE_BINARY_DIR}/freeglut.pc DESTINATION > > share/pkgconfig/ RENAME ${PC_FILENAME}) > > > diff --git a/freeglut/freeglut/include/GL/freeglut_std.h > > b/freeglut/freeglut/include/GL/freeglut_std.h > > > index b24fced..caf52b3 100644 > > > --- a/freeglut/freeglut/include/GL/freeglut_std.h > > > +++ b/freeglut/freeglut/include/GL/freeglut_std.h > > > @@ -134,8 +134,13 @@ > > > (e.g. GL_ES_VERSION_2_0) for all other needs */ > > > #ifdef FREEGLUT_GLES > > > # include <EGL/egl.h> > > > -# include <GLES/gl.h> > > > -# include <GLES2/gl2.h> > > > +# ifdef FREEGLUT_USING_NONSTANDARD_GLES3 > > > +# include <GLES/gl.h> > > > +# include <GLES3/gl3.h> > > > +# else > > > +# include <GLES/gl.h> > > > +# include <GLES2/gl2.h> > > > +# endif > > > #elif __APPLE__ > > > # include <OpenGL/gl.h> > > > # include <OpenGL/glu.h> > > > > > > -- > Life is complex. It has real and imaginary parts. |