Floating point or fixed-point for Android NDK OpenGL apps?

前端 未结 2 663
耶瑟儿~
耶瑟儿~ 2021-02-15 13:10

I\'m trying to decide on whether to primarily use floats or ints for all 3D-related elements in my app (which is C++ for the most part). I understand that most ARM-based devices

2条回答
  •  名媛妹妹
    2021-02-15 13:41

    In my opinion you should stick with fixed-point as much as possible.

    Not only old phones miss floating point support, but also new ones such as the HTC Wildfire.

    Also, if you choose to require ARMv7, please note that for example the Motorola Milestone (Droid for Europe) does feature an ARMv7 CPU, but because of the way Android 2.1 has been built for this device, the device will not use your armeabi-v7a libs (and might hide your app from the Market).

    I personally worked around this by detecting ARMv7 support using the new cpufeatures library provided with NDK r4b, to load some armeabi-v7a lib on demand with dlopen().

提交回复
热议问题