Original Post
Since I know next to nothing about OpenGL, would someone please explain what this is doing? The following is partial source code if from Free Space:
trail_calc_facing_pts( &topv, &botv, fvec, &pos, w );
g3_rotate_vertex( ⊤, &topv );
g3_rotate_vertex( ⊥, &botv );
top.a = bot.a = l;
vertex *vlist[4];
vlist[0] = &last_bot;
vlist[1] = ⊥
vlist[2] = ⊤
vlist[3] = &last_top;
vlist[0]->u = 0.0f; vlist[0]->v = 0.0f;
vlist[1]->u = 1.0f; vlist[1]->v = 0.0f;
vlist[2]->u = 1.0f; vlist[2]->v = 1.0f;
vlist[3]->u = 0.0f; vlist[3]->v = 1.0f;
gr_set_bitmap(ti->bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, l/255.0f );
if ( D3D_enabled ) {
g3_draw_poly( 4, vlist, TMAP_FLAG_TEXTURED|TMAP_FLAG_ALPHA|TMAP_FLAG_GOURAUD );
}
else
{
g3_draw_poly( 4, vlist, TMAP_FLAG_TEXTURED );
}
It looks similar to locking the vertex buffer in DirectX and manipulating the vertices; but I have no idea what "g3_rotate_vertex( ⊤, &topv );" is doing?
_______________________________________
Understanding is a three edged sword...