Methods Summary |
---|
public void | appendRenderable(Renderable d)
mObjectsToDraw.add(d);
|
public java.util.ArrayList | getRenderables()
return mObjectsToDraw;
|
ScriptField_RenderPass_s.Item | getRsField(RenderScriptGL rs, android.content.res.Resources res)
if (mRsField != null) {
return mRsField;
}
mRsField = new ScriptField_RenderPass_s.Item();
if (mColorTarget != null) {
mRsField.color_target = mColorTarget.getRsData(true).get_texture(0);
}
if (mColorTarget != null) {
mRsField.depth_target = mDepthTarget.getRsData(true).get_texture(0);
}
mRsField.camera = mCamera != null ? mCamera.getRSData().getAllocation() : null;
if (mObjectsToDraw.size() != 0) {
Allocation drawableData = Allocation.createSized(rs,
Element.ALLOCATION(rs),
mObjectsToDraw.size());
Allocation[] drawableAllocs = new Allocation[mObjectsToDraw.size()];
for (int i = 0; i < mObjectsToDraw.size(); i ++) {
Renderable dI = (Renderable)mObjectsToDraw.get(i);
drawableAllocs[i] = dI.getRsField(rs, res).getAllocation();
}
drawableData.copyFrom(drawableAllocs);
mRsField.objects = drawableData;
}
mRsField.clear_color = mClearColor;
mRsField.clear_depth = mClearDepth;
mRsField.should_clear_color = mShouldClearColor;
mRsField.should_clear_depth = mShouldClearDepth;
return mRsField;
|
public void | setCamera(Camera c)
mCamera = c;
|
public void | setClearColor(Float4 clearColor)
mClearColor = clearColor;
|
public void | setClearDepth(float clearDepth)
mClearDepth = clearDepth;
|
public void | setColorTarget(TextureRenderTarget colorTarget)
mColorTarget = colorTarget;
|
public void | setDepthTarget(TextureRenderTarget depthTarget)
mDepthTarget = depthTarget;
|
public void | setShouldClearColor(boolean shouldClearColor)
mShouldClearColor = shouldClearColor;
|
public void | setShouldClearDepth(boolean shouldClearDepth)
mShouldClearDepth = shouldClearDepth;
|