Log in or register to post comments

Where is the actual texture file accessed?

November 17, 2010 - 3:50am #1

I'd like to try doing some manipulation on the texture before it gets accessed.

Re: Where is the actual texture file accessed?

November 19, 2010 - 12:39am #5

Yeah, that's what I thought.

And no because I'd be looking for saving new textures over the ones that are there already during runtime.

I'll find out if there is a directory I can write to at runtime and try and oad textures from there instead.

Thank you.

Re: Where is the actual texture file accessed?

November 18, 2010 - 9:10am #4

The textures are located in the assets folder, and I do not believe that you can write to this at runtime. Look at the loadTextureFromApk method in the Texture.java class. It asks the AssetManager for the input stream, I do not think there is a more direct way of dealing with these files.

Can you manipulate the texture buffer once it is in memory instead? Otherwise, feel free to use an entirely different method for storing and loading textures, the current implementation is just there for convenience.

- Kim

Re: Where is the actual texture file accessed?

November 18, 2010 - 7:57am #3

Yeah. Thanks for that :)

What I'm looking for is where the code says "read blah/blah/mytexture.png".
I want to write to that folder or write to another folder and retrieve the textures from there.

Re: Where is the actual texture file accessed?

November 18, 2010 - 6:14am #2

Are you talking about the textures applied to the 3D geometry? Those are read from the files in the Texture Java class, in the Shared sample project. If you prefer manipulating the texture in native code, the QCARSampleActivity.cpp file is responsible for getting the image buffers from Java.

- Kim

Log in or register to post comments