Page 2 of 4

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 07:55
by psi29a
We're fine with the lawyers so long as we color inside the lines. :)

imgurl is safe for hosting photos of morrowind on android, so long as we are not hosting them and showing them, we'll be OK.

If you want to post photos and have them hosted by us, then use the example suite :D

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 08:04
by sandstranger
d

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 09:27
by psi29a
We know, you don't have to keep repeating it. :)

Cheers and thank you for all your help through the years.

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 10:15
by sandstranger
d

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 10:28
by psi29a
Moving forward: https://github.com/OpenMW/android-port

* Created master branch, this is the main development branch.
* This branch is now protected, no force-push.
* Added xyzz as admin, but should still ask for code-review. :)

Todo:
* To be able to use the new code, there are two PRs open for OpenMW proper and OSG that allows building against GLESv1 instead of using gl_wrapper.
* Some type of CI to help with build automation (so there is at least something being tested).

Question:
Should this eventually be ported into OpenMW proper or should we keep this as an apart repo?

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 14:28
by xyzz
If you want to get removed from readme/source code/etc just let me know or pull request it and I'll merge.

It's using SDL 2.0.5 because they changed the api slightly in newer release so it doesn't link with the android port, I plan to update SDL2 eventually.

It's also using android.toolchain.cmake from the NDK already, not shipping its own.

I don't understand your point about -Os, can you elaborate?

Re: OpenMW on android flipped textures

Posted: 16 Jan 2018, 18:28
by xyzz
Thanks, I'll try different flags - but I don't think it's a big issue since our .so files are ~30 MB, bit less than chrome.

Re: OpenMW on android flipped textures

Posted: 17 Jan 2018, 19:51
by xyzz
After some investigation it seems definitely a driver bug: https://i.imgur.com/DAz1X0K.png - you can see in memory, the pointer passed to glTexImage2D, all pixels at the start (which is bottom left corner of the texture) have alpha 0 so should be displayed as black, but as you can see like 20th pixel or so is a part of h (flipped) and is white.

Another thing is that disabling mipmapping just by making Texture::mipmapBeforeTexImage always return GENERATE_MIPMAP_NONE fixes some of the textures, but not others.

I'm going to try the gl4es thing, hoping that the glesv2 driver is either less buggy or at least easier to debug and work around, since right now with gapid https://github.com/google/gapid I can't see anything other than texture contents / opengl commands / errors, which makes debugging super painful.

As an aside, I was wondering if it's okay for me to post prebuilt APK files so people can test on their devices and report whether they have textures flipped or not - and what forum section I should post that in.

Re: OpenMW on android flipped textures

Posted: 17 Jan 2018, 20:04
by xyzz
Whelp, it seems that using gl4es fixes all the issues I had so far - so I'll add it to the build scripts.

screenshot: https://my.mixtape.moe/wtqhbh.png

Re: OpenMW on android flipped textures

Posted: 17 Jan 2018, 21:51
by AnyOldName3
The main limitation with posting binaries is making sure that the source code is easily available so you don't accidentally violate the GPL.