|
Allegro primitives 5.0 - memory leak? |
cosbladego
Member #12,663
March 2011
|
My program draw simple primitive by al_draw_prim(...); function and sometimes one of vertices are crazy dancing :O is this memory leak in al_draw_prim() or something like that? Visual 2010, Code Generation MT, release 1allegro-5.0.0-monolith-mt.lib
2dumb-0.9.3-static-mt.lib
3freetype-2.4.4-static-mt.lib
4libFLAC-1.2.1-static-mt.lib
5libogg-1.2.1-static-mt.lib
6libvorbis-1.3.2-static-mt.lib
7libvorbisfile-1.3.2-static-mt.lib
8zlib-1.2.5-static-mt.lib
1ALLEGRO_VERTEX v[4];
2
3v[0].x = 20;
4v[1].x = 220;
5v[2].x = 220;
6v[3].x = 20;
7
8v[0].y = 20;
9v[1].y = 20;
10v[2].y = 120;
11v[3].y = 120;
12
13v[0].u = 0; v[0].v = 0;
14v[1].u = 0; v[1].v = 0;
15v[2].u = 0; v[2].v = 0;
16v[3].u = 0; v[3].v = 0;
17
18v[0].color = al_map_rgb(255,0,0);
19v[1].color = al_map_rgb(0,255,0);
20v[2].color = al_map_rgb(0,0,255);
21v[3].color = al_map_rgb(255,128,0);
22
23al_draw_prim( v, NULL, NULL, 0, 4, ALLEGRO_PRIM_TRIANGLE_FAN );
Another question is, how can I draw bitmap bigger than it is and repeat bitmap ( like a texture ). Is it only primitives way? |
Arthur Kalliokoski
Second in Command
February 2005
|
I don't see where you're setting the z values of the vertex in 3d space. They all watch too much MSNBC... they get ideas. |
cosbladego
Member #12,663
March 2011
|
Nice Mój błąd. Thanks. |
|