加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20111018180048/http://developer.android.com/reference/android/renderscript/Sampler.html
public class

Sampler

extends Object
java.lang.Object
   ↳ android.renderscript.Sampler

Class Overview

Sampler object which defines how data is extracted from textures. Samplers are attached to Program objects (currently only ProgramFragment) when those objects need to access texture data.

Summary

Nested Classes
class Sampler.Builder Builder for creating non-standard samplers. 
enum Sampler.Value  
Public Methods
static Sampler CLAMP_LINEAR(RenderScript rs)
Retrieve a sampler with min and mag set to linear and wrap modes set to clamp.
static Sampler CLAMP_LINEAR_MIP_LINEAR(RenderScript rs)
Retrieve a sampler with ag set to linear, min linear mipmap linear, and to and wrap modes set to clamp.
static Sampler CLAMP_NEAREST(RenderScript rs)
Retrieve a sampler with min and mag set to nearest and wrap modes set to clamp.
static Sampler WRAP_LINEAR(RenderScript rs)
Retrieve a sampler with min and mag set to nearest and wrap modes set to wrap.
static Sampler WRAP_LINEAR_MIP_LINEAR(RenderScript rs)
Retrieve a sampler with ag set to linear, min linear mipmap linear, and to and wrap modes set to wrap.
static Sampler WRAP_NEAREST(RenderScript rs)
Retrieve a sampler with min and mag set to nearest and wrap modes set to wrap.
synchronized void destroy()
destroy disconnects the object from the native object effectively rendering this java object dead.
void setName(String name)
setName assigns a name to an object.
Protected Methods
void finalize()
Called before the object's memory is reclaimed by the VM.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Sampler CLAMP_LINEAR (RenderScript rs)

Since: API Level 11

Retrieve a sampler with min and mag set to linear and wrap modes set to clamp.

Parameters
rs Context to which the sampler will belong.
Returns
  • Sampler

public static Sampler CLAMP_LINEAR_MIP_LINEAR (RenderScript rs)

Since: API Level 11

Retrieve a sampler with ag set to linear, min linear mipmap linear, and to and wrap modes set to clamp.

Parameters
rs Context to which the sampler will belong.
Returns
  • Sampler

public static Sampler CLAMP_NEAREST (RenderScript rs)

Since: API Level 11

Retrieve a sampler with min and mag set to nearest and wrap modes set to clamp.

Parameters
rs Context to which the sampler will belong.
Returns
  • Sampler

public static Sampler WRAP_LINEAR (RenderScript rs)

Since: API Level 11

Retrieve a sampler with min and mag set to nearest and wrap modes set to wrap.

Parameters
rs Context to which the sampler will belong.
Returns
  • Sampler

public static Sampler WRAP_LINEAR_MIP_LINEAR (RenderScript rs)

Since: API Level 11

Retrieve a sampler with ag set to linear, min linear mipmap linear, and to and wrap modes set to wrap.

Parameters
rs Context to which the sampler will belong.
Returns
  • Sampler

public static Sampler WRAP_NEAREST (RenderScript rs)

Since: API Level 11

Retrieve a sampler with min and mag set to nearest and wrap modes set to wrap.

Parameters
rs Context to which the sampler will belong.
Returns
  • Sampler

public synchronized void destroy ()

Since: API Level 11

destroy disconnects the object from the native object effectively rendering this java object dead. The primary use is to force immediate cleanup of resources when it is believed the GC will not respond quickly enough.

public void setName (String name)

Since: API Level 11

setName assigns a name to an object. This object can later be looked up by this name. This name will also be retained if the object is written to an A3D file.

Parameters
name The name to assign to the object.

Protected Methods

protected void finalize ()

Since: API Level 11

Called before the object's memory is reclaimed by the VM. This can only happen once the garbage collector has detected that the object is no longer reachable by any thread of the running application.

The method can be used to free system resources or perform other cleanup before the object is garbage collected. The default implementation of the method is empty, which is also expected by the VM, but subclasses can override finalize() as required. Uncaught exceptions which are thrown during the execution of this method cause it to terminate immediately but are otherwise ignored.

Note that the VM does guarantee that finalize() is called at most once for any object, but it doesn't guarantee when (if at all) finalize() will be called. For example, object B's finalize() can delay the execution of object A's finalize() method and therefore it can delay the reclamation of A's memory. To be safe, use a ReferenceQueue, because it provides more control over the way the VM deals with references during garbage collection.

Throws
Throwable