summaryrefslogtreecommitdiffstats
path: root/rsProgramVertex.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-08-16 17:40:10 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-08-16 17:40:10 -0700
commit95333f998fd4a983f89e5128e85f6f710d200bd9 (patch)
tree55642ffad67de2e03835e614f4f9a8a8d0bff4cc /rsProgramVertex.cpp
parent991f8f33ca47a7555eeae17e3de39a28b4360863 (diff)
downloadandroid_frameworks_rs-95333f998fd4a983f89e5128e85f6f710d200bd9.tar.gz
android_frameworks_rs-95333f998fd4a983f89e5128e85f6f710d200bd9.tar.bz2
android_frameworks_rs-95333f998fd4a983f89e5128e85f6f710d200bd9.zip
Added frustum plane extraction and sphere culling code.
Change-Id: I9d55baecddc962f8973f0269f2f9977f1d4ce008
Diffstat (limited to 'rsProgramVertex.cpp')
-rw-r--r--rsProgramVertex.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/rsProgramVertex.cpp b/rsProgramVertex.cpp
index 60de04a8..aee41333 100644
--- a/rsProgramVertex.cpp
+++ b/rsProgramVertex.cpp
@@ -318,6 +318,12 @@ void ProgramVertex::setTextureMatrix(const rsc_Matrix *m) const
mDirty = true;
}
+void ProgramVertex::getProjectionMatrix(rsc_Matrix *m) const
+{
+ float *f = static_cast<float *>(mConstants[0]->getPtr());
+ memcpy(m, &f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET], sizeof(rsc_Matrix));
+}
+
void ProgramVertex::transformToScreen(const Context *rsc, float *v4out, const float *v3in) const
{
float *f = static_cast<float *>(mConstants[0]->getPtr());