diff --git a/api/11.xml b/api/11.xml index 1bcf563cc0424..16b792a2607f7 100644 --- a/api/11.xml +++ b/api/11.xml @@ -168910,52 +168910,6 @@ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - = mFileEntries.length) { return null; @@ -166,6 +188,14 @@ public class FileA3D extends BaseObj { return mFileEntries[index]; } + /** + * Creates a FileA3D object from an asset stored on disk + * + * @param rs Context to which the object will belong. + * @param mgr asset manager used to load asset + * @param path location of the file to load + * + */ static public FileA3D createFromAsset(RenderScript rs, AssetManager mgr, String path) { rs.validate(); int fileId = rs.nFileA3DCreateFromAsset(mgr, path); @@ -178,6 +208,13 @@ public class FileA3D extends BaseObj { return fa3d; } + /** + * Creates a FileA3D object from a file stored on disk + * + * @param rs Context to which the object will belong. + * @param path location of the file to load + * + */ static public FileA3D createFromFile(RenderScript rs, String path) { int fileId = rs.nFileA3DCreateFromFile(path); @@ -189,10 +226,25 @@ public class FileA3D extends BaseObj { return fa3d; } + /** + * Creates a FileA3D object from a file stored on disk + * + * @param rs Context to which the object will belong. + * @param path location of the file to load + * + */ static public FileA3D createFromFile(RenderScript rs, File path) { return createFromFile(rs, path.getAbsolutePath()); } + /** + * Creates a FileA3D object from an application resource + * + * @param rs Context to which the object will belong. + * @param res resource manager used for loading + * @param id resource to create FileA3D from + * + */ static public FileA3D createFromResource(RenderScript rs, Resources res, int id) { rs.validate(); diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java index f1f1237a58e37..fcf8178760802 100644 --- a/graphics/java/android/renderscript/Mesh.java +++ b/graphics/java/android/renderscript/Mesh.java @@ -172,7 +172,7 @@ public class Mesh extends BaseObj { /** * Creates builder object - * @param rs + * @param rs Context to which the mesh will belong. * @param usage specifies how the mesh allocations are to be * handled, whether they need to be uploaded to a * buffer on the gpu, maintain a cpu copy, etc @@ -512,7 +512,7 @@ public class Mesh extends BaseObj { public static final int TEXTURE_0 = 0x0100; /** - * @param rs + * @param rs Context to which the mesh will belong. * @param vtxSize specifies whether the vertex is a float2 or * float3 * @param flags bitfield that is a combination of COLOR, NORMAL, diff --git a/graphics/java/android/renderscript/ProgramFragment.java b/graphics/java/android/renderscript/ProgramFragment.java index 14c0c01ca34d0..333880d587428 100644 --- a/graphics/java/android/renderscript/ProgramFragment.java +++ b/graphics/java/android/renderscript/ProgramFragment.java @@ -36,7 +36,7 @@ public class ProgramFragment extends Program { /** * Create a builder object. * - * @param rs + * @param rs Context to which the program will belong. */ public Builder(RenderScript rs) { super(rs); diff --git a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java index 663bc9fae2d5f..1af31f8102538 100644 --- a/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java +++ b/graphics/java/android/renderscript/ProgramFragmentFixedFunction.java @@ -194,7 +194,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment { /** * Creates a builder for fixed function fragment program * - * @param rs + * @param rs Context to which the program will belong. */ public Builder(RenderScript rs) { mRS = rs; diff --git a/graphics/java/android/renderscript/ProgramStore.java b/graphics/java/android/renderscript/ProgramStore.java index d79900e8ef86a..9128f9ba0ac6a 100644 --- a/graphics/java/android/renderscript/ProgramStore.java +++ b/graphics/java/android/renderscript/ProgramStore.java @@ -149,7 +149,7 @@ public class ProgramStore extends BaseObj { * - incoming pixels override the value stored in the color * buffer if it passes the depth test * - * @param rs + * @param rs Context to which the program will belong. **/ public static ProgramStore BLEND_NONE_DEPTH_TEST(RenderScript rs) { if(rs.mProgramStore_BLEND_NONE_DEPTH_TEST == null) { @@ -170,7 +170,7 @@ public class ProgramStore extends BaseObj { * - incoming pixels override the value stored in the color * buffer * - * @param rs + * @param rs Context to which the program will belong. **/ public static ProgramStore BLEND_NONE_DEPTH_NONE(RenderScript rs) { if(rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH == null) { @@ -194,7 +194,7 @@ public class ProgramStore extends BaseObj { * following formula * Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A) * - * @param rs + * @param rs Context to which the program will belong. **/ public static ProgramStore BLEND_ALPHA_DEPTH_TEST(RenderScript rs) { if(rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST == null) { @@ -216,7 +216,7 @@ public class ProgramStore extends BaseObj { * (Dest) using the following formula * Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A) * - * @param rs + * @param rs Context to which the program will belong. **/ public static ProgramStore BLEND_ALPHA_DEPTH_NONE(RenderScript rs) { if(rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH == null) { diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java index 7ba8b8202c4ed..a965b819d8b1c 100644 --- a/graphics/java/android/renderscript/ProgramVertex.java +++ b/graphics/java/android/renderscript/ProgramVertex.java @@ -46,7 +46,7 @@ public class ProgramVertex extends Program { /** * Create a builder object. * - * @param rs + * @param rs Context to which the program will belong. */ public Builder(RenderScript rs) { super(rs); diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java index b9537c7bcae82..666c7ec27f9ce 100644 --- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java +++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java @@ -105,7 +105,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex { /** * Creates a builder for fixed function vertex program * - * @param rs + * @param rs Context to which the program will belong. */ public Builder(RenderScript rs) { mRS = rs; @@ -196,9 +196,9 @@ public class ProgramVertexFixedFunction extends ProgramVertex { private FieldPacker mIOBuffer; /** - * Creates buffer to store fixed function emulation matrices + * Creates a buffer to store fixed function emulation matrices * - * @param rs + * @param rs Context to which the allocation will belong. **/ public Constants(RenderScript rs) { Type constInputType = ProgramVertexFixedFunction.Builder.getConstantInputType(rs); diff --git a/graphics/java/android/renderscript/Sampler.java b/graphics/java/android/renderscript/Sampler.java index 57a9889bd3250..c656d75013f1e 100644 --- a/graphics/java/android/renderscript/Sampler.java +++ b/graphics/java/android/renderscript/Sampler.java @@ -56,7 +56,7 @@ public class Sampler extends BaseObj { * Retrieve a sampler with min and mag set to nearest and wrap modes set to * clamp. * - * @param rs + * @param rs Context to which the sampler will belong. * * @return Sampler */ @@ -76,7 +76,7 @@ public class Sampler extends BaseObj { * Retrieve a sampler with min and mag set to linear and wrap modes set to * clamp. * - * @param rs + * @param rs Context to which the sampler will belong. * * @return Sampler */ @@ -96,7 +96,7 @@ public class Sampler extends BaseObj { * Retrieve a sampler with ag set to linear, min linear mipmap linear, and * to and wrap modes set to clamp. * - * @param rs + * @param rs Context to which the sampler will belong. * * @return Sampler */ @@ -116,7 +116,7 @@ public class Sampler extends BaseObj { * Retrieve a sampler with min and mag set to nearest and wrap modes set to * wrap. * - * @param rs + * @param rs Context to which the sampler will belong. * * @return Sampler */ @@ -136,7 +136,7 @@ public class Sampler extends BaseObj { * Retrieve a sampler with min and mag set to nearest and wrap modes set to * wrap. * - * @param rs + * @param rs Context to which the sampler will belong. * * @return Sampler */ @@ -156,7 +156,7 @@ public class Sampler extends BaseObj { * Retrieve a sampler with ag set to linear, min linear mipmap linear, and * to and wrap modes set to wrap. * - * @param rs + * @param rs Context to which the sampler will belong. * * @return Sampler */ diff --git a/libs/rs/rsContextHostStub.h b/libs/rs/rsContextHostStub.h index c22647f87cc88..8cfb38bd5b181 100644 --- a/libs/rs/rsContextHostStub.h +++ b/libs/rs/rsContextHostStub.h @@ -119,11 +119,12 @@ public: mutable const ObjectBase * mObjHead; bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;} - bool ext_GL_NV_texture_npot_2D_mipmap() const {return false;} - float ext_texture_max_aniso() const {return 1.0f;} + bool ext_GL_NV_texture_npot_2D_mipmap() const {return mGL.GL_NV_texture_npot_2D_mipmap;} + float ext_texture_max_aniso() const {return mGL.EXT_texture_max_aniso; } uint32_t getMaxFragmentTextures() const {return mGL.mMaxFragmentTextureImageUnits;} uint32_t getMaxFragmentUniformVectors() const {return mGL.mMaxFragmentUniformVectors;} uint32_t getMaxVertexUniformVectors() const {return mGL.mMaxVertexUniformVectors;} + uint32_t getMaxVertexAttributes() const {return mGL.mMaxVertexAttribs;} protected: @@ -147,6 +148,8 @@ protected: int32_t mMaxVertexTextureUnits; bool OES_texture_npot; + bool GL_NV_texture_npot_2D_mipmap; + float EXT_texture_max_aniso; } mGL; };