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)

Since: API Level 11

Public Methods

public Program.BaseProgramBuilder addConstant (Type t)

Since: 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)

Since: 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)

Since: 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 ()

Since: API Level 11

Queries the index of the last added constant buffer type

public int getCurrentTextureIndex ()

Since: API Level 11

Queries the index of the last added texture type

public Program.BaseProgramBuilder setShader (String s)

Since: 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)

Since: 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)

Since: API Level 11