Assalamualaikum..
Kereta dah takde...mari kita melintas..
hehe teringat pulak iklan kat tv...ok..title ari ni mari kita melukis...menggunakan MS Visual C++ 6.0 dan OpenGl.... susah jugak nak buat lukisan macam budak2 tu...nak buat dot pun susah, apatah lagi nak bual satu garis lurus, or satu garis putus-putus.
void kapal(int StartX, int StartY)
{
//bawah
glLineWidth (2);
glColor3f (0.0,0.0,1.0);
glBegin (GL_LINES);
glVertex2i (1+StartX,10+StartY);
glVertex2i (4+StartX,1+StartY);
glVertex2i (4+StartX,1+StartY);
glVertex2i (40+StartX,1+StartY);
glVertex2i (40+StartX,1+StartY);
glVertex2i (44+StartX,10+StartY);
glVertex2i (44+StartX,10+StartY);
glVertex2i (1+StartX,10+StartY);
glEnd ();
//tiang
glLineWidth (20);
glColor3f (0.0,1.3,1.0);
glBegin (GL_LINES);
glVertex2i (15+StartX,10+StartY);
glVertex2i (15+StartX,15+StartY);
glEnd ();
//layar
glLineWidth (2);
glColor3f (2.0,1.3,1.0);
glBegin (GL_LINES);
glVertex2i (8+StartX,15+StartY);
glVertex2i (30+StartX,15+StartY);
glVertex2i (30+StartX,15+StartY);
glVertex2i (8+StartX,60+StartY);
glVertex2i (8+StartX,60+StartY);
glVertex2i (8+StartX,15+StartY);
glEnd ();
}
Hmm..susah.....dah last minute baru dapat idea.....
apapun, itula dia...masih belajar lagi..
wassalam
Friday, May 05, 2006
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment