diff options
author | Joe Onorato <joeo@android.com> | 2010-01-14 15:59:35 -0500 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-01-14 16:00:04 -0500 |
commit | 6656c1be2b2f5d266645742e6d4c7f910b3f30b3 (patch) | |
tree | 0e22cefd8e9196617292bf95330615484f410046 /libs/rs | |
parent | 5e083024269e7c5bf904301a98fa6eade6fec094 (diff) | |
download | frameworks_base-6656c1be2b2f5d266645742e6d4c7f910b3f30b3.zip frameworks_base-6656c1be2b2f5d266645742e6d4c7f910b3f30b3.tar.gz frameworks_base-6656c1be2b2f5d266645742e6d4c7f910b3f30b3.tar.bz2 |
add drawSpriteScreenspaceCropped to renderscript
Diffstat (limited to 'libs/rs')
-rw-r--r-- | libs/rs/Android.mk | 4 | ||||
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk index 262ac8d..d364277 100644 --- a/libs/rs/Android.mk +++ b/libs/rs/Android.mk @@ -107,9 +107,5 @@ LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) -# Include the subdirectories ==================== -include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk,\ - java \ - )) endif #simulator diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index 23888ff..de8df39 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -776,6 +776,17 @@ static void SC_drawSpriteScreenspace(float x, float y, float z, float w, float h glDrawTexfOES(x, y, z, w, h); } +static void SC_drawSpriteScreenspaceCropped(float x, float y, float z, float w, float h, + float cx0, float cy0, float cx1, float cy1) +{ + GET_TLS(); + rsc->setupCheck(); + + GLint crop[4] = {cx0, cy0, cx1, cy1}; + glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop); + glDrawTexfOES(x, y, z, w, h); +} + static void SC_drawSprite(float x, float y, float z, float w, float h) { GET_TLS(); @@ -1271,6 +1282,8 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { "void", "(float x, float y, float z, float w, float h)" }, { "drawSpriteScreenspace", (void *)&SC_drawSpriteScreenspace, "void", "(float x, float y, float z, float w, float h)" }, + { "drawSpriteScreenspaceCropped", (void *)&SC_drawSpriteScreenspaceCropped, + "void", "(float x, float y, float z, float w, float h, float cx0, float cy0, float cx1, float cy1)" }, { "drawLine", (void *)&SC_drawLine, "void", "(float x1, float y1, float z1, float x2, float y2, float z2)" }, { "drawPoint", (void *)&SC_drawPoint, |