Moustafa Alzantot
Moustafa Alzantot

Reputation: 371

Is Renderscript supported in Android NDK r14?

I am trying to build and android application that makes use of RenderScript from native code. I wonder what versions of NDK supports the RenderScript API ?

I can not find the RenderScript header files in NDK r14, but they were there until the version r10e.

Is RenderScript no longer supported in NDK ? If It is supported, where can I find some examples for its API ?

Thanks!

Upvotes: 0

Views: 404

Answers (1)

Dan Albert
Dan Albert

Reputation: 10509

Yes, it's supported in r14. There's an example of how to use in in our test suite: https://android.googlesource.com/platform/ndk/+/master/tests/device/rs-cpp-basic/

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := rstest-compute
LOCAL_SRC_FILES:= \
    mono.rs \
    compute.cpp
LOCAL_CLANG := true
LOCAL_CFLAGS := -std=c++11
LOCAL_LDFLAGS := -Wl,-Bsymbolic
LOCAL_LDLIBS := \
    -ldl \
    -llog
LOCAL_STATIC_LIBRARIES := RScpp_static
include $(BUILD_EXECUTABLE)

$(call import-module,android/renderscript)

Upvotes: 2

Related Questions