G
Guest User 1
Guest
I'm using primitives to draw the sides of an isometric cube. The documentation described a set of commands that made a rectangle. Thinking I understood this, I went and made the 3 polygons, but this didn't work. There is a corner missing from each polygon, and triangles appear to be being drawn on top of each-other.
Here is my code:
While a fixed version would be nice, I'd much rather have an explanation as to how Game Maker draws the triangles based on the points given.
Thanks for any help.
Here is my code:
Code:
draw_primitive_begin( pr_trianglestrip ) ;
draw_vertex_colour( 16 , 0 , $009900 , 1 ) ;
draw_vertex_colour( 32 , 8 , $009900 , 1 ) ;
draw_vertex_colour( 16 , 16 , $009900 , 1 ) ;
draw_vertex_colour( 0 , 8 , $009900 , 1 ) ;
draw_primitive_end() ;
draw_primitive_begin( pr_trianglestrip ) ;
draw_vertex_colour( 32 , 8 , $663300 , 1 ) ;
draw_vertex_colour( 32 , 24 , $663300 , 1 ) ;
draw_vertex_colour( 16 , 32 , $663300 , 1 ) ;
draw_vertex_colour( 16 , 16 , $663300 , 1 ) ;
draw_primitive_end() ;
draw_primitive_begin( pr_trianglestrip ) ;
draw_vertex_colour( 0 , 8 , $663300 , 0.8 ) ;
draw_vertex_colour( 16 , 16 , $663300 , 0.8 ) ;
draw_vertex_colour( 16 , 32 , $663300 , 0.8 ) ;
draw_vertex_colour( 0 , 24 , $663300 , 0.8 ) ;
draw_primitive_end() ;
Thanks for any help.