I have successfully rendered a triangle with a hard coded shader using NativeActivity of Android NDK. Now I have the requirement to load a shader file. I tried to use fopen but it is returning NULL.

I have researched a little bit and found out there's an AAssetManager which I can use. I want to know why fopen didn't work and why should I use AAssetManager to load files?

  • \$\begingroup\$ fopen returns NULL if it can't open the file, probably because you just have the path to it incorrect. \$\endgroup\$ – Maximus Minimus Oct 29 '18 at 3:12
  • \$\begingroup\$ Ya that' correct. But I am pretty sure that's not the issue because I have tried all the possible paths. \$\endgroup\$ – Ankit singh kushwah Oct 29 '18 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.