Skip to content

Most visited

Recently visited

navigation

Program.BaseProgramBuilder | Android Developers

to top
Android APIs
public static class

Program.BaseProgramBuilder

extends Object
java.lang.Object
   ↳ android.renderscript.Program.BaseProgramBuilder
Known Direct Subclasses

Summary

Protected Constructors
Program.BaseProgramBuilder(RenderScript rs)
Public Methods
Program.BaseProgramBuilder addConstant(Type t)
Adds constant (uniform) inputs to the program
Program.BaseProgramBuilder addTexture(Program.TextureType texType, String texName)
Adds a texture input to the Program
Program.BaseProgramBuilder addTexture(Program.TextureType texType)
Adds a texture input to the Program
int getCurrentConstantIndex()
Queries the index of the last added constant buffer type
int getCurrentTextureIndex()
Queries the index of the last added texture type
Program.BaseProgramBuilder setShader(String s)
Sets the GLSL shader code to be used in the program
Program.BaseProgramBuilder setShader(Resources resources, int resourceID)
Sets the GLSL shader code to be used in the program
Protected Methods
void initProgram(Program p)
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected Program.BaseProgramBuilder (RenderScript rs)

Added in API level 11

Public Methods

public Program.BaseProgramBuilder addConstant (Type t)

Added in API level 11

Adds constant (uniform) inputs to the program

Parameters
t Type that describes the layout of the Allocation object to be used as constant inputs to the Program
Returns
  • self

public Program.BaseProgramBuilder addTexture (Program.TextureType texType, String texName)

Added in API level 16

Adds a texture input to the Program

Parameters
texType describes that the texture to append it (2D, Cubemap, etc.)
texName what the texture should be called in the shader
Returns
  • self

public Program.BaseProgramBuilder addTexture (Program.TextureType texType)

Added in API level 11

Adds a texture input to the Program

Parameters
texType describes that the texture to append it (2D, Cubemap, etc.)
Returns
  • self

public int getCurrentConstantIndex ()

Added in API level 11

Queries the index of the last added constant buffer type

public int getCurrentTextureIndex ()

Added in API level 11

Queries the index of the last added texture type

public Program.BaseProgramBuilder setShader (String s)

Added in API level 11

Sets the GLSL shader code to be used in the program

Parameters
s GLSL shader string
Returns
  • self

public Program.BaseProgramBuilder setShader (Resources resources, int resourceID)

Added in API level 11

Sets the GLSL shader code to be used in the program

Parameters
resources application resources
resourceID id of the file containing GLSL shader code
Returns
  • self

Protected Methods

protected void initProgram (Program p)

Added in API level 11

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.