[Plib-users] using triangles
Brought to you by:
sjbaker
|
From: Sami P. <sam...@sa...> - 2002-03-24 19:22:05
|
Hi all,
I'm new in this list, and allmost that new with plib too.
My problem is that, that I have a "space thing", where is two
ship. They shoot themselfs all the time. So, I need to
draw laser triangles thousand times in few seconds. For
some reason, this didn't work:
glBegin(GL_TRIANGLES); // GL_TRIANGLES piirtää kolmioita
glColor3f(1.0, 0.0, 0.0);
glVertex3f(0.0, 0.0, 0.0);
glColor3f(1.0, 1.0, 0.0);
glVertex3f(0.0, 20.0, 0.0);
glColor3f(1.0, 0.0, 1.0);
glVertex3f(20.0, 0.0, 0.0);
glEnd();
and propabbly reason is that, that those things don't
go in correct buffer, and glutSwapB.... can't
draw it?
Other way is create object everytime when ship shoot
another ship, but it doesnt sound very good idea to
greate "ten thousand" new object in one session?
Anyway, ship show and move smoothly, so
that side works well. Just need to draw those
lasers with some way.
Sami
|