OpenMW on android flipped textures

Everything about development and the OpenMW source code.
User avatar
psi29a
Posts: 4040
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: OpenMW on android flipped textures

Post by psi29a » 16 Jan 2018, 07:55

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

User avatar
sandstranger
Posts: 436
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: OpenMW on android flipped textures

Post by sandstranger » 16 Jan 2018, 08:04

d
Last edited by sandstranger on 18 Jan 2018, 16:33, edited 1 time in total.

User avatar
psi29a
Posts: 4040
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: OpenMW on android flipped textures

Post by psi29a » 16 Jan 2018, 09:27

We know, you don't have to keep repeating it. :)

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

User avatar
sandstranger
Posts: 436
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: OpenMW on android flipped textures

Post by sandstranger » 16 Jan 2018, 10:15

d
Last edited by sandstranger on 18 Jan 2018, 16:33, edited 1 time in total.

User avatar
psi29a
Posts: 4040
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: OpenMW on android flipped textures

Post by psi29a » 16 Jan 2018, 10:28

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?

xyzz
Posts: 42
Joined: 14 Jan 2018, 22:25

Re: OpenMW on android flipped textures

Post by xyzz » 16 Jan 2018, 14:28

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?

xyzz
Posts: 42
Joined: 14 Jan 2018, 22:25

Re: OpenMW on android flipped textures

Post by xyzz » 16 Jan 2018, 18:28

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.

xyzz
Posts: 42
Joined: 14 Jan 2018, 22:25

Re: OpenMW on android flipped textures

Post by xyzz » 17 Jan 2018, 19:51

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.

xyzz
Posts: 42
Joined: 14 Jan 2018, 22:25

Re: OpenMW on android flipped textures

Post by xyzz » 17 Jan 2018, 20:04

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

User avatar
AnyOldName3
Posts: 994
Joined: 26 Nov 2015, 03:25

Re: OpenMW on android flipped textures

Post by AnyOldName3 » 17 Jan 2018, 21:51

The main limitation with posting binaries is making sure that the source code is easily available so you don't accidentally violate the GPL.
AnyOldName3, Master of Shadows

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest