summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsProgramVertex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
-rw-r--r--libs/rs/rsProgramVertex.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index 9bfa602..eea8b3b 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -121,7 +121,14 @@ void ProgramVertex::setTextureMatrix(const rsc_Matrix *m) const
mDirty = true;
}
-
+void ProgramVertex::transformToScreen(const Context *rsc, float *v4out, const float *v3in) const
+{
+ float *f = static_cast<float *>(mConstants->getPtr());
+ Matrix mvp;
+ mvp.loadMultiply((Matrix *)&f[RS_PROGRAM_VERTEX_MODELVIEW_OFFSET],
+ (Matrix *)&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET]);
+ mvp.vectorMultiply(v4out, v3in);
+}
ProgramVertexState::ProgramVertexState()
{