diff options
author | Stephane Marchesin <stephane.marchesin@gmail.com> | 2010-04-24 20:07:28 -0700 |
---|---|---|
committer | Stephane Marchesin <stephane.marchesin@gmail.com> | 2010-04-24 20:07:28 -0700 |
commit | fb3187afdc1d54638791e2ead5c28cb8e949cf2e (patch) | |
tree | a82d0634c39314f31d5798f683e41c3633e47087 /render.c | |
parent | 661eb5a9126e608b8e5cea3e6105728da3edd015 (diff) |
Get some things kindof working.
Diffstat (limited to 'render.c')
-rw-r--r-- | render.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -105,7 +105,11 @@ void render_init(int w, int h) void render_update(xenon_rect r) { - libGL.glRasterPos2i(r.x, r.y); - libGL.glDrawPixels(r.w, r.h, GL_RGBA, GL_UNSIGNED_BYTE, pixels + (r.x + r.y * screen_rect.w) * 4 ); + for(int j = r.y ; j < r.y + r.h ; j++) + { + libGL.glRasterPos2i(r.x, r.h - j); + libGL.glDrawPixels(r.w, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixels + (r.x + j * screen_rect.w) * 4 ); + } } + |