Open darmie opened 6 years ago
I'm in no way an expert on these things, but I've been playing with this library for awhile too (though I haven't actually tried to get it up and running on Android).
I'm guessing these are the critical lines:
gles_state_set_error_internal:75: [MALI] GLES ctx: 0xa6680008, error code:0x502
gles_state_set_error_internal:76: [MALI] GLES error info: OpenGL ES API version mismatch
I got similar errors when attempting to run it on MacOS, where I needed to select a more appropriate OpenGL version number (i.e., not simply the highest possible version).
I can see a few different versions being identified in your const file. I suspect one of them might not be valid on the particular hardware/OS device you're working with.
The second error (0x502) is an Invalid Operation, which is pretty likely if the environment version is incompatible.
Hope that's helpful.
@lukebayes thanks for your contribution, I was able to fix those issues and they no longer come up. However, I am still getting a blank screen. Could it be how I am passing the vertexes?
06-09 02:51:09.538 13579-13617/? D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
06-09 02:51:09.542 13579-13617/? I/GolangExample: EGL display res: 720x1280
06-09 02:51:09.542 13579-13614/? I/GolangExample: INIT GL
06-09 02:51:09.553 13579-13614/? I/GolangExample: NewContext &{false 0xb7aea080}
06-09 02:51:09.554 13579-13614/? I/GolangExample: Context &{0xb7ae6010 [] 0 0 [] {[] [] [] [0 0 0 0]} 0 0 0 0 <nil> [0 0 0 0] 0 0 0 0 0}
06-09 02:51:09.585 13579-13614/? I/GolangExample: vertex shader status 1
06-09 02:51:09.610 13579-13614/? I/GolangExample: fragment shader status 1
06-09 02:51:09.672 13579-13614/? I/GolangExample: Program status 1
06-09 02:51:09.673 13579-13614/? I/GolangExample: GetUniforms &{1 3 2 [1 0 -1] 0 1}
06-09 02:51:09.673 13579-13617/? I/GolangExample: 1
06-09 02:51:09.673 13579-13614/? I/GolangExample: Render Create
06-09 02:51:09.674 13579-13614/? I/GolangExample: Create Internal
06-09 02:51:09.873 13579-13614/? I/GolangExample: draw
06-09 02:51:09.873 13579-13614/? I/GolangExample: view port
06-09 02:51:09.873 13579-13614/? I/GolangExample: clear color
06-09 02:51:09.929 13579-13617/? D/GraphicBuffer: register, handle(0xef634640) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
06-09 02:51:09.931 13579-13614/? I/GolangExample: begin frame
06-09 02:51:09.936 13579-13614/? I/GolangExample: Draw Window
06-09 02:51:09.939 13579-13614/? I/GolangExample: Draw Search
06-09 02:51:09.941 13579-13614/? I/GolangExample: Draw DropDown
06-09 02:51:09.942 13579-13614/? I/GolangExample: Draw Label
06-09 02:51:09.943 13579-13614/? I/GolangExample: Draw Edit Box
06-09 02:51:09.944 13579-13614/? I/GolangExample: Draw Password
06-09 02:51:09.946 13579-13614/? I/GolangExample: Draw Checkbox
06-09 02:51:09.948 13579-13614/? I/GolangExample: Draw Button
06-09 02:51:09.954 13579-13614/? I/GolangExample: finished rendering
06-09 02:51:09.994 13579-13617/? I/GolangExample: vertex: [50 53 0.5 1 50 447 0.5 1 50.878677 449.12134 0.5 1 53 450 0.5 1 347 450 0.5 1 349.12134 449.12134 0.5 1 350 447 0.5 1 350 53 0.5 1 349.12134 50.878677 0.5 1 347 50 0.5 1 53 50 0.5 1 50.878677 50.878677 0.5 1 50 450 0.5 1 350 450 0.5 1 350 50 0.5 1 50 450 0.5 1 350 50 0.5 1 50 50 0.5 1 40 40 0.5 1 40 470 0.5 1 360 470 0.5 1 360 40 0.5 1 50.878677 50.878677 0.5 1 53 50 0.5 1 347 50 0.5 1 349.12134 50.878677 0.5 1 350 53 0.5 1 350 447 0.5 1 349.12134 449.12134 0.5 1 347 450 0.5 1 53 450 0.5 1 50.878677 449.12134 0.5 1 50 447 0.5 1 50 53 0.5 1 40 470 0.5 1 360 470 0.5 1 360 40 0.5 1 40 470 0.5 1 360 40 0.5 1 40 40 0.5 1 51 53 0.5 1 51 79 0.5 1 51.585785 80.414215 0.5 1 53 81 0.5 1 347 81 0.5 1 348.41425 80.414215 0.5 1 349 79 0.5 1 349 53 0.5 1 348.41425 51.585785 0.5 1 347 51 0.5 1 53 51 0.5 1 51.585785 51.585785 0.5 1 51 81 0.5 1 349 81 0.5 1 349 51 0.5 1 51 81 0.5 1 349 51 0.5 1 51 51 0.5 1 49.61111 79.611115 0 0 49.61111 81.388885 1 0 51.38889 79.611115 0 1 51.38889 81.388885 1 1 348.6111 79.611115 0 1 348.6111 81.388885 1 1 350.3889 79.611115 0 0 350.3889 81.388885 1 0 165.33333 56.88889 0.02734375 0.001953125 145.77779 56.88889 0.005859375 0.001953125 165.33333 74.666664 0.02734375 0.021484375 145.77779 74.666664 0.005859375 0.021484375 168.88889 56.88889 0.04296875 0.001953125 158.22223 56.88889 0.03125 0.001953125 168.88889 74.666664 0.04296875 0.021484375 158.22223 74.666664 0.03125 0.021484375 176 56.88889 0.0625 0.001953125 161.77779 56.88889 0.046875 0.001953125 176 76.44444 0.0625 0.0234375 161.77779 76.44444 0.046875 0.0234375 183.11111 58.666668 0.08203125 0.001953125 168.88889 58.666668 0.06640625 0.001953125 183.11111 78.22222 0.08203125 0.0234375 168.88889 78.22222 0.06640625 0.0234375 190.22223 58.666668 0.1015625 0.001953125 176 58.666668 0.0859375 0.001953125 190.22223 76.44444 0.1015625 0.021484375 176 76.44444 0.0859375 0.021484375 195.55556 56.88889 0.119140625 0.001953125 183.11111 56.88889 0.10546875 0.001953125 195.55556 76.44444 0.119140625 0.0234375 183.11111 76.44444 0.10546875 0.0234375 202.66667 58.666668 0.13867188 0.001953125 188.44444 58.666668 0.123046875 0.001953125 202.66667 76.44444 0.13867188 0.021484375 188.44444 76.44444 0.123046875 0.021484375 202.66667 67.55556 0.15039062 0.001953125 195.55556 67.55556 0.14257812 0.001953125 202.66667 74.666664 0.15039062 0.009765625 195.55556 74.666664 0.14257812 0.009765625 211.55556 56.88889 0.16796875 0.001953125 199.11111 56.88889 0.15429688 0.001953125 211.55556 67.55556 0.16796875 0.013671875 199.11111 67.55556 0.15429688 0.013671875 218.66667 58.666668 0.1875 0.001953125 204.44444 58.666668 0.171875 0.001953125 218.66667 74.666664 0.1875 0.01953125 204.44444 74.666664 0.171875 0.01953125 218.66667 67.55556 0.15039062 0.001953125 211.55556 67.55556 0.14257812 0.001953125 218.66667 74.666664 0.15039062 0.009765625 211.55556 74.666664 0.14257812 0.009765625 231.11111 56.88889 0.20898438 0.001953125 215.11111 56.88889 0.19140625 0.001953125 231.11111 76.44444 0.20898438 0.0234375 215.11111 76.44444 0.19140625 0.0234375 236.44444 56.88889 0.119140625 0.001953125 224 56.88889 0.10546875 0.001953125 236.44444 76.44444 0.119140625 0.0234375 224 76.44444 0.10546875 0.0234375 243.55556 58.666668 0.22851562 0.001953125 229.33333 58.666668 0.21289062 0.001953125 243.55556 76.44444 0.22851562 0.021484375 229.33333 76.44444 0.21289062 0.021484375 248.88889 56.88889 0.24609375 0.001953125 236.44444 56.88889 0.23242188 0.001953125 248.88889 74.666664 0.24609375 0.021484375 236.44444 74.666664 0.23242188 0.021484375 254.22223 56.88889 0.24609375 0.001953125 241.77779 56.88889 0.23242188 0.001953125 254.22223 74.666664 0.24609375 0.021484375 241.77779 74.666664 0.23242188 0.021484375 163.55556 58.666668 0.26757812 0.001953125 147.55556 58.666668 0.25 0.001953125 163.55556 72.88889 0.26757812 0.017578125 147.55556 72.88889 0.25 0.017578125 167.11111 58.666668 0.27929688 0.001953125 160 58.666668 0.27148438 0.001953125 167.11111 72.88889 0.27929688 0.017578125 160 72.88889 0.27148438 0.017578125 174.22223 58
06-09 02:51:09.995 13579-13617/? I/GolangExample: view: [720 1280]
06-09 02:51:10.002 13579-13614/? I/GolangExample: VertexAttribArray 1
06-09 02:51:10.007 13579-13617/? I/GolangExample: nativeWindowRedrawNeeded handled
I'm not sure about what might be causing your blank screen at this point, but that has also happened to me. Here are some things that I've done that can help narrow the search space:
@lukebayes I tried everything you mentioned, but it did not work. Can you paste a link to source code of your working version, so that i can compare notes to see what I might have missed?
I'm sorry to say that I haven't tackled Android rendering with Nanovgo yet, so I'm probably not going to be too much help with the specifics of your case. My project is intended to run on everything (but doesn't yet), so I have a fair amount of indirection that will probably prove obfuscatory.
If you're stuck, I'd recommend removing every single thing you can to get a simple rectangle to draw on the screen on the device.
Once that's working, you can start to add your features one at a time to see where it breaks down. Based on my limited experience, I'd place my bets that it's either fonts or some device-specific arcana related to shaders or version numbers, so do what you can to remove/simplify those first.
Thanks @lukebayes, I got it to work on mobile target using Haxe programming language.
But using Go language would be a good boost tho.
I am trying to Port Nanovgo example to Android using andrioid-go and EGL
I modified Nanovgo to support GLES2 library from https://github.com/xlab/android-go/tree/master/gles2 , see modified version here nanovgo-gles
demo.go :
BUG:
i am getting a blank screen with these errors