summaryrefslogtreecommitdiffstats
path: root/libs/rs
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-07-28 14:46:22 -0700
committerJim Miller <jaggies@google.com>2010-07-28 14:46:22 -0700
commitd8e76204555e5739df495f92061cd3861ad83bb9 (patch)
treec6dd4ae2094f4cfd7633b342fe7c600d9317a521 /libs/rs
parent6b164fe048cdef5ba58f4ba9655e81632ab5e81e (diff)
downloadframeworks_base-d8e76204555e5739df495f92061cd3861ad83bb9.zip
frameworks_base-d8e76204555e5739df495f92061cd3861ad83bb9.tar.gz
frameworks_base-d8e76204555e5739df495f92061cd3861ad83bb9.tar.bz2
Fix 2877497: export rsgProgramVertexLoadProjectionMatrix()
This updates renderscript to allow loading of the projection matrix. Change-Id: I9af03e06ce6b5432ffbf3db8f6cda7b29aa21c7f
Diffstat (limited to 'libs/rs')
-rw-r--r--libs/rs/rsScriptC_LibGL.cpp7
-rw-r--r--libs/rs/scriptc/rs_graphics.rsh1
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp
index e9971a2..bed0fce 100644
--- a/libs/rs/rsScriptC_LibGL.cpp
+++ b/libs/rs/rsScriptC_LibGL.cpp
@@ -91,6 +91,12 @@ static void SC_bindProgramRaster(RsProgramRaster pv)
// VP
//////////////////////////////////////////////////////////////////////////////
+static void SC_vpLoadProjectionMatrix(const rsc_Matrix *m)
+{
+ GET_TLS();
+ rsc->getVertex()->setProjectionMatrix(m);
+}
+
static void SC_vpLoadModelMatrix(const rsc_Matrix *m)
{
GET_TLS();
@@ -355,6 +361,7 @@ static ScriptCState::SymbolTable_t gSyms[] = {
{ "rsgBindSampler", (void *)&SC_bindSampler },
{ "rsgBindTexture", (void *)&SC_bindTexture },
+ { "rsgProgramVertexLoadProjectionMatrix", (void *)&SC_vpLoadProjectionMatrix },
{ "rsgProgramVertexLoadModelMatrix", (void *)&SC_vpLoadModelMatrix },
{ "rsgProgramVertexLoadTextureMatrix", (void *)&SC_vpLoadTextureMatrix },
diff --git a/libs/rs/scriptc/rs_graphics.rsh b/libs/rs/scriptc/rs_graphics.rsh
index 4dc351d..d6ef6e9 100644
--- a/libs/rs/scriptc/rs_graphics.rsh
+++ b/libs/rs/scriptc/rs_graphics.rsh
@@ -13,6 +13,7 @@ extern void rsgBindProgramRaster(rs_program_raster);
extern void rsgBindSampler(rs_program_fragment, int slot, rs_sampler);
extern void rsgBindTexture(rs_program_fragment, int slot, rs_allocation);
+extern void rsgProgramVertexLoadProjectionMatrix(const rs_matrix4x4 *);
extern void rsgProgramVertexLoadModelMatrix(const rs_matrix4x4 *);
extern void rsgProgramVertexLoadTextureMatrix(const rs_matrix4x4 *);