UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    problem with gles2

    Scheduled Pinned Locked Moved App Development
    8 Posts 4 Posters 1.6k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      lxsed
      last edited by

      Hello, I encountered a problem developing a GLES2 application on ubuntu touch, cmake simply does not see the installed GLES2 (libgles2-mesa-dev. It is installed both on the system itself and in the build container, as indicated in the clickable.yaml)

      "Could not find OpenGL (missing: GLES2)"

      Moreover, if I try to find a package using pkg-config(in cmake), it compiles successfully, but a link error occurs, for some reason the reference to libGL(idk) remains

      CiberSheepC 1 Reply Last reply Reply Quote 0
      • K Offline
        kugiigi
        last edited by

        I'm not knowledgeable on this topic but I would suggest checking out some apps in the store that might be helpful...at least I guess they could be πŸ˜…

        • Circle Jump (uses Godot)
        • Tux Racer (uses SDL2 specifically built for mirclient)
        L 1 Reply Last reply Reply Quote 0
        • CiberSheepC Offline
          CiberSheep @lxsed
          last edited by CiberSheep

          @lxsed I think you need to specify the lib in the clickable yml file:

          https://clickable-ut.dev/en/latest/project-config.html#install-lib

          Maybe this helps:
          https://github.com/rinigus/pure-maps/blob/master/packaging/click/full-build.yaml#L24

          Another planet, another time, another universe!

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            lxsed @CiberSheep
            last edited by

            @CiberSheep for what? gles2 is supported in ubuntu touch by default, the so file is needed only so that the linker does not complain about the lack of lib

            1 Reply Last reply Reply Quote 0
            • L Offline
              lxsed @kugiigi
              last edited by

              @kugiigi I think why not port cocos2d-x or any engine that uses GLES
              that would be very cool

              1 Reply Last reply Reply Quote 0
              • L Offline
                lxsed
                last edited by lxsed

                If I manually link the GLES and EGL libraries(using pkg-config), the compiler won't find the gl symbols.

                -- Checking for module 'glesv2'
                -- Found glesv2, version 3.2
                -- Checking for module 'egl'
                -- Found egl, version 1.5

                /usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/opengltest.dir/main.cpp.o: undefined reference to symbol 'glColor3f'
                /usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /lib/aarch64-linux-gnu/libGL.so.1: error adding symbols: DSO missing from command line

                from cmakelists:
                find_package(PkgConfig)
                pkg_check_modules(GLES2 REQUIRED IMPORTED_TARGET GLOBAL glesv2)
                pkg_check_modules(EGL REQUIRED IMPORTED_TARGET GLOBAL egl)

                target_link_libraries(${PROJECT_NAME} Qt5::Gui Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::OpenGL PkgConfig::GLES2 PkgConfig::EGL)

                AppLeeA 1 Reply Last reply Reply Quote 0
                • AppLeeA Offline
                  AppLee @lxsed
                  last edited by

                  Hi @lxsed

                  The previous comments seemed relevant to me.
                  Alfred just shared this project of his linking a lib.
                  I understand your situation is a bit different, but you might find pointers

                  https://github.com/fredldotme/webhunt/blob/main/clickable.yaml#L5

                  Or you can share you sources so we can better understand your issue.
                  Because to me the snippets you shared don't make sense and I need more info to understand what is the issue you're facing.

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    lxsed @AppLee
                    last edited by

                    @AppLee https://github.com/VIRalZah/glestest-ut

                    the problem is that either GLES2 does not have the necessary symbols from opengl (I checked glClear and glClearColor work, but everything else is an undefined reference),
                    or for some reason the linker doesn’t see them

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better πŸ’—

                    Register Login
                    • First post
                      Last post