summaryrefslogtreecommitdiffstats
path: root/minui/graphics.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2012-08-23 22:14:14 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-23 22:14:14 +0200
commitec5eceb849b7038b271dc5882cbbc8f72265e026 (patch)
tree2aa6f95cb875d258f62a5342ec2bb1ad0093e3bd /minui/graphics.c
parentam a3ccba6d: add bonus data feature to imgdiff/imgpatch/applypatch (diff)
parentadd simple text to recovery UI (diff)
downloadandroid_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.tar
android_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.tar.gz
android_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.tar.bz2
android_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.tar.lz
android_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.tar.xz
android_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.tar.zst
android_bootable_recovery-ec5eceb849b7038b271dc5882cbbc8f72265e026.zip
Diffstat (limited to 'minui/graphics.c')
-rw-r--r--minui/graphics.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/minui/graphics.c b/minui/graphics.c
index 81f13ad2c..88572a878 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -244,6 +244,22 @@ int gr_text(int x, int y, const char *s)
return x;
}
+void gr_texticon(int x, int y, gr_surface icon) {
+ GGLContext* gl = gr_context;
+
+ gl->bindTexture(gl, (GGLSurface*) icon);
+ gl->texEnvi(gl, GGL_TEXTURE_ENV, GGL_TEXTURE_ENV_MODE, GGL_REPLACE);
+ gl->texGeni(gl, GGL_S, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
+ gl->texGeni(gl, GGL_T, GGL_TEXTURE_GEN_MODE, GGL_ONE_TO_ONE);
+ gl->enable(gl, GGL_TEXTURE_2D);
+
+ int w = gr_get_width(icon);
+ int h = gr_get_height(icon);
+
+ gl->texCoord2i(gl, -x, -y);
+ gl->recti(gl, x, y, x+gr_get_width(icon), y+gr_get_height(icon));
+}
+
void gr_fill(int x, int y, int w, int h)
{
GGLContext *gl = gr_context;