tareksander / termux-gfx-wrapper

Mozilla Public License 2.0
17 stars 0 forks source link

not working #10

Closed kde-yyds closed 1 year ago

kde-yyds commented 1 year ago
u0_a183@localhost ~> git clone https://github.com/tareksander/termux-gfx-wrapper
Cloning into 'termux-gfx-wrapper'...
remote: Enumerating objects: 219, done.
remote: Counting objects: 100% (219/219), done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 219 (delta 122), reused 164 (delta 72), pack-reused 0
Receiving objects: 100% (219/219), 111.73 KiB | 572.00 KiB/s, done.
Resolving deltas: 100% (122/122), done.
u0_a183@localhost ~> cd termux-gfx-wrapper
u0_a183@localhost ~/termux-gfx-wrapper (main)> mkdir build
u0_a183@localhost ~/termux-gfx-wrapper (main)> cd build/
u0_a183@localhost ~/t/build (main)> cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX
-- The C compiler identification is Clang 15.0.6
-- The CXX compiler identification is Clang 15.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /data/data/com.termux/files/home/termux-gfx-wrapper/build
u0_a183@localhost ~/t/build (main)> make -j8 install
[  8%] Building CXX object CMakeFiles/vulkan-android.dir/src/common/android.cpp.o
[ 16%] Building CXX object CMakeFiles/egl-android.dir/src/egl/egl.cpp.o
[ 25%] Building CXX object CMakeFiles/egl-android.dir/src/egl/x11-display.cpp.o
[ 33%] Building CXX object CMakeFiles/egl-android.dir/src/egl/android-display.cpp.o
[ 41%] Building CXX object CMakeFiles/egl-android.dir/src/egl/dispatch.cpp.o
[ 50%] Building CXX object CMakeFiles/egl-android.dir/src/egl/gles.cpp.o
[ 58%] Building C object CMakeFiles/vulkan-android.dir/wayland/hwbuf.c.o
[ 66%] Building CXX object CMakeFiles/vulkan-android.dir/src/vulkan/vulkan.cpp.o
[ 75%] Building CXX object CMakeFiles/egl-android.dir/src/egl/surface.cpp.o
[ 83%] Building CXX object CMakeFiles/egl-android.dir/src/common/android.cpp.o
[ 91%] Linking CXX shared library libvulkan-android.so
[ 91%] Built target vulkan-android
[100%] Linking CXX shared library libegl-android.so
[100%] Built target egl-android
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /data/data/com.termux/files/usr/lib/libegl-android.so
-- Installing: /data/data/com.termux/files/usr/share/glvnd/egl_vendor.d/10_android_wrapper.json
u0_a183@localhost ~/t/build (main)> export __EGL_VENDOR_LIBRARY_FILENAMES="$PREFIX/share/glvnd/egl_vendor.d/10_android_wrapper.json"
u0_a183@localhost ~/t/build (main)> export DISPLAY=:1
u0_a183@localhost ~/t/build (main)> glmark2-es2
Error: eglGetDisplay() failed with error: 0x3000
Error: main: Could not initialize canvas
u0_a183@localhost ~/t/build (main) [1]>
tareksander commented 1 year ago

Do you have the DISPLAY variable set and an X server running?

kde-yyds commented 1 year ago

Do you have the DISPLAY variable set and an X server running?

yes

kde-yyds commented 1 year ago

Do you have the DISPLAY variable set and an X server running?

In the same terminal, glmark2-es2 works with mesa.

u0_a183@localhost ~/t/build (main) [1]> __EGL_VENDOR_LIBRARY_FILENAMES=/data/data/com.termux/files/usr/share/glvnd/egl_vendor.d/50_mesa.json glmark2-es2
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    llvmpipe (LLVM 16.0.2, 128 bits)
    GL_VERSION:     OpenGL ES 3.2 Mesa 23.0.3
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false:^C⏎                                       

u0_a183@localhost ~/t/build (main) [SIGINT]> __EGL_VENDOR_LIBRARY_FILENAMES=/data/data/com.termux/files/usr/share/glvnd/egl_vendor.d/10_android_wrapper.json glmark2-es2
Error: eglGetDisplay() failed with error: 0x3000
Error: main: Could not initialize canvas
u0_a183@localhost ~/t/build (main) [1]>
tareksander commented 1 year ago

Does xdpyinfo -ext MIT-SHM report support for shared pixmaps? That is needed. I personally only tested it with Termux:X11.

kde-yyds commented 1 year ago

Does xdpyinfo -ext MIT-SHM report support for shared pixmaps? That is needed. I personally only tested it with Termux:X11.

i'm also using termux-x11 I updated the xwayland package and it now works.(I built xwayland by myself, and MIT-SHM didn't work)

kde-yyds commented 1 year ago

but this time i always get error message

could not create EGLImage from HardwareBuffer              
resize
tareksander commented 1 year ago

Try setting the TERMUX_EGL_DISABLE_HWBUF variable. This is still in early development and could break again.

kde-yyds commented 1 year ago

Try setting the TERMUX_EGL_DISABLE_HWBUF variable. This is still in early development and could break again.

It works