Known Direct Subclasses
ProgramFragmentFixedFunction |
ProgramFragmentFixedFunction is a helper class that provides
a way to make a simple fragment shader without writing any
GLSL code. |
|
Class Overview
The Renderscript fragment program, also known as fragment shader is responsible
for manipulating pixel data in a user defined way. It's constructed from a GLSL
shader string containing the program body, textures inputs, and a Type object
that describes the constants used by the program. Similar to the vertex programs,
when an allocation with constant input values is bound to the shader, its values
are sent to the graphics program automatically.
The values inside the allocation are not explicitly tracked. If they change between two draw
calls using the same program object, the runtime needs to be notified of that
change by calling rsgAllocationSyncAll so it could send the new values to hardware.
Communication between the vertex and fragment programs is handled internally in the
GLSL code. For example, if the fragment program is expecting a varying input called
varTex0, the GLSL code inside the program vertex must provide it.
Summary
Nested Classes |
class |
ProgramFragment.Builder |
|
[Expand]
Inherited Methods |
From class
android.renderscript.Program
void
|
bindConstants(Allocation a, int slot)
Binds a constant buffer to be used as uniform inputs to the
program
|
void
|
bindSampler(Sampler vs, int slot)
Binds an object that describes how a texture at the
corresponding location is sampled
|
void
|
bindTexture(Allocation va, int slot)
Binds a texture to be used in the program
|
synchronized
void
|
destroy()
destroy disconnects the object from the native object effectivly
rendering this java object dead.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
void
|
setName(String name)
setName assigns a name to an object.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|