projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- added optimization notes in readme
[dosdemo]
/
src
/
metaball.c
diff --git
a/src/metaball.c
b/src/metaball.c
index
ac0563c
..
f9bc61c
100644
(file)
--- a/
src/metaball.c
+++ b/
src/metaball.c
@@
-159,10
+159,19
@@
static void update(void)
static void draw(void)
{
static void draw(void)
{
+ int i, j;
+
update();
memset(fb_pixels, 0, fb_width * fb_height * 2);
update();
memset(fb_pixels, 0, fb_width * fb_height * 2);
+ for(i=0; i<120; i++) {
+ for(j=0; j<160; j++) {
+ fb_pixels[(i + 60) * 320 + (j + 80)] = 0x1e7;
+ }
+ }
+ g3d_viewport(80, 60, 160, 120);
+
g3d_matrix_mode(G3D_MODELVIEW);
g3d_load_identity();
g3d_translate(0, 0, -cam_dist);
g3d_matrix_mode(G3D_MODELVIEW);
g3d_load_identity();
g3d_translate(0, 0, -cam_dist);
@@
-177,6
+186,8
@@
static void draw(void)
draw_mesh(&mmesh);
draw_mesh(&mmesh);
+ g3d_viewport(0, 0, fb_width, fb_height);
+
swap_buffers(fb_pixels);
}
swap_buffers(fb_pixels);
}